1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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 String getToken();
51  
52      public boolean isAvailable(WebDAVRequest webDavRequest)
53          throws WebDAVException;
54  
55      public boolean isSupportsClassTwo();
56  
57      public Status lockResource(
58              WebDAVRequest webDavRequest, String owner, long timeout)
59          throws WebDAVException;
60  
61      public Status makeCollection(WebDAVRequest webDavRequest)
62          throws WebDAVException;
63  
64      public int moveCollectionResource(
65              WebDAVRequest webDavRequest, Resource resource, String destination,
66              boolean overwrite)
67          throws WebDAVException;
68  
69      public int moveSimpleResource(
70              WebDAVRequest webDavRequest, Resource resource, String destination,
71              boolean overwrite)
72          throws WebDAVException;
73  
74      public int putResource(WebDAVRequest webDavRequest) throws WebDAVException;
75  
76      public Lock refreshResourceLock(
77              WebDAVRequest webDavRequest, String uuid, long timeout)
78          throws WebDAVException;
79  
80      public void setRootPath(String rootPath);
81  
82      public void setToken(String token);
83  
84      public boolean unlockResource(WebDAVRequest webDavRequest, String token)
85          throws WebDAVException;
86  
87  }