Package org.opencms.jsp.decorator
Class CmsDecorationObject
- java.lang.Object
-
- org.opencms.jsp.decorator.CmsDecorationObject
-
public class CmsDecorationObject extends java.lang.Object
The CmsDecorationObject defines a single text decoration.It uses the information of a
to create the pre- and postfix for a text decoration.CmsDecorationDefintion
- Since:
- 6.1.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MACRO_DECORATION
Macro for the decoration.static java.lang.String
MACRO_DECORATIONKEY
Macro for the decoration key.static java.lang.String
MACRO_LANGUAGE
Macro for the language.static java.lang.String
MACRO_LOCALE
Macro for the locale.
-
Constructor Summary
Constructors Constructor Description CmsDecorationObject()
Constructor, creates a new, empty decoration object.CmsDecorationObject(java.lang.String decorationKey, java.lang.String decoration, CmsDecorationDefintion decDef, java.util.Locale locale)
Constructor, creates a new decoration object with given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContentDecoration(I_CmsDecoratorConfiguration config, java.lang.String text, java.lang.String contentLocale)
Gets the decorated content for this decoration object.java.lang.String
getDecoration()
Returns the decoration.CmsDecorationDefintion
getDecorationDefinition()
Returns the decorationDefinition.java.lang.String
getDecorationKey()
Returns the decorationKey.java.lang.String
toString()
-
-
-
Field Detail
-
MACRO_DECORATION
public static final java.lang.String MACRO_DECORATION
Macro for the decoration.- See Also:
- Constant Field Values
-
MACRO_DECORATIONKEY
public static final java.lang.String MACRO_DECORATIONKEY
Macro for the decoration key.- See Also:
- Constant Field Values
-
MACRO_LANGUAGE
public static final java.lang.String MACRO_LANGUAGE
Macro for the language.- See Also:
- Constant Field Values
-
MACRO_LOCALE
public static final java.lang.String MACRO_LOCALE
Macro for the locale.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsDecorationObject
public CmsDecorationObject()
Constructor, creates a new, empty decoration object.
-
CmsDecorationObject
public CmsDecorationObject(java.lang.String decorationKey, java.lang.String decoration, CmsDecorationDefintion decDef, java.util.Locale locale)
Constructor, creates a new decoration object with given values.- Parameters:
decorationKey
- the decoration keydecoration
- the decoration for this decoration keydecDef
- the decoration defintion to be usedlocale
- the locale of this decoration object
-
-
Method Detail
-
getContentDecoration
public java.lang.String getContentDecoration(I_CmsDecoratorConfiguration config, java.lang.String text, java.lang.String contentLocale)
Gets the decorated content for this decoration object.- Parameters:
config
- the configuration usedtext
- the text to be decoratedcontentLocale
- the locale of the content to be decorated- Returns:
- decorated content
-
getDecoration
public java.lang.String getDecoration()
Returns the decoration.- Returns:
- the decoration
-
getDecorationDefinition
public CmsDecorationDefintion getDecorationDefinition()
Returns the decorationDefinition.- Returns:
- the decorationDefinition
-
getDecorationKey
public java.lang.String getDecorationKey()
Returns the decorationKey.- Returns:
- the decorationKey
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-