org.apache.shindig.gadgets.rewrite
Class TemplateRewriter
java.lang.Object
org.apache.shindig.gadgets.rewrite.TemplateRewriter
- All Implemented Interfaces:
- GadgetRewriter
public class TemplateRewriter
- extends Object
- implements GadgetRewriter
This ContentRewriter uses a TemplateProcessor to replace os-template
tag contents of a gadget spec with their rendered equivalents.
Only templates without the @name and @tag attributes are processed
automatically.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAGS
public static final Set<String> TAGS
TEMPLATES_FEATURE_NAME
public static final String TEMPLATES_FEATURE_NAME
- See Also:
- Constant Field Values
OSML_FEATURE_NAME
public static final String OSML_FEATURE_NAME
- See Also:
- Constant Field Values
TemplateRewriter
@Inject
public TemplateRewriter(com.google.inject.Provider<TemplateProcessor> processor,
MessageBundleFactory messageBundleFactory,
Expressions expressions,
TagRegistry baseTagRegistry,
TemplateLibraryFactory libraryFactory,
ContainerTagLibraryFactory containerTags)
rewrite
public void rewrite(Gadget gadget,
MutableContent content)
throws RewritingException
- Description copied from interface:
GadgetRewriter
- Rewrite the gadget.
- Specified by:
rewrite in interface GadgetRewriter
- Parameters:
gadget - Gadget to rewrite.content - the content of the gadget to be manipulated.
- Throws:
RewritingException
Copyright © 2007-2012. All Rights Reserved.