org.apache.beehive.netui.pageflow.internal
Class DefaultURLTemplatesFactory

Object
  extended by Factory
      extended by URLTemplatesFactory
          extended by DefaultURLTemplatesFactory
All Implemented Interfaces:
Serializable

public class DefaultURLTemplatesFactory
extends URLTemplatesFactory

Methods for configuring and retrieving the URLTemplate object.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class URLTemplatesFactory
_configFilePath, _knownTokens, _requiredTokens, ACTION_TEMPLATE, DEFAULT_TEMPLATE, DEFAULT_URL_TEMPLATE_CONFIG_FILE_PATH, RENDER_TEMPLATE, RESOURCE_TEMPLATE, SECURE_ACTION_TEMPLATE, SECURE_DEFAULT_TEMPLATE, SECURE_RENDER_TEMPLATE, SECURE_RESOURCE_TEMPLATE
 
Constructor Summary
DefaultURLTemplatesFactory()
           
 
Method Summary
 String getTemplateNameByRef(String refGroupName, String key)
          Returns URL template name of the given type (by key) from the desired reference group.
 URLTemplate getURLTemplate(String name)
          Returns URL template given the name of the template.
 void load(ServletContext servletContext)
          Initialization method that parses the URL template config file to get the URL templates and template reference groups.
 
Methods inherited from class URLTemplatesFactory
getURLTemplatesFactory, initServletContext, setConfigFilePath, setKnownTokens, setRequiredTokens
 
Methods inherited from class Factory
getConfig, getServletContext, onCreate, reinit
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultURLTemplatesFactory

public DefaultURLTemplatesFactory()
Method Detail

getURLTemplate

public URLTemplate getURLTemplate(String name)
Returns URL template given the name of the template.

Specified by:
getURLTemplate in class URLTemplatesFactory
Parameters:
name - name of the template
Returns:
template

getTemplateNameByRef

public String getTemplateNameByRef(String refGroupName,
                                   String key)
Returns URL template name of the given type (by key) from the desired reference group.

Specified by:
getTemplateNameByRef in class URLTemplatesFactory
Parameters:
refGroupName - name of a group of templates from the config file.
key - type of the template
Returns:
template name

load

public void load(ServletContext servletContext)
Initialization method that parses the URL template config file to get the URL templates and template reference groups.

Specified by:
load in class URLTemplatesFactory
Parameters:
servletContext - the current ServletContext.