com.opencms.template.cache
Class CmsElementDefinition

java.lang.Object
  |
  +--com.opencms.template.cache.CmsElementDefinition
All Implemented Interfaces:
Cloneable

public class CmsElementDefinition
extends Object
implements Cloneable

An instance of CmsElementDefinitions represents an "pointer" to other elements. This pointers are stored in CmsElement's. An ElementDfinitions stores information about an element, like the name, className, templateName and parameters for the pointed element.

Author:
Andreas Schouten, Alexander Lucas

Constructor Summary
CmsElementDefinition(CmsElementDefinition primary, CmsElementDefinition secondary)
          Join constructor.
CmsElementDefinition(String name, String className, String templateName)
          The constructor with name, classname and templateName.
CmsElementDefinition(String name, String className, String templateName, String templateSelector)
          The constructor without any parameters.
CmsElementDefinition(String name, String className, String templateName, String templateSelector, Hashtable elements)
          The complete constructor.
 
Method Summary
 String getClassName()
          Get the class name for the element defined.
 CmsElementDescriptor getDescriptor()
          Get an element descriptor for looking up the corresponding element of this definition using the element locator
 String getName()
          Get the name of the element defined.
 String getTemplateName()
          Get the template name for the element defined.
 String getTemplateSelector()
          Get the templateSelector of the element defined.
 void joinParameters(Hashtable parameter)
          This method adds the parameter from the elementDefinition to the requestParameters.
 String toString()
          Get a string representation of this definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsElementDefinition

public CmsElementDefinition(String name,
                            String className,
                            String templateName)
The constructor with name, classname and templateName. This fits for some default - needs.

Parameters:
name - the name of this element-definition.
className - the classname of this element-definition.
templateName - the name of the template for this element-definition.

CmsElementDefinition

public CmsElementDefinition(String name,
                            String className,
                            String templateName,
                            String templateSelector)
The constructor without any parameters. This fits for some needs.

Parameters:
name - the name of this element-definition.
className - the classname of this element-definition.
templateName - the name of the template.
templateSelector - the name of the template selector.

CmsElementDefinition

public CmsElementDefinition(String name,
                            String className,
                            String templateName,
                            String templateSelector,
                            Hashtable elements)
The complete constructor.

Parameters:
name - the name of this element-definition.
className - the classname of this element-definition.
templateName - the name of the template.
templateSelector - the name of the template selector.
elements - a hashtable with parameters.

CmsElementDefinition

public CmsElementDefinition(CmsElementDefinition primary,
                            CmsElementDefinition secondary)
Join constructor.

Parameters:
primary - Original object 1 with primary rights
secondary - Original object 2 with primary rights
Method Detail

getDescriptor

public CmsElementDescriptor getDescriptor()
Get an element descriptor for looking up the corresponding element of this definition using the element locator

Returns:
Element descriptor for this definition

getName

public String getName()
Get the name of the element defined.

Returns:
Name of the element.

getTemplateSelector

public String getTemplateSelector()
Get the templateSelector of the element defined.

Returns:
templateSelector of the element.

getClassName

public String getClassName()
Get the class name for the element defined.

Returns:
Class name for the element.

getTemplateName

public String getTemplateName()
Get the template name for the element defined.

Returns:
Template name for the element.

joinParameters

public void joinParameters(Hashtable parameter)
This method adds the parameter from the elementDefinition to the requestParameters.


toString

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

Overrides:
toString in class Object
Returns:
String representation.