com.softwareag.centrasite.appl.framework.persistence.revision
Interface RevisionManager

All Known Implementing Classes:
RevisionManagerImpl

public interface RevisionManager

Interface for accessing revision and checkpoint information. Note that the revision objects have limited functionality. For example they must not be updated. However they can be made to the actual object with the appropriate method.


Method Summary
 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>
java.util.Collection<RevisionBean>
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 it the revision infrastructure is enabled.
<T extends RegistryBean>
void
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>
void
setCheckpoints(java.util.Collection<T> beans, java.lang.String checkpointName)
          Set a checkpoint name (label) to the registry beans specified.
 

Method Detail

isRevisioningEnabled

boolean isRevisioningEnabled()
Checks it the revision infrastructure is enabled.

Returns:
true: revision is enabled false: disabled

enableRevisioning

void enableRevisioning()
                       throws CSAppFrameworkException
Enable the revision and checkpoint environment on global level. This method is intended to be used in separate session with no concurrent modifications on registry objects. The JAXR connection should be with com.centrasite.jaxr.BrowserBehaviour flag set to false.

Throws:
CSAppFrameworkException
See Also:
StandaloneRegistryProvider.StandaloneRegistryProvider(String, String, boolean)

disableRevisioning

void disableRevisioning()
                        throws CSAppFrameworkException
Disable the revision and checkpoint environment on global level. This method is intended to be used in separate session with no concurrent modifications on registry objects. The JAXR connection should be with com.centrasite.jaxr.BrowserBehaviour flag set to false.

Throws:
CSAppFrameworkException
See Also:
StandaloneRegistryProvider.StandaloneRegistryProvider(String, String, boolean)

getRevisionBeans

java.util.Collection<RevisionBean> getRevisionBeans(RegistryBean bean)
                                                    throws CSAppFrameworkException
Get revision objects based on a specific registry bean. The result includes the actual object.

Parameters:
bean - a registry bean
Returns:
collection of all RegistryBean revisions
Throws:
CSAppFrameworkException

restoreBeans

<T extends RegistryBean> void restoreBeans(java.util.Collection<T> beans)
                  throws CSAppFrameworkException
Restore the specified revision beans so that they will become the actual registry beans.

Parameters:
beans - collection of RegistryBean revisions
Throws:
CSAppFrameworkException

setCheckpoints

<T extends RegistryBean> void setCheckpoints(java.util.Collection<T> beans,
                                             java.lang.String checkpointName)
                    throws CSAppFrameworkException
Set a checkpoint name (label) to the registry beans specified.

Parameters:
beans - collection of RegistryBean
checkpointName - name of checkpoint (label)
Throws:
CSAppFrameworkException

setCheckpoint

void setCheckpoint(RegistryBean bean,
                   java.lang.String checkpointName)
                   throws CSAppFrameworkException
Set a checkpoint name (label) to the registry bean specified.

Parameters:
bean - RegistryBean
checkpointName - name of checkpoint (label)
Throws:
CSAppFrameworkException

getRevisionBeans

<T extends RegistryBean> java.util.Collection<RevisionBean> getRevisionBeans(java.util.Collection<T> beans,
                                                                             java.lang.String checkpointName)
                                                    throws CSAppFrameworkException
Get the revision beans for the specified registry beans and having a checkpoint name (label).

Parameters:
beans - collection of beans
checkpointName - name of checkpoint (label)
Returns:
collection of revision beans
Throws:
CSAppFrameworkException

getRevisionBeans

java.util.Collection<RevisionBean> getRevisionBeans(RegistryBean bean,
                                                    java.lang.String checkpointName)
                                                    throws CSAppFrameworkException
Get the revision beans, for the specified registry bean and having a checkpoint name (label).

Parameters:
bean - collection of beans
checkpointName - name of checkpoint (label)
Returns:
collection of revision beans
Throws:
CSAppFrameworkException

getAllRevisionBeans

java.util.Collection<RevisionBean> getAllRevisionBeans(java.lang.String checkpointName)
                                                       throws CSAppFrameworkException
Get all revision beans which were created with the given checkpoint name (label).

Parameters:
checkpointName - name of checkpoint (label)
Returns:
collection of revision beans
Throws:
CSAppFrameworkException

getCheckpointNames

java.util.Collection<java.lang.String> getCheckpointNames()
                                                          throws CSAppFrameworkException
Get a list of checkpoint names (labels) active in the system.

Returns:
collection of checkpoint names
Throws:
CSAppFrameworkException

deleteBeans

int deleteBeans(java.lang.String checkpointName)
                throws CSAppFrameworkException
Delete all revision beans flagged with the checkpoint name.

Parameters:
checkpointName - name of checkpoint (label)
Returns:
number of deleted objects
Throws:
CSAppFrameworkException