com.ibm.datapower.wamt.dataAPI
Interface StoredVersion

All Superinterfaces:
Persistable
All Known Subinterfaces:
StoredDeploymentPolicyVersion, StoredDomainVersion, StoredFirmwareVersion
All Known Implementing Classes:
StoredDeploymentPolicyVersionImpl, StoredDomainVersionImpl, StoredFirmwareVersionImpl

public interface StoredVersion
extends Persistable

Information for a version of a Firmware, Domain or Deployment Policy that must be maintained and persisted. This information can be used to deploy firmware or domain configuration to a DataPower device. The user of the dataAPI is responsible for pruning excess or older versions that are no longer useful.

The following interfaces extend StoredVersion:


Field Summary
static java.lang.String COPYRIGHT_2009_2010
           
static java.lang.String SCM_REVISION
           
 
Method Summary
 void delete()
          Deletes the version from the repository.
 Blob getBlob()
          Gets the binary image for this version.
 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 getUserComment().
 
Methods inherited from interface com.ibm.datapower.wamt.dataAPI.Persistable
getPrimaryKey
 

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

getVersionNumber

int getVersionNumber()
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.

Returns:
the version number that this StoredVersion object represents.

getVersionedObject

java.lang.Object getVersionedObject()
Gets a reference to the object that this StoredVersion describes.

Returns:
a reference to either a StoredFirmware, StoredDomain, or StoredSettings object.

getTimestamp

java.util.Date getTimestamp()
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()

Returns:
the timestamp of the StoredVersion creation

getUserComment

java.lang.String getUserComment()
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()

Returns:
the user comment associated with this version
See Also:
setUserComment(String)

setUserComment

void setUserComment(java.lang.String comment)
                    throws DatastoreException
This method is used to set the user comment that can be later retrieved via 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)

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:
getUserComment()

getBlob

Blob getBlob()
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.

Returns:
the blob

delete

void delete()
            throws DatastoreException
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.



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