Package org.apache.tiles.api
Class Definition
java.lang.Object
org.apache.tiles.api.BasicAttributeContext
org.apache.tiles.api.Definition
- All Implemented Interfaces:
Serializable,AttributeContext
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.
It can be used as a data transfer object used for registering new definitions with the Container.
- Since:
- Tiles 2.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringExtends attribute value.protected StringDefinition name.Fields inherited from class org.apache.tiles.api.BasicAttributeContext
attributes, cascadedAttributes, preparer, templateAttribute -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor.Definition(Definition definition) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet extends.getName()Access method for the name property.inthashCode()booleanGet extends flag.voidsetExtends(String name) Set extends.voidSets the value of the name property.toString()Returns a description of the attributes.Methods inherited from class org.apache.tiles.api.BasicAttributeContext
addAll, clear, getAttribute, getCascadedAttribute, getCascadedAttributeNames, getLocalAttribute, getLocalAttributeNames, getPreparer, getTemplateAttribute, inherit, inherit, inheritCascadedAttributes, putAttribute, putAttribute, setPreparer, setTemplateAttribute
-
Field Details
-
inherit
Extends attribute value. -
name
Definition name.
-
-
Constructor Details
-
Definition
public Definition()Constructor. -
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.
-
Definition
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 Details
-
getName
Access method for the name property.- Returns:
- the current value of the name property
-
setName
Sets the value of the name property.- Parameters:
aName- the new value of the name property
-
setExtends
Set extends.- Parameters:
name- Name of the extended definition.
-
getExtends
Get extends.- Returns:
- Name of the extended definition.
-
equals
- Overrides:
equalsin classBasicAttributeContext
-
hashCode
public int hashCode()- Overrides:
hashCodein classBasicAttributeContext
-
isExtending
public boolean isExtending()Get extends flag.- Returns:
trueif this definition extends another.
-
toString
Returns a description of the attributes.
-