Class AbstractWebTemplate
- All Implemented Interfaces:
PropertyConfigurable,WebTemplate
WebTemplate.- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringApplication path for theWebTemplate.protected StringName of theCharset.protected StringContent-Typefor theWebTemplate.protected final booleanIndicates if theWebTemplateis secure.protected charLink separator character.protected StringName of the logicClassfor theWebTemplate.protected StringName ofMethodon the logicClassto return the values for path parameters in redirecting to thisWebTemplate.RenderHttpMethodnames.Secure links.protected AbstractWebTemplateSuperWebTemplate.protected final WebTemplateSectionSource -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWebTemplate(WebTemplateSectionSource webTemplateSectionSource, boolean isSecure, String applicationPath, PropertyList properties, SourceIssues sourceIssues) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionaddExtension(String webTemplateExtensionClassName) Adds aWebTemplateExtensionfor thisWebTemplate.voidaddProperty(String name, String value) Adds aPropertyto configure the item.addRenderHttpMethod(String httpMethodName) Adds aHttpMethodthat will render theWebTemplate.protected abstract PropertyListCreates a newPropertyList.Obtains the application path.Obtains theHttpSecurableBuilderto configure access controls to thisWebTemplate.Obtains theWebTemplateSectionSource.loadProperties(boolean isPathParameters) Loads the properties.setCharset(String charsetName) Allow overriding the defaultCharsetto render theWebTemplate.setContentType(String contentType) Specifies theContent-Typeoutput by thisWebTemplate.setLinkSecure(String linkName, boolean isSecure) Indicate whether a secure connection is required for the link.setLinkSeparatorCharacter(char separator) Allows overriding the default separator character between the path and link.setLogicClass(String logicClassName) Specifies the logicClass.setRedirectValuesFunction(String functionName) Specifies theMethodname on the logicClassto provide the values for redirect path parameters to thisWebTemplate.setSuperTemplate(WebTemplate superTemplate) Specifies the super (parent)WebTemplate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.web.template.build.WebTemplate
addGovernance, getOutput, getRender
-
Field Details
-
webTemplateSectionSource
-
isSecure
protected final boolean isSecureIndicates if theWebTemplateis secure. -
applicationPath
Application path for theWebTemplate. -
logicClassName
Name of the logicClassfor theWebTemplate. -
redirectValuesFunctionName
Name ofMethodon the logicClassto return the values for path parameters in redirecting to thisWebTemplate. -
secureLinks
Secure links. -
linkSeparatorCharacter
protected char linkSeparatorCharacterLink separator character. -
contentType
Content-Typefor theWebTemplate. -
charsetName
Name of theCharset. -
renderHttpMethodNames
RenderHttpMethodnames. -
superTemplate
SuperWebTemplate.
-
-
Constructor Details
-
AbstractWebTemplate
protected AbstractWebTemplate(WebTemplateSectionSource webTemplateSectionSource, boolean isSecure, String applicationPath, PropertyList properties, SourceIssues sourceIssues) Instantiate.- Parameters:
webTemplateSectionSource-WebTemplateSectionSourceinstance to use.isSecure- Indicates if requires secureServerHttpConnectionto render theWebTemplate.applicationPath- Application path for theWebTemplate.properties-PropertyList.sourceIssues-SourceIssues.
-
-
Method Details
-
createPropertyList
Creates a newPropertyList.- Returns:
- New
PropertyList.
-
getApplicationPath
Obtains the application path.- Returns:
- Application path.
-
getWebTemplateSectionSource
Obtains theWebTemplateSectionSource.- Returns:
WebTemplateSectionSource.
-
loadProperties
Loads the properties.- Parameters:
isPathParameters- Indicates if path parameters.- Returns:
PropertyList.
-
addProperty
Description copied from interface:PropertyConfigurableAdds aPropertyto configure the item.- Specified by:
addPropertyin interfacePropertyConfigurable- Parameters:
name- Name ofProperty.value- Value ofProperty.
-
setLogicClass
Description copied from interface:WebTemplateSpecifies the logicClass.- Specified by:
setLogicClassin interfaceWebTemplate- Parameters:
logicClassName- Name of the logicClass.- Returns:
this.
-
setRedirectValuesFunction
Description copied from interface:WebTemplateSpecifies 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.- Specified by:
setRedirectValuesFunctionin interfaceWebTemplate- Parameters:
functionName- LogicClassMethodname.- Returns:
this.
-
setContentType
Description copied from interface:WebTemplateSpecifies theContent-Typeoutput by thisWebTemplate.- Specified by:
setContentTypein interfaceWebTemplate- Parameters:
contentType-Content-Typeoutput by thisWebTemplate.- Returns:
this.
-
setCharset
Description copied from interface:WebTemplateAllow overriding the defaultCharsetto render theWebTemplate.- Specified by:
setCharsetin interfaceWebTemplate- Parameters:
charsetName- Name ofCharsetto render theWebTemplate.- Returns:
this.
-
setLinkSeparatorCharacter
Description copied from interface:WebTemplateAllows overriding the default separator character between the path and link.- Specified by:
setLinkSeparatorCharacterin interfaceWebTemplate- Parameters:
separator- Separator to use to separate path and link.- Returns:
this.
-
setLinkSecure
Description copied from interface:WebTemplateIndicate 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.
- Specified by:
setLinkSecurein interfaceWebTemplate- Parameters:
linkName- Name of link to secure.isSecure-trueshould the link require a secureServerHttpConnection.- Returns:
this.
-
getHttpSecurer
Description copied from interface:WebTemplateObtains the
HttpSecurableBuilderto configure access controls to thisWebTemplate.Calling this method without providing configuration requires only authentication to access the
WebTemplate.- Specified by:
getHttpSecurerin interfaceWebTemplate- Returns:
HttpSecurableBuilder.
-
addRenderHttpMethod
Description copied from interface:WebTemplateAdds 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.- Specified by:
addRenderHttpMethodin interfaceWebTemplate- Parameters:
httpMethodName- Name of theHttpMethodthat will render theWebTemplate.- Returns:
this.
-
setSuperTemplate
Description copied from interface:WebTemplateSpecifies the super (parent)WebTemplate.- Specified by:
setSuperTemplatein interfaceWebTemplate- Parameters:
superTemplate- SuperWebTemplate.- Returns:
this.
-
addExtension
Description copied from interface:WebTemplateAdds aWebTemplateExtensionfor thisWebTemplate.- Specified by:
addExtensionin interfaceWebTemplate- Parameters:
webTemplateExtensionClassName-WebTemplateExtensionClassname.- Returns:
WebTemplateExtensionBuilderto build theWebTemplateExtension.
-