e9c1b390dd49aad08c1796e1829e2e7d9c7ce3be
[aaf/authz.git] / misc / env / src / main / java / org / onap / aaf / misc / env / TransStore.java
1 /**\r
2  * ============LICENSE_START====================================================\r
3  * org.onap.aaf\r
4  * ===========================================================================\r
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
6  * ===========================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END====================================================\r
19  *\r
20  */\r
21 \r
22 package org.onap.aaf.misc.env;\r
23 \r
24 public interface TransStore extends Trans {\r
25         /**\r
26          * Returns the Slot assigned to the supplied name.\r
27          * \r
28          * @param name\r
29          *                      The name of the Slot to acquire.\r
30          * @return\r
31          *                      The Slot associated with the supplied name.\r
32          */\r
33         public abstract Slot slot(String name);\r
34         \r
35         /**\r
36          * Put data into the right slot \r
37          */\r
38         public void put(Slot slot, Object value);\r
39 \r
40         /**\r
41          *  Get data from the right slot\r
42          *  \r
43          *  This will do a cast to the expected type derived from Default\r
44          */\r
45         public<T> T get(Slot slot, T deflt);\r
46 \r
47         /**\r
48          * Returns an Object from the Organizer's static state, or the Default if null\r
49          * \r
50          * @param slot\r
51          *                      The StaticSlot to retrieve the data from.\r
52          * @return\r
53          *                      The Object located in the supplied StaticSlot of the Organizer's static state.\r
54          */\r
55         public abstract<T> T get(StaticSlot slot, T dflt);\r
56         \r
57 }\r