org.apache.shindig.gadgets.templates.tags
Class TemplateBasedTagHandler

java.lang.Object
  extended by org.apache.shindig.gadgets.templates.tags.AbstractTagHandler
      extended by org.apache.shindig.gadgets.templates.tags.TemplateBasedTagHandler
All Implemented Interfaces:
TagHandler

public class TemplateBasedTagHandler
extends AbstractTagHandler

TagHandler implemented by an declarative XML definition.


Field Summary
 
Fields inherited from interface org.apache.shindig.gadgets.templates.tags.TagHandler
OPENSOCIAL_NAMESPACE
 
Constructor Summary
TemplateBasedTagHandler(Element templateDefinition, String namespaceUri, String tagName)
           
 
Method Summary
protected  Map<String,Object> computeMy(Element tagInstance, Node processedContent, TemplateProcessor processor)
          Compute the value of ${My} for this tag execution.
 void process(Node result, Element tagInstance, TemplateProcessor processor)
          Processes the custom tag.
protected  void processTemplate(Node result, Element tagInstance, TemplateProcessor processor)
          Process the template content in the new EL state
 
Methods inherited from class org.apache.shindig.gadgets.templates.tags.AbstractTagHandler
appendTextNode, getNamespaceUri, getTagName, getValueFromTag, processChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateBasedTagHandler

public TemplateBasedTagHandler(Element templateDefinition,
                               String namespaceUri,
                               String tagName)
Method Detail

process

public void process(Node result,
                    Element tagInstance,
                    TemplateProcessor processor)
Description copied from interface: TagHandler
Processes the custom tag.

Parameters:
result - A Node to append output to.
tagInstance - The Element reference to the tag, useful for inspecting attributes and children
processor - A TemplateProcessor, used to evaluate expressions and render sub-templates if needed.

processTemplate

protected void processTemplate(Node result,
                               Element tagInstance,
                               TemplateProcessor processor)
Process the template content in the new EL state


computeMy

protected Map<String,Object> computeMy(Element tagInstance,
                                       Node processedContent,
                                       TemplateProcessor processor)
Compute the value of ${My} for this tag execution.



Copyright © 2007-2012. All Rights Reserved.