com.ibm.datapower.wamt.clientAPI
Interface Version

All Known Implementing Classes:
DeploymentPolicyVersion, DomainVersion, FirmwareVersion

public interface Version

A version of an object that is Versionable. A Versionable object can have a collection of Versions. For example, a Domain object can have a collection of DomainVersions. The data associated with a particular version is stored in the Version object instead of the Versionable object.

A Version should have several attributes.

Please see the list of known implementing classes.

During debug and troubleshooting, it may be helpful to obtain a copy of the Blob as returned from getBlob() if there is a question if the Blob attached to this version is different from what is persisted on the device and how it interacts in Commands.isDomainDifferent(String, byte[], byte[], com.ibm.datapower.wamt.amp.DeviceContext) Beware that the Blob file may be Base64 encoded in the repository, depending on the implementation of Commands and Repository that is being used, the default implementation does store the Blob as Base64 encoded, so you will need to Base64 decode the file before using it in the WebGUI. For a Blob in:

See Also:
Versionable

Field Summary
static java.lang.String COPYRIGHT_2009_2010
           
static java.lang.String SCM_REVISION
           
 
Method Summary
 Blob getBlob()
          Get the Blob that is attached to this Version.
 java.util.Date getTimestamp()
          Get the timestamp that signifies when the Version was created in the Manager.
 java.lang.String getUserComment()
          Get the user comment that corresponds to this Version.
 Versionable getVersionedObject()
          Get a reference to the object that this Version is a version of.
 int getVersionNumber()
          Get the version number that this Version object represents.
 void setUserComment(java.lang.String userComment)
          This is the method to set the user comment that can be later retrieved via getUserComment().
 

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()
                     throws DeletedException
Get the version number that this Version object represents. Version numbers are immutable in the Version object, and are incremented automatically by the Manager when a new Version object is created, so there is no setVersionNumber(int) method. The combination of version number and Object reference forms the primary key for a Version object in the Manager.

Returns:
the version number that this Version object represents.

getVersionedObject

Versionable getVersionedObject()
                               throws DeletedException
Get a reference to the object that this Version is a version of. For example, calling DomainVersion.getVersionedObject() should return a Domain, which is the parent object. This should be a reminder for the subclass to implement the method getDomain() or getFirmware() that would return a typed object instead of a generic one. It isn't expected that a caller would actually use this method.

Returns:
a reference to either a Firmware, Domain, or DeploymentPolicy object.

getTimestamp

java.util.Date getTimestamp()
                            throws DeletedException
Get the timestamp that signifies when the Version was created in the Manager. This value is set automatically by the Manager, so there is no setTimestamp(Date) method.

Returns:
the timestamp of the Version creation

getUserComment

java.lang.String getUserComment()
                                throws DeletedException
Get the user comment that corresponds to this Version. This is where the user can attach a String to the Version that helps describe the version in their terms.

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

setUserComment

void setUserComment(java.lang.String userComment)
                    throws DatastoreException,
                           LockBusyException,
                           DeletedException
This is the method to set the user comment that can be later retrieved via getUserComment(). Calling this method will cause the comment to be written to the persisted datastore.

Parameters:
userComment - the user-defined comment to attach to this Version. 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()
             throws DeletedException
Get the Blob that is attached to this Version. The Blob could be very large, FirmwareVersion blobs can be 20MB. The blob should have lazy instantiation, meaning that it isn't loaded from the datastore until this method is invoked.

Returns:
the blob for this version


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