9dd5cada223b807ee032b1d1186e11189acedcc6
[policy/apex-pdp.git] / core / core-engine / src / test / java / org / onap / policy / apex / core / engine / executor / context / DummyContextAlbum.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
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.apex.core.engine.executor.context;
22
23 import java.util.Collection;
24 import java.util.Map;
25 import java.util.Set;
26
27 import org.apache.commons.lang3.NotImplementedException;
28 import org.onap.policy.apex.context.ContextAlbum;
29 import org.onap.policy.apex.context.ContextException;
30 import org.onap.policy.apex.context.SchemaHelper;
31 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
32 import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
33 import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
34
35 /**
36  * Dummy context album for testing.
37  */
38 public class DummyContextAlbum implements ContextAlbum {
39     private final AxArtifactKey key;
40
41     /**
42      * Constructor.
43      * @param key the key
44      */
45     public DummyContextAlbum(AxArtifactKey key) {
46         super();
47         this.key = key;
48     }
49
50     /**
51      * {@inheritDoc}.
52      */
53     @Override
54     public void clear() {
55         throw new NotImplementedException("Not implemented on dummy class");
56     }
57     
58     /**
59      * {@inheritDoc}.
60      */
61     @Override
62     public boolean containsKey(Object key) {
63         throw new NotImplementedException("Not implemented on dummy class");
64     }
65
66     /**
67      * {@inheritDoc}.
68      */
69     @Override
70     public boolean containsValue(Object value) {
71         throw new NotImplementedException("Not implemented on dummy class");
72     }
73
74     /**
75      * {@inheritDoc}.
76      */
77     @Override
78     public Set<Entry<String, Object>> entrySet() {
79         throw new NotImplementedException("Not implemented on dummy class");
80     }
81
82     /**
83      * {@inheritDoc}.
84      */
85     @Override
86     public Object get(Object key) {
87         throw new NotImplementedException("Not implemented on dummy class");
88     }
89
90     /**
91      * {@inheritDoc}.
92      */
93     @Override
94     public boolean isEmpty() {
95         throw new NotImplementedException("Not implemented on dummy class");
96     }
97
98     /**
99      * {@inheritDoc}.
100      */
101     @Override
102     public Set<String> keySet() {
103         throw new NotImplementedException("Not implemented on dummy class");
104     }
105
106     /**
107      * {@inheritDoc}.
108      */
109     @Override
110     public Object put(String key, Object value) {
111         throw new NotImplementedException("Not implemented on dummy class");
112     }
113
114     /**
115      * {@inheritDoc}.
116      */
117     @Override
118     public void putAll(Map<? extends String, ? extends Object> map) {
119         throw new NotImplementedException("Not implemented on dummy class");
120     }
121
122     /**
123      * {@inheritDoc}.
124      */
125     @Override
126     public Object remove(Object key) {
127         throw new NotImplementedException("Not implemented on dummy class");
128     }
129
130     /**
131      * {@inheritDoc}.
132      */
133     @Override
134     public int size() {
135         throw new NotImplementedException("Not implemented on dummy class");
136     }
137
138     /**
139      * {@inheritDoc}.
140      */
141     @Override
142     public Collection<Object> values() {
143         throw new NotImplementedException("Not implemented on dummy class");
144     }
145
146     /**
147      * {@inheritDoc}.
148      */
149     @Override
150     public AxArtifactKey getKey() {
151         return key;
152     }
153
154     /**
155      * {@inheritDoc}.
156      */
157     @Override
158     public String getName() {
159         throw new NotImplementedException("Not implemented on dummy class");
160     }
161
162     /**
163      * {@inheritDoc}.
164      */
165     @Override
166     public AxContextAlbum getAlbumDefinition() {
167         throw new NotImplementedException("Not implemented on dummy class");
168     }
169
170     /**
171      * {@inheritDoc}.
172      */
173     @Override
174     public SchemaHelper getSchemaHelper() {
175         throw new NotImplementedException("Not implemented on dummy class");
176     }
177
178     /**
179      * {@inheritDoc}.
180      */
181     @Override
182     public void lockForReading(String key) throws ContextException {
183         throw new NotImplementedException("Not implemented on dummy class");
184     }
185
186     /**
187      * {@inheritDoc}.
188      */
189     @Override
190     public void lockForWriting(String key) throws ContextException {
191         throw new NotImplementedException("Not implemented on dummy class");
192     }
193
194     /**
195      * {@inheritDoc}.
196      */
197     @Override
198     public void unlockForReading(String key) throws ContextException {
199         throw new NotImplementedException("Not implemented on dummy class");
200     }
201
202     /**
203      * {@inheritDoc}.
204      */
205     @Override
206     public void unlockForWriting(String key) throws ContextException {
207         throw new NotImplementedException("Not implemented on dummy class");
208     }
209
210     /**
211      * {@inheritDoc}.
212      */
213     @Override
214     public AxConcept[] getUserArtifactStack() {
215         throw new NotImplementedException("Not implemented on dummy class");
216     }
217
218     /**
219      * {@inheritDoc}.
220      */
221     @Override
222     public void setUserArtifactStack(AxConcept[] userArtifactStack) {
223         // Do nothing
224     }
225
226     /**
227      * {@inheritDoc}.
228      */
229     @Override
230     public void flush() throws ContextException {
231         throw new NotImplementedException("Not implemented on dummy class");
232     }
233 }