org.apache.shindig.gadgets.templates.tags
Class AbstractTagHandler
java.lang.Object
org.apache.shindig.gadgets.templates.tags.AbstractTagHandler
- All Implemented Interfaces:
- TagHandler
- Direct Known Subclasses:
- FlashTagHandler, HtmlTagHandler, IfTagHandler, RenderTagHandler, RepeatTagHandler, TemplateBasedTagHandler, VariableTagHandler
public abstract class AbstractTagHandler
- extends Object
- implements TagHandler
Abstract implementation of TagHandler, provides convenience methods
for resolving values in context.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.shindig.gadgets.templates.tags.TagHandler |
process |
AbstractTagHandler
public AbstractTagHandler(String namespaceUri,
String tagName)
- Create the tag handler instance.
- Parameters:
namespaceUri - the namespace of element this tag parses.tagName - the local name of the element this tag parses.
getTagName
public String getTagName()
- Specified by:
getTagName in interface TagHandler
- Returns:
- the local name of the element this tag parses.
getNamespaceUri
public String getNamespaceUri()
- Specified by:
getNamespaceUri in interface TagHandler
- Returns:
- the namespace of the element this tag parses.
getValueFromTag
protected final <T> T getValueFromTag(Element tag,
String name,
TemplateProcessor processor,
Class<T> type)
- Returns the value of a tag attribute, evaluating any contained EL
expressions if necessary.
- Type Parameters:
T - the type of the value- Parameters:
tag - the elementname - the attribute nameprocessor - the template processortype - the type of the value
- Returns:
- the value of the attribute, or null if the attribute is not
present.
processChildren
protected final DocumentFragment processChildren(Element tag,
TemplateProcessor processor)
appendTextNode
protected final void appendTextNode(Node parent,
String text)
- Create a text node with proper escaping.
Copyright © 2007-2012. All Rights Reserved.