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