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 SummaryFieldsModifier and TypeFieldDescriptionprotected StringExtends attribute value.protected StringDefinition name.Fields inherited from class org.apache.tiles.api.BasicAttributeContextattributes, cascadedAttributes, preparer, templateAttribute
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor.Constructor.Definition(Definition definition) Copy Constructor.
- 
Method SummaryModifier 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.BasicAttributeContextaddAll, clear, getAttribute, getCascadedAttribute, getCascadedAttributeNames, getLocalAttribute, getLocalAttributeNames, getPreparer, getTemplateAttribute, inherit, inherit, inheritCascadedAttributes, putAttribute, putAttribute, setPreparer, setTemplateAttribute
- 
Field Details- 
inheritExtends attribute value.
- 
nameDefinition name.
 
- 
- 
Constructor Details- 
Definitionpublic Definition()Constructor.
- 
DefinitionCopy 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.
 
- 
DefinitionConstructor.- 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- 
getNameAccess method for the name property.- Returns:
- the current value of the name property
 
- 
setNameSets the value of the name property.- Parameters:
- aName- the new value of the name property
 
- 
setExtendsSet extends.- Parameters:
- name- Name of the extended definition.
 
- 
getExtendsGet extends.- Returns:
- Name of the extended definition.
 
- 
equals- Overrides:
- equalsin class- BasicAttributeContext
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- BasicAttributeContext
 
- 
isExtendingpublic boolean isExtending()Get extends flag.- Returns:
- trueif this definition extends another.
 
- 
toStringReturns a description of the attributes.
 
-