Interface WebTemplate
-
- All Superinterfaces:
PropertyConfigurable
- All Known Implementing Classes:
AbstractWebTemplate
public interface WebTemplate extends PropertyConfigurable
Web template.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebTemplateExtensionBuilder
addExtension(java.lang.String webTemplateExtensionClassName)
Adds aWebTemplateExtension
for thisWebTemplate
.WebTemplate
addGovernance(OfficeGovernance governance)
AddsGovernance
for thisWebTemplate
.WebTemplate
addRenderHttpMethod(java.lang.String httpMethodName)
Adds aHttpMethod
that will render theWebTemplate
.HttpSecurableBuilder
getHttpSecurer()
Obtains theHttpSecurableBuilder
to configure access controls to thisWebTemplate
.OfficeFlowSourceNode
getOutput(java.lang.String outputName)
Obtains theOfficeFlowSourceNode
from theWebTemplate
.OfficeFlowSinkNode
getRender(java.lang.String valuesTypeName)
Obtains theOfficeFlowSinkNode
to render theWebTemplate
.WebTemplate
setCharset(java.lang.String charsetName)
Allow overriding the defaultCharset
to render theWebTemplate
.WebTemplate
setContentType(java.lang.String contentType)
Specifies theContent-Type
output by thisWebTemplate
.WebTemplate
setLinkSecure(java.lang.String linkName, boolean isSecure)
Indicate whether a secure connection is required for the link.WebTemplate
setLinkSeparatorCharacter(char separator)
Allows overriding the default separator character between the path and link.WebTemplate
setLogicClass(java.lang.String logicClassName)
Specifies the logicClass
.WebTemplate
setRedirectValuesFunction(java.lang.String functionName)
Specifies theMethod
name on the logicClass
to provide the values for redirect path parameters to thisWebTemplate
.WebTemplate
setSuperTemplate(WebTemplate superTemplate)
Specifies the super (parent)WebTemplate
.-
Methods inherited from interface net.officefloor.compile.properties.PropertyConfigurable
addProperty
-
-
-
-
Method Detail
-
setLogicClass
WebTemplate setLogicClass(java.lang.String logicClassName)
Specifies the logicClass
.- Parameters:
logicClassName
- Name of the logicClass
.- Returns:
this
.
-
setRedirectValuesFunction
WebTemplate setRedirectValuesFunction(java.lang.String functionName)
Specifies the
Method
name on the logicClass
to provide the values for redirect path parameters to thisWebTemplate
. The returned type from theMethod
will be used to source values for parameters in constructing the path to thisWebTemplate
.Should the path to the template be static (i.e. has no path parameters), no
Method
need be specified.- Parameters:
functionName
- LogicClass
Method
name.- Returns:
this
.
-
setContentType
WebTemplate setContentType(java.lang.String contentType)
Specifies theContent-Type
output by thisWebTemplate
.- Parameters:
contentType
-Content-Type
output by thisWebTemplate
.- Returns:
this
.
-
setCharset
WebTemplate setCharset(java.lang.String charsetName)
Allow overriding the defaultCharset
to render theWebTemplate
.- Parameters:
charsetName
- Name ofCharset
to render theWebTemplate
.- Returns:
this
.
-
setLinkSeparatorCharacter
WebTemplate setLinkSeparatorCharacter(char separator)
Allows overriding the default separator character between the path and link.- Parameters:
separator
- Separator to use to separate path and link.- Returns:
this
.
-
setLinkSecure
WebTemplate setLinkSecure(java.lang.String linkName, boolean isSecure)
Indicate whether a secure connection is required for the link. This overrides the default template secure setting for the link.
Example use could be the landing page may be insecure but the login form submission link on the page is to be secure.
- Parameters:
linkName
- Name of link to secure.isSecure
-true
should the link require a secureServerHttpConnection
.- Returns:
this
.
-
getHttpSecurer
HttpSecurableBuilder getHttpSecurer()
Obtains the
HttpSecurableBuilder
to configure access controls to thisWebTemplate
.Calling this method without providing configuration requires only authentication to access the
WebTemplate
.- Returns:
HttpSecurableBuilder
.
-
addRenderHttpMethod
WebTemplate addRenderHttpMethod(java.lang.String httpMethodName)
Adds a
HttpMethod
that will render theWebTemplate
. Should theHttpMethod
not be in this list, a redirect will occur toHttpMethod.HttpMethodEnum.GET
.Note that
HttpMethod.HttpMethodEnum.GET
is added by default.- Parameters:
httpMethodName
- Name of theHttpMethod
that will render theWebTemplate
.- Returns:
this
.
-
setSuperTemplate
WebTemplate setSuperTemplate(WebTemplate superTemplate)
Specifies the super (parent)WebTemplate
.- Parameters:
superTemplate
- SuperWebTemplate
.- Returns:
this
.
-
addExtension
WebTemplateExtensionBuilder addExtension(java.lang.String webTemplateExtensionClassName)
Adds aWebTemplateExtension
for thisWebTemplate
.- Parameters:
webTemplateExtensionClassName
-WebTemplateExtension
Class
name.- Returns:
WebTemplateExtensionBuilder
to build theWebTemplateExtension
.
-
getRender
OfficeFlowSinkNode getRender(java.lang.String valuesTypeName)
Obtains theOfficeFlowSinkNode
to render theWebTemplate
.- Parameters:
valuesTypeName
- Name of type provided as a parameter to theOfficeFlowSinkNode
should the path parameters require being obtained. The type should provide a bean property for each path parameter for theWebTemplate
. May benull
if no path parameters are required.- Returns:
OfficeFlowSinkNode
to render theWebTemplate
.
-
getOutput
OfficeFlowSourceNode getOutput(java.lang.String outputName)
Obtains theOfficeFlowSourceNode
from theWebTemplate
.- Parameters:
outputName
-OfficeFlowSourceNode
name.- Returns:
OfficeFlowSourceNode
for the name.
-
addGovernance
WebTemplate addGovernance(OfficeGovernance governance)
Adds
Governance
for thisWebTemplate
.This enables providing
Governance
over allOfficeSectionFunction
instances within theWebTemplate
and all its subsequentOfficeSubSection
instances.- Parameters:
governance
-OfficeGovernance
.- Returns:
this
.
-
-