1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.webdav;
16  
17  import com.liferay.portal.model.Lock;
18  
19  import java.util.List;
20  
21  /**
22   * <a href="WebDAVStorage.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   * @author Alexander Chow
26   */
27  public interface WebDAVStorage {
28  
29      public int copyCollectionResource(
30              WebDAVRequest webDavRequest, Resource resource, String destination,
31              boolean overwrite, long depth)
32          throws WebDAVException;
33  
34      public int copySimpleResource(
35              WebDAVRequest webDavRequest, Resource resource, String destination,
36              boolean overwrite)
37          throws WebDAVException;
38  
39      public int deleteResource(WebDAVRequest webDavRequest)
40          throws WebDAVException;
41  
42      public Resource getResource(WebDAVRequest webDavRequest)
43          throws WebDAVException;
44  
45      public List<Resource> getResources(WebDAVRequest webDavRequest)
46          throws WebDAVException;
47  
48      public String getRootPath();
49  
50      public boolean isAvailable(WebDAVRequest webDavRequest)
51          throws WebDAVException;
52  
53      public boolean isSupportsClassTwo();
54  
55      public Status lockResource(
56              WebDAVRequest webDavRequest, String owner, long timeout)
57          throws WebDAVException;
58  
59      public Status makeCollection(WebDAVRequest webDavRequest)
60          throws WebDAVException;
61  
62      public int moveCollectionResource(
63              WebDAVRequest webDavRequest, Resource resource, String destination,
64              boolean overwrite)
65          throws WebDAVException;
66  
67      public int moveSimpleResource(
68              WebDAVRequest webDavRequest, Resource resource, String destination,
69              boolean overwrite)
70          throws WebDAVException;
71  
72      public int putResource(WebDAVRequest webDavRequest) throws WebDAVException;
73  
74      public Lock refreshResourceLock(
75              WebDAVRequest webDavRequest, String uuid, long timeout)
76          throws WebDAVException;
77  
78      public void setRootPath(String rootPath);
79  
80      public boolean unlockResource(WebDAVRequest webDavRequest, String token)
81          throws WebDAVException;
82  
83  }