com.liferay.portlet.imagegallery.webdav
Class IGWebDAVStorageImpl

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

public class IGWebDAVStorageImpl
extends BaseWebDAVStorageImpl

View Source

Author:
Alexander Chow

Constructor Summary
IGWebDAVStorageImpl()
           
 
Method Summary
 int copyCollectionResource(WebDAVRequest webDavReq, Resource resource, java.lang.String destination, boolean overwrite, long depth)
           
 int copySimpleResource(WebDAVRequest webDavReq, Resource resource, java.lang.String destination, boolean overwrite)
           
protected  boolean deleteResource(long groupId, long parentFolderId, java.lang.String name)
           
 int deleteResource(WebDAVRequest webDavReq)
           
protected  long getFolderId(java.lang.String[] pathArray)
           
protected  long getFolderId(java.lang.String[] pathArray, boolean parent)
           
protected  java.util.List<Resource> getFolders(WebDAVRequest webDavReq, long parentFolderId)
           
protected  java.util.List<Resource> getImages(WebDAVRequest webDavReq, long parentFolderId)
           
protected  long getParentFolderId(java.lang.String[] pathArray)
           
 Resource getResource(WebDAVRequest webDavReq)
           
 java.util.List<Resource> getResources(WebDAVRequest webDavReq)
           
 Status makeCollection(WebDAVRequest webDavReq)
           
 int moveCollectionResource(WebDAVRequest webDavReq, Resource resource, java.lang.String destination, boolean overwrite)
           
 int moveSimpleResource(WebDAVRequest webDavReq, Resource resource, java.lang.String destination, boolean overwrite)
           
 int putResource(WebDAVRequest webDavReq)
           
protected  Resource toResource(WebDAVRequest webDavReq, com.liferay.portlet.imagegallery.model.IGFolder folder, boolean appendPath)
           
protected  Resource toResource(WebDAVRequest webDavReq, com.liferay.portlet.imagegallery.model.IGImage image, boolean appendPath)
           
 
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

IGWebDAVStorageImpl

public IGWebDAVStorageImpl()
Method Detail

copyCollectionResource

public int copyCollectionResource(WebDAVRequest webDavReq,
                                  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 webDavReq,
                              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 webDavReq)
                   throws WebDAVException
Specified by:
deleteResource in interface WebDAVStorage
Overrides:
deleteResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

getResource

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

getResources

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

makeCollection

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

moveCollectionResource

public int moveCollectionResource(WebDAVRequest webDavReq,
                                  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 webDavReq,
                              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 webDavReq)
                throws WebDAVException
Specified by:
putResource in interface WebDAVStorage
Overrides:
putResource in class BaseWebDAVStorageImpl
Throws:
WebDAVException

deleteResource

protected boolean deleteResource(long groupId,
                                 long parentFolderId,
                                 java.lang.String name)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException,
                                 java.rmi.RemoteException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
java.rmi.RemoteException

getFolders

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

getImages

protected java.util.List<Resource> getImages(WebDAVRequest webDavReq,
                                             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

getParentFolderId

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

toResource

protected Resource toResource(WebDAVRequest webDavReq,
                              com.liferay.portlet.imagegallery.model.IGImage image,
                              boolean appendPath)

toResource

protected Resource toResource(WebDAVRequest webDavReq,
                              com.liferay.portlet.imagegallery.model.IGFolder folder,
                              boolean appendPath)