Class CmsDecorationDefintion

java.lang.Object
org.opencms.jsp.decorator.CmsDecorationDefintion

public class CmsDecorationDefintion extends Object
This class defines text decoration to be made by the postprocessor.

Since:
6.1.3
  • Constructor Details

    • CmsDecorationDefintion

      Constructor, creates a new empty CmsDecorationDefintion.

    • CmsDecorationDefintion

      public CmsDecorationDefintion(String name, String preText, String postText, String preTextFirst, String postTextFirst, boolean markFrist, String configurationFile)
      Constructor, creates a new CmsDecorationDefintion with given values.

      Parameters:
      name - the name of the decoration defintinion
      preText - the preText to be used
      postText - the postText to be used
      preTextFirst - the preTextFirst to be used
      postTextFirst - the postTextFirst to be used
      markFrist - the flag to use different decorations for the first occurance
      configurationFile - the name of the configuration file
  • Method Details

    • getDecorationDefinitionNames

      Returns all different decoration configuration names (like "abbr" or "acronym") that are in the config file pointed to by module parameter "configfile".

      Parameters:
      cms - needed to access the decoration definition XML content
      Returns:
      all different decoration configuration names (like "abbr" or "acronym") that are in the config file pointed to by module parameter "configfile"
      Throws:
      CmsException - if sth goes wrong
    • createDecorationBundle

      Creates a CmsDecorationBundle of text decoration to be used by the decorator.

      Parameters:
      cms - the CmsObject
      locale - the locale to build the decoration bundle for. If no locale is given, a bundle of all locales is build
      Returns:
      CmsDecorationBundle including all decoration lists that match the locale
      Throws:
      CmsException - if something goes wrong
    • createDecorationBundle

      Creates a CmsDecorationBundle of text decoration to be used by the decorator based on a list of decoration maps.

      Parameters:
      decorationMaps - the decoration maps to build the bundle from
      locale - the locale to build the decoration bundle for. If no locale is given, a bundle of all locales is build
      Returns:
      CmsDecorationBundle including all decoration lists that match the locale
    • getConfigurationFile

      Returns the configurationFile.

      Returns:
      the configurationFile
    • getName

      public String getName()
      Returns the name.

      Returns:
      the name
    • getPostText

      public String getPostText()
      Returns the postText.

      Returns:
      the postText
    • getPostTextFirst

      Returns the postTextFirst.

      Returns:
      the postTextFirst
    • getPreText

      public String getPreText()
      Returns the preText.

      Returns:
      the preText
    • getPreTextFirst

      Returns the preTextFirst.

      Returns:
      the preTextFirst
    • isMarkFirst

      public boolean isMarkFirst()
      Returns the markFirst flag.

      Returns:
      the markFirst flag
    • setConfigurationFile

      public void setConfigurationFile(String configurationFile)
      Sets the configurationFile.

      Parameters:
      configurationFile - the configurationFile to set
    • setMarkFirst

      public void setMarkFirst(boolean markFirst)
      Sets the markFirst flag.

      Parameters:
      markFirst - the markFirst flag to set
    • setName

      public void setName(String name)
      Sets the name.

      Parameters:
      name - the name to set
    • setPostText

      public void setPostText(String postText)
      Sets the postText.

      Parameters:
      postText - the postText to set
    • setPostTextFirst

      public void setPostTextFirst(String postTextFirst)
      Sets the postTextFirst.

      Parameters:
      postTextFirst - the postTextFirst to set
    • setPreText

      public void setPreText(String preText)
      Sets the preText.

      Parameters:
      preText - the preText to set
    • setPreTextFirst

      public void setPreTextFirst(String preTextFirst)
      Sets the preTextFirst.

      Parameters:
      preTextFirst - the preTextFirst to set
    • toString

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