com.softwareag.centrasite.appl.framework.persistence.versioning.impl
Class VersionObjectListenerImpl

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.persistence.versioning.impl.VersionObjectListenerImpl
All Implemented Interfaces:
VersionObjectListener

public class VersionObjectListenerImpl
extends java.lang.Object
implements VersionObjectListener


Constructor Summary
VersionObjectListenerImpl(com.centrasite.jaxr.JAXRAccessor jaxrAccessor, InternationalString description, java.lang.String userVersion)
           
 
Method Summary
 com.centrasite.registry.versionmanagementservices.VersionObjectListener getGenericObjectListener()
           
 boolean grantPurgeObject(RegistryBean registryBean)
          Grant the object to be purged.
 boolean grantVersionedObject(RegistryBean registryBean)
          Grant the object to be versioned.
 VersionCopyMode handleExternalLink(RegistryBean registryBean, ExternalLink elink)
          Handle the external link of given object according copy mode.
 void objectCopied(RegistryBean registryBean)
          Handle the new copied object.
 void objectVersioned(RegistryBean registryBean)
          Handle the new versioned object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionObjectListenerImpl

public VersionObjectListenerImpl(com.centrasite.jaxr.JAXRAccessor jaxrAccessor,
                                 InternationalString description,
                                 java.lang.String userVersion)
                          throws CSAppFrameworkException
Throws:
CSAppFrameworkException
Method Detail

grantPurgeObject

public boolean grantPurgeObject(RegistryBean registryBean)
                         throws CSAppFrameworkException
Description copied from interface: VersionObjectListener
Grant the object to be purged.

Specified by:
grantPurgeObject in interface VersionObjectListener
Parameters:
registryBean - the versionable registry object
Returns:
true: object can be deleted
false: delete not permitted
Throws:
CSAppFrameworkException

grantVersionedObject

public boolean grantVersionedObject(RegistryBean registryBean)
                             throws CSAppFrameworkException
Description copied from interface: VersionObjectListener
Grant the object to be versioned.

Specified by:
grantVersionedObject in interface VersionObjectListener
Parameters:
registryBean - the versionable registry object
Returns:
true: object can be versioned
false: versioning not permitted
Throws:
CSAppFrameworkException

handleExternalLink

public VersionCopyMode handleExternalLink(RegistryBean registryBean,
                                          ExternalLink elink)
                                   throws CSAppFrameworkException
Description copied from interface: VersionObjectListener
Handle the external link of given object according copy mode. The user can overwrite the default handling defined by the object's copy mode.
Note: if several listeners return copy modes, then the result is not predictable

Specified by:
handleExternalLink in interface VersionObjectListener
Parameters:
registryBean - the versioned registry object holding 'elink'
elink - the original external link of the registry object
Returns:
the version copy mode
null: not required
Throws:
CSAppFrameworkException

objectCopied

public void objectCopied(RegistryBean registryBean)
                  throws CSAppFrameworkException
Description copied from interface: VersionObjectListener
Handle the new copied object. The object may be modified.

Specified by:
objectCopied in interface VersionObjectListener
Parameters:
registryBean - the newly created copied registry object
Throws:
CSAppFrameworkException

objectVersioned

public void objectVersioned(RegistryBean registryBean)
                     throws CSAppFrameworkException
Description copied from interface: VersionObjectListener
Handle the new versioned object. The object may be modified.

Specified by:
objectVersioned in interface VersionObjectListener
Parameters:
registryBean - the new created versionable registry object
Throws:
CSAppFrameworkException

getGenericObjectListener

public com.centrasite.registry.versionmanagementservices.VersionObjectListener getGenericObjectListener()