|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tiles.Attribute
public class Attribute
Common implementation of attribute definition.
Nested Class Summary | |
---|---|
static class |
Attribute.AttributeType
Attribute types. |
Field Summary | |
---|---|
protected Set<String> |
roles
The roles that can render this attribute. |
protected Object |
value
The value of the attribute. |
Constructor Summary | |
---|---|
Attribute()
Constructor. |
|
Attribute(Attribute attribute)
Copy constructor. |
|
Attribute(Object value)
Constructor. |
|
Attribute(Object value,
String role)
Constructor. |
|
Attribute(Object value,
String role,
Attribute.AttributeType type)
Constructor. |
|
Attribute(String name,
Object value)
Constructor. |
|
Attribute(String name,
Object value,
String role,
Attribute.AttributeType type)
Constructor. |
Method Summary | |
---|---|
String |
getName()
Deprecated. Use the getName methods in object that contain
attributes. |
String |
getRole()
Get role. |
Set<String> |
getRoles()
Returns the roles that can render this attribute. |
Attribute.AttributeType |
getType()
Returns the type of this attribute. |
Object |
getValue()
Get value. |
void |
setBody(String body)
Sets the body of this attribute. |
void |
setName(String name)
Deprecated. Use the setName methods in object that contain
attributes. |
void |
setRole(String role)
Set role. |
void |
setRoles(Set<String> roles)
Sets the roles that can render this attribute. |
void |
setType(Attribute.AttributeType type)
Sets the type of this attribute. |
void |
setValue(Object value)
Set value. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Set<String> roles
protected Object value
Constructor Detail |
---|
public Attribute()
public Attribute(Object value)
value
- Object to store.public Attribute(Attribute attribute)
attribute
- The attribute to copy from.public Attribute(String name, Object value)
name
- name of the attributevalue
- Object to store.public Attribute(Object value, String role)
value
- Object to store.role
- Asociated role.public Attribute(Object value, String role, Attribute.AttributeType type)
value
- Object to store.role
- Asociated role.type
- Attribute type.public Attribute(String name, Object value, String role, Attribute.AttributeType type)
name
- name of the attributevalue
- Object to store.role
- Asociated role.type
- Attribute type.Method Detail |
---|
public String getRole()
public Set<String> getRoles()
public void setRole(String role)
role
- Associated role.public void setRoles(Set<String> roles)
roles
- The enabled roles.public Object getValue()
public void setValue(Object value)
value
- New value.public String toString()
toString
in class Object
public Attribute.AttributeType getType()
string
,
template
, definition
, object
.public void setType(Attribute.AttributeType type)
type
- The attribute type.@Deprecated public String getName()
getName
methods in object that contain
attributes.
null
, but in
this case it should be used as an element of ListAttribute
@Deprecated public void setName(String name)
setName
methods in object that contain
attributes.
name
- The name of the attribute. It can be null
,
but in this case it should be used as an element of
ListAttribute
public void setBody(String body)
body
- The attribute body.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |