efb53a682fb06a0ed85b04c9f38bc310102d0547
[policy/apex-pdp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.apex.core.engine.executor.context;
23
24 import java.util.Collection;
25 import java.util.Map;
26 import java.util.Set;
27 import lombok.AllArgsConstructor;
28 import org.apache.commons.lang3.NotImplementedException;
29 import org.onap.policy.apex.context.ContextAlbum;
30 import org.onap.policy.apex.context.ContextException;
31 import org.onap.policy.apex.context.SchemaHelper;
32 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
33 import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
34 import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
35
36 /**
37  * Dummy context album for testing.
38  */
39 @AllArgsConstructor
40 public class DummyContextAlbum implements ContextAlbum {
41     private final AxArtifactKey key;
42
43     /**
44      * {@inheritDoc}.
45      */
46     @Override
47     public void clear() {
48         throw new NotImplementedException("Not implemented on dummy class");
49     }
50
51     /**
52      * {@inheritDoc}.
53      */
54     @Override
55     public boolean containsKey(Object key) {
56         throw new NotImplementedException("Not implemented on dummy class");
57     }
58
59     /**
60      * {@inheritDoc}.
61      */
62     @Override
63     public boolean containsValue(Object value) {
64         throw new NotImplementedException("Not implemented on dummy class");
65     }
66
67     /**
68      * {@inheritDoc}.
69      */
70     @Override
71     public Set<Entry<String, Object>> entrySet() {
72         throw new NotImplementedException("Not implemented on dummy class");
73     }
74
75     /**
76      * {@inheritDoc}.
77      */
78     @Override
79     public Object get(Object key) {
80         throw new NotImplementedException("Not implemented on dummy class");
81     }
82
83     /**
84      * {@inheritDoc}.
85      */
86     @Override
87     public boolean isEmpty() {
88         throw new NotImplementedException("Not implemented on dummy class");
89     }
90
91     /**
92      * {@inheritDoc}.
93      */
94     @Override
95     public Set<String> keySet() {
96         throw new NotImplementedException("Not implemented on dummy class");
97     }
98
99     /**
100      * {@inheritDoc}.
101      */
102     @Override
103     public Object put(String key, Object value) {
104         throw new NotImplementedException("Not implemented on dummy class");
105     }
106
107     /**
108      * {@inheritDoc}.
109      */
110     @Override
111     public void putAll(Map<? extends String, ? extends Object> map) {
112         throw new NotImplementedException("Not implemented on dummy class");
113     }
114
115     /**
116      * {@inheritDoc}.
117      */
118     @Override
119     public Object remove(Object key) {
120         throw new NotImplementedException("Not implemented on dummy class");
121     }
122
123     /**
124      * {@inheritDoc}.
125      */
126     @Override
127     public int size() {
128         throw new NotImplementedException("Not implemented on dummy class");
129     }
130
131     /**
132      * {@inheritDoc}.
133      */
134     @Override
135     public Collection<Object> values() {
136         throw new NotImplementedException("Not implemented on dummy class");
137     }
138
139     /**
140      * {@inheritDoc}.
141      */
142     @Override
143     public AxArtifactKey getKey() {
144         return key;
145     }
146
147     /**
148      * {@inheritDoc}.
149      */
150     @Override
151     public String getName() {
152         throw new NotImplementedException("Not implemented on dummy class");
153     }
154
155     /**
156      * {@inheritDoc}.
157      */
158     @Override
159     public AxContextAlbum getAlbumDefinition() {
160         throw new NotImplementedException("Not implemented on dummy class");
161     }
162
163     /**
164      * {@inheritDoc}.
165      */
166     @Override
167     public SchemaHelper getSchemaHelper() {
168         throw new NotImplementedException("Not implemented on dummy class");
169     }
170
171     /**
172      * {@inheritDoc}.
173      */
174     @Override
175     public void lockForReading(String key) throws ContextException {
176         throw new NotImplementedException("Not implemented on dummy class");
177     }
178
179     /**
180      * {@inheritDoc}.
181      */
182     @Override
183     public void lockForWriting(String key) throws ContextException {
184         throw new NotImplementedException("Not implemented on dummy class");
185     }
186
187     /**
188      * {@inheritDoc}.
189      */
190     @Override
191     public void unlockForReading(String key) throws ContextException {
192         throw new NotImplementedException("Not implemented on dummy class");
193     }
194
195     /**
196      * {@inheritDoc}.
197      */
198     @Override
199     public void unlockForWriting(String key) throws ContextException {
200         throw new NotImplementedException("Not implemented on dummy class");
201     }
202
203     /**
204      * {@inheritDoc}.
205      */
206     @Override
207     public AxConcept[] getUserArtifactStack() {
208         throw new NotImplementedException("Not implemented on dummy class");
209     }
210
211     /**
212      * {@inheritDoc}.
213      */
214     @Override
215     public void setUserArtifactStack(AxConcept[] userArtifactStack) {
216         // Do nothing
217     }
218
219     /**
220      * {@inheritDoc}.
221      */
222     @Override
223     public void flush() throws ContextException {
224         throw new NotImplementedException("Not implemented on dummy class");
225     }
226 }