|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Repository
The object used for executing persistence operations such as retrieving and saving Stored objects available with the dataAPI
The implementor of this interface must provide a public static Repository getInstance() method to return the singleton instance of Repository. This is invoked when the Manager is initialized.
For the methods that return multiple objects in the form of arrays, for
example getFirmwares()
, if there are no items in the collection
then the method should return an array of zero elements instead of a null
array reference. By doing this the caller can easily use a for
loop to iterate the array without worrying about a NullPointerException. This
applies to all the classes in this package, not just this class.
Manager
,
StoredManagedSet
,
StoredDevice
,
StoredDomain
,
StoredFirmware
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2010
|
static java.lang.String |
SCM_REVISION
|
Method Summary | |
---|---|
StoredDeploymentPolicy |
createDeploymentPolicy(StoredDomain domain,
java.lang.String policyObjectName,
URLSource url,
java.lang.String policyDomainName,
DeploymentPolicyType type)
Creates a new policy object in the repository. |
StoredDeploymentPolicyVersion |
createDeploymentPolicyVersion(StoredDeploymentPolicy policy,
Blob blob,
java.lang.String comment,
java.util.Date timestamp)
Creates a new policy version object in the repository. |
StoredDevice |
createDevice(java.lang.String deviceID,
java.lang.String serialNumber,
java.lang.String name,
DeviceType deviceType,
ModelType modelType,
java.lang.String hostname,
java.lang.String userid,
java.lang.String password,
int HLMport,
int guiPort,
java.lang.String ampVersion)
Create a new device object in the repository with these properties. |
StoredDomain |
createDomain(StoredDevice device,
java.lang.String domainName)
Create a new domain object in the repository. |
StoredDomainVersion |
createDomainVersion(StoredDomain versionedObject,
Blob blob,
java.lang.String userComment,
java.util.Date timeStamp)
Creates a new StoredDomainVersion object in the repository when the clientAPI deploys a new domain source configuration from Domain.deployConfiguration() . |
StoredFirmware |
createFirmware(DeviceType deviceType,
ModelType modelType,
StringCollection strictFeatures,
StringCollection nonstrictFeatures)
Creates a new StoredFirmware object in the repository unless a matching Firmware already exists in the manager. |
StoredFirmwareVersion |
createFirmwareVersion(StoredFirmware versionedObject,
Blob blob,
java.lang.String level,
java.util.Date manufactureDate,
java.lang.String userComment,
java.util.Date timeStamp)
Creates a new StoredFirmwareVersion object in the repository. |
StoredManagedSet |
createManagedSet(java.lang.String name)
Creates a new StoredManagedSet object in the repository. |
StoredTagImpl |
createTag(java.lang.String name,
java.lang.String value)
|
void |
exportAll(java.io.OutputStream outputStream)
Export everything in the repository to the specified OutputStream. |
StoredDevice |
getDevice(java.lang.String serialNumber)
Retrieves a device from the repository that has the specified serialNumber. |
StoredDevice[] |
getDeviceBySerialNumber(java.lang.String serialNumber)
Retrieves all devices from the repository that has the specified serialNumber. |
StoredDevice[] |
getDevices()
Retrieves all known devices in the repository. |
StoredFirmware |
getFirmware(DeviceType deviceType,
ModelType modelType,
StringCollection strictFeatures,
StringCollection nonstrictFeatures)
Gets an existing firmware with the specified attributes from the repository. |
StoredFirmware[] |
getFirmwares()
Gets all the firmwares that are in the repository. |
StoredManagedSet |
getManagedSet(java.lang.String name)
Gets the existing StoredManagedSet that has the specified name from the repository. |
StoredManagedSet[] |
getManagedSets()
Gets all the ManagedSets in the repository. |
int |
getMaxVersionsToStore()
Gets the maximum number of versions of any one object that the repository will try to keep. |
StoredTag |
getTag(java.lang.String name)
|
StoredTag[] |
getTags()
|
void |
importAll(java.io.InputStream inputStream)
Import to the repository from the specified InputStream. |
void |
save(boolean forceSave)
Save the changes that have been made to Stored objects to the repository The clientAPI method Manager.save(boolean)
calls an implementation of this interface to save the data in the repository. |
void |
setMaxVersionsToStore(int maxVersions)
Sets the maximum number of versions of any one object that should be kept in the repository. |
void |
shutdown()
Shuts down the Repository. |
void |
startup()
Starts up the Repository. |
StoredDomain |
updateDomain(StoredDomain domain)
Updates an existing domain object. |
Field Detail |
---|
static final java.lang.String COPYRIGHT_2009_2010
static final java.lang.String SCM_REVISION
Method Detail |
---|
void exportAll(java.io.OutputStream outputStream) throws DatastoreException
Manager.exportAll(OutputStream)
calls an implementation of this interface to perform the export of the data in the repository.
outputStream
- where the exported data will be writtenimportAll(InputStream)
void importAll(java.io.InputStream inputStream) throws DatastoreException
Manager.importAll(InputStream)
calls an implementation of this interface to perform the export of the data in the repository.
inputStream
- where to read the previously exported data fromexportAll(OutputStream)
void save(boolean forceSave) throws DirtySaveException, DatastoreException
Manager.save(boolean)
calls an implementation of this interface to save the data in the repository.
forceSave
- If true, do not throw DirtySaveException, even if other changes have
been saved to the repository while the unsaved changes were
taking place.StoredDevice createDevice(java.lang.String deviceID, java.lang.String serialNumber, java.lang.String name, DeviceType deviceType, ModelType modelType, java.lang.String hostname, java.lang.String userid, java.lang.String password, int HLMport, int guiPort, java.lang.String ampVersion) throws AlreadyExistsInRepositoryException, DatastoreException
Device
calls an implementation of this
interface to save the data in the repository.
serialNumber
- the serialNumber for this devicename
- the human-consumable symbolic name for this objectdeviceType
- the device type of the devicemodelType
- the model type of the devicehostname
- the host name or IP address of the deviceuserid
- the administrative user id of the devicepassword
- the administrative password of the deviceHLMport
- the device port for AMP communicationsguiPort
- the device port for the WebGUIampVersion
- the device's current AMP version
StoredManagedSet.add(StoredDevice)
,
getDevice(String)
,
StoredDevice.delete()
StoredDomain createDomain(StoredDevice device, java.lang.String domainName) throws AlreadyExistsInRepositoryException, DatastoreException
Device.createManagedDomain(String)
calls an implementation of this interface to save the newly created
domain data in the repository.
device
- The StoredDevice that contains this StoredDomaindomainName
- The name of this StoredDomain
StoredDeployableConfiguration.delete()
StoredDeploymentPolicyVersion createDeploymentPolicyVersion(StoredDeploymentPolicy policy, Blob blob, java.lang.String comment, java.util.Date timestamp) throws AlreadyExistsInRepositoryException, DatastoreException
Domain.deployConfiguration()
will create a new domain version and a new policy version. It will invoke
an implementation of this interface to save the newly created
policy version data in the repository.
policy
- The StoredDeploymentPolicyVersion objectblob
- The policy blob that will be deployedcomment
- The user provided comment for the deployment policy objecttimestamp
- creation timestamp
StoredVersion.delete()
StoredDeploymentPolicy createDeploymentPolicy(StoredDomain domain, java.lang.String policyObjectName, URLSource url, java.lang.String policyDomainName, DeploymentPolicyType type) throws AlreadyExistsInRepositoryException, DatastoreException
Domain.deployConfiguration()
will create a new domain version and a new policy version. It will invoke
an implementation of this interface to save the newly created
policy version data in the repository.
domain
- The stored Domain objectpolicyObjectName
- - this is the first piece of information used to find the deployment policy within
the URLSource specifiedurl
- - is a URLSource that points to a configuration containing the policy to be used
during deployment.policyDomainName
- - this is the second piece of information used to find the deployment domain within
the URLSource specifiedtype
- - the policy type used during configuration deployment
StoredDeployablePolicy.delete()
,
DeploymentPolicyType.EXPORT
,
DeploymentPolicyType.XML
StoredTagImpl createTag(java.lang.String name, java.lang.String value) throws AlreadyExistsInRepositoryException, DatastoreException
StoredDevice getDevice(java.lang.String serialNumber)
Manager.getDeviceBySerialNumber(String)
serialNumber
- serialNumber of the device to retrieve from the repository
StoredDevice[] getDeviceBySerialNumber(java.lang.String serialNumber)
serialNumber
- serialNumber of the device to retrieve from the repository
StoredDevice[] getDevices()
Manager.getAllDevices()
StoredManagedSet getManagedSet(java.lang.String name)
Manager.getManagedSet(String)
name
- name of the StoredManagedSet as stored in the repository
StoredManagedSet[] getManagedSets()
Manager.getManagedSets()
StoredTag getTag(java.lang.String name)
StoredTag[] getTags()
StoredFirmware[] getFirmwares()
Manager.getFirmwares()
StoredFirmware getFirmware(DeviceType deviceType, ModelType modelType, StringCollection strictFeatures, StringCollection nonstrictFeatures)
deviceType
- the deviceType the firmware supportsmodelType
- the modelType the firmware supportsstrictFeatures
- The strict features supported by this firmware.nonstrictFeatures
- The nonstrict features supported by this firmware.
StoredManagedSet createManagedSet(java.lang.String name) throws AlreadyExistsInRepositoryException, DatastoreException
ManagedSet.ManagedSet(String)
to
create and persist a new managed set in the repository.
name
- a human-consumable symbolic name for this StoredManagedSet
StoredFirmware createFirmware(DeviceType deviceType, ModelType modelType, StringCollection strictFeatures, StringCollection nonstrictFeatures) throws AlreadyExistsInRepositoryException, DatastoreException
Firmware
has attributes that uniquely identify it. These attributes include
DeviceType, ModelType, Strict feature list, and Non-strict features
See Firmware
.
It also creates a new StoredFirmwareVersion object whose attributes are determined
from the firmware image passed in on the
Manager.addFirmware(Blob, String)
call.
deviceType
- The type of device this firmware must run on.modelType
- The model type this firmware must run on.strictFeatures
- The strict features supported by this firmware.nonstrictFeatures
- The nonstrict features supported by this firmware.
StoredFirmwareVersion createFirmwareVersion(StoredFirmware versionedObject, Blob blob, java.lang.String level, java.util.Date manufactureDate, java.lang.String userComment, java.util.Date timeStamp) throws AlreadyExistsInRepositoryException, DatastoreException
Firmware
and Version
.
The StoredFirmwareVersion attributes (level) are determined
from the firmware image passed in on the
Manager.addFirmware(Blob, String)
call.
When creating a StoredFirmwareVersion that has a Blob, please read the
Blob class javadoc
about verifying the contents are not in a
byte array via Blob.hasBytes()
.
versionedObject
- a reference to the StoredFirmware object that this
StoredVersion object is a version of.blob
- a reference to the Blob that contains the binary image for
this firmware image as down loaded from the manufacturer's web
sitelevel
- The level of the firmware extracted from the blobmanufactureDate
- The date the firmware was created. Extracted from the blob.userComment
- The user's comment for the action that is creating the
StoredFirmware versiontimeStamp
- The time to record for the creation of the
StoredFirmwareVersion
StoredDomainVersion createDomainVersion(StoredDomain versionedObject, Blob blob, java.lang.String userComment, java.util.Date timeStamp) throws AlreadyExistsInRepositoryException, DatastoreException
Domain.deployConfiguration()
.
The binary image for the domain configuration is also persisted.
When creating a StoredDomainVersion that has a Blob, please read the
Blob class javadoc
about verifying the contents are not in a
byte array via Blob.hasBytes()
.
versionedObject
- a reference to the StoredDomain object that this StoredVersion
object is a version of.blob
- a reference to the Blob that contains the binary image for
this StoredDomainVersionuserComment
- The user's comment for the action that is creating the
StoredDomainVersiontimeStamp
- The time to record for the creation of the StoredDomainVersion
int getMaxVersionsToStore()
Manager.getMaxVersionsToStore()
uses this interface to query the maximum versions that can currently be persisted.
This is the value set in setMaxVersionsToStore(int)
. This allows the version
data for objects to be trimmed by users when they want to purge their older data.
setMaxVersionsToStore(int)
) then it should return 0 so
that the Manager can set it to a usable default.setMaxVersionsToStore(int)
void setMaxVersionsToStore(int maxVersions) throws DatastoreException
maxVersions
- the maximum number of versions of any one object to keep in
the repository. For example, is set to 4 then the repository
will limit itself to keeping 4 versions of firmware, 4
settings of each managedSet, and 4 versions of each domain in
each managedSet. This applies to all versioned objects:
firmware, domains, and settings. A value that is less than 1
(0 or negative) means that there is no limit and the
repository will never delete versions.getMaxVersionsToStore()
void startup() throws DatastoreException
Manager.getInstance(java.util.Map)
shutdown()
void shutdown() throws DatastoreException
Manager.shutdown()
startup()
StoredDomain updateDomain(StoredDomain domain) throws AlreadyExistsInRepositoryException, DatastoreException
Domain.setSourceConfiguration(URLSource)
,
Domain.setQuiesceTimeout(int)
, and
Domain.setSynchronizationMode(com.ibm.datapower.wamt.clientAPI.DomainSynchronizationMode)
.
These changes have to be persisted in the repository.
Domain.setDeploymentPolicy(URLSource, String, String)
,
Domain.setQuiesceTimeout(int)
,
Domain.setSynchronizationMode(com.ibm.datapower.wamt.clientAPI.DomainSynchronizationMode)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |