org.opencms.jsp.decorator
Class CmsDecorationMap

java.lang.Object
  extended by org.opencms.jsp.decorator.CmsDecorationMap
All Implemented Interfaces:
java.lang.Comparable<CmsDecorationMap>

public class CmsDecorationMap
extends java.lang.Object
implements java.lang.Comparable<CmsDecorationMap>

The CmsDecorationMap is the object representation of a single decoartion file.

The semicolon seperated elements of the decoartion file are stored in a map.

The map uses the decoration as keys and CmsDecorationObjects as values.

Multiple CmsDecorationMaps form a CmsDecorationBundle.

Since:
6.1.3

Field Summary
static java.lang.String CSV_SEPERATOR
          The seperator for the CSV file.
 
Constructor Summary
CmsDecorationMap(CmsDecorationDefintion decDef, java.lang.String name, java.util.Locale locale)
          Constructor, creates a new, empty CmsDecorationMap.
CmsDecorationMap(CmsObject cms, CmsResource res, CmsDecorationDefintion decDef)
          Constructor, creates a new CmsDecorationMap.
 
Method Summary
 int compareTo(CmsDecorationMap o)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,CmsDecorationObject> getDecorationMap()
          Returns the decorationMap.
 java.util.Locale getLocale()
          Returns the locale.
 java.lang.String getName()
          Returns the name.
 int hashCode()
           
 void setDecorationMap(java.util.Map<java.lang.String,CmsDecorationObject> decorationMap)
          Sets the decorationMap.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CSV_SEPERATOR

public static final java.lang.String CSV_SEPERATOR
The seperator for the CSV file.

See Also:
Constant Field Values
Constructor Detail

CmsDecorationMap

public CmsDecorationMap(CmsDecorationDefintion decDef,
                        java.lang.String name,
                        java.util.Locale locale)
Constructor, creates a new, empty CmsDecorationMap.

Parameters:
decDef - the CmsDecorationDefintion to be used in this decoration map
name - The name of the decoration map
locale - the locale for this decoration map

CmsDecorationMap

public CmsDecorationMap(CmsObject cms,
                        CmsResource res,
                        CmsDecorationDefintion decDef)
                 throws CmsException
Constructor, creates a new CmsDecorationMap.

Parameters:
cms - the CmsObject
res - the resource to extrace the decorations from
decDef - the CmsDecorationDefintion to be used in this decoration map
Throws:
CmsException - if something goes wrong
Method Detail

compareTo

public int compareTo(CmsDecorationMap o)
Specified by:
compareTo in interface java.lang.Comparable<CmsDecorationMap>
See Also:
Comparable.compareTo(java.lang.Object)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getDecorationMap

public java.util.Map<java.lang.String,CmsDecorationObject> getDecorationMap()
Returns the decorationMap.

Returns:
the decorationMap

getLocale

public java.util.Locale getLocale()
Returns the locale.

Returns:
the locale

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

setDecorationMap

public void setDecorationMap(java.util.Map<java.lang.String,CmsDecorationObject> decorationMap)
Sets the decorationMap.

Parameters:
decorationMap - the decorationMap to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()