Package org.opencms.jsp.decorator
Class CmsDecorationDefintion
java.lang.Object
org.opencms.jsp.decorator.CmsDecorationDefintion
This class defines text decoration to be made by the postprocessor.
- Since:
- 6.1.3
-
Constructor Summary
ConstructorDescriptionConstructor, creates a new empty CmsDecorationDefintion.CmsDecorationDefintion
(String name, String preText, String postText, String preTextFirst, String postTextFirst, boolean markFrist, String configurationFile) Constructor, creates a new CmsDecorationDefintion with given values. -
Method Summary
Modifier and TypeMethodDescriptioncreateDecorationBundle
(List<CmsDecorationMap> decorationMaps, Locale locale) Creates a CmsDecorationBundle of text decoration to be used by the decorator based on a list of decoration maps.createDecorationBundle
(CmsObject cms, Locale locale) Creates a CmsDecorationBundle of text decoration to be used by the decorator.Returns the configurationFile.Returns all different decoration configuration names (like "abbr" or "acronym") that are in the config file pointed to by module parameter "configfile".getName()
Returns the name.Returns the postText.Returns the postTextFirst.Returns the preText.Returns the preTextFirst.boolean
Returns the markFirst flag.void
setConfigurationFile
(String configurationFile) Sets the configurationFile.void
setMarkFirst
(boolean markFirst) Sets the markFirst flag.void
Sets the name.void
setPostText
(String postText) Sets the postText.void
setPostTextFirst
(String postTextFirst) Sets the postTextFirst.void
setPreText
(String preText) Sets the preText.void
setPreTextFirst
(String preTextFirst) Sets the preTextFirst.toString()
-
Constructor Details
-
CmsDecorationDefintion
public 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 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 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 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(List<CmsDecorationMap> decorationMaps, 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
Returns the configurationFile.- Returns:
- the configurationFile
-
getName
Returns the name.- Returns:
- the name
-
getPostText
Returns the postText.- Returns:
- the postText
-
getPostTextFirst
Returns the postTextFirst.- Returns:
- the postTextFirst
-
getPreText
Returns the preText.- Returns:
- the preText
-
getPreTextFirst
Returns the preTextFirst.- Returns:
- the preTextFirst
-
isMarkFirst
Returns the markFirst flag.- Returns:
- the markFirst flag
-
setConfigurationFile
Sets the configurationFile.- Parameters:
configurationFile
- the configurationFile to set
-
setMarkFirst
Sets the markFirst flag.- Parameters:
markFirst
- the markFirst flag to set
-
setName
Sets the name.- Parameters:
name
- the name to set
-
setPostText
Sets the postText.- Parameters:
postText
- the postText to set
-
setPostTextFirst
Sets the postTextFirst.- Parameters:
postTextFirst
- the postTextFirst to set
-
setPreText
Sets the preText.- Parameters:
preText
- the preText to set
-
setPreTextFirst
Sets the preTextFirst.- Parameters:
preTextFirst
- the preTextFirst to set
-
toString
-