com.centrasite.registry.versionmanagementservices
Class VersionWebDAVUpdate

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

public class VersionWebDAVUpdate
extends java.lang.Object

This class supports for the updates of webdav files within versioning when the files in webdav are copied. Those files (wsdl, xsd) could have references (with location attributes) to other files. In this case the filename must be updated to reflect the new location.

Note: the webdav updates here have the logic of wsdl/xsd registration !

 Example:
 
        wsdl (at path1/service.wsdl):                         xsd (at path1/schema.xsd)
        ...   import location="path1/schema.xsd" 
        
                  after versioning the files got copied:
                          
        wsdl (at path1/key/service.wsdl):                     xsd (at path1/key/schema.xsd)
        ...   import location="path1/schema.xsd" 
   
                  after update with VersionWebDAVUpdate.update():
                          
        wsdl (at path1/key/service.wsdl):                     xsd (at path1/key/schema.xsd)
        ...   import location="path1/key/schema.xsd"                      
 


Constructor Summary
VersionWebDAVUpdate(VersionWebDAVAccess webdavAccess)
          Constructor.
 
Method Summary
 void add(java.lang.String originalWebdavUri, java.lang.String copiedWebdavUri, java.lang.String copiedElinkKey, boolean hasReference)
          Add a new file.
 java.util.List<com.centrasite.registry.versionmanagementservices.VersionWebDAVUpdate.WebDAVUpdateEntry> getWebdavUpdateEntries()
          Get the list of collected WebDAVUpdateEntry
 void update()
          Perform the updates of the files in WebDAV (note: the old ones get updated)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionWebDAVUpdate

public VersionWebDAVUpdate(VersionWebDAVAccess webdavAccess)
Constructor.

Parameters:
webdavAccess - webdav access class (to get jaxr and webdav locator)
Method Detail

add

public void add(java.lang.String originalWebdavUri,
                java.lang.String copiedWebdavUri,
                java.lang.String copiedElinkKey,
                boolean hasReference)
Add a new file. Normally the copied URI has the object's key insdide, but there could also be the opposite handling.

Parameters:
originalWebdavUri - original uri of the file (usually without key in name)
copiedWebdavUri - newly copied uri of the file (usually with key in name)
copiedElinkKey - key of external link of the copied source
hasReference - true: file has any import reference ; false: no reference

update

public void update()
            throws VersionException
Perform the updates of the files in WebDAV (note: the old ones get updated)

Throws:
VersionException

getWebdavUpdateEntries

public java.util.List<com.centrasite.registry.versionmanagementservices.VersionWebDAVUpdate.WebDAVUpdateEntry> getWebdavUpdateEntries()
Get the list of collected WebDAVUpdateEntry

Returns:
list of WebDAVUpdateEntry