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 void
flagAsNonRenderTemplateMethod(java.lang.String templateClassMethodName)
Flags that the method on the logic class should not have the template rendered to theHttpResponse
by default on its completion.SectionDependencyObjectNode
getDependency(java.lang.String qualifier, java.lang.String typeName)
Obtains or creates theSectionObject
for the type name.ClassSectionFlow
getFlow(java.lang.String name, java.lang.String argumentType)
Obtains or creates theSectionOutput
.ClassSectionManagedFunction
getFunction(java.lang.String functionName)
Obtains theSectionFunction
by the name.java.lang.Class<?>
getLogicClass()
Obtains the logic class for theWebTemplate
.SectionDesigner
getSectionDesigner()
Obtains theSectionDesigner
for theWebTemplate
being extended.SectionSourceContext
getSectionSourceContext()
Obtains theSectionSourceContext
for theWebTemplate
to be extended.java.lang.String
getTemplateContent()
Obtains the content of theWebTemplate
.SectionManagedObject
getTemplateLogicObject()
Obtains theSectionManagedObject
for the template logic object.void
setTemplateContent(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 theHttpResponse
by 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
SectionSourceContext
for theWebTemplate
to be extended.Please be aware that the returned
SectionSourceContext
does not filter the properties. Therefore please use the property methods on this interface to obtain the extension specific properties.- Returns:
SectionSourceContext
for theWebTemplate
to be extended.
-
getSectionDesigner
SectionDesigner getSectionDesigner()
Obtains theSectionDesigner
for theWebTemplate
being extended.- Returns:
SectionDesigner
for theWebTemplate
being extended.
-
getTemplateLogicObject
SectionManagedObject getTemplateLogicObject()
Obtains theSectionManagedObject
for the template logic object.- Returns:
SectionManagedObject
.
-
getFunction
ClassSectionManagedFunction getFunction(java.lang.String functionName)
Obtains theSectionFunction
by the name.- Parameters:
functionName
-SectionFunction
name.- Returns:
ClassSectionManagedFunction
ornull
if noSectionFunction
by name.
-
getDependency
SectionDependencyObjectNode getDependency(java.lang.String qualifier, java.lang.String typeName) throws java.lang.Exception
Obtains or creates theSectionObject
for 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
-SectionOutput
name.argumentType
- Argument type. May benull
if no argument.- Returns:
ClassSectionFlow
.
-
-