com.ibm.datapower.wamt.clientAPI
Class DomainVersion

java.lang.Object
  extended by com.ibm.datapower.wamt.clientAPI.DomainVersion
All Implemented Interfaces:
Version

public class DomainVersion
extends java.lang.Object
implements Version

Internal use only

A class to track the versions of a Domain. There may be multiple DomainVersions for a single Domain.

This object (by way of the StoredDomainVersion member) has the Blob that contains the data that represents this domain's configuration.

If the domain is not the domain named "default", then the Blob is a generic domain export, the same you would get via the WebGUI.

For more information refer to the javadoc for Domain and Version.

See Also:
Domain

Field Summary
static java.lang.String COPYRIGHT_2009_2013
           
 
Fields inherited from interface com.ibm.datapower.wamt.clientAPI.Version
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 ProgressContainer diff(DomainVersion that)
          Generate a background task to get a visual representation of the differences of a domain between two versions.
 java.lang.String getAbsoluteDisplayName()
          Get a human-readable name that represents this object.
 Blob getBlob()
          Get the Blob that is attached to this Version.
static DomainVersion getByPrimaryKey(java.lang.String targetKey)
          Retrieve a reference to the DomainVersion that has the specified primary key.
 Domain getDomain()
          Get the Domain that this object is a Version of.
 java.lang.String getPrimaryKey()
           
 java.lang.String getRelativeDisplayName()
          Get a human-readable name that represents this object.
 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 Version.getUserComment().
 java.lang.String toString()
          Get a String representation of this object for the purpose of debugging or tracing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_2009_2013

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

getVersionedObject

public Versionable getVersionedObject()
                               throws DeletedException
Description copied from interface: Version
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.

Specified by:
getVersionedObject in interface Version
Returns:
a reference to either a Firmware, Domain, or DeploymentPolicy object.

getDomain

public Domain getDomain()
                 throws DeletedException
Get the Domain that this object is a Version of. This is the same as getVersionedObject(), except that it returns an object with type Domain instead of the parent type Versionable.

Returns:
the Domain that this object is a Version of.

getPrimaryKey

public java.lang.String getPrimaryKey()
                               throws DeletedException

getByPrimaryKey

public static DomainVersion getByPrimaryKey(java.lang.String targetKey)
Retrieve a reference to the DomainVersion that has the specified primary key.

Parameters:
targetKey - the primary key to search for
Returns:
the DomainVersion that has the specified primary key. May return null if no DomainVersion with the specified primary key was found.
See Also:
getPrimaryKey()

diff

public ProgressContainer diff(DomainVersion that)
                       throws DeletedException,
                              DatastoreException,
                              FullException
Generate a background task to get a visual representation of the differences of a domain between two versions. This DomainVersion will be compared to the DomainVersion parameter. The diff will be performed on the device, since the manager has no knowledge of the domain internals and instead treats the DomainVersions' Blob as opaque. Since the diff is performed on the device, this is considered a long-running task and is why it returns a ProgressContainer.

Parameters:
that - the other DomainVersion to be used for comparison to "this"
Returns:
a ProgressContainer so you can monitor this progress of this long-running task. If the ProgressContainer indicates successful completion, you can retrieve a URL object from the ProgressContainer. It is expected that this URL can be opened in an external web browser that will connect to a predefined point on a DataPower device that will generate the diff content for the browser.
See Also:
"useCases section 4.8"

getVersionNumber

public int getVersionNumber()
                     throws DeletedException
Description copied from interface: Version
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.

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

getTimestamp

public java.util.Date getTimestamp()
                            throws DeletedException
Description copied from interface: Version
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.

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

getUserComment

public java.lang.String getUserComment()
                                throws DeletedException
Description copied from interface: Version
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.

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

setUserComment

public void setUserComment(java.lang.String userComment)
                    throws DeletedException,
                           DatastoreException,
                           DirtySaveException
Description copied from interface: Version
This is the method to set the user comment that can be later retrieved via Version.getUserComment(). Calling this method will cause the comment to be written to the persisted datastore.

Specified by:
setUserComment in interface Version
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:
Version.getUserComment()

getBlob

public Blob getBlob()
             throws DeletedException
Description copied from interface: Version
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.

Specified by:
getBlob in interface Version
Returns:
the blob for this version

toString

public java.lang.String toString()
Get a String representation of this object for the purpose of debugging or tracing.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object for the purpose of debugging or tracing.

getRelativeDisplayName

public java.lang.String getRelativeDisplayName()
Get a human-readable name that represents this object. This name may be used in user interfaces. This name is relative within the context of a Domain within a ManagedSet. For example "3".

Returns:
a human-readable name that represents this object.

getAbsoluteDisplayName

public java.lang.String getAbsoluteDisplayName()
Get a human-readable name that represents this object. This name may be used in user interfaces. This name is absolute within the context of the whole system. For example, "3 of domain domain1 in managed set set1".

Returns:
a human-readable name that represents this object.


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