Remove unused statistics methods
[policy/models.git] / models-provider / src / test / java / org / onap / policy / models / provider / impl / DummyBadProviderImpl.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019-2021 Nordix Foundation.
4  *  Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
5  *  Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * SPDX-License-Identifier: Apache-2.0
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.models.provider.impl;
24
25 import java.time.Instant;
26 import java.util.ArrayList;
27 import java.util.Collection;
28 import java.util.Collections;
29 import java.util.List;
30 import javax.ws.rs.core.Response;
31 import lombok.NonNull;
32 import org.onap.policy.models.base.PfModelException;
33 import org.onap.policy.models.base.PfModelRuntimeException;
34 import org.onap.policy.models.pap.concepts.PolicyAudit;
35 import org.onap.policy.models.pap.persistence.provider.PolicyAuditProvider.AuditFilter;
36 import org.onap.policy.models.pdp.concepts.Pdp;
37 import org.onap.policy.models.pdp.concepts.PdpGroup;
38 import org.onap.policy.models.pdp.concepts.PdpGroupFilter;
39 import org.onap.policy.models.pdp.concepts.PdpPolicyStatus;
40 import org.onap.policy.models.pdp.concepts.PdpStatistics;
41 import org.onap.policy.models.pdp.concepts.PdpSubGroup;
42 import org.onap.policy.models.pdp.persistence.provider.PdpFilterParameters;
43 import org.onap.policy.models.provider.PolicyModelsProvider;
44 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
45 import org.onap.policy.models.tosca.authorative.concepts.ToscaEntityFilter;
46 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
47 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType;
48 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
49 import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
50
51 /**
52  * Dummy implementation of {@link PolicyModelsProvider} with bad constructor.
53  *
54  * @author Liam Fallon (liam.fallon@est.tech)
55  */
56 public class DummyBadProviderImpl implements PolicyModelsProvider {
57     public DummyBadProviderImpl() {
58         throw new PfModelRuntimeException(Response.Status.BAD_REQUEST, "Bad Request");
59     }
60
61     @Override
62     public void close() throws PfModelException {
63         // do nothing
64     }
65
66     @Override
67     public void init() throws PfModelException {
68         // do nothing
69     }
70
71     @Override
72     public List<ToscaServiceTemplate> getFilteredServiceTemplateList(
73             @NonNull ToscaEntityFilter<ToscaServiceTemplate> filter) throws PfModelException {
74         return null;
75     }
76
77     @Override
78     public ToscaServiceTemplate createServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate)
79             throws PfModelException {
80         return null;
81     }
82
83     @Override
84     public ToscaServiceTemplate updateServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate)
85             throws PfModelException {
86         return null;
87     }
88
89     @Override
90     public ToscaServiceTemplate deleteServiceTemplate(@NonNull String name, @NonNull String version)
91             throws PfModelException {
92         return null;
93     }
94
95     @Override
96     public ToscaServiceTemplate getPolicyTypes(final String name, final String version) throws PfModelException {
97         return null;
98     }
99
100     @Override
101     public ToscaServiceTemplate createPolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
102             throws PfModelException {
103         return null;
104     }
105
106     @Override
107     public ToscaServiceTemplate updatePolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
108             throws PfModelException {
109         return null;
110     }
111
112     @Override
113     public ToscaServiceTemplate deletePolicyType(final String name, final String version) throws PfModelException {
114         return null;
115     }
116
117     @Override
118     public ToscaServiceTemplate getPolicies(final String name, final String version) throws PfModelException {
119         return null;
120     }
121
122     @Override
123     public ToscaServiceTemplate createPolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
124         return null;
125     }
126
127     @Override
128     public ToscaServiceTemplate updatePolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
129         return null;
130     }
131
132     @Override
133     public ToscaServiceTemplate deletePolicy(final String name, final String version) throws PfModelException {
134         return null;
135     }
136
137     @Override
138     public List<PdpGroup> getPdpGroups(String name) throws PfModelException {
139         return Collections.emptyList();
140     }
141
142     @Override
143     public List<PdpGroup> createPdpGroups(@NonNull List<PdpGroup> pdpGroups) throws PfModelException {
144         return Collections.emptyList();
145     }
146
147     @Override
148     public List<PdpGroup> updatePdpGroups(@NonNull List<PdpGroup> pdpGroups) throws PfModelException {
149         return Collections.emptyList();
150     }
151
152     @Override
153     public void updatePdp(@NonNull String pdpGroupName, @NonNull String pdpSubGroup, @NonNull Pdp pdp)
154             throws PfModelException {
155         // do nothing
156     }
157
158     @Override
159     public PdpGroup deletePdpGroup(@NonNull String name) throws PfModelException {
160         return null;
161     }
162
163     @Override
164     public List<ToscaPolicyType> getPolicyTypeList(String name, String version) throws PfModelException {
165         return Collections.emptyList();
166     }
167
168     @Override
169     public ToscaServiceTemplate getFilteredPolicyTypes(@NonNull ToscaEntityFilter<ToscaPolicyType> filter)
170             throws PfModelException {
171         return null;
172     }
173
174     @Override
175     public List<ToscaPolicyType> getFilteredPolicyTypeList(@NonNull ToscaEntityFilter<ToscaPolicyType> filter)
176             throws PfModelException {
177         return Collections.emptyList();
178     }
179
180     @Override
181     public List<ToscaPolicy> getPolicyList(String name, String version) throws PfModelException {
182         return Collections.emptyList();
183     }
184
185     @Override
186     public ToscaServiceTemplate getFilteredPolicies(@NonNull ToscaTypedEntityFilter<ToscaPolicy> filter)
187             throws PfModelException {
188         return null;
189     }
190
191     @Override
192     public List<ToscaPolicy> getFilteredPolicyList(@NonNull ToscaTypedEntityFilter<ToscaPolicy> filter)
193             throws PfModelException {
194         return Collections.emptyList();
195     }
196
197     @Override
198     public List<PdpGroup> getFilteredPdpGroups(@NonNull PdpGroupFilter filter) throws PfModelException {
199         return Collections.emptyList();
200     }
201
202     @Override
203     public void updatePdpSubGroup(@NonNull String pdpGroupName, @NonNull PdpSubGroup pdpSubGroup)
204             throws PfModelException {
205         // do nothing
206     }
207
208     @Override
209     public List<PdpStatistics> getFilteredPdpStatistics(PdpFilterParameters filterParams) throws PfModelException {
210         // Not implemented
211         return null;
212     }
213
214     @Override
215     public List<PdpStatistics> createPdpStatistics(final List<PdpStatistics> pdpStatisticsList)
216             throws PfModelException {
217         // Not implemented
218         return new ArrayList<>();
219     }
220
221     @Override
222     public List<PdpStatistics> updatePdpStatistics(final List<PdpStatistics> pdpStatisticsList)
223             throws PfModelException {
224         // Not implemented
225         return new ArrayList<>();
226     }
227
228     @Override
229     public List<PdpStatistics> deletePdpStatistics(final String name, final Instant timestamp) {
230         // Not implemented
231         return null;
232     }
233
234     @Override
235     public List<PdpPolicyStatus> getAllPolicyStatus() throws PfModelException {
236         // Not implemented
237         return null;
238     }
239
240     @Override
241     public List<PdpPolicyStatus> getAllPolicyStatus(@NonNull ToscaConceptIdentifierOptVersion policy)
242             throws PfModelException {
243         // Not implemented
244         return null;
245     }
246
247     @Override
248     public List<PdpPolicyStatus> getGroupPolicyStatus(@NonNull String groupName) throws PfModelException {
249         // Not implemented
250         return null;
251     }
252
253     @Override
254     public void cudPolicyStatus(Collection<PdpPolicyStatus> createObjs, Collection<PdpPolicyStatus> updateObjs,
255             Collection<PdpPolicyStatus> deleteObjs) {
256         // Not implemented
257     }
258
259     @Override
260     public List<ToscaServiceTemplate> getServiceTemplateList(String name, String version) throws PfModelException {
261         // Not implemented
262         return null;
263     }
264
265     @Override
266     public void createAuditRecords(List<PolicyAudit> auditRecords) {
267         // Not implemented
268     }
269
270     @Override
271     public List<PolicyAudit> getAuditRecords(AuditFilter auditFilter) {
272         // Not implemented
273         return null;
274     }
275 }