org.opencms.jsp.decorator
Class CmsDecorationBundle

java.lang.Object
  extended by org.opencms.jsp.decorator.CmsDecorationBundle

public class CmsDecorationBundle
extends java.lang.Object

CmsDecorationBundle, contains a map of merged CmsDEcorationMaps.

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

A decoration bundle contains either all decoarions for one locale (similar to a resource bundle), or is locale independend. If its a locale independend bundle, the included locale is set to null.

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

Constructor Summary
CmsDecorationBundle()
          Constructor, creates a new, empty CmsDecorationBundle.
CmsDecorationBundle(java.util.Locale locale)
          Constructor, creates a new CmsDecorationBundle for a given locale.
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Gets an object from the decoration bundle.
 java.util.Map getAll()
          Gets the map of all decoarion bundle entries.
 java.util.Locale getLocale()
          Gets the locale of this decoration bundle.
 java.util.Set keySet()
          Gets the keyset of the decoration bundle map.
 void put(java.lang.Object key, java.lang.Object value)
          Stores an obiect in the decoration bundle.
 void putAll(java.util.Map map)
          Puts a complete map of objects into bundle.
 void setLocale(java.util.Locale locale)
          Sets the locale of the decoration bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsDecorationBundle

public CmsDecorationBundle()
Constructor, creates a new, empty CmsDecorationBundle.


CmsDecorationBundle

public CmsDecorationBundle(java.util.Locale locale)
Constructor, creates a new CmsDecorationBundle for a given locale.

Parameters:
locale - the locale of this bundle or null
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Gets an object from the decoration bundle.

Parameters:
key - the key of the object ot get
Returns:
the value matching the key or null.

getAll

public java.util.Map getAll()
Gets the map of all decoarion bundle entries.

Returns:
map of all decoarion bundle entries

getLocale

public java.util.Locale getLocale()
Gets the locale of this decoration bundle.

Returns:
locale of the decoration bundle

keySet

public java.util.Set keySet()
Gets the keyset of the decoration bundle map.

Returns:
keyset of the decoration bundle map

put

public void put(java.lang.Object key,
                java.lang.Object value)
Stores an obiect in the decoration bundle.

Parameters:
key - the key of the object to store
value - the value of the object to store

putAll

public void putAll(java.util.Map map)
Puts a complete map of objects into bundle.

Parameters:
map - the map to put into the bundle

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of the decoration bundle.

Parameters:
locale - the locale to set