com.ibm.sysmgt.chassis
Class ChassisManagedObject

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGObject
      extended bycom.tivoli.twg.engine.TWGPersistentObject
          extended bycom.tivoli.twg.engine.TWGManagedObject
              extended bycom.ibm.sysmgt.chassis.ChassisManagedObject
All Implemented Interfaces:
TWGBaseShadowedObject, TWGGetSetDescInterface, TWGGetSetInterface, TWGPersistentObjectSubclassRestorable, TWGShadowedObject

public class ChassisManagedObject
extends TWGManagedObject

Chassis Managed Object Class Abstract class for managed objects representing Chassis. Object represents the general idea of a chassis, including the common concepts of membership by other managed objects in the chassis.


Field Summary
static java.lang.String CLASSNAME
           
 
Fields inherited from class com.tivoli.twg.engine.TWGManagedObject
CLIENT_SERVICE_NOT_SUPPORTED, CLIENT_SERVICE_START_FAILED, CLIENT_SERVICE_START_SUCCEEDED, CLIENT_SERVICE_STOP_FAILED, CLIENT_SERVICE_STOP_SUCCEEDED, MO_SHADOW_ATTRIB_FLAGS_OFF, MO_SHADOW_CNTTASK_OFF, MO_SHADOW_HDRLEN, MO_SHADOW_HDRLEN_001, MO_SHADOW_HDRLEN_OFF, MO_SHADOW_IMGSET_OFF, MO_SHADOW_OFFNAME_OFF, MO_SHADOW_OFFTASK_OFF, MO_SHADOW_PINGINT_OFF, MO_SHADOW_STATE_OFF, MOSTATE_ERROR_OFFLINE, MOSTATE_ERROR_ONLINE, MOSTATE_INDETERMINATE, MOSTATE_INVALID_OBJECT, MOSTATE_NORMAL_OFFLINE, MOSTATE_NORMAL_ONLINE, MOSTATE_UNKNOWN, MOSTATE_UNLICENSED, SHADOWCLASSNAME
 
Fields inherited from class com.tivoli.twg.engine.TWGPersistentObject
CLASS_NAME, SIZEOF_BYTE, SIZEOF_CHAR, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_SHORT
 
Constructor Summary
ChassisManagedObject()
          Default constructor for creating new chassis
 
Method Summary
 boolean addSubsystem(ChassisSubsystemInfo info)
          Add subsystem to Chassis list and Chassis Factory list.
 boolean addSubsystem(ChassisSubsystemInfo info, ChassisSubsystemInfo parentInfo)
          Add subsystem to Chassis list and Chassis Factory list.
protected  void copyTo(TWGManagedObject managedObject)
          Copy instance data to another managed object.
 void Delete()
          Destructor for ChassisManagedObject: remove persistent oid from lists
 void Destroy()
          Destroy for ChassisManagedObject
 java.lang.String getAttributeDescription(java.lang.String id, java.util.Locale loc)
          Get description string for given attribute in given locale
 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
 java.lang.String getAttributeValueString(java.lang.String id, java.util.Locale loc)
          Get descriptive value string for given attribute in given locale
 int getChassisSubsystemType()
          Get Chassis Subsystem Type
 ChassisSubsystemInfo[] getSubsystemInfo()
          Get list of Subystem Informatin Objects
static ChassisSubsystemInfo[] getSubsystemInfo(long chassis_moid)
          Get list of Subystem Informatin Objects
 ChassisSubsystemInfo getSubsystemInfoByLocation(int type, int loc)
          Get subsystem Information objects of a specific subystem type at a specific location (Assumes Chassis as the parent)
static ChassisSubsystemInfo getSubsystemInfoByLocation(long chassis_moid, int type, int loc)
          Get subsystem Information objects of a specific subystem type at a specific location
 ChassisSubsystemInfo getSubsystemInfoByMOID(long subsys_moid)
          Get Subsytem Information object of a specific subsystem MOID
static ChassisSubsystemInfo getSubsystemInfoByMOID(long chassis_moid, long subsys_moid)
          Get Subsytem Information object of a specific subsystem MOID
 ChassisSubsystemInfo[] getSubsystemInfoByParent(ChassisSubsystemInfo parentInfo)
          Get children subsystem Information objects of a parent
