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 |
---|---|
Concept |
getNewerActiveModelStateIfApplicable(Concept existingStateConcept)
Gets the newer Active model's LC state concept if applicable which supersedes the given older state concept
|
RegistryObject |
getNewerActiveVersion(RegistryObject olderVersion)
Finds the first (only) newer version of this registry object which is classified as active.
|
Concept |
getNewerVersionState(Concept olderStateConcept,
LCModel newerModel)
Gets the newer version model's LC state concept which supersedes the given older state concept
|
RegistryObject |
getOlderActiveVersion(RegistryObject newerVersion)
Finds the first (only) older version of this registry object which is classified as active.
|
RegistryObject |
getOlderInactiveVersion(RegistryObject newerVersion)
Finds the first (only) older version of this registry object which is classified as inactive.
|
java.util.Collection<RegistryObject> |
getOlderVersions(RegistryObject newerVersion) |
LCState |
getSupersededNextState(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(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(RegistryObject olderActiveVersion) throws LCMException
olderActiveVersion
- the active older version of registry object.LCMException
- if encounters an internal error on retrieving Superseded Next Statepublic RegistryObject getOlderActiveVersion(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<RegistryObject> getOlderVersions(RegistryObject newerVersion) throws LCMException
LCMException
public RegistryObject getOlderInactiveVersion(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 RegistryObject getNewerActiveVersion(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 Concept getNewerVersionState(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 Concept getNewerActiveModelStateIfApplicable(Concept existingStateConcept) throws LCMException, JAXRException
existingStateConcept
- existing state for which active model state is applicableLCMException
- if encounters an internal errorJAXRException
- if encounters an internal error on retrieving newer active model LC statepublic void setToState(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