org.opencms.jsp.decorator
Class CmsDecorationDefintion

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

public class CmsDecorationDefintion
extends java.lang.Object

This class defines text decoration to be made by the postprocessor.

Since:
6.1.3
Version:
$Revision: 1.10 $
Author:
Michael Emmerich

Constructor Summary
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.
 
Method Summary
 CmsDecorationBundle createDecorationBundle(CmsObject cms, java.util.Locale locale)
          Creates a CmsDecorationBundle of text decoration to be used by the decorator.
 CmsDecorationBundle createDecorationBundle(java.util.List decorationMaps, java.util.Locale locale)
          Creates a CmsDecorationBundle of text decoration to be used by the decorator based on a list of decoration maps.
 java.lang.String getConfigurationFile()
          Returns the configurationFile.
static java.util.List getDecorationDefinitionNames(CmsObject cms)
          Returns all different decoration configuration names (like "abbr" or "acronym") that are in the config file pointed to by module parameter "configfile".
 java.lang.String getName()
          Returns the name.
 java.lang.String getPostText()
          Returns the postText.
 java.lang.String getPostTextFirst()
          Returns the postTextFirst.
 java.lang.String getPreText()
          Returns the preText.
 java.lang.String getPreTextFirst()
          Returns the preTextFirst.
 boolean isMarkFirst()
          Returns the markFirst flag.
 void setConfigurationFile(java.lang.String configurationFile)
          Sets the configurationFile.
 void setMarkFirst(boolean markFirst)
          Sets the markFirst flag.
 void setName(java.lang.String name)
          Sets the name.
 void setPostText(java.lang.String postText)
          Sets the postText.
 void setPostTextFirst(java.lang.String postTextFirst)
          Sets the postTextFirst.
 void setPreText(java.lang.String preText)
          Sets the preText.
 void setPreTextFirst(java.lang.String preTextFirst)
          Sets the preTextFirst.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 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 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()