|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tiles.Attribute
public class Attribute
Common implementation of attribute definition.
Nested Class Summary | |
---|---|
static class |
Attribute.AttributeType
Deprecated. Use setRenderer(String) and
getRenderer() . |
Field Summary | |
---|---|
protected java.util.Set<java.lang.String> |
roles
The roles that can render this attribute. |
protected java.lang.Object |
value
The value of the attribute. |
Constructor Summary | |
---|---|
Attribute()
Constructor. |
|
Attribute(Attribute attribute)
Copy constructor. |
|
Attribute(java.lang.Object value)
Constructor. |
|
Attribute(java.lang.Object value,
java.lang.String role)
Constructor. |
|
Attribute(java.lang.Object value,
java.lang.String role,
Attribute.AttributeType type)
Deprecated. Use Attribute(Object, String, String) . |
|
Attribute(java.lang.Object value,
java.lang.String role,
java.lang.String rendererName)
Constructor. |
|
Attribute(java.lang.String name,
java.lang.Object value)
Constructor. |
|
Attribute(java.lang.String name,
java.lang.Object value,
java.lang.String role,
Attribute.AttributeType type)
Deprecated. Use Attribute#Attribute(Object, String, String))) . |
Method Summary | |
---|---|
java.lang.String |
getName()
Deprecated. Use the getName methods in object that contain
attributes. |
java.lang.String |
getRenderer()
Returns the renderer name to use. |
java.lang.String |
getRole()
Get role. |
java.util.Set<java.lang.String> |
getRoles()
Returns the roles that can render this attribute. |
Attribute.AttributeType |
getType()
Deprecated. Use getRenderer() . |
java.lang.Object |
getValue()
Get value. |
void |
setBody(java.lang.String body)
Sets the body of this attribute. |
void |
setName(java.lang.String name)
Deprecated. Use the setName methods in object that contain
attributes. |
void |
setRenderer(java.lang.String rendererName)
Sets the renderer name to use. |
void |
setRole(java.lang.String role)
Set role. |
void |
setRoles(java.util.Set<java.lang.String> roles)
Sets the roles that can render this attribute. |
void |
setType(Attribute.AttributeType type)
Deprecated. Use Attribute#setRenderer(String)) . |
void |
setValue(java.lang.Object value)
Set value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<java.lang.String> roles
protected java.lang.Object value
Constructor Detail |
---|
public Attribute()
public Attribute(java.lang.Object value)
value
- Object to store.public Attribute(Attribute attribute)
attribute
- The attribute to copy from.public Attribute(java.lang.String name, java.lang.Object value)
name
- name of the attributevalue
- Object to store.public Attribute(java.lang.Object value, java.lang.String role)
value
- Object to store.role
- Asociated role.@Deprecated public Attribute(java.lang.Object value, java.lang.String role, Attribute.AttributeType type)
Attribute(Object, String, String)
.
value
- Object to store.role
- Associated role.type
- Attribute type.public Attribute(java.lang.Object value, java.lang.String role, java.lang.String rendererName)
value
- Object to store.role
- Associated role.rendererName
- The renderer name.public Attribute(java.lang.String name, java.lang.Object value, java.lang.String role, Attribute.AttributeType type)
Attribute#Attribute(Object, String, String)))
.
name
- name of the attributevalue
- Object to store.role
- Asociated role.type
- Attribute type.Method Detail |
---|
public java.lang.String getRole()
public java.util.Set<java.lang.String> getRoles()
public void setRole(java.lang.String role)
role
- Associated role.public void setRoles(java.util.Set<java.lang.String> roles)
roles
- The enabled roles.public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- New value.public java.lang.String toString()
toString
in class java.lang.Object
public Attribute.AttributeType getType()
getRenderer()
.
string
,
template
, definition
, object
.public void setType(Attribute.AttributeType type)
Attribute#setRenderer(String))
.
type
- The attribute type.public java.lang.String getRenderer()
public void setRenderer(java.lang.String rendererName)
rendererName
- The renderer.@Deprecated public java.lang.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(java.lang.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(java.lang.String body)
body
- The attribute body.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |