com.ibm.datapower.wamt.dataAPI
Interface StoredDevice

All Superinterfaces:
Persistable
All Known Implementing Classes:
StoredDeviceImpl

public interface StoredDevice
extends Persistable

All device related information that must be maintained and persisted for a physical DataPower device, i.e Device. This includes the device serialnumber, hostname, GUIPOrt, HLMPort, Hostname, Model, Symbolic Name, and Quiesce time out.

It is the container for StoredDomains persisted in the repository.


Field Summary
static java.lang.String COPYRIGHT_2009_2010
           
static java.lang.String SCM_REVISION
           
 
Method Summary
 void add(StoredTag tag)
          Add a tag to the device.
 void delete()
          Deletes the persisted instance of this StoredDevice.
 URLSource getBackupCertificateLocation()
          Gets the location of the certificate file to be used in a secure backup operation on a device
 java.net.URI getBackupFileLocation()
          Gets the location where the backup files are to be saved for a secure backup operation.
 java.lang.String getCurrentAMPVersion()
          Gets the current AMP version supported by this device.
 DeviceType getDeviceType()
          Gets the DeviceType for this device.
 StringCollection getFeatureLicenses()
          Gets the list of Strings that represent the feature licenses for this device.
 int getGUIPort()
          Gets the device's port for the WebGUI.
 int getHLMPort()
          Gets the device's port number for HLM communication.
 java.lang.String getHostname()
          Gets the hostname or IP address of this device.
 StoredDomain getManagedDomain(java.lang.String domainName)
          Gets the domain from the repository that has the specified name.
 StoredDomain[] getManagedDomains()
          Gets an array of the managed domains in this managed set.
 StoredManagedSet getManagedSet()
          If this is a managed device, return the StoredManagedSet that owns this device member.
 ModelType getModelType()
          Gets the ModelType for this device.
 java.lang.String getPassword()
          Gets the administrative password for this device.
 java.lang.String getPrimaryKey()
          A unique identifier for this StoredDevice in the repository which can be used as a primary key to retrieve and store the data.
 int getQuiesceTimeout()
          Gets the persisted timeout value for quiescing the device.
 java.lang.String getSerialNumber()
          Gets the serial number of this device.
 java.lang.String getSymbolicName()
          Gets the symbolic name of this StoredDevice.
 StoredTag[] getTags()
          Gets the tags for this device.
 java.lang.String getUserId()
          Gets the administrative userid persisted on this StoredDevice.
 void remove(StoredDomain domain)
          Removes the specified domain from this containing StoredDevice.
 void remove(StoredTag tag)
          Remove the tags for this device.
 void removeTags()
          Remove all tags for this device.
 void setBackupCertificateLocation(URLSource certificatesLocation)
          Stores the location of the certificate file to be used in the secure backup operation.
 void setBackupFileLocation(java.net.URI fileLocation)
          Stores the location for the backup file from a Device.
 void setCurrentAMPVersion(java.lang.String ampVersion)
          Sets the current AMP version supported by this device.
 void setFeatureLicenses(StringCollection featureLicenses)
          Sets the list of Strings that represent the feature licenses for this device.
 void setGUIPort(int guiPort)
          Sets the device's port for the WebGUI.
 void setHLMPort(int hlmPort)
          Sets the device's port number for HLM communication.
 void setHostname(java.lang.String hostname)
          Sets the hostname or IP address of this device.
 void setPassword(java.lang.String password)
          Sets the administrative password for this device.
 void setQuiesceTimeout(int timeout)
          Sets the timeout value for quiescing a Device before performing a firmware update on the device.
 void setSymbolicName(java.lang.String name)
          Sets the symbolic name of this StoredDevice.
 void setUserId(java.lang.String userid)
          Sets the administrative userid for this device.
 

Field Detail

COPYRIGHT_2009_2010

static final java.lang.String COPYRIGHT_2009_2010
See Also:
Constant Field Values

SCM_REVISION

static final java.lang.String SCM_REVISION
See Also:
Constant Field Values
Method Detail

getPrimaryKey

java.lang.String getPrimaryKey()
A unique identifier for this StoredDevice in the repository which can be used as a primary key to retrieve and store the data.

Specified by:
getPrimaryKey in interface Persistable
Returns:
the the unique identifier for this object

getSymbolicName

java.lang.String getSymbolicName()
Gets the symbolic name of this StoredDevice. This name should be human-consumable and may be used in user interfaces. This is invoked by Device.getSymbolicName()to retrieve the symbolic name.

Returns:
the device Name
See Also:
setSymbolicName(String)

setSymbolicName

void setSymbolicName(java.lang.String name)
                     throws AlreadyExistsInRepositoryException,
                            DatastoreException
Sets the symbolic name of this StoredDevice. This name is designed to be human-consumable. This name must be unique but it is mutable. This is invoked by Device.setSymbolicName(String)to set this symbolic name.

