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 WebTemplateExtensionBuilderaddExtension(java.lang.String webTemplateExtensionClassName)Adds aWebTemplateExtensionfor thisWebTemplate.WebTemplateaddGovernance(OfficeGovernance governance)AddsGovernancefor thisWebTemplate.WebTemplateaddRenderHttpMethod(java.lang.String httpMethodName)Adds aHttpMethodthat will render theWebTemplate.HttpSecurableBuildergetHttpSecurer()Obtains theHttpSecurableBuilderto configure access controls to thisWebTemplate.OfficeFlowSourceNodegetOutput(java.lang.String outputName)Obtains theOfficeFlowSourceNodefrom theWebTemplate.OfficeFlowSinkNodegetRender(java.lang.String valuesTypeName)Obtains theOfficeFlowSinkNodeto render theWebTemplate.WebTemplatesetCharset(java.lang.String charsetName)Allow overriding the defaultCharsetto render theWebTemplate.WebTemplatesetContentType(java.lang.String contentType)Specifies theContent-Typeoutput by thisWebTemplate.WebTemplatesetLinkSecure(java.lang.String linkName, boolean isSecure)Indicate whether a secure connection is required for the link.WebTemplatesetLinkSeparatorCharacter(char separator)Allows overriding the default separator character between the path and link.WebTemplatesetLogicClass(java.lang.String logicClassName)Specifies the logicClass.WebTemplatesetRedirectValuesFunction(java.lang.String functionName)Specifies theMethodname on the logicClassto provide the values for redirect path parameters to thisWebTemplate.WebTemplatesetSuperTemplate(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
Methodname on the logicClassto provide the values for redirect path parameters to thisWebTemplate. The returned type from theMethodwill 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
Methodneed be specified.- Parameters:
functionName- LogicClassMethodname.- Returns:
this.
-
setContentType
WebTemplate setContentType(java.lang.String contentType)
Specifies theContent-Typeoutput by thisWebTemplate.- Parameters:
contentType-Content-Typeoutput by thisWebTemplate.- Returns:
this.
-
setCharset
WebTemplate setCharset(java.lang.String charsetName)
Allow overriding the defaultCharsetto render theWebTemplate.- Parameters:
charsetName- Name ofCharsetto 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-trueshould the link require a secureServerHttpConnection.- Returns:
this.
-
getHttpSecurer
HttpSecurableBuilder getHttpSecurer()
Obtains the
HttpSecurableBuilderto 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
HttpMethodthat will render theWebTemplate. Should theHttpMethodnot be in this list, a redirect will occur toHttpMethod.HttpMethodEnum.GET.Note that
HttpMethod.HttpMethodEnum.GETis added by default.- Parameters:
httpMethodName- Name of theHttpMethodthat 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 aWebTemplateExtensionfor thisWebTemplate.- Parameters:
webTemplateExtensionClassName-WebTemplateExtensionClassname.- Returns:
WebTemplateExtensionBuilderto build theWebTemplateExtension.
-
getRender
OfficeFlowSinkNode getRender(java.lang.String valuesTypeName)
Obtains theOfficeFlowSinkNodeto render theWebTemplate.- Parameters:
valuesTypeName- Name of type provided as a parameter to theOfficeFlowSinkNodeshould the path parameters require being obtained. The type should provide a bean property for each path parameter for theWebTemplate. May benullif no path parameters are required.- Returns:
OfficeFlowSinkNodeto render theWebTemplate.
-
getOutput
OfficeFlowSourceNode getOutput(java.lang.String outputName)
Obtains theOfficeFlowSourceNodefrom theWebTemplate.- Parameters:
outputName-OfficeFlowSourceNodename.- Returns:
OfficeFlowSourceNodefor the name.
-
addGovernance
WebTemplate addGovernance(OfficeGovernance governance)
Adds
Governancefor thisWebTemplate.This enables providing
Governanceover allOfficeSectionFunctioninstances within theWebTemplateand all its subsequentOfficeSubSectioninstances.- Parameters:
governance-OfficeGovernance.- Returns:
this.
-
-