com.ibm.datapower.wamt.dataAPI.local.filesystem
Class StoredFirmwareImpl

java.lang.Object
  extended by com.ibm.datapower.wamt.dataAPI.local.filesystem.StoredFirmwareImpl
All Implemented Interfaces:
Persistable, StoredFirmware

public class StoredFirmwareImpl
extends java.lang.Object
implements StoredFirmware

Persists all Firmware related information. This includes the device type, model type, strict features list, and non-strict feature list. It acts as a container for all the FirmwareVersions for this device type. The firmware that is deployed to devices is persisted in separate bin files in the local file system. Below is a sample firmware element which can contain multiple firmware versions

 
 <firmwares xmi:id="DPFirmware_0" deviceType="XI50" highestVersion="1" modelType="9003" strictFeatures="" nonstrictFeatures="DataGlue;JAXP-API;PKCS7-SMIME;HSM;XG4;Compact-Flash;iSCSI;RaidVolume;LocateLED;AppOpt;MQ;WebSphere-JMS;">
   ...
 </firmwares> 
 
 

See Also:
StoredFirmware, StoredFirmwareVersion, Firmware, FirmwareVersion

Field Summary
 
Fields inherited from interface com.ibm.datapower.wamt.dataAPI.StoredFirmware
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 void delete()
          Deletes the persisted instance of this StoredFirmware.
 DeviceType getDeviceType()
          Gets the deviceType of this StoredFirmware.
 int getHighestVersionNumber()
          Gets the highest version number that has EVER been used for a version of this object.
 ModelType getModelType()
          Gets the modelType of this StoredFirmware.
 StringCollection getNonstrictFeatures()
          Gets the StringCollection that represents the nonstrict features supported by this firmware.
 java.lang.String getPrimaryKey()
          Returns the unique identifier for this StoredFirmware.
 StringCollection getStrictFeatures()
          Gets the StringCollection that represents the strict features supported by this firmware.
 StoredFirmwareVersion[] getVersions()
          Returns all the FirmwareVersions contained by this StoredFirmware object.
 void remove(StoredFirmwareVersion firmwareVersion)
          Removes the specifed StoredFirmwareVersion from this StoredFirmware.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDeviceType

public DeviceType getDeviceType()
Description copied from interface: StoredFirmware
Gets the deviceType of this StoredFirmware. StoredFirmware is specific to a combination of device type + model type + features. The deviceType is immutable, so there is no setDeviceType method. This is invoked by Firmware.getDeviceType()

Note: The Local File System implementation persists device type as an attribute on firmwares element in the WAMT.repository.xml file.

Specified by:
getDeviceType in interface StoredFirmware
Returns:
the device type that this firmware must run on

getModelType

public ModelType getModelType()
Description copied from interface: StoredFirmware
Gets the modelType of this StoredFirmware. StoredFirmware is specific to a combination of device type + model type + features. The deviceType is immutable, so there is no setModelType method. This is invoked by Firmware.getModelType()

Note: The Local File System implementation persists device model type as an attribute on firmwares element in the WAMT.repository.xml file.

Specified by:
getModelType in interface StoredFirmware
Returns:
the device type that this firmware must run on

getStrictFeatures

public StringCollection getStrictFeatures()
Description copied from interface: StoredFirmware
Gets the StringCollection that represents the strict features supported by this firmware. If a Firmware supports a strict feature, it can ONLY be installed on devices having a license for that feature.

StoredFirmware is specific to a combination of device type + model type + strictfeatures + nonstrictFeatures. The strictFeatures attribute is immutable, so there is no setStrictFeatures method. This is invoked by Firmware.getStrictFeatures()

Note: The Local File System implementation persists the collection of strict features as an attribute on firmwares element in the WAMT.repository.xml file.

Specified by:
getStrictFeatures in interface StoredFirmware
Returns:
the StringCollection that represent the strict features supported by this firmware. i.e., "MQ", "TAM", etc.

getNonstrictFeatures

public StringCollection getNonstrictFeatures()
Description copied from interface: StoredFirmware
Gets the StringCollection that represents the nonstrict features supported by this firmware. If a Firmware supports a nonstrict feature, it can be installed on a device irrespective of whether that device has a licence for that feature.

StoredFirmware is specific to a combination of device type + model type + strictfeatures + nonstrictFeatures. The nonstrictFeatures attribute is immutable, so there is no setNonstrictFeatures method. This is invoked by Firmware.getNonstrictFeatures()

Note: The Local File System implementation persists the collection of non-strict features as an attribute on firmwares element in the WAMT.repository.xml file.

Specified by:
getNonstrictFeatures in interface StoredFirmware
Returns:
the StringCollection that represent the nonstrict features supported by this firmware. i.e., "DataGlue;JAXP-API;PKCS7-SMIME;HSM;XG4;Compact-Flash;iSCSI;RaidVolume;LocateLED;AppOpt;MQ;WebSphere-JMS;"

getVersions

public StoredFirmwareVersion[] getVersions()
Description copied from interface: StoredFirmware
Returns all the FirmwareVersions contained by this StoredFirmware object. This is invoked by Firmware.getVersions()

Specified by:
getVersions in interface StoredFirmware
Returns:
the FirmwareVersions contained by this StoredFirmware object

getPrimaryKey

public java.lang.String getPrimaryKey()
Description copied from interface: StoredFirmware
Returns the unique identifier for this StoredFirmware. This is invoked by Firmware.getPrimaryKey(). There is no setPrimaryKey exposed since it is managed by the dataAPI implementation.

Note: The Local File System implementation combines the device type, model type, strict features and non-strict features as the unique identifier of this object.

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

remove

public void remove(StoredFirmwareVersion firmwareVersion)
            throws NotExistInRepositoryException
Description copied from interface: StoredFirmware
Removes the specifed StoredFirmwareVersion from this StoredFirmware. This is invoked by Firmware.remove(com.ibm.datapower.wamt.clientAPI.Version).

Specified by:
remove in interface StoredFirmware
Parameters:
firmwareVersion - the StoredFirmwareVersion to remove
See Also:
Repository.createFirmwareVersion(StoredFirmware, Blob, String, Date, String, Date)

delete

public void delete()
Description copied from interface: StoredFirmware
Deletes the persisted instance of this StoredFirmware. This is invoked by Manager.remove(com.ibm.datapower.wamt.clientAPI.Firmware) which also contains the logic to removes any contained FirmwareVersions.

Specified by:
delete in interface StoredFirmware

getHighestVersionNumber

public int getHighestVersionNumber()
Description copied from interface: StoredFirmware
Gets the highest version number that has EVER been used for a version of this object. Used to create unique identifiers for the versions of this object. It is OK for this number to wrap as long as it doesn't create duplicated identifiers among the current set of versions. This is invoked by Firmware.getHighestVersionNumber()

Note: The Local File System implementation persists the highest version number as an attribute on firmwares element in the WAMT.repository.xml file.

Specified by:
getHighestVersionNumber in interface StoredFirmware
Returns:
The highest version number that has EVER been for a version of this object


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