1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.plugin.webdav.resources.partial; |
21 |
|
|
22 |
|
import java.io.IOException; |
23 |
|
|
24 |
|
import org.apache.jackrabbit.server.io.IOUtil; |
25 |
|
import org.apache.jackrabbit.webdav.DavException; |
26 |
|
import org.apache.jackrabbit.webdav.DavResource; |
27 |
|
import org.apache.jackrabbit.webdav.DavServletResponse; |
28 |
|
import org.apache.jackrabbit.webdav.io.InputContext; |
29 |
|
import org.apache.jackrabbit.webdav.io.OutputContext; |
30 |
|
|
31 |
|
import com.xpn.xwiki.plugin.webdav.resources.domain.DavTempFile; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
@version |
39 |
|
|
|
|
| 63.6% |
Uncovered Elements: 8 (22) |
Complexity: 9 |
Complexity Density: 0.82 |
|
40 |
|
public abstract class AbstractDavView extends AbstractDavResource |
41 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
17 |
@Override... |
43 |
|
public boolean exists() |
44 |
|
{ |
45 |
17 |
return true; |
46 |
|
} |
47 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
0 |
@Override... |
49 |
|
public long getModificationTime() |
50 |
|
{ |
51 |
0 |
return IOUtil.UNDEFINED_TIME; |
52 |
|
} |
53 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
54 |
216 |
@Override... |
55 |
|
public boolean isCollection() |
56 |
|
{ |
57 |
216 |
return true; |
58 |
|
} |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0 |
@Override... |
61 |
|
public void move(DavResource destination) throws DavException |
62 |
|
{ |
63 |
0 |
throw new DavException(DavServletResponse.SC_METHOD_NOT_ALLOWED); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0 |
@Override... |
67 |
|
public void spool(OutputContext outputContext) throws IOException |
68 |
|
{ |
69 |
0 |
throw new IOException("Views cannot be spooled."); |
70 |
|
} |
71 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
72 |
4 |
@Override... |
73 |
|
public void addMember(DavResource resource, InputContext inputContext) throws DavException |
74 |
|
{ |
75 |
4 |
if (resource instanceof DavTempFile) { |
76 |
4 |
addVirtualMember(resource, inputContext); |
77 |
|
} else { |
78 |
0 |
throw new DavException(DavServletResponse.SC_FORBIDDEN); |
79 |
|
} |
80 |
|
} |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
82 |
9 |
@Override... |
83 |
|
public void removeMember(DavResource member) throws DavException |
84 |
|
{ |
85 |
9 |
if (member instanceof DavTempFile) { |
86 |
4 |
removeVirtualMember(member); |
87 |
|
} else { |
88 |
5 |
throw new DavException(DavServletResponse.SC_FORBIDDEN); |
89 |
|
} |
90 |
|
} |
91 |
|
} |