info.magnolia.templating.jsp.cms
Class AbstractTag<C extends TemplatingElement>

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by info.magnolia.templating.jsp.cms.AbstractTag<C>
Type Parameters:
C - the templating element the tag is operating on
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
Direct Known Subclasses:
AreaTag, ComponentTag, InitTag

public abstract class AbstractTag<C extends TemplatingElement>
extends javax.servlet.jsp.tagext.SimpleTagSupport

Base class for jsp tags.

Version:
$Id$

Constructor Summary
AbstractTag()
           
 
Method Summary
protected  C createTemplatingElement()
           
protected  void doBody()
           
 void doTag()
           
protected  Class<C> getTemplatingElementClass()
           
protected  void initContentElement(AbstractContentTemplatingElement element)
          Init attributes common to all AbstractContentTemplatingElement.
protected  Map<String,Object> mandatoryMapConvertor(Object attrValue, String attributeName)
          Currently only support Map attrValue.
protected  Map<String,Object> mapConvertor(Object attrValue, String attributeName, boolean isMandatory)
          Currently only support Map attrValue.
protected abstract  void prepareTemplatingElement(C templatingElement)
          Implementations of this method should prepare the TemplatingElement with the known parameters.
 void setContent(Object content)
           
 void setPath(String path)
           
 void setUuid(String uuid)
           
 void setWorkspace(String workspace)
           
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTag

public AbstractTag()
Method Detail

setContent

@Attribute(required=false,
           rtexprvalue=true)
public void setContent(Object content)

setWorkspace

@Attribute(required=false,
           rtexprvalue=true)
public void setWorkspace(String workspace)

setUuid

@Attribute(required=false,
           rtexprvalue=true)
public void setUuid(String uuid)

setPath

@Attribute(required=false,
           rtexprvalue=true)
public void setPath(String path)

doTag

public void doTag()
           throws javax.servlet.jsp.JspException,
                  IOException
Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException
IOException

doBody

protected void doBody()
               throws javax.servlet.jsp.JspException,
                      IOException
Throws:
javax.servlet.jsp.JspException
IOException

prepareTemplatingElement

protected abstract void prepareTemplatingElement(C templatingElement)
                                          throws javax.servlet.jsp.JspException
Implementations of this method should prepare the TemplatingElement with the known parameters.

Throws:
javax.servlet.jsp.JspException

initContentElement

protected void initContentElement(AbstractContentTemplatingElement element)
Init attributes common to all AbstractContentTemplatingElement.


createTemplatingElement

protected C createTemplatingElement()

getTemplatingElementClass

protected Class<C> getTemplatingElementClass()

mapConvertor

protected Map<String,Object> mapConvertor(Object attrValue,
                                          String attributeName,
                                          boolean isMandatory)
                                   throws javax.servlet.jsp.JspException
Currently only support Map attrValue.

Throws:
javax.servlet.jsp.JspException

mandatoryMapConvertor

protected Map<String,Object> mandatoryMapConvertor(Object attrValue,
                                                   String attributeName)
                                            throws javax.servlet.jsp.JspException
Currently only support Map attrValue.

Throws:
javax.servlet.jsp.JspException


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.