org.apache.cocoon.taglib
Class VarTagSupport

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.taglib.TagSupport
          extended by org.apache.cocoon.taglib.VarTagSupport
All Implemented Interfaces:
Poolable, Recyclable, Component, LogEnabled, Serviceable, Tag
Direct Known Subclasses:
LoopTagSupport, MonthsTag, VarTransformerTagSupport, VarXMLProducerTagSupport, XMLConsumerTagSupport

public abstract class VarTagSupport
extends TagSupport
implements Serviceable

Add support for setting and getting variables

Version:
CVS $Id: VarTagSupport.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Volker Schmitt

Field Summary
protected  ServiceManager manager
           
protected  String var
           
 
Fields inherited from class org.apache.cocoon.taglib.TagSupport
objectModel, parameters, parent, resolver
 
Fields inherited from interface org.apache.cocoon.taglib.Tag
EVAL_BODY, EVAL_PAGE, ROLE, SKIP_BODY
 
Constructor Summary
VarTagSupport()
           
 
Method Summary
protected  Request getRequest()
           
 String getVar()
          Get the attribute to store the result in.
protected  Object getVariable(String name)
           
 void recycle()
           
protected  void removeVariable(String name)
           
 void service(ServiceManager manager)
           
 void setVar(String var)
          Set the attribute to store the result in.
protected  void setVariable(String name, Object value)
          Register the name and object specified.
 
Methods inherited from class org.apache.cocoon.taglib.TagSupport
doEndTag, doStartTag, findAncestorWithClass, findAttribute, getParent, setParent, setup
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

var

protected String var

manager

protected ServiceManager manager
Constructor Detail

VarTagSupport

public VarTagSupport()
Method Detail

getVar

public final String getVar()
Get the attribute to store the result in.


setVar

public final void setVar(String var)
Set the attribute to store the result in.


getRequest

protected final Request getRequest()

getVariable

protected final Object getVariable(String name)

setVariable

protected final void setVariable(String name,
                                 Object value)
Register the name and object specified.

Parameters:
name - the name of the attribute to set
value - the object to associate with the name

removeVariable

protected final void removeVariable(String name)

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

recycle

public void recycle()
Specified by:
recycle in interface Recyclable
Overrides:
recycle in class TagSupport


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.