static ChassisSubsystemInfo[] getSubsystemInfoByParent(long chassis_moid, ChassisSubsystemInfo parentInfo)
          Get children subsystem Information objects of a parent
static ChassisSubsystemInfo[] getSubsystemInfoByParent(long chassis_moid, ChassisSubsystemInfo parentInfo, int childType)
          Get specific type children subsystem Information objects of a parent
static ChassisSubsystemInfo getSubsystemInfoByParent(long chassis_moid, ChassisSubsystemInfo parentInfo, int childType, int childIndex)
          Get children subsystem Information objects of a parent by specific subsystem type and index of a specific parent
 ChassisSubsystemInfo[] getSubsystemInfoByType(int type)
          Get list of subsystem Information objects of a specific subsystem type
static ChassisSubsystemInfo[] getSubsystemInfoByType(long chassis_moid, int type)
          Get list of subsystem Information objects of a specific subsystem type
 long[] getSubsystemMOID()
          Get list of subsystem MOIDs
static long[] getSubsystemMOID(long chassis_moid)
          Get list of subsystem MOIDs
 long getSubsystemMOIDByLocation(int type, int loc)
          Get Subsystem MOID of a specific type at a specific location
static long getSubsystemMOIDByLocation(long chassis_moid, int type, int loc)
          Get Subsystem MOID of a specific type at a specific location
 long[] getSubsystemMOIDByType(int type)
          Get specific type subsystem MOIDs
static long[] getSubsystemMOIDByType(long chassis_moid, int type)
          Get specific type subsystem MOIDs
 boolean isSubsystem(long moid)
          Test to see if managed object ID is a subsystem of chassis
 boolean isSubsystem(TWGManagedObject mo)
          Test to see if managed object is a subsystem of chassis
 boolean removeSubsystem(ChassisSubsystemInfo info)
          Remove subsystem hardware from Chassis list and Chassis Factory list.
 boolean removeSubsystem(int subsys_type, int subsys_locId)
          Remove subsystem hardware from Chassis list and Chassis Factory list.
 boolean removeSubsystemMOID(long moid)
          Remove subsystem managed object id from Chassis list and Chassis Factory list.
protected  void restoreData(TWGPersistentObjectDictionary dictionary, boolean resolveObjectReferences)
          Restore support for persistant object.
protected  void saveData(TWGPersistentObjectDictionary dictionary)
          Save support for persistant object.
 boolean setAttributeValue(java.lang.String id, DataValue val)
          Set value of attribute with given ID
 void setChassisSubsystemType(int type)
          Set Chassis Subsystem Type
 void SetObjectID(long oid)
          Set object ID.
 
Methods inherited from class com.tivoli.twg.engine.TWGManagedObject
AddClientService, addDatabaseRecord, addTask, addTask, categorizedManagedObjectIDs, clearPingInterval, ClientServiceStart, ClientServiceStart, ClientServiceStop, ClientServiceStop, containsTask, containsTask, deregisterNewOSListener, FindByAttributeValue, FindByAttributeValue, getAddressEntryRecord, getAddressEntryShadowClass, getAgentPingInterval, getAgentTimezoneOffset, getAllManagedObjectIDs, getAllManagedObjects, GetClientServices, GetConShadowClass, getDatabaseList, getEventCorrelator, getFingerprint, getImageSet, getLicenseVersionRequired, getManagedObjectByID, getManagedObjectsSupportingClientService, getMof, getName, getOEMID, getPinger, getPingInterval, getPingInterval, getPingType, GetShadowRecord, GetShadowVersion, getState, getTaskListAsIds, getTaskListSize, initializeRestoredLicenses, initializeRestoredStatusGroups, ipAddressChangeNotify, isAccessDenied, isAccessRequestSupported, isAttribFlagSet, isClientSecureSupported, IsClientServiceSupported, isClientUnsecure, isConsoleDeletable, isConsoleRenamable, isEncryptionEnabled, isPowerdownSupported, isRestartSupported, isServerMO, isShutdownSupported, isTMADetectable, isTMADetected, isWakeOnLANSupported, licenseGranted, licenseRequired, ObjectAddressEntryChangeNotify, ObjectChangedNotify, ObjectCreateNotify, ObjectDestroyNotify, ObjectStateChangeNotify, processGrantRevokeLicense, registerClientServiceSubscriber, registerIPAddressChangeListener, RegisterLifeCycleListener, registerNewOSListener, RegisterStateListener, reissueLicenses, removeAllTaskAssociations, removeAllTaskAssociations, RemoveClientService, removeTask, removeTask, ReplaceClientServiceList, reportOSTypeAndVersion, requestAccess, requestClientSecure, requestPowerdown, requestRestart, requestShutdown, requestWakeOnLAN, saveAndUpdateIfNeeded, setAccessDenied, setAccessRequestSupported, setAgentPingInterval, setAgentTimezoneOffset, setAsServerMO, setClientSec ureSupported, setClientUnsecureFlag, setConsoleDeletable, setConsoleRenamable, setEncryptionEnabled, setEventCorrelator, setImageSet, setName, setOEMID, setPinger, setPingInterval, setPowerdownSupported, setRestartSupported, setShutdownSupported, setState, setTMADetectable, setTMADetected, setWakeOnLANSupported, startPing, startPing, startPing, startPingWithReauthenticate, synchronizedObjectWithDatabase, toString, unregisterClientServiceSubscriber, unregisterIPAddressChangeListener, UnregisterLifeCycleListener, UnregisterStateListener, updateNameInDatabaseRecord, UpdateShadowVersion, updateStateInDatabaseRecord
 
