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.delivery.jcr.v2;
35
36 import info.magnolia.jcr.util.NodeTypes.Content;
37 import info.magnolia.jcr.util.NodeTypes.ContentNode;
38 import info.magnolia.rest.reference.ReferenceDefinition;
39 import info.magnolia.rest.registry.ConfiguredEndpointDefinition;
40
41 import java.util.ArrayList;
42 import java.util.Collections;
43 import java.util.List;
44
45
46
47
48 public class ConfiguredJcrDeliveryEndpointDefinition extends ConfiguredEndpointDefinition implements JcrDeliveryEndpointDefinition {
49
50 private String workspace;
51 private String rootPath;
52 private boolean strict = false;
53 private List<String> nodeTypes = Collections.singletonList(Content.NAME);
54 private List<String> childNodeTypes = Collections.singletonList(ContentNode.NAME);
55 private List<String> systemProperties = new ArrayList<>();
56 private int depth = 0;
57 private long limit = 10;
58 private boolean includeSystemProperties = false;
59 private boolean bypassWorkspaceAcls = false;
60 private List<ReferenceDefinition> references = new ArrayList<>();
61
62 public ConfiguredJcrDeliveryEndpointDefinition() {
63 setImplementationClass(JcrDeliveryEndpoint.class);
64 }
65
66 @Override
67 public String getWorkspace() {
68 return workspace;
69 }
70
71 public void setWorkspace(String workspace) {
72 this.workspace = workspace;
73 }
74
75 @Override
76 public String getRootPath() {
77 return rootPath;
78 }
79
80 public void setRootPath(String rootPath) {
81 this.rootPath = rootPath;
82 }
83
84 @Override
85 public boolean isStrict() {
86 return strict;
87 }
88
89 public void setStrict(boolean strict) {
90 this.strict = strict;
91 }
92
93 @Override
94 public List<String> getNodeTypes() {
95 return nodeTypes;
96 }
97
98 public void setNodeTypes(List<String> nodeTypes) {
99 this.nodeTypes = nodeTypes;
100 }
101
102 @Override
103 public List<String> getChildNodeTypes() {
104 return childNodeTypes;
105 }
106
107 public void setChildNodeTypes(List<String> childNodeTypes) {
108 this.childNodeTypes = childNodeTypes;
109 }
110
111 @Override
112 public int getDepth() {
113 return depth;
114 }
115
116 public void setDepth(int depth) {
117 this.depth = depth;
118 }
119
120 @Override
121 public long getLimit() {
122 return limit;
123 }
124
125 public void setLimit(long limit) {
126 this.limit = limit;
127 }
128
129 @Override
130 public boolean isIncludeSystemProperties() {
131 return includeSystemProperties;
132 }
133
134 public void setIncludeSystemProperties(boolean includeSystemProperties) {
135 this.includeSystemProperties = includeSystemProperties;
136 }
137
138 @Override
139 public boolean isBypassWorkspaceAcls() {
140 return bypassWorkspaceAcls;
141 }
142
143 public void setBypassWorkspaceAcls(boolean bypassWorkspaceAcls) {
144 this.bypassWorkspaceAcls = bypassWorkspaceAcls;
145 }
146
147 @Override
148 public List<ReferenceDefinition> getReferences() {
149 return references;
150 }
151
152 public void setReferences(List<ReferenceDefinition> references) {
153 this.references = references;
154 }
155
156 @Override
157 public List<String> getSystemProperties() {
158 return systemProperties;
159 }
160
161 public void setSystemProperties(List<String> systemProperties) {
162 this.systemProperties = systemProperties;
163 }
164 }