1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
package info.magnolia.imaging.operations.load; |
35 |
|
|
36 |
|
import info.magnolia.cms.core.Content; |
37 |
|
import info.magnolia.cms.core.NodeData; |
38 |
|
import info.magnolia.imaging.ImagingException; |
39 |
|
import info.magnolia.imaging.ParameterProvider; |
40 |
|
|
41 |
|
import javax.jcr.RepositoryException; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
@link |
46 |
|
|
47 |
|
@deprecated |
48 |
|
|
49 |
|
@Deprecated |
|
|
| 88.9% |
Uncovered Elements: 1 (9) |
Complexity: 3 |
Complexity Density: 0.5 |
|
50 |
|
public class FromContent extends AbstractFromContent<Content> { |
51 |
|
|
52 |
|
private String propertyName = "binary"; |
53 |
|
|
|
|
| 87.5% |
Uncovered Elements: 1 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
54 |
2 |
@Override... |
55 |
|
protected NodeData getNodeData(ParameterProvider<Content> param) throws ImagingException { |
56 |
2 |
try { |
57 |
2 |
final Content node = param.getParameter(); |
58 |
2 |
if (!node.hasNodeData(propertyName)) { |
59 |
1 |
throw new ImagingException("There is no '" + propertyName + "' property at " + node.getHandle()); |
60 |
|
} |
61 |
1 |
return node.getNodeData(propertyName); |
62 |
|
} catch (RepositoryException e) { |
63 |
0 |
throw new RuntimeException(e); |
64 |
|
} |
65 |
|
} |
66 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
67 |
|
public String getPropertyName() {... |
68 |
|
return propertyName; |
69 |
|
} |
70 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
71 |
|
public void setPropertyName(String propertyName) {... |
72 |
|
this.propertyName = propertyName; |
73 |
|
} |
74 |
|
|
75 |
|
} |