com.opencms.template.cache
Class CmsElementDefinitionCollection

java.lang.Object
  |
  +--com.opencms.template.cache.CmsElementDefinitionCollection

public class CmsElementDefinitionCollection
extends Object

Used to collect a set of element definitions. Two CmsElementDefinitionCollections can be merged using the join constructor.

Author:
Alexander Lucas

Constructor Summary
CmsElementDefinitionCollection()
          Default constructor
CmsElementDefinitionCollection(CmsElementDefinitionCollection primary, CmsElementDefinitionCollection secondary)
          Join cunstructor.
 
Method Summary
 void add(CmsElementDefinition def)
          Add a definition to the collection.
 CmsElementDefinition get(String name)
          Geta definition from the collection.
 Enumeration getAllElementNames()
           
 String toString()
          Get a string representation of this collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsElementDefinitionCollection

public CmsElementDefinitionCollection()
Default constructor


CmsElementDefinitionCollection

public CmsElementDefinitionCollection(CmsElementDefinitionCollection primary,
                                      CmsElementDefinitionCollection secondary)
Join cunstructor. Two CmsElementDefinitionCollections can be merged using this constructor. If a definition is defined in both source collections the single parts of this definitions will be merged. If a part of a definition is defined twice, the collection primary will be preferred.

Parameters:
primary - Source CmsElementDefinitionCollection
secondary - Source CmsElementDefinitionCollection
Method Detail

add

public void add(CmsElementDefinition def)
Add a definition to the collection.

Parameters:
def - CmsElementDefinition that should be added

get

public CmsElementDefinition get(String name)
Geta definition from the collection.

Parameters:
name - Name of the element definition requested
Returns:
CmsElementDefinition for name or null, if not defined.

getAllElementNames

public Enumeration getAllElementNames()
Returns:
a Enumeration with the element names

toString

public String toString()
Get a string representation of this collection.

Overrides:
toString in class Object
Returns:
String representation.