Package org.opencms.jsp.decorator
Class CmsDecorationDefintion
- java.lang.Object
-
- 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
-
-
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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.CmsDecorationBundle
createDecorationBundle(CmsObject cms, java.util.Locale locale)
Creates a CmsDecorationBundle of text decoration to be used by the decorator.java.lang.String
getConfigurationFile()
Returns the configurationFile.static java.util.List<java.lang.String>
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()
-
-
-
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 defintinionpreText
- the preText to be usedpostText
- the postText to be usedpreTextFirst
- the preTextFirst to be usedpostTextFirst
- the postTextFirst to be usedmarkFrist
- the flag to use different decorations for the first occuranceconfigurationFile
- 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 CmsObjectlocale
- 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 fromlocale
- 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 classjava.lang.Object
- See Also:
Object.toString()
-
-