com.centrasite.jaxr
Interface CentraSiteRevisionManager


public interface CentraSiteRevisionManager

Interface for revision manager tasks.


Field Summary
static java.lang.String AUTO_VERSION_CONTROL
           
static java.lang.String REVISION_COLLECTION
           
 
Method Summary
 void commitUpdates()
          Commit updates.
 java.lang.String getCheckpointName(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the checkpoint name of the specified registry object.
 javax.xml.namespace.QName getDoctypeName(java.lang.String objectType)
          Get the doctype name (for xquery) from object type.
 int getMajorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the major version from the specified registry object.
 int getMaximumVersionNumber(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the maximum version (minor version) based on the given registry object.
 int getMaximumVersionNumber(java.lang.String objectType, java.lang.String objectId)
          Get the maximum version (minor version) based on the given registry object.
 int getMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the minor version from the specified registry object.
 java.util.Collection getObjectsFromQuery(java.lang.String xquery)
          Execute xquery and return resulting objects.
 java.lang.String getObjectTypeName(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the object type name from a registry object.
 javax.xml.namespace.QName getObjectTypeQName(javax.xml.registry.infomodel.RegistryObject regObj)
          Get the object type name from a registry object.
 boolean getRevisionStatus()
          Determines if revision is enabled by checking the schema of the version-collection.
 void handleUpdates(java.util.Collection updateObjects)
          Handle updates of objects.
 boolean isEnabled()
          Checks if revision is enabled.
 void restoreObjects(java.util.Collection objects)
          Restore revision objects to the active part.
 void rollbackUpdates()
          Rollback updates.
 void setCheckpointLabel(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> objects)
          Set checkpoint label from user version
 void setMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj, int minorVersion)
          Set the minor version to any registry object.
 

Field Detail

REVISION_COLLECTION

static final java.lang.String REVISION_COLLECTION
See Also:
Constant Field Values

AUTO_VERSION_CONTROL

static final java.lang.String AUTO_VERSION_CONTROL
See Also:
Constant Field Values
Method Detail

isEnabled

boolean isEnabled()
Checks if revision is enabled. Note: it only determines the status the first time and reminds it.

Returns:
true: revision is enabled

getRevisionStatus

boolean getRevisionStatus()
                          throws javax.xml.registry.JAXRException
Determines if revision is enabled by checking the schema of the version-collection.

Returns:
true: enabled, false: not enabled
Throws:
javax.xml.registry.JAXRException

getMajorVersion

int getMajorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
                    throws javax.xml.registry.JAXRException
Get the major version from the specified registry object.

Parameters:
regObj - a registry object
Returns:
the major version number
Throws:
javax.xml.registry.JAXRException

getMinorVersion

int getMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
                    throws javax.xml.registry.JAXRException
Get the minor version from the specified registry object.

Parameters:
regObj - a registry object
Returns:
the minor version number
Throws:
javax.xml.registry.JAXRException

setMinorVersion

void setMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj,
                     int minorVersion)
                     throws javax.xml.registry.JAXRException
Set the minor version to any registry object.

Parameters:
regObj - a registry object
minorVersion - a minor version number
Throws:
javax.xml.registry.JAXRException

getMaximumVersionNumber

int getMaximumVersionNumber(javax.xml.registry.infomodel.RegistryObject regObj)
                            throws javax.xml.registry.JAXRException
Get the maximum version (minor version) based on the given registry object.

Parameters:
regObj - a registry object
Returns:
the highest minor version (-1: no versions present)
Throws:
javax.xml.registry.JAXRException

getMaximumVersionNumber

int getMaximumVersionNumber(java.lang.String objectType,
                            java.lang.String objectId)
                            throws javax.xml.registry.JAXRException
Get the maximum version (minor version) based on the given registry object.

Parameters:
objectType - object type (e.g.: "{http://...}service")
objectId - uddi-id of the object
Returns:
the highest minor version (-1: no versions present)
Throws:
javax.xml.registry.JAXRException

getCheckpointName

java.lang.String getCheckpointName(javax.xml.registry.infomodel.RegistryObject regObj)
                                   throws javax.xml.registry.JAXRException
Get the checkpoint name of the specified registry object.

Parameters:
regObj - a registry object
Returns:
the checkpoint name
Throws:
javax.xml.registry.JAXRException

getObjectsFromQuery

java.util.Collection getObjectsFromQuery(java.lang.String xquery)
                                         throws javax.xml.registry.JAXRException
Execute xquery and return resulting objects.

Parameters:
xquery - the xquery
Returns:
collection of objects
Throws:
javax.xml.registry.JAXRException

restoreObjects

void restoreObjects(java.util.Collection objects)
                    throws javax.xml.registry.JAXRException
Restore revision objects to the active part.

Parameters:
objects - collection of revision objects
Throws:
javax.xml.registry.JAXRException

handleUpdates

void handleUpdates(java.util.Collection updateObjects)
                   throws javax.xml.registry.JAXRException
Handle updates of objects.

Parameters:
updateObjects - collection of iaxr objects being updated
Throws:
javax.xml.registry.JAXRException

getObjectTypeQName

javax.xml.namespace.QName getObjectTypeQName(javax.xml.registry.infomodel.RegistryObject regObj)
                                             throws javax.xml.registry.JAXRException
Get the object type name from a registry object.

Parameters:
regObj - a registry object
Returns:
the object type of the object as a qname ("{namespace}name")
Throws:
javax.xml.registry.JAXRException

getObjectTypeName

java.lang.String getObjectTypeName(javax.xml.registry.infomodel.RegistryObject regObj)
                                   throws javax.xml.registry.JAXRException
Get the object type name from a registry object.

Parameters:
regObj - a registry object
Returns:
the object type in the shape: {namespace}name
Throws:
javax.xml.registry.JAXRException

getDoctypeName

javax.xml.namespace.QName getDoctypeName(java.lang.String objectType)
                                         throws javax.xml.registry.JAXRException
Get the doctype name (for xquery) from object type.

Parameters:
objectType - object type (e.g.: "{http://...}service")
Returns:
the doctype name (e.g.: "cs:service") null: doctype not found
Throws:
javax.xml.registry.JAXRException

commitUpdates

void commitUpdates()
                   throws java.lang.Exception
Commit updates. Means that the modified objects are updated physically in the database.

Throws:
java.lang.Exception

rollbackUpdates

void rollbackUpdates()
Rollback updates. Means that all updates against revision objects are rolled back.


setCheckpointLabel

void setCheckpointLabel(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> objects)
                        throws javax.xml.registry.JAXRException
Set checkpoint label from user version

Parameters:
objects - list of registry objects with modified user version
Throws:
javax.xml.registry.JAXRException