Methods inherited from class com.tivoli.twg.engine.TWGPersistentObject
enableAsyncWrites, fromPersistID, initialize, isNewPersistentStore, isSaveRequired, PersistID, restore, restoreAll, save, save, setSaveRequired, terminate, toPersistID
 
Methods inherited from class com.tivoli.twg.engine.TWGObject
AllObjects, AllObjects, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
Constructor Detail

ChassisManagedObject

public ChassisManagedObject()
Default constructor for creating new chassis

Method Detail

copyTo

protected void copyTo(TWGManagedObject managedObject)
Copy instance data to another managed object.

Overrides:
copyTo in class TWGManagedObject
Parameters:
managedObject - target managed object.

saveData

protected void saveData(TWGPersistentObjectDictionary dictionary)
                 throws TWGPersistentObjectSaveException
Save support for persistant object. This method saves all managed object fields that are persistant in nature.

Overrides:
saveData in class TWGManagedObject
Throws:
TWGPersistentObjectSaveException - if error on save

restoreData

protected void restoreData(TWGPersistentObjectDictionary dictionary,
                           boolean resolveObjectReferences)
                    throws TWGPersistentObjectRestoreException
Restore support for persistant object. This method restores managed object fields that are persistant in nature.

Overrides:
restoreData in class TWGManagedObject
Throws:
TWGPersistentObjectRestoreException - if restore error

Delete

public void Delete()
Destructor for ChassisManagedObject: remove persistent oid from lists

Overrides:
Delete in class TWGManagedObject

Destroy

public void Destroy()
             throws TWGObjectDestroyException
Destroy for ChassisManagedObject

Overrides:
Destroy in class TWGManagedObject
Throws:
TWGObjectDestroyException - if error during destroy

setChassisSubsystemType

public void setChassisSubsystemType(int type)
Set Chassis Subsystem Type


getChassisSubsystemType

public int getChassisSubsystemType()
Get Chassis Subsystem Type


addSubsystem

public final boolean addSubsystem(ChassisSubsystemInfo info)
                           throws InvalidObjectIDException
Add subsystem to Chassis list and Chassis Factory list. Save Required set.

Parameters:
info - Subsystem to be added with Chassis as the parent
Returns:
true if successful
Throws:
InvalidObjectIDException - if bad MO or chassis object

addSubsystem

public final boolean addSubsystem(ChassisSubsystemInfo info,
                                  ChassisSubsystemInfo parentInfo)
                           throws InvalidObjectIDException
Add subsystem to Chassis list and Chassis Factory list. Save Required set.

Parameters:
info - Subsystem to be added
parentInfo - Parent of the Subsytem to be added
Returns:
true if successful
Throws:
InvalidObjectIDException - if bad MO or chassis object

removeSubsystemMOID

