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

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

public class StoredDomainVersionImpl
extends java.lang.Object
implements StoredDomainVersion

A version of Domain object persisted in the repository that can be deployed to a DataPower device. It is contained within the Domain on which it is deployed. It is persisted when a domain configuration is successfully deployed by the manager. Below is a sample domain version element as well as the deployment policy and deployment version that are also created and persisted with the domain version by the clientAPI.

 
 <domains xmi:id="DPDomain_0" highestVersion="1" name="domain1" SourceURL="device://9.42.112.79/domain1" SynchDate="0" OutOfSynch="false" checkVersionSynch="false" quiesceTimeout="60" SyncMode="MANUAL">
     <versions xmi:id="DPDomainVersion_0" timeCreatedInManager="1276807490921" userComment="Version generated from Domain.deployConfiguration()" versionImageFileLocation="Blob9074270970331689053.bin" versionNumber="1" xsi:type="dat:DPDomainVersion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
     <deploymentPolicy xmi:id="DPPolicy_0" highestVersion="1" policyName="domain1" SynchDate="1276806718906" SourceURL="file:///C:/DataPower2010/DatapowerTest/domain.zip" policyType="EXPORT" domainName="domain1">
       <versions xmi:id="DPPolicyVersion_0" timeCreatedInManager="1276807490921" userComment="Version generated from Domain.deployConfiguration()" versionImageFileLocation="Blob9198776463933681699.bin" versionNumber="1" policyType="EXPORT" domainName="domain1" policyName="domain1"/>
     </deploymentPolicy>
 </domains>
 
 


Field Summary
 
Fields inherited from interface com.ibm.datapower.wamt.dataAPI.StoredDomainVersion
COPYRIGHT_2009_2010, SCM_REVISION
 
Method Summary
 void delete()
           Note: The Local File System implementation clears the Stored object and removes the version element from the WAMT.repository.xml file.
 Blob getBlob()
           Note: The Local File System implementation stores each image as a separate bin file.
 StoredDomain getDomain()
           Note: In the Local File System implementation the Domain element contains version elements in the WAMT.repository.xml file.
 java.lang.String getPrimaryKey()
           Note: The Local File System implementation uses the unique identifier of the StoredDomain combined with the version number of this StoredDomainVersion.
 java.util.Date getTimestamp()
           Note: The Local File System implementation stores the timestamp as an attribute on the version element
 java.lang.String getUserComment()
           Note: The Local File System implementation stores the getUserComment as an attribute on the version elements
 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 recordDomainVersion(java.io.OutputStream outputStream)
           Note: The Local File System implementation is provided for the convenience of customers that wish to write their own dataAPI implementation.
 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()

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

Specified by:
getPrimaryKey in interface Persistable
Specified by:
getPrimaryKey in interface StoredDomainVersion
Returns:
the unique identifier for this object

getDomain

public StoredDomain getDomain()

Note: In the Local File System implementation the Domain element contains version elements in the WAMT.repository.xml file.

Specified by:
getDomain in interface StoredDomainVersion
Returns:
StoredDomain object

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

Note: The Local File System implementation stores the timestamp as an attribute on the version element

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

getUserComment

public java.lang.String getUserComment()

Note: The Local File System implementation stores the getUserComment as an attribute on the version elements

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

Note: The Local File System implementation stores each image as a separate bin file. The name of the file is stored as an attribute on the version element in the WAMT.repository.xml file.

Specified by:
getBlob in interface StoredVersion
Returns:
the blob

delete

public void delete()

Note: The Local File System implementation clears the Stored object and removes the version element from the WAMT.repository.xml file. It does not modify any other elements. The corresponding deployment policy version is deleted by logic in clientAPI.

Specified by:
delete in interface StoredVersion

recordDomainVersion

public void recordDomainVersion(java.io.OutputStream outputStream)

Note: The Local File System implementation is provided for the convenience of customers that wish to write their own dataAPI implementation.

Specified by:
recordDomainVersion in interface StoredDomainVersion
Parameters:
outputStream - that will be used to write the report
See Also:



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