com.tivoli.twg.engine
Interface TWGGetSetInterface

All Known Subinterfaces:
TWGGetSetDescInterface, TWGProtectedGetSetInterface
All Known Implementing Classes:
TWGActiveConsole, TWGDatabaseQuery, TWGFilter, TWGManagedObject, TWGManagedObjectFactory, TWGManagedObjectStatusGroup, TWGManagedObjectStatusSet, TWGTask, TWGUser

public interface TWGGetSetInterface

Interface for allowing TWGObject subclasses to support simple attribute access and manipulation through textual attribute names.


Method Summary
 java.lang.String[] getAttributeIDList()
          Attribute ID enumeration : this method is expected to return a list of strings containing the String names of the attributes supported for a given object.
 int getAttributeType(java.lang.String id)
          Get type of attribute value for given attribute
 DataValue getAttributeValue(java.lang.String id, java.util.Locale loc)
          Get value of attribute with given ID
 boolean setAttributeValue(java.lang.String id, DataValue val)
          Set value of attribute with given ID
 

Method Detail

getAttributeIDList

public java.lang.String[] getAttributeIDList()
Attribute ID enumeration : this method is expected to return a list of strings containing the String names of the attributes supported for a given object. Subclasses of base classes implementing the interface should report additional attributes by adding them to the list returned by the base class.


getAttributeValue

public DataValue getAttributeValue(java.lang.String id,
                                   java.util.Locale loc)
Get value of attribute with given ID

Parameters:
id - - attribute ID requested
loc - - locale to use for value, if applicable
Returns:
value object, or null if no value

setAttributeValue

public boolean setAttributeValue(java.lang.String id,
                                 DataValue val)
Set value of attribute with given ID

Parameters:
id - - attribute ID to be set
val - - attribute value to be set
Returns:
true if set successful, false if not successful

getAttributeType

public int getAttributeType(java.lang.String id)
Get type of attribute value for given attribute

Parameters:
id - - attribute ID
Returns:
DataValue type of attribute, or DataValue.NONE_TYPE if undefined