public final boolean removeSubsystemMOID(long moid)
                                  throws InvalidObjectIDException
Remove subsystem managed object id from Chassis list and Chassis Factory list. Save Required set.

Parameters:
moid - - subsystem managed object id to be removed
Returns:
true if successful
Throws:
InvalidObjectIDException - if bad MO or Chassis object

removeSubsystem

public final boolean removeSubsystem(int subsys_type,
                                     int subsys_locId)
Remove subsystem hardware from Chassis list and Chassis Factory list. Save Required set. (assumes chassis as the parent)

Parameters:
subsys_type - Subsystem Type
subsys_locId - Subsystem Location Id
Returns:
true if successful

removeSubsystem

public final boolean removeSubsystem(ChassisSubsystemInfo info)
Remove subsystem hardware from Chassis list and Chassis Factory list. Save Required set.

Returns:
true if successful

SetObjectID

public void SetObjectID(long oid)
                 throws DuplicateObjectIDException
Set object ID. This method subclasses the TWGObject class's SetObjectID. This call is needed so that Managed object class instances can be registered with the appropriate TreeNode instances within the ManagedObjectFactory.

Overrides:
SetObjectID in class TWGManagedObject
Parameters:
oid - - new object ID, or INVALID_OBJECT_ID if none
Throws:
DuplicateObjectIDException - if ID is duplicate

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.

Specified by:
getAttributeIDList in interface TWGGetSetInterface
Overrides:
getAttributeIDList in class TWGManagedObject

getAttributeValue

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

Specified by:
getAttributeValue in interface TWGGetSetInterface
Overrides:
getAttributeValue in class TWGManagedObject
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

Specified by:
setAttributeValue in interface TWGGetSetInterface
Overrides:
setAttributeValue in class TWGManagedObject
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

Specified by:
getAttributeType in interface TWGGetSetInterface
Overrides:
getAttributeType in class TWGManagedObject
Parameters:
id - - attribute ID
Returns:
DataValue type of attribute, or DataValue.NONE_TYPE if undefined

getAttributeDescription

public java.lang.String getAttributeDescription(java.lang.String id,
                                                java.util.Locale loc)
Get description string for given attribute in given locale

Specified by:
getAttributeDescription in interface TWGGetSetDescInterface
Overrides:
getAttributeDescription in class TWGManagedObject
Parameters:
id - - attribute ID
loc - - locale to use for description
Returns:
description string, or null if not available

getAttributeValueString

public java.lang.String getAttributeValueString(java.lang.String id,
                                                java.util.Locale loc)
Get descriptive value string for given attribute in given locale

Specified by:
getAttributeValueString in interface TWGGetSetDescInterface
Overrides:
getAttributeValueString in class TWGManagedObject
Parameters:
id - - attribute ID
loc - - locale to use for description
Returns:
descriptive string for attribute value, or null if not available

isSubsystem

public boolean isSubsystem(TWGManagedObject mo)
Test to see if managed object is a subsystem of chassis

Parameters:
mo - - managed object to be checked

isSubsystem

public boolean isSubsystem(long moid)
Test to see if managed object ID is a subsystem of chassis


getSubsystemInfo

public ChassisSubsystemInfo[] getSubsystemInfo()
Get list of Subystem Informatin Objects

Returns:
array of ChassisSubsystemInfo objects

getSubsystemInfo

public static ChassisSubsystemInfo[] getSubsystemInfo(long chassis_moid)
Get list of Subystem Informatin Objects

Returns:
array of ChassisSubsystemInfo objects

getSubsystemInfoByType

public ChassisSubsystemInfo[] getSubsystemInfoByType(int type)
Get list of subsystem Information objects of a specific subsystem type

Parameters:
type - - Subsystem Type
Returns:
array of subsystem Information objects of subsys_type Type

getSubsystemInfoByType

public static ChassisSubsystemInfo[] getSubsystemInfoByType(long chassis_moid,
                                                            int type)
Get list of subsystem Information objects of a specific subsystem type

Parameters:
type - - Subsystem Type
Returns:
array of subsystem Information objects of subsys_type Type

getSubsystemInfoByLocation

public ChassisSubsystemInfo getSubsystemInfoByLocation(int type,
                                                       int loc)
