Class CmsTemplateContext

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

public class CmsTemplateContext extends 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 Details

  • Method Details

    • getClientVariants

      Gets the map of client variants.

      Client variants are specialized variants of a template context which are only used by the container page editor for preview purposes.

      Returns:
      the client variants
    • getKey

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

      Returns:
      the internal name
    • getLocalizedName

      public String getLocalizedName(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

      Gets the message container for the user-readable name.

      Returns:
      the message container
    • getProvider

      Gets the template context provider which produced this template context.

      Returns:
      the template context provider
    • getTemplatePath

      Gets the path to the template.

      Returns:
      the path to the template
    • isForced

      public boolean isForced()
      Return true if the template context was not automatically determined.

      Returns:
      true if the template context was not automatically determined
    • toString

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