Parameters:
name - the device name
See Also:
getSymbolicName()

getSerialNumber

java.lang.String getSerialNumber()
Gets the serial number of this device. The serial number is a unique value hard coded inside the device, and is the same serial number that appears in the WebGUI. The serial number is the primary key of this object in the repository. The serial number is immutable, thus there is no set method. This is invoked by Device.getSerialNumber() to retrieve the serial number of a persisted Device object.

Returns:
the device's embedded serial number

getHostname

java.lang.String getHostname()
Gets the hostname or IP address of this device. Users of the clientAPI can use Device.getHostname() to retrieve the hostname of a persisted Device object.

Returns:
the device's hostname or IP address
See Also:
setHostname(String)

setHostname

void setHostname(java.lang.String hostname)
                 throws DatastoreException
Sets the hostname or IP address of this device. This value is used when the repository attempts to communicate with the device. Users of the clientAPI can use Device.setHostname(String) to set the hostname a StoredDevice object.

Parameters:
hostname - the new hostname or IP address for this device *
See Also:
getHostname()

getCurrentAMPVersion

java.lang.String getCurrentAMPVersion()
Gets the current AMP version supported by this device. The AMP version is the string representation of the numeric version. The AMP version supported is determined by the firmware deployed on the device. Users of the clientAPI users can use Device.getCurrentAMPVersion() to retrieve the supported AMP version from a StoredDevice object.

Returns:
the device's current AMP version

setCurrentAMPVersion

void setCurrentAMPVersion(java.lang.String ampVersion)
                          throws DatastoreException
Sets the current AMP version supported by this device. The AMP version is the string representation of the numeric version. The AMP version supported is determined by the firmware.

Parameters:
ampVersion - the amp Version currently supported by the DataPower device

getManagedDomains

StoredDomain[] getManagedDomains()
Gets an array of the managed domains in this managed set. This is a convenience method used internally within the clientAPI and users can invoke it by calling Device.getManagedDomains(). If the device is not managed or has does not have any domains then no domains will be returned.

Domains cannot exist outside of a containing device object.

Returns:
an array of StoredDomain objects

getManagedDomain

StoredDomain getManagedDomain(java.lang.String domainName)
Gets the domain from the repository that has the specified name. This is a convenience method used internally within the clientAPI and this information can also be accessed by invoking Device.getManagedDomain(String)

Parameters:
domainName -
Returns:
the StoredDomain object

remove

void remove(StoredDomain domain)
            throws DatastoreException
Removes the specified domain from this containing StoredDevice. This does not affect the domain on the device. This is invoked by Device.removeManagedDomain(String). It is followed by logic to delete any child objects contained by the specified StoredDomain object. It will delete any StoredDomainVersion, StoredDeploymentPolicy and StoredDeploymentPolicyVersion objects contained by the StoredDomain in the repository.

Parameters:
domain - the domain to remove
See Also:
Repository.createDomain(StoredDevice, String)

getUserId

java.lang.String getUserId()
Gets the administrative userid persisted on this StoredDevice. It is use internally by the manager and also exposed through Device.getUserId().

Returns:
the device's administrative userid
See Also:
setUserId(String)

setUserId

void setUserId(java.lang.String userid)
               throws DatastoreException
Sets the administrative userid for this device. This value is used when the repository attempts to communicate with the device. It can be invoked using Device.getUserId().

Parameters:
userid - the new administrative userid *
See Also:
setUserId(String)

setPassword

void setPassword(java.lang.String password)
                 throws DatastoreException
Sets the administrative password for this device. This value is used when the repository attempts to communicate with the device. It can be invoked using Device.setPassword(String).

Parameters:
password - the new administrative password *
See Also:
getPassword()

getPassword

java.lang.String getPassword()
Gets the administrative password for this device. This value is used when the repository attempts to communicate with the device. It is invoked from Device.getDeviceContext(). The password must be set on the DeviceContext for AMP calls.

Returns:
password the new administrative password

getHLMPort

int getHLMPort()
Gets the device's port number for HLM communication. This is invoked by Device.getHLMPort() to retrieve the information from the repository.

Returns:
the device's port number for HLM communication
See Also:
setHLMPort(int)

setHLMPort

void setHLMPort(int hlmPort)
                throws DatastoreException
Sets the device's port number for HLM communication. This is invoked by Device.getHLMPort() to set the port number for HLM communication on a StoredDevice and persist it in the repository.

Parameters:
hlmPort - the device's port number for HLM communication.
See Also:
getHLMPort()

getGUIPort

int getGUIPort()
Gets the device's port for the WebGUI. This is invoked by Device.getGUIPort() to retrieve the information from the repository.

Returns:
the device's port for the WebGUI
See Also:
setGUIPort(int)

setGUIPort