Get subsystem Information objects of a specific subystem type at a specific location (Assumes Chassis as the parent)

Parameters:
type - - Subsystem Type
loc - - Subsystem Location
Returns:
Subsystem Information Object, null if not present

getSubsystemInfoByParent

public static ChassisSubsystemInfo[] getSubsystemInfoByParent(long chassis_moid,
                                                              ChassisSubsystemInfo parentInfo)
Get children subsystem Information objects of a parent

Parameters:
chassis_moid - - Chassis MOID
parentInfo - - Parent Subsytem Information object
Returns:
subsystem information objects - Array of children subsytem info objects, null if not present

getSubsystemInfoByParent

public ChassisSubsystemInfo[] getSubsystemInfoByParent(ChassisSubsystemInfo parentInfo)
Get children subsystem Information objects of a parent

Parameters:
parentInfo - - Parent Subsytem Information object
Returns:
subsystem information objects - Array of children subsytem info objects, null if not present

getSubsystemInfoByParent

public static ChassisSubsystemInfo[] getSubsystemInfoByParent(long chassis_moid,
                                                              ChassisSubsystemInfo parentInfo,
                                                              int childType)
Get specific type children subsystem Information objects of a parent

Parameters:
parentInfo - - Parent Subsytem Information object
childType - - Child Subsystem Type
Returns:
subsystem information objects - Array of children subsytem info objects, null if not present

getSubsystemInfoByParent

public static ChassisSubsystemInfo getSubsystemInfoByParent(long chassis_moid,
                                                            ChassisSubsystemInfo parentInfo,
                                                            int childType,
                                                            int childIndex)
Get children subsystem Information objects of a parent by specific subsystem type and index of a specific parent

Parameters:
parentInfo - - Parent Subsytem Information object
childType - - Child Subsystem Type
childIndex - - Child Subsystem Index

getSubsystemInfoByLocation

public static ChassisSubsystemInfo getSubsystemInfoByLocation(long chassis_moid,
                                                              int type,
                                                              int loc)
Get subsystem Information objects of a specific subystem type at a specific location

Parameters:
type - - Subsystem Type
loc - - Subsystem Location
Returns:
Subsystem Information Object, null if not present

getSubsystemInfoByMOID

public ChassisSubsystemInfo getSubsystemInfoByMOID(long subsys_moid)
Get Subsytem Information object of a specific subsystem MOID

Parameters:
subsys_moid - - Subsystem MOID
Returns:
Subsystem Information Object, null if not present

getSubsystemInfoByMOID

public static ChassisSubsystemInfo getSubsystemInfoByMOID(long chassis_moid,
                                                          long subsys_moid)
Get Subsytem Information object of a specific subsystem MOID

Parameters:
subsys_moid - - Subsystem MOID
Returns:
Subsystem Information Object, null if not presetn

getSubsystemMOID

public long[] getSubsystemMOID()
Get list of subsystem MOIDs

Returns:
all_moids - array of Subystem MOIDs, null if empty

getSubsystemMOID

public static long[] getSubsystemMOID(long chassis_moid)
Get list of subsystem MOIDs

Returns:
all_moids - array of Subystem MOIDs, null if empty

getSubsystemMOIDByType

public long[] getSubsystemMOIDByType(int type)
Get specific type subsystem MOIDs

Parameters:
type - - Subsystem Type
Returns:
type_moids - list of 'type' subsystem MOIDs

getSubsystemMOIDByType

public static long[] getSubsystemMOIDByType(long chassis_moid,
                                            int type)
Get specific type subsystem MOIDs

Parameters:
type - - Subsystem Type
Returns:
type_moids - list of 'type' subsystem MOIDs

getSubsystemMOIDByLocation

public long getSubsystemMOIDByLocation(int type,
                                       int loc)
Get Subsystem MOID of a specific type at a specific location

Parameters:
type - - Subsystem Type
loc - - Subsystem Location
Returns:
long - Subsystem MOID

getSubsystemMOIDByLocation

public static long getSubsystemMOIDByLocation(long chassis_moid,
                                              int type,
                                              int loc)
Get Subsystem MOID of a specific type at a specific location

Parameters:
type - - Subsystem Type
loc - - Subsystem Location
Returns:
long - Subsystem MOID