Clover icon

Magnolia REST Content Delivery 2.1

  1. Project Clover database Fri Mar 16 2018 18:21:08 CET
  2. Package info.magnolia.rest.delivery.jcr.v2

File ConfiguredJcrDeliveryEndpointDefinition.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
1
1
1
145
85
1
1
1
1
1
94.7% of code in this file is excluded from these metrics.

Classes

Class Line # Actions
ConfiguredJcrDeliveryEndpointDefinition 48 1 94.7% 1 0
1.0100%
 

Contributing tests

This file is covered by 3 tests. .

Source view

1    /**
2    * This file Copyright (c) 2017-2018 Magnolia International
3    * Ltd. (http://www.magnolia-cms.com). All rights reserved.
4    *
5    *
6    * This file is dual-licensed under both the Magnolia
7    * Network Agreement and the GNU General Public License.
8    * You may elect to use one or the other of these licenses.
9    *
10    * This file is distributed in the hope that it will be
11    * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the
12    * implied warranty of MERCHANTABILITY or FITNESS FOR A
13    * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
14    * Redistribution, except as permitted by whichever of the GPL
15    * or MNA you select, is prohibited.
16    *
17    * 1. For the GPL license (GPL), you can redistribute and/or
18    * modify this file under the terms of the GNU General
19    * Public License, Version 3, as published by the Free Software
20    * Foundation. You should have received a copy of the GNU
21    * General Public License, Version 3 along with this program;
22    * if not, write to the Free Software Foundation, Inc., 51
23    * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24    *
25    * 2. For the Magnolia Network Agreement (MNA), this file
26    * and the accompanying materials are made available under the
27    * terms of the MNA which accompanies this distribution, and
28    * is available at http://www.magnolia-cms.com/mna.html
29    *
30    * Any modifications to this file must keep this entire header
31    * intact.
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    * Configured content delivery node endpoint definition version 2.
47    */
 
48    public class ConfiguredJcrDeliveryEndpointDefinition extends ConfiguredEndpointDefinition implements JcrDeliveryEndpointDefinition {
49   
50    private String workspace;
51    private String rootPath;
52    private List<String> nodeTypes = Collections.singletonList(Content.NAME);
53    private List<String> childNodeTypes = Collections.singletonList(ContentNode.NAME);
54    private int depth = 0;
55    private long limit = 10;
56    private boolean includeSystemProperties = true;
57    private boolean bypassWorkspaceAcls = false;
58    private List<ReferenceDefinition> references = new ArrayList<>();
59   
 
60  3 toggle public ConfiguredJcrDeliveryEndpointDefinition() {
61  3 setImplementationClass(JcrDeliveryEndpoint.class);
62    }
63   
 
64    toggle @Override
65    public String getWorkspace() {
66    return workspace;
67    }
68   
 
69    toggle public void setWorkspace(String workspace) {
70    this.workspace = workspace;
71    }
72   
 
73    toggle @Override
74    public String getRootPath() {
75    return rootPath;
76    }
77   
 
78    toggle public void setRootPath(String rootPath) {
79    this.rootPath = rootPath;
80    }
81   
 
82    toggle @Override
83    public List<String> getNodeTypes() {
84    return nodeTypes;
85    }
86   
 
87    toggle public void setNodeTypes(List<String> nodeTypes) {
88    this.nodeTypes = nodeTypes;
89    }
90   
 
91    toggle @Override
92    public List<String> getChildNodeTypes() {
93    return childNodeTypes;
94    }
95   
 
96    toggle public void setChildNodeTypes(List<String> childNodeTypes) {
97    this.childNodeTypes = childNodeTypes;
98    }
99   
 
100    toggle @Override
101    public int getDepth() {
102    return depth;
103    }
104   
 
105    toggle public void setDepth(int depth) {
106    this.depth = depth;
107    }
108   
 
109    toggle @Override
110    public long getLimit() {
111    return limit;
112    }
113   
 
114    toggle public void setLimit(long limit) {
115    this.limit = limit;
116    }
117   
 
118    toggle @Override
119    public boolean isIncludeSystemProperties() {
120    return includeSystemProperties;
121    }
122   
 
123    toggle public void setIncludeSystemProperties(boolean includeSystemProperties) {
124    this.includeSystemProperties = includeSystemProperties;
125    }
126   
 
127    toggle @Override
128    public boolean isBypassWorkspaceAcls() {
129    return bypassWorkspaceAcls;
130    }
131   
 
132    toggle public void setBypassWorkspaceAcls(boolean bypassWorkspaceAcls) {
133    this.bypassWorkspaceAcls = bypassWorkspaceAcls;
134    }
135   
 
136    toggle @Override
137    public List<ReferenceDefinition> getReferences() {
138    return references;
139    }
140   
 
141    toggle public void setReferences(List<ReferenceDefinition> references) {
142    this.references = references;
143    }
144   
145    }