Home » tiles-2.2.1-src » org.apache » tiles » [javadoc | source]
org.apache.tiles
public class: Definition [javadoc | source]
java.lang.Object
   org.apache.tiles.BasicAttributeContext
      org.apache.tiles.Definition

All Implemented Interfaces:
    AttributeContext, Serializable

A definition, i.e. a template with (completely or not) filled attributes. Attributes of a template can be defined with the help of this class.
It can be used as a data transfer object used for registering new definitions with the Container.
Field Summary
protected  String inherit    Extends attribute value. 
protected  String name    Definition name. 
Fields inherited from org.apache.tiles.BasicAttributeContext:
templateAttribute,  preparer,  attributes,  cascadedAttributes
Constructor:
 public Definition() 
 public Definition(Definition definition) 
    Copy Constructor. Create a new definition initialized with parent definition. Do a shallow copy : attributes are shared between copies, but not the Map containing attributes.
    Parameters:
    definition - The definition to copy.
 public Definition(String name,
    String template,
    Map<String, Attribute> attributes) 
    Constructor.
    Parameters:
    name - The name of the definition.
    template - The template of the definition.
    attributes - The attribute map of the definition.
 public Definition(String name,
    Attribute templateAttribute,
    Map<String, Attribute> attributes) 
    Constructor.
    Parameters:
    name - The name of the definition.
    templateAttribute - The template attribute of the definition.
    attributes - The attribute map of the definition.
    since: 2.1.2 -
Method from org.apache.tiles.Definition Summary:
addAttribute,   equals,   getAttributes,   getExtends,   getName,   getRole,   getTemplate,   hasAttributeValue,   hashCode,   isExtending,   put,   put,   put,   setExtends,   setName,   setRole,   setTemplate,   toString
Methods from org.apache.tiles.BasicAttributeContext:
addAll,   addMissing,   clear,   equals,   getAttribute,   getAttributeNames,   getCascadedAttribute,   getCascadedAttributeNames,   getLocalAttribute,   getLocalAttributeNames,   getPreparer,   getTemplateAttribute,   hashCode,   inherit,   inherit,   inheritCascadedAttributes,   putAttribute,   putAttribute,   setPreparer,   setTemplateAttribute
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tiles.Definition Detail:
 public  void addAttribute(Attribute attribute) 
Deprecated! Use - Definition#putAttribute(String, Attribute) .

    Add an attribute to this definition.

    This method is used by Digester to load definitions.

 public boolean equals(Object obj) 
    {@inheritDoc}
 public Map<String, Attribute> getAttributes() 
Deprecated! Use - AttributeContext#getLocalAttributeNames() and AttributeContext#getCascadedAttributeNames() .

    Access method for the attributes property. If there is no attributes, return an empty map.
 public String getExtends() 
    Get extends.
 public String getName() 
    Access method for the name property.
 public String getRole() 
Deprecated! Use - #getTemplateAttribute() .

    Access method for the role property.
 public String getTemplate() 
Deprecated! Use - #getTemplateAttribute() .

    Access method for the template property.
 public boolean hasAttributeValue(String key) 
Deprecated! Check - if the AttributeContext#getAttribute(String) returns null.

    Checks whether the key attribute has been set.
 public int hashCode() 
    {@inheritDoc}
 public boolean isExtending() 
    Get extends flag.
 public  void put(String name,
    Object content) 
Deprecated! Use - AttributeContext#putAttribute(String, Attribute) or AttributeContext#putAttribute(String, Attribute, boolean) .

    Put an attribute in template definition. Attribute can be used as content for tag get.
 public  void put(String name,
    Object content,
    String role) 
Deprecated! Use - AttributeContext#putAttribute(String, Attribute) or AttributeContext#putAttribute(String, Attribute, boolean) .

    Put an attribute in template definition. Attribute can be used as content for tag get.
 public  void put(String name,
    Object content,
    AttributeType type,
    String role) 
Deprecated! Use - AttributeContext#putAttribute(String, Attribute) or AttributeContext#putAttribute(String, Attribute, boolean) .

    Put an attribute in template definition. Attribute can be used as content for tag get.
 public  void setExtends(String name) 
    Set extends.
 public  void setName(String aName) 
    Sets the value of the name property.
 public  void setRole(String role) 
Deprecated! Use - #getTemplateAttribute() .

    Sets the value of the role property.
 public  void setTemplate(String template) 
Deprecated! Use - #getTemplateAttribute() .

    Sets the value of the template property.
 public String toString() 
    Returns a description of the attributes.