org.makumba.list.functions
Class GenericListValueFunction

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.makumba.analyser.AnalysableElement
          extended by org.makumba.analyser.AnalysableExpression
              extended by org.makumba.list.functions.GenericListValueFunction
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
ValueChangeFunctions, ValueFunction

public abstract class GenericListValueFunction
extends AnalysableExpression

Provides a basic implementation for a EL function that uses a ValueComputer to compute some value from an expression.

Version:
$Id: GenericListValueFunction.java 5117 2010-05-18 17:18:03Z rosso_nero $
Author:
Rudolf Mayer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement
AnalysableElement.FilePositionElementComparator
 
Field Summary
 
Fields inherited from class org.makumba.analyser.AnalysableExpression
elData, expression, key, parent
 
Fields inherited from class org.makumba.analyser.AnalysableElement
ANALYSIS_STATE
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GenericListValueFunction()
           
 
Method Summary
protected static MultipleKey computeKey(String expr, MultipleKey parentListKey)
          computes the key for this function from the expression and the key of the enclosing mak:list/object
 void doEndAnalyze(PageCache pageCache)
          Tells the ValueComputer to finish analysis.
protected  QueryTag getEnclosingList()
          Finds the enclosing mak:list/object
protected static MultipleKey getRunningListKey(PageContext pageContext)
          retrieve the key of the current mak:list from the stack of lists
protected static ValueComputer getValueComputer(String expr, PageContext pageContext, MultipleKey parentListKey)
          retrieve the value computer for the expression from the pageCache
protected  void registerValueAtParentList(PageCache pageCache, String expr, QueryTag parentList)
          Registers this function at the parent/enclosing mak:list/object.
 void setKey(PageCache pageCache)
           
 
Methods inherited from class org.makumba.analyser.AnalysableExpression
analyze, checkNumberOfArguments, findParentWithClass, getElementData, getKey, getParent, getPrefix, resolve, setELDataAtAnalysis, setParent, treatELExpressionAtAnalysis, treatExpressionAtAnalysis
 
Methods inherited from class org.makumba.analyser.AnalysableElement
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericListValueFunction

public GenericListValueFunction()
Method Detail

registerValueAtParentList

protected void registerValueAtParentList(PageCache pageCache,
                                         String expr,
                                         QueryTag parentList)
Registers this function at the parent/enclosing mak:list/object.


doEndAnalyze

public void doEndAnalyze(PageCache pageCache)
Tells the ValueComputer to finish analysis.

Specified by:
doEndAnalyze in class AnalysableExpression
Parameters:
pageCache - the page cache of the current page

getEnclosingList

protected QueryTag getEnclosingList()
Finds the enclosing mak:list/object


setKey

public void setKey(PageCache pageCache)
Specified by:
setKey in class AnalysableExpression

computeKey

protected static MultipleKey computeKey(String expr,
                                        MultipleKey parentListKey)
computes the key for this function from the expression and the key of the enclosing mak:list/object


getValueComputer

protected static ValueComputer getValueComputer(String expr,
                                                PageContext pageContext,
                                                MultipleKey parentListKey)
retrieve the value computer for the expression from the pageCache


getRunningListKey

protected static MultipleKey getRunningListKey(PageContext pageContext)
retrieve the key of the current mak:list from the stack of lists