org.makumba.list.functions
Class CountFunctions

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.CountFunctions
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class CountFunctions
extends AnalysableExpression

Represents all types of mak:count() functions, and does analysis on them.
FIXME: maybe QueryTag.count() and others should move here.

Version:
$Id: CountFunctions.java 4995 2010-05-10 12:10:36Z 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
CountFunctions()
           
 
Method Summary
 void analyze(PageCache pageCache)
          Performs analysis-time operations
 void doEndAnalyze(PageCache pageCache)
           
 String getPrefix()
          Gets the prefix of the makumba EL expression, e.g.
 Object resolve(PageContext pc, PageCache pageCache)
          Resolves the expression at runtime
 void setKey(PageCache pageCache)
           
 String treatExpressionAtAnalysis(String expression)
          Modifies the expression before analysis.
 
Methods inherited from class org.makumba.analyser.AnalysableExpression
checkNumberOfArguments, findParentWithClass, getElementData, getKey, getParent, setELDataAtAnalysis, setParent, treatELExpressionAtAnalysis
 
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

CountFunctions

public CountFunctions()
Method Detail

analyze

public void analyze(PageCache pageCache)
Description copied from class: AnalysableExpression
Performs analysis-time operations

Specified by:
analyze in class AnalysableExpression

doEndAnalyze

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

getPrefix

public String getPrefix()
Description copied from class: AnalysableExpression
Gets the prefix of the makumba EL expression, e.g. Value

Specified by:
getPrefix in class AnalysableExpression
Returns:
the prefix of this EL expression

resolve

public Object resolve(PageContext pc,
                      PageCache pageCache)
               throws LogicException
Description copied from class: AnalysableExpression
Resolves the expression at runtime

Specified by:
resolve in class AnalysableExpression
Throws:
LogicException

setKey

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

treatExpressionAtAnalysis

public String treatExpressionAtAnalysis(String expression)
Description copied from class: AnalysableExpression
Modifies the expression before analysis. This is necessary because the expression that comes from page analysis is not tailored to the specific expression we want to handle

Specified by:
treatExpressionAtAnalysis in class AnalysableExpression
Returns:
the expression value, trimmed down to what is necessary for this kind of EL expression evaluator