a9a0d13e362f99bc6bfee06fe3284edb37ce6b6e
[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.PfModelException;
30 import org.onap.policy.models.base.PfModelRuntimeException;
31 import org.onap.policy.models.pdp.concepts.PdpGroups;
32 import org.onap.policy.models.provider.PolicyModelsProvider;
33 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
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
38 /**
39  * Dummy implementation of {@link PolicyModelsProvider} with bad constructor.
40  *
41  * @author Liam Fallon (liam.fallon@est.tech)
42  */
43 public class DummyBadProviderImpl implements PolicyModelsProvider {
44     public DummyBadProviderImpl() {
45         throw new PfModelRuntimeException(Response.Status.BAD_REQUEST, "Bad Request");
46     }
47
48     @Override
49     public void close() throws Exception {}
50
51     @Override
52     public void init() throws PfModelException {}
53
54     @Override
55     public ToscaServiceTemplate getPolicyTypes(final String name, final String version) throws PfModelException {
56         return null;
57     }
58
59     @Override
60     public ToscaServiceTemplate createPolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
61             throws PfModelException {
62         return null;
63     }
64
65     @Override
66     public ToscaServiceTemplate updatePolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
67             throws PfModelException {
68         return null;
69     }
70
71     @Override
72     public ToscaServiceTemplate deletePolicyTypes(final String name, final String version) throws PfModelException {
73         return null;
74     }
75
76     @Override
77     public ToscaServiceTemplate getPolicies(final String name, final String version) throws PfModelException {
78         return null;
79     }
80
81     @Override
82     public ToscaServiceTemplate createPolicies(@NonNull ToscaServiceTemplate serviceTemplate)
83             throws PfModelException {
84         return null;
85     }
86
87     @Override
88     public ToscaServiceTemplate updatePolicies(@NonNull ToscaServiceTemplate serviceTemplate)
89             throws PfModelException {
90         return null;
91     }
92
93     @Override
94     public ToscaServiceTemplate deletePolicies(final String name, final String version) throws PfModelException {
95         return null;
96     }
97
98     @Override
99     public LegacyOperationalPolicy getOperationalPolicy(@NonNull String policyId) throws PfModelException {
100         return null;
101     }
102
103     @Override
104     public LegacyOperationalPolicy createOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
105             throws PfModelException {
106         return null;
107     }
108
109     @Override
110     public LegacyOperationalPolicy updateOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
111             throws PfModelException {
112         return null;
113     }
114
115     @Override
116     public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull String policyId) throws PfModelException {
117         return null;
118     }
119
120     @Override
121     public Map<String, LegacyGuardPolicyOutput> getGuardPolicy(@NonNull String policyId) throws PfModelException {
122         return null;
123     }
124
125     @Override
126     public Map<String, LegacyGuardPolicyOutput> createGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
127             throws PfModelException {
128         return null;
129     }
130
131     @Override
132     public Map<String, LegacyGuardPolicyOutput> updateGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
133             throws PfModelException {
134         return null;
135     }
136
137     @Override
138     public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(@NonNull String policyId) throws PfModelException {
139         return null;
140     }
141
142     @Override
143     public PdpGroups getPdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
144         return null;
145     }
146
147     @Override
148     public PdpGroups createPdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
149         return null;
150     }
151
152     @Override
153     public PdpGroups updatePdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
154         return null;
155     }
156
157     @Override
158     public PdpGroups deletePdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
159         return null;
160     }
161 }