org.opencms.jsp.decorator
Class CmsDecorationObject

java.lang.Object
  extended by 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 CmsDecorationDefintion to create the pre- and postfix for a text decoration.

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

Field Summary
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
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
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 key
decoration - the decoration for this decoration key
decDef - the decoration defintion to be used
locale - 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 used
text - the text to be decorated
contentLocale - 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 class java.lang.Object
See Also:
Object.toString()