com.ibm.datapower.wamt.clientAPI
Class DeploymentPolicyVersion

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

public class DeploymentPolicyVersion
extends java.lang.Object
implements Version

A class to track the versions of a DeploymentPolicy. There may be multiple DeploymentPolicyVersions for a single DeploymentPolicy. A DeploymentPolicyVersion is created for each successful Domain deployment, even if the DeploymentPolicy is empty. A DeploymentPolicyVersion is tightly coupled with the DomainVersion. If the DomainVersion is deleted, the associated DeploymentPolicyVersion is deleted too.

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

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

See Also:
DeploymentPolicy, Domain.remove(Version)

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
 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 DeploymentPolicyVersion getByPrimaryKey(java.lang.String targetKey)
          Retrieve a reference to the DeploymentPolicyVersion that has the specified primary key.
 DeploymentPolicy getDeploymentPolicy()
          Get the DeploymentPolicy that this object is a Version of.
 java.lang.String getPolicyDomainName()
           
 java.lang.String getPolicyName()
           
 DeploymentPolicyType getPolicyType()
           
 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.

getDeploymentPolicy

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

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

getPrimaryKey

public java.lang.String getPrimaryKey()
                               throws DeletedException

getByPrimaryKey

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

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

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. This includes the version number.

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.

Returns:
a human-readable name that represents this object.Example: "DeploymentPolicyVersion : Version:1, URL Source:file:///C:/DP/policydefaultdp12.zip, Policy Domain Name:default, Policy Object Name:policy1 for Domain:domain1 on Device:dp12.dp.rtp.raleigh.ibm.com/9.42.101.11 in Managed Set:set1,Domain:domain1 on Device:dp12.raleighnc.ibm.com/9.42.102.72 in Managed Set:set1"

getPolicyDomainName

public java.lang.String getPolicyDomainName()
                                     throws DeletedException

getPolicyType

public DeploymentPolicyType getPolicyType()
                                   throws DeletedException

getPolicyName

public java.lang.String getPolicyName()
                               throws DeletedException


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