org.mmbase.bridge.jsp.taglib.functions
Class AbstractFunctionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended by org.mmbase.bridge.jsp.taglib.CloudReferrerTag
                  extended by org.mmbase.bridge.jsp.taglib.NodeReferrerTag
                      extended by org.mmbase.bridge.jsp.taglib.functions.AbstractFunctionTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally
Direct Known Subclasses:
BooleanFunctionTag, FunctionContainerTag, FunctionTag, HasFunctionTag, ListFunctionTag, NodeFunctionTag, NodeListFunctionTag, VoidFunctionTag

public abstract class AbstractFunctionTag
extends NodeReferrerTag

The function tags can be used as a child of a 'NodeProvider' tag (though posisbly not on clusternodes). It can also be used stand alone, when using the attributes to specify on which object the function must be called (besides nodes, it can be called on node-manager, modules, sets). This is the absctract implementation, providing only the result of the function. The several extensions cast to the right type, and handle it on a specific way.

Since:
MMBase-1.7
Version:
$Id: AbstractFunctionTag.java 35335 2009-05-21 08:14:41Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Attribute add
           
protected  Attribute container
           
protected  Attribute functionClass
           
protected  Attribute functionSet
           
protected  Attribute module
           
protected  Attribute name
           
protected  Attribute nodeManager
           
protected  Attribute parametersAttr
           
protected  Attribute referids
           
protected  Attribute remove
           
protected  Attribute retain
           
static String THISPAGE
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
parentNodeId
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
cloudId
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
AbstractFunctionTag()
           
 
Method Summary
protected  Function getFunction()
           
protected  Function getFunction(String functionName)
           
protected  Function getFunction(String functionName, boolean exception)
          Gets function object, and checks consistency of attributes.
protected  Object getFunctionValue()
           
protected  Object getFunctionValue(boolean register)
           
 void setAdd(String c)
           
 void setClassname(String c)
           
 void setContainer(String c)
           
 void setModule(String m)
           
 void setName(String n)
           
 void setNodemanager(String n)
           
 void setParameters(String p)
           
 void setReferids(String r)
           
 void setRemove(String c)
           
 void setRetain(String c)
           
 void setSet(String s)
           
protected
<C> Collection<C>
useCollectionMethods(Collection<C> col)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
doEndTag, doStartTag, fillStandardParameters, findNode, findNodeProvider, findNodeProvider, getCloudVar, getLocale, getNode, getNode, getNodeFromPageContext, initTag, setElement, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloudContext, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
appendMoreParameters, doCatch, doFinally, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

THISPAGE

public static final String THISPAGE
See Also:
Constant Field Values

container

protected Attribute container

name

protected Attribute name

parametersAttr

protected Attribute parametersAttr

module

protected Attribute module

nodeManager

protected Attribute nodeManager

functionSet

protected Attribute functionSet

functionClass

protected Attribute functionClass

referids

protected Attribute referids

add

protected Attribute add

retain

protected Attribute retain

remove

protected Attribute remove
Constructor Detail

AbstractFunctionTag

public AbstractFunctionTag()
Method Detail

setName

public void setName(String n)
             throws JspTagException
Throws:
JspTagException

setContainer

public void setContainer(String c)
                  throws JspTagException
Throws:
JspTagException

setParameters

public void setParameters(String p)
                   throws JspTagException
Throws:
JspTagException

setModule

public void setModule(String m)
               throws JspTagException
Throws:
JspTagException

setNodemanager

public void setNodemanager(String n)
                    throws JspTagException
Throws:
JspTagException

setSet

public void setSet(String s)
            throws JspTagException
Throws:
JspTagException

setClassname

public void setClassname(String c)
                  throws JspTagException
Throws:
JspTagException

setReferids

public void setReferids(String r)
                 throws JspTagException
Throws:
JspTagException

setAdd

public void setAdd(String c)
            throws JspTagException
Throws:
JspTagException

setRetain

public void setRetain(String c)
               throws JspTagException
Throws:
JspTagException

setRemove

public void setRemove(String c)
               throws JspTagException
Throws:
JspTagException

useCollectionMethods

protected <C> Collection<C> useCollectionMethods(Collection<C> col)
                                      throws JspTagException
Throws:
JspTagException

getFunction

protected final Function getFunction(String functionName)
                              throws JspTagException
Throws:
JspTagException

getFunction

protected final Function getFunction(String functionName,
                                     boolean exception)
                              throws JspTagException
Gets function object, and checks consistency of attributes.

Throws:
JspTagException

getFunction

protected final Function getFunction()
                              throws JspTagException
Throws:
JspTagException

getFunctionValue

protected final Object getFunctionValue()
                                 throws JspTagException
Throws:
JspTagException

getFunctionValue

protected final Object getFunctionValue(boolean register)
                                 throws JspTagException
Throws:
JspTagException


MMBase 2.0-SNAPSHOT - null