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