|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.centrasite.registry.versionmanagementservices.VersionManagerImpl
public class VersionManagerImpl
The implementation of the VersionManager.
Constructor Summary | |
---|---|
VersionManagerImpl(com.centrasite.jaxr.JAXRAccessor jaxr)
Construct the Version Manager Implementation. |
Method Summary | |
---|---|
void |
addVersionObjectListener(VersionObjectListener versionObjectListener)
Add a listener which is notified at registry objects updates. |
java.util.Collection |
copy(javax.xml.registry.infomodel.RegistryObject registryObject)
Copy the specified registry object (RegistryEntry or RegistryObject). |
java.util.Collection |
copy(javax.xml.registry.infomodel.RegistryObject registryObject,
VersionCopyMode copyMode)
Copy the specified registry object (RegistryEntry or RegistryObject). |
java.util.Collection |
copy(javax.xml.registry.infomodel.RegistryObject registryObject,
VersionCopyMode copyMode,
java.util.Collection ignoreCopyObjects)
Copy the specified registry object (RegistryEntry or RegistryObject). |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.ExternalLink elink)
Create a new version of an External Link. |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.ExternalLink elink,
VersionCopyMode copyMode)
A new Version of an External link is created with the copy modes described below. |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.RegistryObject registryObject)
Create a new version of a registry object (RegistryEntry or RegistryObject). |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.RegistryObject registryObject,
VersionCopyMode copyMode)
Create a new version of a any registry object (all implementations of RegistryObject). |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.RegistryObject registryObject,
VersionCopyMode copyMode,
java.util.Collection ignoreCopyObjects)
Create a new version of a registry object (RegistryEntry or RegistryObject). |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.Service serviceObject,
java.util.Collection ignoreCopyObjects)
Create a new version of a Service object. |
java.util.Collection |
createVersion(javax.xml.registry.infomodel.Service serviceObject,
VersionCopyMode copyMode,
java.util.Collection ignoreCopyObjects)
Create a new version of a Service object. |
java.util.Collection |
getAllIgnoredObjects(java.util.Collection ignoredObjects)
Get the entire list of objects to be ignored. |
javax.xml.registry.infomodel.RegistryObject |
getMaxVersionObject(javax.xml.registry.infomodel.RegistryObject regObj)
Get the maximum version object of an arbitrary given object in a versioning row. |
java.util.List |
getNewerVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject,
java.util.Collection<javax.xml.registry.infomodel.Classification> classifications)
Get all older versioned objects based on the object given. |
javax.xml.registry.infomodel.RegistryObject |
getNewVersionObject(javax.xml.registry.infomodel.RegistryObject registryObject,
java.util.Collection<javax.xml.registry.infomodel.RegistryObject> newObjects)
Get the new version object of the original object out of the collection of new objects |
java.util.List |
getOlderVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject,
java.util.Collection<javax.xml.registry.infomodel.Classification> classifications)
Get all newer versioned objects based on the object given. |
java.util.Collection |
getPurgedWebDAVResources()
Deliver the list of resources purging in WebDAV |
ICollectorVersioning |
getVersionCollector(javax.xml.registry.infomodel.RegistryObject oldRegistryObj,
boolean recursiveCall)
Get the version collector depending on the object's type. |
java.util.Collection |
getVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject)
Get all versioned objects based on the object given. |
VersionResult |
getVersionResult()
Get the version result. |
boolean |
isForceTargetPurge()
|
boolean |
isMaxVersionObject(javax.xml.registry.infomodel.RegistryObject regObj)
Checks if the given object is the maximum (or only) version object |
boolean |
isOnlyComponentObjects()
|
void |
overwriteCopyRule(CopyRule copyRule)
Overwrite a default copy rule. |
java.util.Collection |
purge(java.util.Collection registryObjects,
int keepCount)
Purge the list of registry objects with the same keep count. |
java.util.Collection |
purge(javax.xml.registry.infomodel.RegistryObject registryObject)
Purge older version registry entries and keep only the actual one. |
java.util.Collection |
purge(javax.xml.registry.infomodel.RegistryObject purgeObject,
int keepCount)
Purge older version registry entries. |
void |
removeRepositoryResources()
Remove repository resources, collected during purge() methods. |
void |
removeVersionObjectListener(VersionObjectListener versionObjectListener)
Remove a registered listener. |
void |
setForceTargetPurge(boolean forceTargetPurge)
Indicates for the purge methods whether to delete objects although they are target of associations. |
void |
setOnlyComponentObjects()
Is equivilant to setOnlyComponentObjects(true) |
void |
setOnlyComponentObjects(boolean onlyComponentObjects)
Implemented in this way: Service: true: Service+related - false: Service + related + schemas Schema: true: Schema - false: Schema + all referenced schemas |
void |
setOrganization(javax.xml.registry.infomodel.Organization versionOrg)
Specify the organization which the versioned objects receive. |
void |
setUserVersion(java.lang.String userVersion)
Specify a user version for versioned assets. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionManagerImpl(com.centrasite.jaxr.JAXRAccessor jaxr)
jaxr
- opened JAXR connectionMethod Detail |
---|
public void overwriteCopyRule(CopyRule copyRule)
overwriteCopyRule
in interface VersionManager
copyRule
- the copy rule to be usedpublic void addVersionObjectListener(VersionObjectListener versionObjectListener)
addVersionObjectListener
in interface VersionManager
versionObjectListener
- a implementation of VersionObjectListenerpublic void removeVersionObjectListener(VersionObjectListener versionObjectListener)
removeVersionObjectListener
in interface VersionManager
versionObjectListener
- a registered VersionObjectListenerpublic final void setUserVersion(java.lang.String userVersion)
setUserVersion
in interface VersionManager
userVersion
- the user version (null: not used)public final void setOrganization(javax.xml.registry.infomodel.Organization versionOrg)
setOrganization
in interface VersionManager
versionOrg
- the organization for the versioned objects (null: not used)public VersionResult getVersionResult()
getVersionResult
in interface VersionManager
public void setOnlyComponentObjects()
VersionManager
setOnlyComponentObjects
in interface VersionManager
setOnlyComponentObjects(boolean)
public void setOnlyComponentObjects(boolean onlyComponentObjects)
setOnlyComponentObjects
in interface VersionManager
onlyComponentObjects
- public boolean isOnlyComponentObjects()
public java.util.Collection createVersion(javax.xml.registry.infomodel.RegistryObject registryObject) throws VersionException
createVersion
in interface VersionManager
registryObject
- a versionable (or non-versionable) registry object (version top level)
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.RegistryObject registryObject, VersionCopyMode copyMode) throws VersionException
Specials for certain registry objects:
Depending on the copy mode, the following picture exists:
1) None: +---------------+ +---------------+ | RegistryEntry | <---------- | RegistryEntry | | vers=n | Supersedes | vers=n+1 | +---------------+ +---------------+ | assoc | V object 2) Shallow: +---------------+ +---------------+ | RegistryEntry | <---------- | RegistryEntry | | vers=n | Supersedes | vers=n+1 | +---------------+ +---------------+ | | assoc | | V | object <-------------------' 3) Deep: Depending on the association type the referenced objects get pointed as shown in 'Shallow', or will be also versioned: +---------------+ +---------------+ | RegistryEntry | <---------- | RegistryEntry | | vers=n | Supersedes | vers=n+1 | +---------------+ +---------------+ | | assoc | | V V object (n) object (n+1) Also duplicates associated external links if they are bound to WebDAV resources and the resource itself. 4) Remove Same as 'None' but if the object contains ExternalLink objects they will be removed from the object.
createVersion
in interface VersionManager
registryObject
- a versionable registry entry or a usual registry objectcopyMode
- the copy mode (NONE, SHALLOW, DEEP, REMOVE)
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.RegistryObject registryObject, VersionCopyMode copyMode, java.util.Collection ignoreCopyObjects) throws VersionException
createVersion
in interface VersionManager
registryObject
- a versionable (or non-versionable) registry object (version top level)copyMode
- the copy mode (SHALLOW, DEEP, ...)ignoreCopyObjects
- list of RegistryObject which shouldn't get a new version
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.Service serviceObject, java.util.Collection ignoreCopyObjects) throws VersionException
createVersion
in interface VersionManager
serviceObject
- a Service object (version top level)ignoreCopyObjects
- list of RegistryObject which shouldn't get a new version
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.Service serviceObject, VersionCopyMode copyMode, java.util.Collection ignoreCopyObjects) throws VersionException
createVersion
in interface VersionManager
serviceObject
- a Service object (version top level)copyMode
- the copy mode (SHALLOW, DEEP, ...)ignoreCopyObjects
- list of RegistryObject which shouldn't get a new version
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.ExternalLink elink) throws VersionException
createVersion
in interface VersionManager
elink
- the external link
VersionException
public java.util.Collection createVersion(javax.xml.registry.infomodel.ExternalLink elink, VersionCopyMode copyMode) throws VersionException
createVersion
in interface VersionManager
elink
- external link to be duplicatedcopyMode
- copy mode
VersionException
ExternalLinkVersion
public java.util.Collection copy(javax.xml.registry.infomodel.RegistryObject registryObject) throws VersionException
copy
in interface VersionManager
registryObject
- registry object to copy
VersionException
public java.util.Collection copy(javax.xml.registry.infomodel.RegistryObject registryObject, VersionCopyMode copyMode) throws VersionException
copy
in interface VersionManager
registryObject
- registry object to copycopyMode
- the copy mode (SHALLOW, DEEP, ...)
VersionException
public java.util.Collection copy(javax.xml.registry.infomodel.RegistryObject registryObject, VersionCopyMode copyMode, java.util.Collection ignoreCopyObjects) throws VersionException
copy
in interface VersionManager
registryObject
- registry object to copycopyMode
- the copy mode (SHALLOW, DEEP, ...)ignoreCopyObjects
- list of RegistryObject which shouldn't get a new version
VersionException
public java.util.Collection purge(java.util.Collection registryObjects, int keepCount) throws VersionException
purge
in interface VersionManager
registryObjects
- list of registry objects to be deletedkeepCount
- > 0 : number of version objects to keep;
< 0 : number of old object version to delete;
0 : delete all objects
VersionException
public java.util.Collection purge(javax.xml.registry.infomodel.RegistryObject registryObject) throws VersionException
purge
in interface VersionManager
registryObject
- a registry object to be purged
VersionException
public java.util.Collection purge(javax.xml.registry.infomodel.RegistryObject purgeObject, int keepCount) throws VersionException
purge
in interface VersionManager
purgeObject
- a registry object to be purgedkeepCount
- > 0 : number of version objects to keep;
< 0 : number of old object version to delete;
0 : delete all objects
VersionException
public void removeRepositoryResources()
removeRepositoryResources
in interface VersionManager
public java.util.Collection getVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject) throws VersionException
Example: +-------------+ supersedes +-------------+ | object (v0) | <---------- | object (v1) | +-------------+ +-------------+
getVersionObjects
in interface VersionManager
registryObject
- a registry object (any version)
VersionException
public javax.xml.registry.infomodel.RegistryObject getNewVersionObject(javax.xml.registry.infomodel.RegistryObject registryObject, java.util.Collection<javax.xml.registry.infomodel.RegistryObject> newObjects) throws VersionException
getNewVersionObject
in interface VersionManager
registryObject
- the original object which was versionednewObjects
- collection of new objects
VersionException
public java.util.List getNewerVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject, java.util.Collection<javax.xml.registry.infomodel.Classification> classifications) throws VersionException
getNewerVersionObjects
in interface VersionManager
registryObject
- a (versioned) registry objectclassifications
- collection of classifications; if not null and not empty
then at least one of the classification must match
VersionException
public java.util.List getOlderVersionObjects(javax.xml.registry.infomodel.RegistryObject registryObject, java.util.Collection<javax.xml.registry.infomodel.Classification> classifications) throws VersionException
getOlderVersionObjects
in interface VersionManager
registryObject
- a (versioned) registry objectclassifications
- collection of classifications; if not null and not empty
then at least one of the classification must match
VersionException
public javax.xml.registry.infomodel.RegistryObject getMaxVersionObject(javax.xml.registry.infomodel.RegistryObject regObj) throws VersionException
getMaxVersionObject
in interface VersionManager
regObj
- any registry object in a versioning row
VersionException
public boolean isMaxVersionObject(javax.xml.registry.infomodel.RegistryObject regObj) throws VersionException
isMaxVersionObject
in interface VersionManager
regObj
- a registry object
VersionException
public java.util.Collection getAllIgnoredObjects(java.util.Collection ignoredObjects) throws VersionException
getAllIgnoredObjects
in interface VersionManager
ignoredObjects
- list of RegistryObject to be ignored
VersionException
public java.util.Collection getPurgedWebDAVResources()
public final void setForceTargetPurge(boolean forceTargetPurge)
setForceTargetPurge
in interface VersionManager
forceTargetPurge
- true: delete objects no matter of target associations;
false: reject object delete (implicitely by JAXR) if they
are target of associationspublic boolean isForceTargetPurge()
public ICollectorVersioning getVersionCollector(javax.xml.registry.infomodel.RegistryObject oldRegistryObj, boolean recursiveCall) throws javax.xml.registry.JAXRException, VersionException
oldRegistryObj
- the (old - to be versioned) registry objectrecursiveCall
- true: within recursion
javax.xml.registry.JAXRException
VersionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |