com.centrasite.registry.versionmanagementservices
Class VersionWebDAVAccess

java.lang.Object
  extended by com.centrasite.jaxr.common.AbstractWebDAVAccess
      extended by com.centrasite.jaxr.common.BinaryWebDAVAccess
          extended by com.centrasite.registry.versionmanagementservices.VersionWebDAVAccess

public class VersionWebDAVAccess
extends com.centrasite.jaxr.common.BinaryWebDAVAccess

Handles the webdav accesses during versioning. For base webdav usage, the IWebServiceWebDAVLocator is used. It performs copy and remove operations of webdav resources for versioning.


Field Summary
 
Fields inherited from class com.centrasite.jaxr.common.AbstractWebDAVAccess
SUPPORTING_DOCUMENTS_LIBRARY
 
Constructor Summary
VersionWebDAVAccess(com.centrasite.jaxr.JAXRAccessor jaxr)
          Constructor with an opened JAXR accessor (credentials required)
 
Method Summary
 void addOldKey(javax.xml.registry.infomodel.RegistryObject regObj)
          Add a object with old key (used to extract via copyWithReplacedKey)
 java.lang.String copyWithReplacedKey(java.lang.String sourceURI, javax.xml.registry.infomodel.ExternalLink newElink)
          Copy a webdav resource to a location which path contains the key of the external link itself.
 java.lang.String remove(java.lang.String webdavURI)
          Remove resource from WebDAV.
 void setObjectForKey(javax.xml.registry.infomodel.RegistryObject objectForKey)
          Set the object to be used for key.
 
Methods inherited from class com.centrasite.jaxr.common.BinaryWebDAVAccess
getFileType
 
Methods inherited from class com.centrasite.jaxr.common.AbstractWebDAVAccess
copy, get, getJAXR, getSupportingDocumentsLibraryOrgroot, getWebdavBase, getWebDAVLocator, put, remove, removeAndCleanup, removeAndCleanup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionWebDAVAccess

public VersionWebDAVAccess(com.centrasite.jaxr.JAXRAccessor jaxr)
Constructor with an opened JAXR accessor (credentials required)

Parameters:
jaxr - opened JAXR session
Method Detail

addOldKey

public void addOldKey(javax.xml.registry.infomodel.RegistryObject regObj)
               throws javax.xml.registry.JAXRException
Add a object with old key (used to extract via copyWithReplacedKey)

Parameters:
regObj - a registry object with old key (for path checking)
Throws:
javax.xml.registry.JAXRException

setObjectForKey

public void setObjectForKey(javax.xml.registry.infomodel.RegistryObject objectForKey)
Set the object to be used for key.

Parameters:
objectForKey -

copyWithReplacedKey

public java.lang.String copyWithReplacedKey(java.lang.String sourceURI,
                                            javax.xml.registry.infomodel.ExternalLink newElink)
                                     throws javax.xml.registry.JAXRException,
                                            VersionException
Copy a webdav resource to a location which path contains the key of the external link itself.

 
 Example:
           elink   -->    .../projects/WSDL/namespace/[oldElink-uddi-key/]x.wsdl
                                                                        gets copied to:
                          .../projects/WSDL/namespace/elink-uddi-key/x.wsdl 
 

Parameters:
sourceURI - the absolute webdav address of the source to be copied
newElink - the webdav external link (whose resource should be copied)
Returns:
the (full) webdav pathname of the copied resource null: elink path could not be established
Throws:
javax.xml.registry.JAXRException
VersionException

remove

public java.lang.String remove(java.lang.String webdavURI)
                        throws java.lang.Exception
Remove resource from WebDAV. The folder, which is usually a special one (with uddi-key) as sub folder is tried to be removed as well.

Overrides:
remove in class com.centrasite.jaxr.common.AbstractWebDAVAccess
Parameters:
webdavURI - the absolute (or relative) WebDAV URI
Throws:
java.lang.Exception