com.centrasite.registry.versionmanagementservices
Class VersionRegistryObject

java.lang.Object
  extended by com.centrasite.registry.versionmanagementservices.VersionRegistryObject

public class VersionRegistryObject
extends java.lang.Object

This class maintains version numbers on non-versionable Registry Objects. They are in principle all objects which are not derived from RegistryEntry.

For those objects the version numbers are maintained in Slots of the object with the following names:


Constructor Summary
VersionRegistryObject(com.centrasite.jaxr.JAXRAccessor jaxr)
          Constructor
 
Method Summary
 int getMajorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
          Returns the major version of a RegistryObject by inspecting the appropriate slot.
 int getMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
          Returns the minor version of a RegistryObject by inspecting the appropriate slot.
 java.lang.String getUserVersion(javax.xml.registry.infomodel.RegistryObject regObj)
          Returns the user version of a RegistryObject by inspecting the appropriate slot.
 void setUserVersion(javax.xml.registry.infomodel.RegistryObject regObj, int versionNumber)
          Sets the given user version into the registry object by appending/reusing the appropriate slot.
 void setUserVersion(javax.xml.registry.infomodel.RegistryObject regObj, java.lang.String userVersion)
          Sets the given user version into the registry object by appending/reusing the appropriate slot.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionRegistryObject

public VersionRegistryObject(com.centrasite.jaxr.JAXRAccessor jaxr)
Constructor

Parameters:
jaxr - opened JAXR session
Method Detail

setUserVersion

public void setUserVersion(javax.xml.registry.infomodel.RegistryObject regObj,
                           int versionNumber)
                    throws javax.xml.registry.JAXRException
Sets the given user version into the registry object by appending/reusing the appropriate slot.

Parameters:
regObj - a registry object
versionNumber - a version number for the user version
Throws:
javax.xml.registry.JAXRException

setUserVersion

public void setUserVersion(javax.xml.registry.infomodel.RegistryObject regObj,
                           java.lang.String userVersion)
                    throws javax.xml.registry.JAXRException
Sets the given user version into the registry object by appending/reusing the appropriate slot.

Parameters:
regObj - a registry object
userVersion - a user supplied version (null: remove slot)
Throws:
javax.xml.registry.JAXRException

getMajorVersion

public int getMajorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
                    throws javax.xml.registry.JAXRException
Returns the major version of a RegistryObject by inspecting the appropriate slot.

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

getMinorVersion

public int getMinorVersion(javax.xml.registry.infomodel.RegistryObject regObj)
                    throws javax.xml.registry.JAXRException
Returns the minor version of a RegistryObject by inspecting the appropriate slot.

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

getUserVersion

public java.lang.String getUserVersion(javax.xml.registry.infomodel.RegistryObject regObj)
                                throws javax.xml.registry.JAXRException
Returns the user version of a RegistryObject by inspecting the appropriate slot.

Parameters:
regObj - a registry object
Returns:
the user version
"" : no version present
Throws:
javax.xml.registry.JAXRException