org.apache.shindig.gadgets.templates
Class XmlTemplateLibrary
java.lang.Object
org.apache.shindig.gadgets.templates.XmlTemplateLibrary
- All Implemented Interfaces:
- TemplateLibrary
public class XmlTemplateLibrary
- extends Object
- implements TemplateLibrary
An Object representing a Library of Template-based custom OSML tags.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAG_ATTRIBUTE
public static final String TAG_ATTRIBUTE
- See Also:
- Constant Field Values
NAMESPACE_TAG
public static final String NAMESPACE_TAG
- See Also:
- Constant Field Values
TEMPLATE_TAG
public static final String TEMPLATE_TAG
- See Also:
- Constant Field Values
STYLE_TAG
public static final String STYLE_TAG
- See Also:
- Constant Field Values
JAVASCRIPT_TAG
public static final String JAVASCRIPT_TAG
- See Also:
- Constant Field Values
TEMPLATEDEF_TAG
public static final String TEMPLATEDEF_TAG
- See Also:
- Constant Field Values
XmlTemplateLibrary
public XmlTemplateLibrary(Uri uri,
Element root,
String source)
throws GadgetException
- Parameters:
uri - URI of the template libraryroot - Element representing the Templates tag of this library
- Throws:
GadgetException
XmlTemplateLibrary
public XmlTemplateLibrary(Uri uri,
Element root,
String source,
boolean safe)
throws GadgetException
- Parameters:
uri - URI of the template libraryroot - Element representing the Templates tag of this librarysafe - Is this library exempt from being sanitized?
- Throws:
GadgetException
getTagRegistry
public TagRegistry getTagRegistry()
- Specified by:
getTagRegistry in interface TemplateLibrary
- Returns:
- a registry of tags in this library.
getLibraryUri
public Uri getLibraryUri()
- Specified by:
getLibraryUri in interface TemplateLibrary
- Returns:
- the URI from which the library was loaded. (This is not the
namespace of tags in the library.)
isSafe
public boolean isSafe()
- Specified by:
isSafe in interface TemplateLibrary
- Returns:
- this library is safe and its content doesn't need to be sanitized.
serialize
public String serialize()
- Specified by:
serialize in interface TemplateLibrary
- Returns:
- This library as XML source.
createTagHandler
protected TagHandler createTagHandler(Element template,
String namespaceUri,
String localName)
- Creates a tag handler wrapping an element. By default, creates
a
TemplateBasedTagHandler. Override this to create custom
tag handlers.
Copyright © 2007-2012. All Rights Reserved.