Add support for legacy guard policies
[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.ToscaServiceTemplate;
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 ToscaServiceTemplate getPolicyTypes(@NonNull PfConceptKey policyTypeKey) throws PfModelException {
57         return null;
58     }
59
60     @Override
61     public ToscaServiceTemplate createPolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
62             throws PfModelException {
63         return null;
64     }
65
66     @Override
67     public ToscaServiceTemplate updatePolicyTypes(@NonNull ToscaServiceTemplate serviceTemplate)
68             throws PfModelException {
69         return null;
70     }
71
72     @Override
73     public ToscaServiceTemplate deletePolicyTypes(@NonNull PfConceptKey policyTypeKey) throws PfModelException {
74         return null;
75     }
76
77     @Override
78     public ToscaServiceTemplate getPolicies(@NonNull PfConceptKey policyKey) throws PfModelException {
79         return null;
80     }
81
82     @Override
83     public ToscaServiceTemplate createPolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
84         return null;
85     }
86
87     @Override
88     public ToscaServiceTemplate updatePolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
89         return null;
90     }
91
92     @Override
93     public ToscaServiceTemplate deletePolicies(@NonNull PfConceptKey policyKey) throws PfModelException {
94         return null;
95     }
96
97     @Override
98     public LegacyOperationalPolicy getOperationalPolicy(@NonNull String policyId) throws PfModelException {
99         return null;
100     }
101
102     @Override
103     public LegacyOperationalPolicy createOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
104             throws PfModelException {
105         return null;
106     }
107
108     @Override
109     public LegacyOperationalPolicy updateOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
110             throws PfModelException {
111         return null;
112     }
113
114     @Override
115     public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull String policyId) throws PfModelException {
116         return null;
117     }
118
119     @Override
120     public Map<String, LegacyGuardPolicyOutput> getGuardPolicy(@NonNull String policyId) throws PfModelException {
121         return null;
122     }
123
124     @Override
125     public Map<String, LegacyGuardPolicyOutput> createGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
126             throws PfModelException {
127         return null;
128     }
129
130     @Override
131     public Map<String, LegacyGuardPolicyOutput> updateGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
132             throws PfModelException {
133         return null;
134     }
135
136     @Override
137     public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(@NonNull String policyId) throws PfModelException {
138         return null;
139     }
140
141     @Override
142     public PdpGroups getPdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
143         return null;
144     }
145
146     @Override
147     public PdpGroups createPdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
148         return null;
149     }
150
151     @Override
152     public PdpGroups updatePdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
153         return null;
154     }
155
156     @Override
157     public PdpGroups deletePdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
158         return null;
159     }
160 }