public interface HttpTemplateAutoWireSection extends AutoWireSection
HttpTemplate
.ENVIRONMENT_PROPERTIES_DIRECTORY
Modifier and Type | Method and Description |
---|---|
void |
addRenderRedirectHttpMethod(String renderRedirectHttpMethod)
Adds a HTTP method that will cause a redirect on rendering this
HttpTemplate . |
HttpTemplateAutoWireSectionExtension |
addTemplateExtension(Class<? extends HttpTemplateSectionExtension> extensionClass)
Adds an
HttpTemplateSectionExtension to this
HttpTemplateAutoWireSection . |
String[] |
getRenderRedirectHttpMethods()
Obtains the configured render redirect HTTP methods.
|
Map<String,Boolean> |
getSecureLinks()
Obtains an immutable
Map providing the overriding configuration
of whether a link requires a secure ServerHttpConnection . |
String |
getTemplateContentType()
Obtains the Content-Type for the template.
|
Class<?> |
getTemplateLogicClass()
Obtains the logic class for the template.
|
String |
getTemplatePath()
Obtains path to the template file.
|
String |
getTemplateUri()
Obtains the URI to the template.
|
String |
getTemplateUriSuffix()
Obtains the template URI suffix.
|
boolean |
isTemplateSecure()
Indicates whether a secure
ServerHttpConnection is required for
the template. |
void |
setLinkSecure(String linkName,
boolean isSecure)
Indicate whether a secure
ServerHttpConnection is required for
the link. |
void |
setTemplateContentType(String contentType)
Specifies the Content-Type for the template.
|
void |
setTemplateSecure(boolean isSecure)
Indicate whether a secure
ServerHttpConnection is required for
the template. |
void |
setTemplateUriSuffix(String uriSuffix)
Specifies the template URI suffix.
|
getSectionLocation, getSectionName, getSectionSourceClassName, getSuperSection, setSuperSection
getProperties, loadProperties
addProperty
String getTemplateUri()
String getTemplatePath()
Class<?> getTemplateLogicClass()
void setTemplateUriSuffix(String uriSuffix)
Specifies the template URI suffix.
This is appended to the template URI and link URIs. It is useful to provide a ".extension" to the template URIs.
uriSuffix
- Template URI suffix. May be null
to not have a
URI suffix.String getTemplateUriSuffix()
null
to not have a URI
suffix.void setTemplateContentType(String contentType)
Specifies the Content-Type for the template.
Note for text/*
values, the charset
parameter
will be respected in generating the template.
contentType
- Content-Type for the template.String getTemplateContentType()
null
to use
the default encoding.void setTemplateSecure(boolean isSecure)
Indicate whether a secure ServerHttpConnection
is required for
the template. This applies to:
HttpTemplateAutoWireSection
HttpTemplateAutoWireSection
response (a
redirect will be triggered if not appropriately secure)isSecure
- true
should the AutoWireSection
require a
secure ServerHttpConnection
.boolean isTemplateSecure()
ServerHttpConnection
is required for
the template.true
if a secure ServerHttpConnection
is
required for the template.void setLinkSecure(String linkName, boolean isSecure)
Indicate whether a secure ServerHttpConnection
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.
linkName
- Name of link to secure.isSecure
- true
should the link require a secure
ServerHttpConnection
.Map<String,Boolean> getSecureLinks()
Obtains an immutable Map
providing the overriding configuration
of whether a link requires a secure ServerHttpConnection
.
Links not contained in the returned Map
will default secure to
that of the template.
Map
of link to whether if requires a secure
ServerHttpConnection
.void addRenderRedirectHttpMethod(String renderRedirectHttpMethod)
Adds a HTTP method that will cause a redirect on rendering this
HttpTemplate
.
This allows specifying the HTTP methods that will follow the POST/redirect/GET pattern.
renderRedirectHttpMethod
- HTTP method.String[] getRenderRedirectHttpMethods()
HttpTemplateAutoWireSectionExtension addTemplateExtension(Class<? extends HttpTemplateSectionExtension> extensionClass)
HttpTemplateSectionExtension
to this
HttpTemplateAutoWireSection
.extensionClass
- Class of the HttpTemplateSectionExtension
.HttpTemplateAutoWireSectionExtension
.Copyright © 2005–2016. All rights reserved.