getURLTemplatesFactory(ServletContext servletContext) Gets the URLTemplatesFactory instance from a ServletContext attribute.
Parameters: servletContext - the current ServletContext.
getURLTemplatesFactory(ServletRequest servletRequest) Gets the URLTemplatesFactory instance from a ServletRequest attribute.
Parameters: servletRequest - the current ServletRequest.
load(ServletContext servletContext) Initialization method that parses the URL template config file to
get the URL templates and template reference groups.
public void
setConfigFilePath(String configFilePath) Allow clients to set their own URL template config file name/path.
public void
setKnownTokens(Collection knownTokens) Allow clients to define a set of known tokens for the
template verification.
public void
setRequiredTokens(Collection requiredTokens) Allow clients to define a set of required tokens for the
template verification.
Returns URL template name of the given type (by key) from the
desired reference group.
Parameters: refGroupName - name of a group of templates from the config file. Parameters: key - type of the template template name
Gets the URLTemplatesFactory instance from a ServletContext attribute.
Parameters: servletContext - the current ServletContext. the URLTemplatesFactory instance from the ServletContext.
Gets the URLTemplatesFactory instance from a ServletRequest attribute.
Parameters: servletRequest - the current ServletRequest. the URLTemplatesFactory instance from the ServletRequest.
Adds a given URLTemplatesFactory instance as an attribute on the ServletContext.
Parameters: servletContext - the current ServletContext. Parameters: templatesFactory - the URLTemplatesFactory instance to add as an attribute of the context
Adds a given URLTemplatesFactory instance as an attribute on the ServletRequest.
Parameters: servletRequest - the current ServletRequest. Parameters: templatesFactory - the URLTemplatesFactory instance to add as an attribute of the request
Initialization method that parses the URL template config file to
get the URL templates and template reference groups.
Parameters: servletContext - the current ServletContext.
setConfigFilePath
public void setConfigFilePath(String configFilePath)(Code)
Allow clients to set their own URL template config file name/path.
Parameters: configFilePath - An absolute path from the web app root to the URL template config file.
Allow clients to define a set of known tokens for the
template verification. Tokens are expected to be qualified
in braces. E.g. {url:path}
The template verification will ensure the known tokens in the
URL template conforms to a valid format.
Parameters: knownTokens - The set of known tokens for a valid template.