com.acsinet_solutions.cetia4.controller.meta
Class AttributeInfo

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.meta.AttributeInfo
All Implemented Interfaces:
java.io.Serializable

public final class AttributeInfo
extends java.lang.Object
implements java.io.Serializable

Holder for attribute information such as name, scope and maintenance policy. It's a serializable, non annotation version of FormAttribute more suitable for information sharing.

Author:
Santiago Arriaga
See Also:
Serialized Form

Method Summary
static AttributeInfo getAttributeInfo(FormAttribute formAttribute, java.lang.Class attributeType)
          Factory method.
 AttributeMaintenancePolicy getMaintenancePolicy()
          Get the maintenance policy of the current attribute
 java.lang.String getName()
          Get the name of the current attribute
 Scope getScope()
          Get the scope at which it is stored the current attribute
 java.lang.Class getType()
          Get the type of the current attribute.
 java.lang.Object getValue(RequestContext context)
          Obtain the attribute value of the attribute represented by the current instance from the provided context.
 void removeValue(RequestContext context)
          Remove the attribute value of the attribute represented by the current instance on the provided context.
 void setType(java.lang.Class type)
          This method is provided so late Class association is possible.
 void setValue(RequestContext context, java.lang.Object value)
          Set the attribute value of the attribute represented by the current instance on the provided context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttributeInfo

public static AttributeInfo getAttributeInfo(FormAttribute formAttribute,
                                             java.lang.Class attributeType)
Factory method. Returns null if the parameter is null; a not-null object otherwise.


getMaintenancePolicy

public final AttributeMaintenancePolicy getMaintenancePolicy()
Get the maintenance policy of the current attribute


getName

public final java.lang.String getName()
Get the name of the current attribute


getScope

public final Scope getScope()
Get the scope at which it is stored the current attribute


getType

public final java.lang.Class getType()
Get the type of the current attribute.


setType

public final void setType(java.lang.Class type)
This method is provided so late Class association is possible. This way declarations are less verbose, and the type of an attribute may be declared until runtime. If initial declaration is needed, an optional field may later be added to FieldAttribute.


getValue

public final java.lang.Object getValue(RequestContext context)
Obtain the attribute value of the attribute represented by the current instance from the provided context.


setValue

public final void setValue(RequestContext context,
                           java.lang.Object value)
Set the attribute value of the attribute represented by the current instance on the provided context.


removeValue

public final void removeValue(RequestContext context)
Remove the attribute value of the attribute represented by the current instance on the provided context.