1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.webdav;
21  
22  import com.liferay.lock.model.Lock;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="WebDAVStorage.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   * @author Alexander Chow
31   *
32   */
33  public interface WebDAVStorage {
34  
35      public int copyCollectionResource(
36              WebDAVRequest webDavRequest, Resource resource, String destination,
37              boolean overwrite, long depth)
38          throws WebDAVException;
39  
40      public int copySimpleResource(
41              WebDAVRequest webDavRequest, Resource resource, String destination,
42              boolean overwrite)
43          throws WebDAVException;
44  
45      public int deleteResource(WebDAVRequest webDavRequest)
46          throws WebDAVException;
47  
48      public Resource getResource(WebDAVRequest webDavRequest)
49          throws WebDAVException;
50  
51      public List<Resource> getResources(WebDAVRequest webDavRequest)
52          throws WebDAVException;
53  
54      public String getRootPath();
55  
56      public boolean isAvailable(WebDAVRequest webDavRequest)
57          throws WebDAVException;
58  
59      public boolean isSupportsClassTwo();
60  
61      public Status lockResource(
62              WebDAVRequest webDavRequest, String owner, long timeout)
63          throws WebDAVException;
64  
65      public Status makeCollection(WebDAVRequest webDavRequest)
66          throws WebDAVException;
67  
68      public int moveCollectionResource(
69              WebDAVRequest webDavRequest, Resource resource, String destination,
70              boolean overwrite)
71          throws WebDAVException;
72  
73      public int moveSimpleResource(
74              WebDAVRequest webDavRequest, Resource resource, String destination,
75              boolean overwrite)
76          throws WebDAVException;
77  
78      public int putResource(WebDAVRequest webDavRequest) throws WebDAVException;
79  
80      public Lock refreshResourceLock(
81              WebDAVRequest webDavRequest, String uuid, long timeout)
82          throws WebDAVException;
83  
84      public void setRootPath(String rootPath);
85  
86      public boolean unlockResource(WebDAVRequest webDavRequest, String token)
87          throws WebDAVException;
88  
89  }