Package org.apache.tiles
Class ListAttribute
- java.lang.Object
-
- org.apache.tiles.Attribute
-
- org.apache.tiles.ListAttribute
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class ListAttribute extends Attribute
An attribute as aList
. This attribute associates a name with a list. The list can be found by the property name. Elements in list are retrieved using List methods. This class is used to read configuration files.- Since:
- 2.1.0
- Version:
- $Rev: 832867 $ $Date: 2009-11-05 07:16:23 +1100 (Thu, 05 Nov 2009) $
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.tiles.Attribute
expressionObject, roles, value
-
-
Constructor Summary
Constructors Constructor Description ListAttribute()
Constructor.ListAttribute(java.util.List<Attribute> value)
Constructor.ListAttribute(ListAttribute toCopy)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Attribute element)
Add an element in list.ListAttribute
clone()
boolean
equals(java.lang.Object obj)
java.util.List<Attribute>
getValue()
Returns the list of the attributes that are elements of this attribute.int
hashCode()
void
inherit(ListAttribute parent)
Inherits elements present in a "parent" list attribute.boolean
isInherit()
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here.void
setInherit(boolean inherit)
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here.void
setValue(java.util.List<Attribute> attributes)
Sets the list of the attributes that are elements of this attribute.-
Methods inherited from class org.apache.tiles.Attribute
createTemplateAttribute, createTemplateAttribute, createTemplateAttributeWithExpression, getExpressionObject, getRenderer, getRole, getRoles, inherit, isPermitted, setExpressionObject, setRenderer, setRole, setRoles, setValue, toString
-
-
-
-
Constructor Detail
-
ListAttribute
public ListAttribute()
Constructor.- Since:
- 2.1.0
-
ListAttribute
public ListAttribute(java.util.List<Attribute> value)
Constructor.- Parameters:
value
- List.- Since:
- 2.1.0
-
ListAttribute
public ListAttribute(ListAttribute toCopy)
Copy constructor.- Parameters:
toCopy
- The list attribute to copy.- Since:
- 2.1.3
-
-
Method Detail
-
setValue
public void setValue(java.util.List<Attribute> attributes)
Sets the list of the attributes that are elements of this attribute.- Parameters:
attributes
- The attributes.- Since:
- 3.0.0
-
getValue
public java.util.List<Attribute> getValue()
Returns the list of the attributes that are elements of this attribute.
-
add
public void add(Attribute element)
Add an element in list. We use a property to avoid rewriting a new class.- Parameters:
element
- XmlAttribute to add.- Since:
- 2.1.0
-
setInherit
public void setInherit(boolean inherit)
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here. By default, it is 'false'- Parameters:
inherit
- The "inherit" value.- Since:
- 2.1.0
-
isInherit
public boolean isInherit()
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here. By default, it is 'false'- Returns:
- inherit The "inherit" value.
- Since:
- 2.1.0
-
inherit
public void inherit(ListAttribute parent)
Inherits elements present in a "parent" list attribute. The elements will be put before the ones already present.- Parameters:
parent
- The parent list attribute.- Since:
- 2.1.0
-
clone
public ListAttribute clone()
-
-