public class RevisionManagerImpl extends java.lang.Object implements RevisionManager
RevisionManager
interface. Wrapper for the
CentraSiteVMS revision manager and administrator.Constructor and Description |
---|
RevisionManagerImpl(Connection connection,
ManagedBeanPool beanPool)
Requires JAXR connection and bean pool instance.
|
Modifier and Type | Method and Description |
---|---|
int |
deleteBeans(java.lang.String checkpointName)
Delete all revision beans flagged with the checkpoint name.
|
void |
disableRevisioning()
Disable the revision and checkpoint environment on global level.
|
void |
enableRevisioning()
Enable the revision and checkpoint environment on global level.
|
java.util.Collection<RevisionBean> |
getAllRevisionBeans(java.lang.String checkpointName)
Get all revision beans which were created with the given checkpoint name
(label).
|
java.util.Collection<java.lang.String> |
getCheckpointNames()
Get a list of checkpoint names (labels) active in the system.
|
<T extends RegistryBean> |
getRevisionBeans(java.util.Collection<T> beans,
java.lang.String checkpointName)
Get the revision beans for the specified registry beans and having a
checkpoint name (label).
|
java.util.Collection<RevisionBean> |
getRevisionBeans(RegistryBean bean)
Get revision objects based on a specific registry bean.
|
java.util.Collection<RevisionBean> |
getRevisionBeans(RegistryBean bean,
java.lang.String checkpointName)
Get the revision beans, for the specified registry bean and having a
checkpoint name (label).
|
boolean |
isRevisioningEnabled()
Checks if the revision infrastructure is enabled.
|
<T extends RegistryBean> |
restoreBeans(java.util.Collection<T> beans)
Restore the specified revision beans so that they will become the actual
registry beans.
|
void |
setCheckpoint(RegistryBean bean,
java.lang.String checkpointName)
Set a checkpoint name (label) to the registry bean specified.
|
<T extends RegistryBean> |
setCheckpoints(java.util.Collection<T> beans,
java.lang.String checkpointName)
Set a checkpoint name (label) to the registry beans specified.
|
public RevisionManagerImpl(Connection connection, ManagedBeanPool beanPool) throws CSAppFrameworkException
connection
- Used to initialize the CentraSiteVMS revision manager - Connection
instance.beanPool
- ManagedBeanPool
instance used to map revision registry objects to registry beans.CSAppFrameworkException
- If an error occurs in constructing the RevisionManagerImpl
objectpublic int deleteBeans(java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
deleteBeans
in interface RevisionManager
checkpointName
- name of checkpoint (label)CSAppFrameworkException
- If an error occurs while deleting all revision beans flagged with the given checkpointNamepublic java.util.Collection<java.lang.String> getCheckpointNames() throws CSAppFrameworkException
RevisionManager
getCheckpointNames
in interface RevisionManager
Collection
of checkpoint namesCSAppFrameworkException
- If an error occurs while getting all the checkpoint namespublic <T extends RegistryBean> java.util.Collection<RevisionBean> getRevisionBeans(java.util.Collection<T> beans, java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
getRevisionBeans
in interface RevisionManager
T
- Type class extending RegistryBean
beans
- Collection
of RevisionBean
scheckpointName
- name of checkpoint (label)Collection
of RevisionBean
sCSAppFrameworkException
- If an error occurs in fetching the revision beans by checkpoint namepublic java.util.Collection<RevisionBean> getAllRevisionBeans(java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
getAllRevisionBeans
in interface RevisionManager
checkpointName
- name of checkpoint (label)Collection
of RevisionBean
sCSAppFrameworkException
- If an error occurs in obtaining all the revision beanspublic java.util.Collection<RevisionBean> getRevisionBeans(RegistryBean bean) throws CSAppFrameworkException
RevisionManager
getRevisionBeans
in interface RevisionManager
bean
- a RegistryBean
objectCollection
of all RegistryBean revisions as RevisionBean
objectsCSAppFrameworkException
- If an error occurs while obtaining the revision beanspublic <T extends RegistryBean> void restoreBeans(java.util.Collection<T> beans) throws CSAppFrameworkException
RevisionManager
restoreBeans
in interface RevisionManager
T
- Type class extending RegistryBean
beans
- Collection
of RegistryBean revisions as RevisionBean
objectsCSAppFrameworkException
- If an error occurs while trying to restore the specified revision beanspublic <T extends RegistryBean> void setCheckpoints(java.util.Collection<T> beans, java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
setCheckpoints
in interface RevisionManager
T
- Type class extending RegistryBean
beans
- Collection
of RegistryBean objectscheckpointName
- name of checkpoint (label)CSAppFrameworkException
- If an error occurs while setting the checkpointspublic java.util.Collection<RevisionBean> getRevisionBeans(RegistryBean bean, java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
getRevisionBeans
in interface RevisionManager
bean
- The RegistryBean
objectcheckpointName
- name of checkpoint (label)Collection
of RevisionBean
sCSAppFrameworkException
- If an error occurs in fetching the revision beanspublic void disableRevisioning() throws CSAppFrameworkException
RevisionManager
false
.disableRevisioning
in interface RevisionManager
CSAppFrameworkException
- If an error occurs while disabling the revision and checkpoint environmentStandaloneRegistryProvider.StandaloneRegistryProvider(String, String, boolean)
public void enableRevisioning() throws CSAppFrameworkException
RevisionManager
false
.enableRevisioning
in interface RevisionManager
CSAppFrameworkException
- If an error occurs while enabling the revision and checkpoint environmentStandaloneRegistryProvider.StandaloneRegistryProvider(String, String, boolean)
public boolean isRevisioningEnabled()
RevisionManager
isRevisioningEnabled
in interface RevisionManager
true
if revision is enabled and false
if disabledpublic void setCheckpoint(RegistryBean bean, java.lang.String checkpointName) throws CSAppFrameworkException
RevisionManager
setCheckpoint
in interface RevisionManager
bean
- RegistryBean
objectcheckpointName
- name of checkpoint (label)CSAppFrameworkException
- If an error occurs while setting the checkpoint name