org.infoglue.deliver.taglib
Class AbstractTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.infoglue.deliver.taglib.AbstractTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
AbstractSortArgumentTag, CategoryWithNameTag, ContentParameterTag, ContentTag, ContentVersionAttributeParameterTag, ContentVersionParameterTag, ContentVersionTag, CropTextTag, DigitalAssetParameterTag, DigitalAssetsTag, DigitalAssetUrlTag, GroupsTag, RemoteInvokeWorkflowActionServiceTag, RemoteWorkflowServiceTag, RepositoryLanguagesTag, RolesTag, SizeTag, SlotsTag, SublistTag, TemplateControllerTag, URLParameterTag, UserPropertiesAttributeParameterTag, WorkflowTag, XSLTransformParameterTag

public abstract class AbstractTag
extends javax.servlet.jsp.tagext.TagSupport

Base class for all tags in the infoglue platform.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
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
protected AbstractTag()
          Default constructor.
 
Method Summary
protected  java.lang.Object evaluate(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression, java.lang.Class expectedType)
          Evaluates an expression if present, but does not allow the expression to evaluate to null.
protected  java.util.Collection evaluateCollection(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression)
          Evaluates the expression which must evaluate to a Collection.
protected  java.lang.Integer evaluateInteger(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression)
          Evaluates the expression which must evaluate to an Integer.
protected  java.util.List evaluateList(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression)
          Evaluates the expression which must evaluate to a List.
protected  java.lang.String evaluateString(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression)
          Evaluates the expression which must evaluate to a String.
protected  void produceResult(java.lang.Object value)
          Depending on wheter the id attribute is set, does one of the following: - stores the value in a page context variable (if the id attribute is set)
 void setId(java.lang.String id)
          TODO: remove, use var instead.
protected  void setResultAttribute(java.lang.Object value)
          Stores the value in the page context variable indicated by the id attribute.
protected  void write(java.lang.String text)
          Writes the specified text to the response stream.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTag

protected AbstractTag()
Default constructor.

Method Detail

setId

public void setId(java.lang.String id)
TODO: remove, use var instead. Sets the name of the page context variable to store the result in.

Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
id - the id to use.

setResultAttribute

protected void setResultAttribute(java.lang.Object value)
Stores the value in the page context variable indicated by the id attribute. If the value is null; the page context variable is removed instead.

Parameters:
value - the value to store.

produceResult

protected void produceResult(java.lang.Object value)
                      throws javax.servlet.jsp.JspTagException
Depending on wheter the id attribute is set, does one of the following: - stores the value in a page context variable (if the id attribute is set). - writes the value to the output stream.

Parameters:
value - the value.
Throws:
javax.servlet.jsp.JspTagException - if an exception occurs when storing/writing the value.

write

protected void write(java.lang.String text)
              throws javax.servlet.jsp.JspTagException
Writes the specified text to the response stream.

Parameters:
text - the text to write.
Throws:
javax.servlet.jsp.JspException - if an I/O error occurs.
javax.servlet.jsp.JspTagException

evaluate

protected java.lang.Object evaluate(java.lang.String tagName,
                                    java.lang.String attributeName,
                                    java.lang.String expression,
                                    java.lang.Class expectedType)
                             throws javax.servlet.jsp.JspException
Evaluates an expression if present, but does not allow the expression to evaluate to null.

Parameters:
tagName - the name of the tag.
attributeName - the name of the attribute to evaluate.
expression - the expression to evaluate.
expectedType - the expected type of the evaluated expression.
Returns:
the evaluated expression.
Throws:
javax.servlet.jsp.JspException - if an error occurs while evaluating the expression.

evaluateInteger

protected java.lang.Integer evaluateInteger(java.lang.String tagName,
                                            java.lang.String attributeName,
                                            java.lang.String expression)
                                     throws javax.servlet.jsp.JspException
Evaluates the expression which must evaluate to an Integer.

Parameters:
tagName - the name of the tag.
attributeName - the name of the attribute to evaluate.
expression - the expression to evaluate.
Returns:
the evaluated expression.
Throws:
javax.servlet.jsp.JspException - if an error occurs while evaluating the expression.

evaluateString

protected java.lang.String evaluateString(java.lang.String tagName,
                                          java.lang.String attributeName,
                                          java.lang.String expression)
                                   throws javax.servlet.jsp.JspException
Evaluates the expression which must evaluate to a String.

Parameters:
tagName - the name of the tag.
attributeName - the name of the attribute to evaluate.
expression - the expression to evaluate.
Returns:
the evaluated expression.
Throws:
javax.servlet.jsp.JspException - if an error occurs while evaluating the expression.

evaluateCollection

protected java.util.Collection evaluateCollection(java.lang.String tagName,
                                                  java.lang.String attributeName,
                                                  java.lang.String expression)
                                           throws javax.servlet.jsp.JspException
Evaluates the expression which must evaluate to a Collection.

Parameters:
tagName - the name of the tag.
attributeName - the name of the attribute to evaluate.
expression - the expression to evaluate.
Returns:
the evaluated expression.
Throws:
javax.servlet.jsp.JspException - if an error occurs while evaluating the expression.

evaluateList

protected java.util.List evaluateList(java.lang.String tagName,
                                      java.lang.String attributeName,
                                      java.lang.String expression)
                               throws javax.servlet.jsp.JspException
Evaluates the expression which must evaluate to a List.

Parameters:
tagName - the name of the tag.
attributeName - the name of the attribute to evaluate.
expression - the expression to evaluate.
Returns:
the evaluated expression.
Throws:
javax.servlet.jsp.JspException - if an error occurs while evaluating the expression.


Copyright © 2005 InfoGlue.org All Rights Reserved.