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

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

public class StoredDeploymentPolicyVersionImpl
extends java.lang.Object
implements StoredDeploymentPolicyVersion

Holds all information related to a deployment policy version that can be used during domain configuration deployment to a DataPower device. The policy name, the domain name, policy type, and deployment policy image information is persisted in the local file system. Below is a sample of a deployment policy versions element contained within a deploymentPolicy element.

 
 <deploymentPolicy xmi:id="DPPolicy_0" highestVersion="1" policyName="lathas" SynchDate="1276806718906" SourceURL="file:///C:/DataPower2010/DatapowerTest/lathasdomain.zip" policyType="EXPORT" domainName="lathas">
     <versions xmi:id="DPPolicyVersion_0" timeCreatedInManager="1276807490921" userComment="Version generated from Domain.deployConfiguration()" versionImageFileLocation="Blob9198776463933681699.bin" versionNumber="1" policyType="EXPORT" domainName="lathas" policyName="lathas"/>
 </deploymentPolicy>
 
 


Field Summary
 
Fields inherited from interface com.ibm.datapower.wamt.dataAPI.StoredDeploymentPolicyVersion
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 void delete()
          Deletes the version from the repository.
 Blob getBlob()
          Gets the binary image for this version.
 StoredDeploymentPolicy getDeploymentPolicy()
          Returns the persisted StoredDeploymentPolicy that contains this version.
 StoredDomain getDomain()
           
 java.lang.String getPolicyDomainName()
          Gets the domain name on the StoredDeploymentPolicyVersion.
 java.lang.String getPolicyName()
          Gets the policy object name persisted on the StoredDeploymentPolicyVersion object.
 DeploymentPolicyType getPolicyType()
          Gets the DeploymentPolicyType on the StoredDeploymentPolicyVersion.
 java.lang.String getPrimaryKey()
          Returns Unique identifier for this StoredDeploymentPolicyVersion.
 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 setPolicyDomainName(java.lang.String policyDomain)
          Sets the Policy Domain name on the StoredDeploymentPolicyVersion object which can be used along with the configuration source, domain name and policy object name during domain configuration deployment.
 void setPolicyName(java.lang.String policyName)
          Sets the policy object name on the StoredDeploymentPolicyVersion object which can be used along with the configuration source, domain name and policy object name during domain configuration deployment.
 void setPolicyType(DeploymentPolicyType policyType)
           
 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

getPrimaryKey

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

Note: The Local File System implementation uses the unique identifier of the StoredDeploymentPolicy combined with the version number of this StoredDeploymentPolicyVersion.

Specified by:
getPrimaryKey in interface Persistable
Specified by:
getPrimaryKey in interface StoredDeploymentPolicyVersion
Returns:
the unique identifier for this object
See Also:

, StoredDeploymentPolicy.getPrimaryKey()

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

setPolicyDomainName

public void setPolicyDomainName(java.lang.String policyDomain)
Description copied from interface: StoredDeploymentPolicyVersion
Sets the Policy Domain name on the StoredDeploymentPolicyVersion object which can be used along with the configuration source, domain name and policy object name during domain configuration deployment.

Note: The policy domain name is stored as an attribute on the policydeployment version element by the Local File System implementation.

Specified by:
setPolicyDomainName in interface StoredDeploymentPolicyVersion
Parameters:
policyDomain - the policy domain name that serves as an "index" into the configuration source, and points to the domain within the configuration source blob.
See Also:
StoredVersion.getVersionedObject()

getDeploymentPolicy

public StoredDeploymentPolicy getDeploymentPolicy()
Description copied from interface: StoredDeploymentPolicyVersion
Returns the persisted StoredDeploymentPolicy that contains this version. This is invoked by DeploymentPolicyVersion.getDeploymentPolicy().

Note: For the Local File System implementation, the deploymentpolicy element contains version elements in the WAMT.repository.xml file.

Specified by:
getDeploymentPolicy in interface StoredDeploymentPolicyVersion
Returns:
instance of StoredDeploymentPolicy which holds all the related versions

getDomain

public StoredDomain getDomain()

getPolicyType

public DeploymentPolicyType getPolicyType()
Description copied from interface: StoredDeploymentPolicyVersion
Gets the DeploymentPolicyType on the StoredDeploymentPolicyVersion. It is used internally and cannot be set by users of the clientAPI.

Note: The policy type is an enumerated type which is stored as an attribute on the policydeployment version element in Local File System implementation,

Specified by:
getPolicyType in interface StoredDeploymentPolicyVersion
Returns:
the persisted deployment policy type on the DeploymentPolicyVersion
See Also:
StoredVersion.getVersionedObject(), DeploymentPolicyType.XML, DeploymentPolicyType.EXPORT

setPolicyName

public void setPolicyName(java.lang.String policyName)
Description copied from interface: StoredDeploymentPolicyVersion
Sets the policy object name on the StoredDeploymentPolicyVersion object which can be used along with the configuration source, domain name and policy object name during domain configuration deployment. This is invoked internally by by clientAPI when a domain source configuration is deployed.

Note: The policy name is stored as an attribute on the policydeployment version element by the Local File System implementation,

Specified by:
setPolicyName in interface StoredDeploymentPolicyVersion
Parameters:
policyName - the policy name that is used along with the domain name to index into the configuration source and points to the domain, and associated deployment policy within the configuration source.
See Also:
DeploymentPolicy.setPolicyExport(com.ibm.datapower.wamt.clientAPI.URLSource, String, String), StoredVersion.getVersionedObject()

getPolicyName

public java.lang.String getPolicyName()
Description copied from interface: StoredDeploymentPolicyVersion
Gets the policy object name persisted on the StoredDeploymentPolicyVersion object. This is exposed by DeploymentPolicyVersion.getPolicyName().

Note: The policy name is stored as an attribute on the policydeployment version element by the Local File System implementation,

Specified by:
getPolicyName in interface StoredDeploymentPolicyVersion
Returns:
the policy name that is used along with the domain name to index into the configuration source and point to the deployment policy and associated domain within the configuration source.
See Also:
StoredVersion.getVersionedObject(), DeploymentPolicy.setPolicyExport(com.ibm.datapower.wamt.clientAPI.URLSource, String, String)

setPolicyType

public void setPolicyType(DeploymentPolicyType policyType)

getPolicyDomainName

public java.lang.String getPolicyDomainName()
Description copied from interface: StoredDeploymentPolicyVersion
Gets the domain name on the StoredDeploymentPolicyVersion. It is used as an index into the configuration source. A version is created with each domain deployment. It is called by DeploymentPolicyVersion.getPolicyDomainName().

Note: For the Local File System implementation, the policy domain name is stored as an attribute on the policydeployment version element.

Specified by:
getPolicyDomainName in interface StoredDeploymentPolicyVersion
Returns:
the policy domain name that serves as an "index" into the configuration source, and points to the domain within the domain configuration blob.
See Also:
DeploymentPolicy.setPolicyExport(com.ibm.datapower.wamt.clientAPI.URLSource, String, String)


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