public class RevisionManagerImpl extends java.lang.Object implements RevisionManager
Collection CentraSite Collection v.CentraSite doctype1 -----------> v.doctype1 doctype2 -----------> v.doctype2 ...Updates and inserts to any of the doctypes in the CentraSite collection creates a version into the corresponding doctype of the v.CentraSite collection. Deletes of objects from the usual CentraSite collection has no effect on the versioning collection.
All of the get() and find() methods return objects from the v.CentraSite collection. The restore() plays back objects from v.CentraSite to CentraSite. The purge() methods delete old versions from the versioning part v.CentraSite.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CS_TYPE_NAMESPACE |
Modifier and Type | Method and Description |
---|---|
int |
deleteCheckpointLabels(java.lang.String checkpointLabel)
Deletes all label names from all flagged revision objects.
|
java.util.Collection<RegistryObject> |
findObjects(java.util.Collection findQualifiers,
RegistryObject regObj)
Finds all revision objects based on the given registry object and with find qualifiers.
|
java.util.Collection<RegistryObject> |
findObjects(java.util.Collection findQualifiers,
java.lang.String objectType,
java.util.Collection checkpointLabels,
java.util.Collection classifications)
Finds all revision objects based on the given object type and with find qualifiers.
|
java.lang.String |
getCheckpointLabel(RegistryObject regObj)
Gets the checkpoint label name of a registry object from the revision part.
|
java.util.Collection<java.lang.String> |
getCheckpointLabels()
Gets a list of all checkpoint label names active in the system.
|
java.util.Collection<RegistryObject> |
getCheckpointObjects(java.util.Collection<RegistryObject> objects,
java.lang.String checkpointLabel)
Gets the revision objects, based on the objects specified and having a checkpoint label in
one of their revisions.
|
java.util.Collection<RegistryObject> |
getCheckpointObjects(java.lang.String checkpointLabel)
Gets all revision objects which were created with the given checkpoint label name.
|
int |
getMinorVersion(RegistryObject regObj)
Gets the minor version number of a registry object.
|
java.util.Collection<RegistryObject> |
getObjects(RegistryObject regObj)
Gets all present revision objects based on a specific jaxr object.
|
java.util.Collection<RegistryObject> |
getObjects(java.lang.String objectType,
java.lang.String objectId)
Gets all present revision objects based on a specific jaxr object.
|
void |
printRevisions(RegistryObject regObj)
Prints all the revisions of an object to the console.
|
int |
purge(RegistryObject regObj,
int keepCount)
Purges old versions based on the given registry object.
|
void |
restoreObjects(java.util.Collection objects)
Restores the specified revision objects that they will become the actual object.
|
void |
setCheckpointLabel(java.util.Collection<RegistryObject> objects,
java.lang.String checkpointLabel)
Sets a checkpoint label name to the objects specified.
|
public static final java.lang.String CS_TYPE_NAMESPACE
public java.util.Collection<RegistryObject> getObjects(java.lang.String objectType, java.lang.String objectId) throws RevisionException
getObjects
in interface RevisionManager
objectType
- the object type of the object (in the shape: "{namespace}typename")objectId
- the uddi-id of the objectRevisionException
- if an internal error occurs on retrieving the objectsRevisionManager.getObjects(java.lang.String, java.lang.String)
public java.util.Collection<RegistryObject> getObjects(RegistryObject regObj) throws RevisionException
getObjects
in interface RevisionManager
regObj
- a registry objectRevisionException
- if an internal error occurs on retrieving the objectscom.centrasite.registry.revision.RevisionManager#getObjects(javax.xml.registry.infomodel.RegistryObject)
public java.util.Collection<RegistryObject> findObjects(java.util.Collection findQualifiers, RegistryObject regObj) throws RevisionException
findObjects
in interface RevisionManager
findQualifiers
- qualifiers from RevisionFindQualifiers (null: no qualifiers supplied)regObj
- a registry objectRevisionException
- if an internal error occurs on finding the objectspublic java.util.Collection<RegistryObject> findObjects(java.util.Collection findQualifiers, java.lang.String objectType, java.util.Collection checkpointLabels, java.util.Collection classifications) throws RevisionException
findObjects
in interface RevisionManager
findQualifiers
- qualifiers from RevisionFindQualifiers (null: not required)objectType
- the object type (in the shape: "{namespace}typename")checkpointLabels
- collection of matching label names (null: not required)classifications
- collection of classifications which should match (null: not required)RevisionException
- if an internal error occurs on retrieving the objectspublic void restoreObjects(java.util.Collection objects) throws RevisionException
restoreObjects
in interface RevisionManager
objects
- collection of RegistryObject from the revision partRevisionException
- revision feature not enabled
object list contains non-revisioned objectsRevisionException
- if an internal error occurs on restoring the objectsRevisionManager.restoreObjects(java.util.Collection)
public void setCheckpointLabel(java.util.Collection<RegistryObject> objects, java.lang.String checkpointLabel) throws RevisionException
setCheckpointLabel
in interface RevisionManager
objects
- collection of RegistryObjectcheckpointLabel
- name of the checkpoint labelRevisionException
- revision feature not enabledRevisionException
- if an internal error occurs on updating the check point labelsRevisionManager.setCheckpointLabel(java.util.Collection<RegistryObject>, java.lang.String)
public java.util.Collection<RegistryObject> getCheckpointObjects(java.util.Collection<RegistryObject> objects, java.lang.String checkpointLabel) throws RevisionException
getCheckpointObjects
in interface RevisionManager
objects
- collection of RegistryObjectcheckpointLabel
- name of the checkpoint labelRevisionException
- if an internal error occurs on retrieving the check point objectsRevisionManager.getCheckpointObjects(java.util.Collection, java.lang.String)
public java.util.Collection<RegistryObject> getCheckpointObjects(java.lang.String checkpointLabel) throws RevisionException
getCheckpointObjects
in interface RevisionManager
checkpointLabel
- name of the checkpoint labelRevisionException
- if an internal error occurs on retrieving the check point objectsRevisionManager.getCheckpointObjects(java.lang.String)
public java.util.Collection<java.lang.String> getCheckpointLabels() throws RevisionException
getCheckpointLabels
in interface RevisionManager
RevisionException
- if an internal error occurs on retrieving the check point labelsRevisionManager.getCheckpointLabels()
public int deleteCheckpointLabels(java.lang.String checkpointLabel) throws RevisionException
deleteCheckpointLabels
in interface RevisionManager
checkpointLabel
- name of the checkpoint labelRevisionException
- revision feature not enabledRevisionException
- if an internal error occurs on deleting the check point labelsRevisionManager.deleteCheckpointLabels(java.lang.String)
public int getMinorVersion(RegistryObject regObj) throws RevisionException
getMinorVersion
in interface RevisionManager
regObj
- any registry objectRevisionException
- if an internal error occurs on retrieving the minor versionpublic java.lang.String getCheckpointLabel(RegistryObject regObj) throws RevisionException
getCheckpointLabel
in interface RevisionManager
regObj
- a registry object (original or from revision part)RevisionException
- if an internal error occurs on retrieving the check point labelpublic int purge(RegistryObject regObj, int keepCount) throws RevisionException
purge
in interface RevisionManager
regObj
- a registry objectkeepCount
- number of objects to keep (the value must be > 0)RevisionException
- if an internal error occurs on purgepublic void printRevisions(RegistryObject regObj) throws RevisionException
regObj
- a registry objectRevisionException
- if an internal error occurs