com.liferay.portlet.documentlibrary.webdav
Class DLWebDAVStorageImpl

java.lang.Object
  extended by com.liferay.portal.webdav.BaseWebDAVStorageImpl
      extended by com.liferay.portlet.documentlibrary.webdav.DLWebDAVStorageImpl
All Implemented Interfaces:
WebDAVStorage

public class DLWebDAVStorageImpl
extends BaseWebDAVStorageImpl

View Source

Author:
Brian Wing Shun Chan, Alexander Chow

Constructor Summary
DLWebDAVStorageImpl()
           
 
Method Summary
 int copyCollectionResource(WebDAVRequest webDavRequest, Resource resource, java.lang.String destination, boolean overwrite, long depth)
           
 int copySimpleResource(WebDAVRequest webDavRequest, Resource resource, java.lang.String destination, boolean overwrite)
           
protected  boolean deleteResource(long groupId, long parentFolderId, java.lang.String name, java.lang.String lockUuid)
           
 int deleteResource(WebDAVRequest webDavRequest)
           
protected  java.util.List<Resource> getFileEntries(WebDAVRequest webDavRequest, long parentFolderId)
           
protected  long getFolderId(java.lang.String[] pathArray)
           
protected  long getFolderId(java.lang.String[] pathArray, boolean parent)
           
protected  java.util.List<Resource> getFolders(WebDAVRequest webDavRequest, long parentFolderId)
           
protected  long getParentFolderId(java.lang.String[] pathArray)
           
 Resource getResource(WebDAVRequest webDavRequest)
           
 java.util.List<Resource> getResources(WebDAVRequest webDavRequest)
           
protected  boolean isLocked(com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry, java.lang.String lockUuid)
           
protected  boolean isLocked(long parentFolderId, java.lang.String fileName, java.lang.String lockUuid)
           
 boolean isSupportsClassTwo()
           
 Status lockResource(WebDAVRequest webDavRequest, java.lang.String owner, long timeout)
           
 Status makeCollection(WebDAVRequest webDavRequest)
           
 int moveCollectionResource(WebDAVRequest webDavRequest, Resource resource, java.lang.String destination, boolean overwrite)
           
 int moveSimpleResource(WebDAVRequest webDavRequest, Resource resource, java.lang.String destination, boolean overwrite)
           
 int putResource(WebDAVRequest webDavRequest)
           
 com.liferay.portal.model.Lock refreshResourceLock(WebDAVRequest webDavRequest, java.lang.String uuid, long timeout)
           
protected  Resource toResource(WebDAVRequest webDavRequest, com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry, boolean appendPath)
           
protected  Resource toResource(WebDAVRequest webDavRequest, com.liferay.portlet.documentlibrary.model.DLFolder folder, boolean appendPath)
           
 boolean unlockResource(WebDAVRequest webDavRequest, java.lang.String token)
           
 
Methods inherited from class com.liferay.portal.webdav.BaseWebDAVStorageImpl
getPlid, getRootPath, getToken, isAvailable, setRootPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLWebDAVStorageImpl

public DLWebDAVStorageImpl()
Method Detail

copyCollectionResource

public int copyCollectionResource(WebDAVRequest webDavRequest,
                                  Resource resource,
                                  java.lang.String destination,
                                  boolean overwrite,
                                  long depth)
                           throws WebDAVException
Specified by:
copyCollectionResource in interface WebDAVStorage
Overrides:
copyCollectionResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

copySimpleResource

public int copySimpleResource(WebDAVRequest webDavRequest,
                              Resource resource,
                              java.lang.String destination,
                              boolean overwrite)
                       throws WebDAVException
Specified by:
copySimpleResource in interface WebDAVStorage
Overrides:
copySimpleResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

deleteResource

public int deleteResource(WebDAVRequest webDavRequest)
                   throws WebDAVException
Specified by:
deleteResource in interface WebDAVStorage
Overrides:
deleteResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

getResource

public Resource getResource(WebDAVRequest webDavRequest)
                     throws WebDAVException
Throws:
WebDAVException

getResources

public java.util.List<Resource> getResources(WebDAVRequest webDavRequest)
                                      throws WebDAVException
Throws:
WebDAVException

isSupportsClassTwo

public boolean isSupportsClassTwo()
Specified by:
isSupportsClassTwo in interface WebDAVStorage
Overrides:
isSupportsClassTwo in class BaseWebDAVStorageImpl

lockResource

public Status lockResource(WebDAVRequest webDavRequest,
                           java.lang.String owner,
                           long timeout)
                    throws WebDAVException
Specified by:
lockResource in interface WebDAVStorage
Overrides:
lockResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

makeCollection

public Status makeCollection(WebDAVRequest webDavRequest)
                      throws WebDAVException
Specified by:
makeCollection in interface WebDAVStorage
Overrides:
makeCollection in class BaseWebDAVStorageImpl
Throws:
WebDAVException

moveCollectionResource

public int moveCollectionResource(WebDAVRequest webDavRequest,
                                  Resource resource,
                                  java.lang.String destination,
                                  boolean overwrite)
                           throws WebDAVException
Specified by:
moveCollectionResource in interface WebDAVStorage
Overrides:
moveCollectionResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

moveSimpleResource

public int moveSimpleResource(WebDAVRequest webDavRequest,
                              Resource resource,
                              java.lang.String destination,
                              boolean overwrite)
                       throws WebDAVException
Specified by:
moveSimpleResource in interface WebDAVStorage
Overrides:
moveSimpleResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

putResource

public int putResource(WebDAVRequest webDavRequest)
                throws WebDAVException
Specified by:
putResource in interface WebDAVStorage
Overrides:
putResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

refreshResourceLock

public com.liferay.portal.model.Lock refreshResourceLock(WebDAVRequest webDavRequest,
                                                         java.lang.String uuid,
                                                         long timeout)
                                                  throws WebDAVException
Specified by:
refreshResourceLock in interface WebDAVStorage
Overrides:
refreshResourceLock in class BaseWebDAVStorageImpl
Throws:
WebDAVException

unlockResource

public boolean unlockResource(WebDAVRequest webDavRequest,
                              java.lang.String token)
                       throws WebDAVException
Specified by:
unlockResource in interface WebDAVStorage
Overrides:
unlockResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

deleteResource

protected boolean deleteResource(long groupId,
                                 long parentFolderId,
                                 java.lang.String name,
                                 java.lang.String lockUuid)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getFileEntries

protected java.util.List<Resource> getFileEntries(WebDAVRequest webDavRequest,
                                                  long parentFolderId)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

getFolderId

protected long getFolderId(java.lang.String[] pathArray)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getFolderId

protected long getFolderId(java.lang.String[] pathArray,
                           boolean parent)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getFolders

protected java.util.List<Resource> getFolders(WebDAVRequest webDavRequest,
                                              long parentFolderId)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getParentFolderId

protected long getParentFolderId(java.lang.String[] pathArray)
                          throws java.lang.Exception
Throws:
java.lang.Exception

isLocked

protected boolean isLocked(com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
                           java.lang.String lockUuid)
                    throws java.lang.Exception
Throws:
java.lang.Exception

isLocked

protected boolean isLocked(long parentFolderId,
                           java.lang.String fileName,
                           java.lang.String lockUuid)
                    throws java.lang.Exception
Throws:
java.lang.Exception

toResource

protected Resource toResource(WebDAVRequest webDavRequest,
                              com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
                              boolean appendPath)

toResource

protected Resource toResource(WebDAVRequest webDavRequest,
                              com.liferay.portlet.documentlibrary.model.DLFolder folder,
                              boolean appendPath)