1
22
23 package com.liferay.portal.webdav;
24
25 import com.liferay.lock.model.Lock;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.service.LayoutLocalServiceUtil;
28
29 import javax.servlet.http.HttpServletResponse;
30
31
37 public abstract class BaseWebDAVStorageImpl implements WebDAVStorage {
38
39 public int copyCollectionResource(
40 WebDAVRequest webDavRequest, Resource resource, String destination,
41 boolean overwrite, long depth)
42 throws WebDAVException {
43
44 return HttpServletResponse.SC_FORBIDDEN;
45 }
46
47 public int copySimpleResource(
48 WebDAVRequest webDavRequest, Resource resource, String destination,
49 boolean overwrite)
50 throws WebDAVException {
51
52 return HttpServletResponse.SC_FORBIDDEN;
53 }
54
55 public int deleteResource(WebDAVRequest webDavRequest)
56 throws WebDAVException {
57
58 return HttpServletResponse.SC_FORBIDDEN;
59 }
60
61 public String getRootPath() {
62 return _rootPath;
63 }
64
65 public String getToken() {
66 return _token;
67 }
68
69 public boolean isAvailable(WebDAVRequest webDavRequest)
70 throws WebDAVException {
71
72 if (getResource(webDavRequest) == null) {
73 return false;
74 }
75 else {
76 return true;
77 }
78 }
79
80 public boolean isSupportsClassTwo() {
81 return false;
82 }
83
84 public Status lockResource(
85 WebDAVRequest webDavRequest, String owner, long timeout)
86 throws WebDAVException {
87
88 return null;
89 }
90
91 public Status makeCollection(WebDAVRequest webDavRequest)
92 throws WebDAVException {
93
94 return new Status(HttpServletResponse.SC_FORBIDDEN);
95 }
96
97 public int moveCollectionResource(
98 WebDAVRequest webDavRequest, Resource resource, String destination,
99 boolean overwrite)
100 throws WebDAVException {
101
102 return HttpServletResponse.SC_FORBIDDEN;
103 }
104
105 public int moveSimpleResource(
106 WebDAVRequest webDavRequest, Resource resource, String destination,
107 boolean overwrite)
108 throws WebDAVException {
109
110 return HttpServletResponse.SC_FORBIDDEN;
111 }
112
113 public int putResource(WebDAVRequest webDavRequest) throws WebDAVException {
114 return HttpServletResponse.SC_FORBIDDEN;
115 }
116
117 public Lock refreshResourceLock(
118 WebDAVRequest webDavRequest, String uuid, long timeout)
119 throws WebDAVException {
120
121 return null;
122 }
123
124 public void setRootPath(String rootPath) {
125 _rootPath = rootPath;
126 }
127
128 public void setToken(String token) {
129 _token = token;
130 }
131
132 public boolean unlockResource(WebDAVRequest webDavRequest, String token)
133 throws WebDAVException {
134
135 return false;
136 }
137
138 protected long getPlid(long groupId) throws SystemException {
139 return LayoutLocalServiceUtil.getDefaultPlid(groupId);
140 }
141
142 private String _rootPath;
143 private String _token;
144
145 }