org.apache.tiles
Class ComponentAttribute

Package class diagram package ComponentAttribute
java.lang.Object
  extended by org.apache.tiles.ComponentAttribute
All Implemented Interfaces:
java.io.Serializable

public class ComponentAttribute
extends java.lang.Object
implements java.io.Serializable

Common implementation of attribute definition.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFINITION
          Attribute of type definition.
protected  java.lang.String role
          Role associated to this attribute.
static java.lang.String STRING
          Attribute of type string.
static java.lang.String TEMPLATE
          Attribute of type template.
protected  java.lang.Object value
           
 
Constructor Summary
ComponentAttribute()
          Constructor.
ComponentAttribute(java.lang.Object value)
          Constructor.
ComponentAttribute(java.lang.Object value, java.lang.String role)
          Constructor.
ComponentAttribute(java.lang.Object value, java.lang.String role, java.lang.String type)
          Constructor.
ComponentAttribute(java.lang.String name, java.lang.Object value)
          Constructor.
 
Method Summary
 java.util.Map<java.lang.String,ComponentAttribute> getAttributes()
           
 java.lang.String getName()
           
 java.lang.String getRole()
          Get role.
 java.lang.String getType()
           
 java.lang.Object getValue()
          Get value.
 void setAttributes(java.util.Map<java.lang.String,ComponentAttribute> attributes)
           
 void setBody(java.lang.String body)
           
 void setName(java.lang.String name)
           
 void setRole(java.lang.String role)
          Set role.
 void setType(java.lang.String type)
           
 void setValue(java.lang.Object value)
          Set value.
 java.lang.String toString()
          Get String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFINITION

public static final java.lang.String DEFINITION
Attribute of type definition.

See Also:
Constant Field Values

TEMPLATE

public static final java.lang.String TEMPLATE
Attribute of type template.

See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
Attribute of type string.

See Also:
Constant Field Values

role

protected java.lang.String role
Role associated to this attribute.


value

protected java.lang.Object value
Constructor Detail

ComponentAttribute

public ComponentAttribute()
Constructor.


ComponentAttribute

public ComponentAttribute(java.lang.Object value)
Constructor.

Parameters:
value - Object to store.

ComponentAttribute

public ComponentAttribute(java.lang.String name,
                          java.lang.Object value)
Constructor.

Parameters:
name - name of the attribute
value - Object to store.

ComponentAttribute

public ComponentAttribute(java.lang.Object value,
                          java.lang.String role)
Constructor.

Parameters:
value - Object to store.
role - Asociated role.

ComponentAttribute

public ComponentAttribute(java.lang.Object value,
                          java.lang.String role,
                          java.lang.String type)
Constructor.

Parameters:
value - Object to store.
role - Asociated role.
type - Attribute type.
Method Detail

getRole

public java.lang.String getRole()
Get role.

Returns:
the name of the required role(s)

setRole

public void setRole(java.lang.String role)
Set role.

Parameters:
role - Associated role.

getValue

public java.lang.Object getValue()
Get value.

Returns:
the value

setValue

public void setValue(java.lang.Object value)
Set value.

Parameters:
value - New value.

toString

public java.lang.String toString()
Get String representation of this object.

Overrides:
toString in class java.lang.Object

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getAttributes

public java.util.Map<java.lang.String,ComponentAttribute> getAttributes()

setAttributes

public void setAttributes(java.util.Map<java.lang.String,ComponentAttribute> attributes)

setBody

public void setBody(java.lang.String body)