baselookupvalue.java

来自「这是一个mvc模式」· Java 代码 · 共 63 行

JAVA
63
字号
package jsp.tags.dapact.lookup;

import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * Title:        Data Aware Processing And Control Tags
 * Description:  Tag library for the processing and controlling the input and output of data.
 * Copyright:    LGPL (http://www.gnu.org/copyleft/lesser.html)
 * Compile Date: @compile_date@
 * @author Allen M Servedio
 * @amp_sign@version @VERSION@
 */

/**
 * Base class for objects that want to lookup the values of attributes. To use it, you
 * should override this class, implement its abstract function(s) and register is in
 * the configuration file.
 *
 * <p>This is the abstract Strategy class that concrete classes have to implement in the
 * Strategy pattern. The client class is any class that calls
 * UserClassFactory.getFilterValueInstance() or UserClassFactory.getLookupValueInstance() method.</p>
 */
public abstract class BaseLookupValue
{
  /**
   * Default constructor.
   */
  public BaseLookupValue()
  {
  }

  /**
   * This function will be called by the tags when they want to lookup a string object
   * (most common case: storing attributes).
   *
   * @param key the key of the value to be saved.
   * @param value the value to be added - this will be overridden by what is returned by
   *   this function.
   * @param tag the tag that will be used to save the value.
   * @param pc the page context associated with the tag that is also a parameter. This
   *   will be used to search parameters and contexts (page, session, request, and servlet).
   *
   * @return the lookedup value.
   */
  public abstract String lookupValue(String key, String value, TagSupport tag, PageContext pc);

  /**
   * This function will be called by the tags when they want to lookup a general
   * non-String object.
   *
   * @param key the key of the value to be saved.
   * @param value the value to be added - this will be overridden by what is returned by
   *   this function.
   * @param tag the tag that will be used to save the value.
   * @param pc the page context associated with the tag that is also a parameter. This
   *   will be used to search parameters and contexts (page, session, request, and servlet).
   *
   * @return the lookedup value.
   */
  public abstract Object lookupValue(String key, Object value, TagSupport tag, PageContext pc);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?