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

java.lang.Object
  extended by com.ibm.datapower.wamt.dataAPI.local.filesystem.StoredFirmwareVersionImpl
All Implemented Interfaces:
Persistable, StoredFirmwareVersion, StoredVersion

public class StoredFirmwareVersionImpl
extends java.lang.Object
implements StoredFirmwareVersion

A persisted version of a Firmware i.e StoredFirmware. FirmwareVersions can be deployed to managed or unmanaged devices. A firmwareVersion can be deployed to all device members that belong to a ManagedSet. Below is a sample firmware version uniquely identified by the level, contained within a firmware which is uniquely identified by its attributes: device type, model type, strict featires and non-strict features.

 
 <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;">
   <versions xmi:id="DPFirmwareVersion_0" timeCreatedInManager="1273597277312" userComment="/dev-xi-186298.scrypt2" versionImageFileLocation="Blob302265539053947690.bin" versionNumber="1" manufactureDate="1272586131000" level="3.8.1.0"/>
 </firmwares> 
 
 

See Also:
StoredFirmware, StoredFirmwareVersion, Firmware, FirmwareVersion

Field Summary
 
Fields inherited from interface com.ibm.datapower.wamt.dataAPI.StoredFirmwareVersion
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 void delete()
          Deletes the version from the repository.
 Blob getBlob()
          Gets the binary image for this version.
 StoredFirmware getFirmware()
          Gets the StoredFirmware Object that contains this StoredFirmwareVersion.
 java.lang.String getLevel()
          Gets the version level of this firmware.
 java.util.Date getManufactureDate()
          Gets the manufacture date of this firmware.
 java.lang.String getPrimaryKey()
          Returns the Unique identifier for this StoredFirmwareVersion.
 java.util.Date getTimestamp()
          Gets the timestamp that signifies when the StoredVersion was created in the repository.
 java.lang.String getUserComment()
          Gets the user comment that corresponds to this version.
 java.lang.Object getVersionedObject()
          Gets a reference to the object that this StoredVersion describes.
 int getVersionNumber()
          Gets the version number that this StoredVersion object represents.
 void setUserComment(java.lang.String comment)
          This method is used to set the user comment that can be later retrieved via StoredVersion.getUserComment().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLevel

public java.lang.String getLevel()
Description copied from interface: StoredFirmwareVersion
Gets the version level of this firmware. This value is embedded in the firmware image, so there is no setLevel(String) method. It will be automatically populated in this object by the setImage method. This is invoked by FirmwareVersion.getLevel()

Note: The Local File System implementation persists the level an an attribute on this version element in the WAMT.repository.xml

Specified by:
getLevel in interface StoredFirmwareVersion
Returns:
the firmware version level, for example 3.5.1.12.

getManufactureDate

public java.util.Date getManufactureDate()
Description copied from interface: StoredFirmwareVersion
Gets the manufacture date of this firmware. This value is embedded in the firmware image, so there is no setManufactureDate(Date) method. It will be automatically populated in this object by the setImage method. This is invoked by FirmwareVersion.getManufactureDate()

Note: The Local File System implementation persists date of manufacture an an attribute on this version element in the WAMT.repository.xml

Specified by:
getManufactureDate in interface StoredFirmwareVersion
Returns:
the date of manufacture of this firmware image

getFirmware

public StoredFirmware getFirmware()
Description copied from interface: StoredFirmwareVersion
Gets the StoredFirmware Object that contains this StoredFirmwareVersion. This is invoked by FirmwareVersion.getFirmware()

Specified by:
getFirmware in interface StoredFirmwareVersion
Returns:
he StoredFirmware Object that contains this StoredFirmwareVersion

getPrimaryKey

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

Note: The Local File System implementation combines the unique identifier of the containing firmware with the firmware level to generate the unique identifier of this object.

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

getVersionNumber

public int getVersionNumber()
Description copied from interface: StoredVersion
Gets the version number that this StoredVersion object represents. StoredVersion numbers are immutable in the StoredVersion object, and are incremented automatically by the repository when a new StoredVersion object is created, so there is no setVersionNumber(int) method. The combination of version number and Object reference forms the primary key for a StoredVersion object in the repository.

Specified by:
getVersionNumber in interface StoredVersion
Returns:
the version number that this StoredVersion object represents.

getVersionedObject

public java.lang.Object getVersionedObject()
Description copied from interface: StoredVersion
Gets a reference to the object that this StoredVersion describes.

Specified by:
getVersionedObject in interface StoredVersion
Returns:
a reference to either a StoredFirmware, StoredDomain, or StoredSettings object.

getTimestamp

public java.util.Date getTimestamp()
Description copied from interface: StoredVersion
Gets the timestamp that signifies when the StoredVersion was created in the repository. This value is set automatically by the repository, so there is no setTimestamp(Date) method. The timestamp is accessed from DomainVersion.getTimestamp(), FirmwareVersion.getTimestamp(), and DeploymentPolicyVersion.getTimestamp()

Specified by:
getTimestamp in interface StoredVersion
Returns:
the timestamp of the StoredVersion creation

getUserComment

public java.lang.String getUserComment()
Description copied from interface: StoredVersion
Gets the user comment that corresponds to this version. This is where the user can attach a String to the StoredVersion that helps describe the version in their terms. The comment is can be obtained by calling DomainVersion.getUserComment(), FirmwareVersion.getUserComment(), DeploymentPolicyVersion.getUserComment()

Specified by:
getUserComment in interface StoredVersion
Returns:
the user comment associated with this version
See Also:
StoredVersion.setUserComment(String)

setUserComment

public void setUserComment(java.lang.String comment)
                    throws DatastoreException
Description copied from interface: StoredVersion
This method is used to set the user comment that can be later retrieved via StoredVersion.getUserComment(). Calling this method will cause the comment to be written to the repository. The comment is set by invoking DomainVersion.setUserComment(String), FirmwareVersion.setUserComment(String), DeploymentPolicyVersion.setUserComment(String)

Specified by:
setUserComment in interface StoredVersion
Parameters:
comment - the user-defined comment to attach to this StoredVersion. It may have reference to a new function, bug fix, change management or problem management ticket, etc. This is a freeform field of unlimited length.
See Also:
StoredVersion.getUserComment()

getBlob

public Blob getBlob()
Description copied from interface: StoredVersion
Gets the binary image for this version. This is used internally by the clientAPI when deploying domain source configuration or firmware to a DataPower device. The blob can also be accessed by invoking DomainVersion.getBlob(), FirmwareVersion.getBlob(), DeploymentPolicyVersion.getBlob() The image is set by the clientAPI and store by the repository, so there is no setBlob method.

Specified by:
getBlob in interface StoredVersion
Returns:
the blob

delete

public void delete()
Description copied from interface: StoredVersion
Deletes the version from the repository. Will remove the version from it's container and delete the Blob for this StoredVersion. This is invoked internally by the manager to remove a version.

Specified by:
delete in interface StoredVersion


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