2ee210c138763fc5f00c4c4cca7bfefa83f70d82
[policy/models.git] / models-provider / src / test / java / org / onap / policy / models / provider / impl / DummyBadProviderImpl.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.models.provider.impl;
22
23 import java.util.Map;
24
25 import javax.ws.rs.core.Response;
26
27 import lombok.NonNull;
28
29 import org.onap.policy.models.base.PfConceptKey;
30 import org.onap.policy.models.base.PfModelException;
31 import org.onap.policy.models.base.PfModelRuntimeException;
32 import org.onap.policy.models.pdp.concepts.PdpGroups;
33 import org.onap.policy.models.provider.PolicyModelsProvider;
34 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyInput;
35 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyOutput;
36 import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
37 import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
38
39 /**
40  * Dummy implementation of {@link PolicyModelsProvider} with bad constructor.
41  *
42  * @author Liam Fallon (liam.fallon@est.tech)
43  */
44 public class DummyBadProviderImpl implements PolicyModelsProvider {
45     public DummyBadProviderImpl() {
46         throw new PfModelRuntimeException(Response.Status.BAD_REQUEST, "Bad Request");
47     }
48
49     @Override
50     public void close() throws Exception {}
51
52     @Override
53     public void init() throws PfModelException {}
54
55     @Override
56     public JpaToscaServiceTemplate getPolicyTypes(@NonNull PfConceptKey policyTypeKey) throws PfModelException {
57         return null;
58     }
59
60     @Override
61     public JpaToscaServiceTemplate createPolicyTypes(@NonNull JpaToscaServiceTemplate serviceTemplate)
62             throws PfModelException {
63         return null;
64     }
65
66     @Override
67     public JpaToscaServiceTemplate updatePolicyTypes(@NonNull JpaToscaServiceTemplate serviceTemplate)
68             throws PfModelException {
69         return null;
70     }
71
72     @Override
73     public JpaToscaServiceTemplate deletePolicyTypes(@NonNull PfConceptKey policyTypeKey) throws PfModelException {
74         return null;
75     }
76
77     @Override
78     public JpaToscaServiceTemplate getPolicies(@NonNull PfConceptKey policyKey) throws PfModelException {
79         return null;
80     }
81
82     @Override
83     public JpaToscaServiceTemplate createPolicies(@NonNull JpaToscaServiceTemplate serviceTemplate)
84             throws PfModelException {
85         return null;
86     }
87
88     @Override
89     public JpaToscaServiceTemplate updatePolicies(@NonNull JpaToscaServiceTemplate serviceTemplate)
90             throws PfModelException {
91         return null;
92     }
93
94     @Override
95     public JpaToscaServiceTemplate deletePolicies(@NonNull PfConceptKey policyKey) throws PfModelException {
96         return null;
97     }
98
99     @Override
100     public LegacyOperationalPolicy getOperationalPolicy(@NonNull String policyId) throws PfModelException {
101         return null;
102     }
103
104     @Override
105     public LegacyOperationalPolicy createOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
106             throws PfModelException {
107         return null;
108     }
109
110     @Override
111     public LegacyOperationalPolicy updateOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
112             throws PfModelException {
113         return null;
114     }
115
116     @Override
117     public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull String policyId) throws PfModelException {
118         return null;
119     }
120
121     @Override
122     public Map<String, LegacyGuardPolicyOutput> getGuardPolicy(@NonNull String policyId) throws PfModelException {
123         return null;
124     }
125
126     @Override
127     public Map<String, LegacyGuardPolicyOutput> createGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
128             throws PfModelException {
129         return null;
130     }
131
132     @Override
133     public Map<String, LegacyGuardPolicyOutput> updateGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
134             throws PfModelException {
135         return null;
136     }
137
138     @Override
139     public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(@NonNull String policyId) throws PfModelException {
140         return null;
141     }
142
143     @Override
144     public PdpGroups getPdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
145         return null;
146     }
147
148     @Override
149     public PdpGroups createPdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
150         return null;
151     }
152
153     @Override
154     public PdpGroups updatePdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
155         return null;
156     }
157
158     @Override
159     public PdpGroups deletePdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
160         return null;
161     }
162 }