org.opencms.loader
Class CmsTemplateContext

java.lang.Object
  extended by org.opencms.loader.CmsTemplateContext

public class CmsTemplateContext
extends java.lang.Object

A template context is basically a named path to a template JSP, which has both an internal name used as a key, and a user-readable, localizable name. It also has a reference to the template context provider which produced it.


Constructor Summary
CmsTemplateContext(java.lang.String key, java.lang.String path, CmsMessageContainer container, I_CmsTemplateContextProvider provider)
          Constructor.
 
Method Summary
 java.lang.String getKey()
          Gets the internal name used as a key.
 java.lang.String getLocalizedName(java.util.Locale locale)
          Gets the localized name for a given locale.
 CmsMessageContainer getMessageContainer()
          Gets the message container for the user-readable name.
 I_CmsTemplateContextProvider getProvider()
          Gets the template context provider which produced this template context.
 java.lang.String getTemplatePath()
          Gets the path to the template.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsTemplateContext

public CmsTemplateContext(java.lang.String key,
                          java.lang.String path,
                          CmsMessageContainer container,
                          I_CmsTemplateContextProvider provider)
Constructor.

Parameters:
key - the internal name
path - the template path
container - the message container for the name
provider - the template context provider
Method Detail

getKey

public java.lang.String getKey()
Gets the internal name used as a key.

Returns:
the internal name

getLocalizedName

public java.lang.String getLocalizedName(java.util.Locale locale)
Gets the localized name for a given locale.

Parameters:
locale - the locale for which we want the name
Returns:
the localized name

getMessageContainer

public CmsMessageContainer getMessageContainer()
Gets the message container for the user-readable name.

Returns:
the message container

getProvider

public I_CmsTemplateContextProvider getProvider()
Gets the template context provider which produced this template context.

Returns:
the template context provider

getTemplatePath

public java.lang.String getTemplatePath()
Gets the path to the template.

Returns:
the path to the template

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()