public class VersioningUtil
extends java.lang.Object
Constructor and Description |
---|
VersioningUtil(com.centrasite.jaxr.CentraSiteConnection conn)
Constructs new
VersioningUtil object. |
Modifier and Type | Method and Description |
---|---|
javax.xml.registry.infomodel.Concept |
getNewerActiveModelStateIfApplicable(javax.xml.registry.infomodel.Concept existingStateConcept)
Gets the newer Active model's LC state concept if applicable which supersedes the given older state concept
|
javax.xml.registry.infomodel.RegistryObject |
getNewerActiveVersion(javax.xml.registry.infomodel.RegistryObject olderVersion)
Finds the first (only) newer version of this registry object which is classified as active.
|
javax.xml.registry.infomodel.Concept |
getNewerVersionState(javax.xml.registry.infomodel.Concept olderStateConcept,
LCModel newerModel)
Gets the newer version model's LC state concept which supersedes the given older state concept
|
javax.xml.registry.infomodel.RegistryObject |
getOlderActiveVersion(javax.xml.registry.infomodel.RegistryObject newerVersion)
Finds the first (only) older version of this registry object which is classified as active.
|
javax.xml.registry.infomodel.RegistryObject |
getOlderInactiveVersion(javax.xml.registry.infomodel.RegistryObject newerVersion)
Finds the first (only) older version of this registry object which is classified as inactive.
|
java.util.Collection<javax.xml.registry.infomodel.RegistryObject> |
getOlderVersions(javax.xml.registry.infomodel.RegistryObject newerVersion) |
LCState |
getSupersededNextState(javax.xml.registry.infomodel.RegistryObject olderActiveVersion)
If the given old version registry object (policy or LC model taxonomy)
can be moved to a LC state which will cause the old model to be superseded,
returns the first such LCState, else returns null.
|
void |
setToState(javax.xml.registry.infomodel.RegistryEntry policy,
java.lang.String stateName)
Sets the policy to the requested LCM state, if not already set.
|
public VersioningUtil(com.centrasite.jaxr.CentraSiteConnection conn) throws LCMException
VersioningUtil
object.conn
- the centrasite connection object.LCMException
- if internal error occurs on creating a new instance.public LCState getSupersededNextState(javax.xml.registry.infomodel.RegistryObject olderActiveVersion) throws LCMException
olderActiveVersion
- the active older version of registry object.LCMException
- if encounters an internal error on retrieving Superseded Next Statepublic javax.xml.registry.infomodel.RegistryObject getOlderActiveVersion(javax.xml.registry.infomodel.RegistryObject newerVersion) throws LCMException
newerVersion
- the newer version registry object for which older active version is neededLCMException
- if encounters an internal error on retrieving older active versionpublic java.util.Collection<javax.xml.registry.infomodel.RegistryObject> getOlderVersions(javax.xml.registry.infomodel.RegistryObject newerVersion) throws LCMException
LCMException
public javax.xml.registry.infomodel.RegistryObject getOlderInactiveVersion(javax.xml.registry.infomodel.RegistryObject newerVersion) throws LCMException
newerVersion
- the newer version registry object for which older inactive version is neededLCMException
- if encounters an internal error on retrieving older inactive versionpublic javax.xml.registry.infomodel.RegistryObject getNewerActiveVersion(javax.xml.registry.infomodel.RegistryObject olderVersion) throws LCMException
olderVersion
- the older version registry object for which newer active version is neededLCMException
- if encounters an internal error on retrieving newer active versionpublic javax.xml.registry.infomodel.Concept getNewerVersionState(javax.xml.registry.infomodel.Concept olderStateConcept, LCModel newerModel) throws LCMException
olderStateConcept
- old state for which newer model state is needednewerModel
- the model which supersedes the old state's modelLCMException
- if encounters an internal error on retrieving newer version statepublic javax.xml.registry.infomodel.Concept getNewerActiveModelStateIfApplicable(javax.xml.registry.infomodel.Concept existingStateConcept) throws LCMException, javax.xml.registry.JAXRException
existingStateConcept
- existing state for which active model state is applicableLCMException
- if encounters an internal errorjavax.xml.registry.JAXRException
- if encounters an internal error on retrieving newer active model LC statepublic void setToState(javax.xml.registry.infomodel.RegistryEntry policy, java.lang.String stateName) throws java.lang.Exception
policy
- the policy registry objectstateName
- the name of the state (e.g. "Productive")java.lang.Exception
- the policy is not permitted to be set to the requested state