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.rest.registry; |
35 |
|
|
36 |
|
import info.magnolia.jcr.node2bean.Node2BeanException; |
37 |
|
import info.magnolia.jcr.node2bean.Node2BeanProcessor; |
38 |
|
import info.magnolia.objectfactory.Components; |
39 |
|
import info.magnolia.registry.RegistrationException; |
40 |
|
import info.magnolia.rest.EndpointDefinition; |
41 |
|
|
42 |
|
import javax.jcr.Node; |
43 |
|
import javax.jcr.RepositoryException; |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
|
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.5 |
|
48 |
|
public class ConfiguredEndpointDefinitionProvider implements EndpointDefinitionProvider { |
49 |
|
|
50 |
|
private final String name; |
51 |
|
private final ConfiguredEndpointDefinition endpointDefinition; |
52 |
|
|
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
53 |
8 |
public ConfiguredEndpointDefinitionProvider(String name, Node configNode) throws Node2BeanException, RepositoryException {... |
54 |
8 |
this.name = name; |
55 |
8 |
this.endpointDefinition = (ConfiguredEndpointDefinition) Components.getComponent(Node2BeanProcessor.class).toBean(configNode, EndpointDefinition.class); |
56 |
8 |
if (this.endpointDefinition != null) { |
57 |
8 |
this.endpointDefinition.setName(name); |
58 |
|
} |
59 |
|
} |
60 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
61 |
|
@Override... |
62 |
|
public String getName() { |
63 |
|
return name; |
64 |
|
} |
65 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
66 |
|
@Override... |
67 |
|
public EndpointDefinition getEndpointDefinition() throws RegistrationException { |
68 |
|
return endpointDefinition; |
69 |
|
} |
70 |
|
|
71 |
|
} |