Interface WebTemplateExtensionContext
-
- All Superinterfaces:
SourceProperties
public interface WebTemplateExtensionContext extends SourceProperties
Context for theWebTemplateExtension.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidflagAsNonRenderTemplateMethod(java.lang.String templateClassMethodName)Flags that the method on the logic class should not have the template rendered to theHttpResponseby default on its completion.SectionDependencyObjectNodegetDependency(java.lang.String qualifier, java.lang.String typeName)Obtains or creates theSectionObjectfor the type name.ClassSectionFlowgetFlow(java.lang.String name, java.lang.String argumentType)Obtains or creates theSectionOutput.ClassSectionManagedFunctiongetFunction(java.lang.String functionName)Obtains theSectionFunctionby the name.java.lang.Class<?>getLogicClass()Obtains the logic class for theWebTemplate.SectionDesignergetSectionDesigner()Obtains theSectionDesignerfor theWebTemplatebeing extended.SectionSourceContextgetSectionSourceContext()Obtains theSectionSourceContextfor theWebTemplateto be extended.java.lang.StringgetTemplateContent()Obtains the content of theWebTemplate.SectionManagedObjectgetTemplateLogicObject()Obtains theSectionManagedObjectfor the template logic object.voidsetTemplateContent(java.lang.String templateContent)Enables overriding the content of the template.-
Methods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
-
-
-
Method Detail
-
getTemplateContent
java.lang.String getTemplateContent()
Obtains the content of theWebTemplate.- Returns:
- Content of the
WebTemplate.
-
setTemplateContent
void setTemplateContent(java.lang.String templateContent)
Enables overriding the content of the template.
This need not be called, however is available should the extension wish to change the template content.
- Parameters:
templateContent- Content of the template.
-
getLogicClass
java.lang.Class<?> getLogicClass()
Obtains the logic class for theWebTemplate.- Returns:
- Logic class for the
WebTemplate.
-
flagAsNonRenderTemplateMethod
void flagAsNonRenderTemplateMethod(java.lang.String templateClassMethodName)
Flags that the method on the logic class should not have the template rendered to theHttpResponseby default on its completion.- Parameters:
templateClassMethodName- Name of the method on the template class to be flagged to not have template rendered on its completion.
-
getSectionSourceContext
SectionSourceContext getSectionSourceContext()
Obtains the
SectionSourceContextfor theWebTemplateto be extended.Please be aware that the returned
SectionSourceContextdoes not filter the properties. Therefore please use the property methods on this interface to obtain the extension specific properties.- Returns:
SectionSourceContextfor theWebTemplateto be extended.
-
getSectionDesigner
SectionDesigner getSectionDesigner()
Obtains theSectionDesignerfor theWebTemplatebeing extended.- Returns:
SectionDesignerfor theWebTemplatebeing extended.
-
getTemplateLogicObject
SectionManagedObject getTemplateLogicObject()
Obtains theSectionManagedObjectfor the template logic object.- Returns:
SectionManagedObject.
-
getFunction
ClassSectionManagedFunction getFunction(java.lang.String functionName)
Obtains theSectionFunctionby the name.- Parameters:
functionName-SectionFunctionname.- Returns:
ClassSectionManagedFunctionornullif noSectionFunctionby name.
-
getDependency
SectionDependencyObjectNode getDependency(java.lang.String qualifier, java.lang.String typeName) throws java.lang.Exception
Obtains or creates theSectionObjectfor the type name.- Parameters:
qualifier- Qualifier. May benull.typeName- Type name.- Returns:
SectionDependencyObjectNode.- Throws:
java.lang.Exception- If fails to obtain dependency.
-
getFlow
ClassSectionFlow getFlow(java.lang.String name, java.lang.String argumentType)
Obtains or creates theSectionOutput.- Parameters:
name-SectionOutputname.argumentType- Argument type. May benullif no argument.- Returns:
ClassSectionFlow.
-
-