Class CmsDecorationDefintion


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

    Since:
    6.1.3
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsDecorationDefintion()
      Constructor, creates a new empty CmsDecorationDefintion.
      CmsDecorationDefintion​(java.lang.String name, java.lang.String preText, java.lang.String postText, java.lang.String preTextFirst, java.lang.String postTextFirst, boolean markFrist, java.lang.String configurationFile)
      Constructor, creates a new CmsDecorationDefintion with given values.
    • Constructor Detail

      • CmsDecorationDefintion

        public CmsDecorationDefintion()
        Constructor, creates a new empty CmsDecorationDefintion.

      • CmsDecorationDefintion

        public CmsDecorationDefintion​(java.lang.String name,
                                      java.lang.String preText,
                                      java.lang.String postText,
                                      java.lang.String preTextFirst,
                                      java.lang.String postTextFirst,
                                      boolean markFrist,
                                      java.lang.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 Detail

      • getDecorationDefinitionNames

        public static java.util.List<java.lang.String> getDecorationDefinitionNames​(CmsObject cms)
                                                                             throws CmsException
        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

        public CmsDecorationBundle createDecorationBundle​(CmsObject cms,
                                                          java.util.Locale locale)
                                                   throws CmsException
        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

        public CmsDecorationBundle createDecorationBundle​(java.util.List<CmsDecorationMap> decorationMaps,
                                                          java.util.Locale locale)
        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

        public java.lang.String getConfigurationFile()
        Returns the configurationFile.

        Returns:
        the configurationFile
      • getName

        public java.lang.String getName()
        Returns the name.

        Returns:
        the name
      • getPostText

        public java.lang.String getPostText()
        Returns the postText.

        Returns:
        the postText
      • getPostTextFirst

        public java.lang.String getPostTextFirst()
        Returns the postTextFirst.

        Returns:
        the postTextFirst
      • getPreText

        public java.lang.String getPreText()
        Returns the preText.

        Returns:
        the preText
      • getPreTextFirst

        public java.lang.String getPreTextFirst()
        Returns the preTextFirst.

        Returns:
        the preTextFirst
      • isMarkFirst

        public boolean isMarkFirst()
        Returns the markFirst flag.

        Returns:
        the markFirst flag
      • setConfigurationFile

        public void setConfigurationFile​(java.lang.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​(java.lang.String name)
        Sets the name.

        Parameters:
        name - the name to set
      • setPostText

        public void setPostText​(java.lang.String postText)
        Sets the postText.

        Parameters:
        postText - the postText to set
      • setPostTextFirst

        public void setPostTextFirst​(java.lang.String postTextFirst)
        Sets the postTextFirst.

        Parameters:
        postTextFirst - the postTextFirst to set
      • setPreText

        public void setPreText​(java.lang.String preText)
        Sets the preText.

        Parameters:
        preText - the preText to set
      • setPreTextFirst

        public void setPreTextFirst​(java.lang.String preTextFirst)
        Sets the preTextFirst.

        Parameters:
        preTextFirst - the preTextFirst to set
      • toString

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