void setGUIPort(int guiPort)
                throws DatastoreException
Sets the device's port for the WebGUI. This is invoked by Device.setGUIPort(int) to set the port number for the WebGUI on a StoredDevice and persist it in the repository.

Parameters:
guiPort - the device's port for the WebGUI
See Also:
getGUIPort()

getFeatureLicenses

StringCollection getFeatureLicenses()
Gets the list of Strings that represent the feature licenses for this device. This is invoked by Device.getFeatureLicenses() to retrieve the information from the repository.

Returns:
the list of Strings that represent the feature licenses for this device, i.e., "MQ", "TAM", etc.

setFeatureLicenses

void setFeatureLicenses(StringCollection featureLicenses)
                        throws DatastoreException
Sets the list of Strings that represent the feature licenses for this device. This is invoked by Device.createDevice(String, String, String, String, int) to set the feature entitlements for this device and persist it in the repository.

Parameters:
featureLicenses -
See Also:
getFeatureLicenses()

getManagedSet

StoredManagedSet getManagedSet()
If this is a managed device, return the StoredManagedSet that owns this device member. This is invoked by extensively by the clientAPI and also from Device.getManagedSet() to retrieve the information from the repository.

Returns:
the StoredManagedSet that the device is a member of. If the device is not a member of any StoredManagedSet, then this value will be null.
See Also:
StoredManagedSet.add(StoredDevice)

getDeviceType

DeviceType getDeviceType()
Gets the DeviceType for this device. This is invoked from Device.getDeviceType() to retrieve the information from the repository. The DeviceType is immutable, so there is no setDeviceType()

Returns:
the device's device type, i.e., "XS35", "XS40", "XI50"

getModelType

ModelType getModelType()
Gets the ModelType for this device. A device ModelType is immutable, so there is no need for a setModelType(). This is in invoked from Device.getModelType() to retrieve the information from the repository.

Returns:
the ModelType for this device

delete

void delete()
            throws DatastoreException
Deletes the persisted instance of this StoredDevice. This is in invoked from Manager.remove(com.ibm.datapower.wamt.clientAPI.Device) If this StoredDevice is managed by a StoredManagedSet,i.e it is a device member of a StoredManagedSet, it will be removed from that StoredManagedSet before it is deleted. Also all stored objects contained within the StoredManagedSet such as StoredDomain, DomainVersion, StoredDeploymentPolicy, StoredDeploymentPolicyVersion, and StoredTag are also deleted because they do not exist without the containing StoredDevice object.


setBackupFileLocation

void setBackupFileLocation(java.net.URI fileLocation)
Stores the location for the backup file from a Device. This information is stored when Device.backup(String, URLSource, URI, boolean, boolean) is invoked to backup up a managed or unmanaged device.

Parameters:
fileLocation - indicates location of back up files for a secure backup operation

getBackupFileLocation

java.net.URI getBackupFileLocation()
Gets the location where the backup files are to be saved for a secure backup operation.

Returns:
location which holds location of backed up files that can be later used during the restore operation on the device

setBackupCertificateLocation

void setBackupCertificateLocation(URLSource certificatesLocation)
Stores the location of the certificate file to be used in the secure backup operation. This information is stored when Device.backup(String, URLSource, URI, boolean, boolean) is invoked to backup up a managed or unmanaged device.

Parameters:
certificatesLocation - indicates location of back up certificates that can be later used during the restore operation on the device

getBackupCertificateLocation

URLSource getBackupCertificateLocation()
Gets the location of the certificate file to be used in a secure backup operation on a device

Returns:
the location which holds the certificate file that can be later used during the restore operation on the device

setQuiesceTimeout

void setQuiesceTimeout(int timeout)
Sets the timeout value for quiescing a Device before performing a firmware update on the device. This is invoked by Device.setQuiesceTimeout(int)

Parameters:
timeout - value in sec

getQuiesceTimeout

int getQuiesceTimeout()
Gets the persisted timeout value for quiescing the device. This is invoked by Device.getQuiesceTimeout()

Returns:
timeout value in sec

add

void add(StoredTag tag)
Add a tag to the device. This is invoked by Device.addTag(String, String) to set the tag on a StoredTag and persist it in the repository.

Parameters:
tag - StoreTag

getTags

StoredTag[] getTags()
Gets the tags for this device. This is invoked from Device.getTagNames(), Device.getTagValues(String), Device.removeTag(String) and Device.removeTag(String, String), to retrieve the information from the repository.

Returns:
a array of StoredTags

remove

void remove(StoredTag tag)
            throws DatastoreException
Remove the tags for this device. This is invoked from Device.removeTag(String, String) and Device.removeTag(String)

Parameters:
tag - the StoredTag

removeTags

void removeTags()
Remove all tags for this device. This is invoked from Device.removeTags()



© Copyright IBM Corp. 2006, 2010 All Rights Reserved.