43f5f5218784da79dafcd8118c46c7a665986649
[aaf/authz.git] / misc / env / src / main / java / org / onap / aaf / misc / env / Store.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 import java.util.List;\r
25 \r
26 public interface Store {\r
27         /**\r
28          * Returns the Slot assigned to the supplied name.\r
29          * \r
30          * @param name\r
31          *                      The name of the Slot to acquire.\r
32          * @return\r
33          *                      The Slot associated with the supplied name.\r
34          */\r
35         public abstract Slot slot(String name);\r
36 \r
37         /**\r
38          * Returns the existing Slot associated with the supplied name, or null if it doesn't exist.\r
39          * \r
40          * @param name\r
41          *                      The name of the Slot to get.\r
42          * @return\r
43          *                      The Slot assigned to the supplied name, or null if it doesn't exist.\r
44          *                      \r
45          */\r
46         public abstract Slot existingSlot(String name);\r
47 \r
48         /**\r
49          * Returns the names used while creating Slots in a List\r
50          * \r
51          * @return\r
52          */\r
53         public abstract List<String> existingSlotNames();\r
54 \r
55         /**\r
56          * Returns the StaticSlot assigned to the supplied name.\r
57          * \r
58          * @param name\r
59          *                      The name of the StaticSlot to acquire.\r
60          * @return\r
61          *                      The StaticSlot associated with the supplied name.\r
62          */\r
63         public abstract StaticSlot staticSlot(String name);\r
64 \r
65         /**\r
66          * Returns the names used while creating Static Slots in a List\r
67          * \r
68          * @return\r
69          */\r
70         public abstract List<String> existingStaticSlotNames();\r
71         \r
72         /**\r
73          * Store the supplied value in the StaticSlot of the Organizer's static state.\r
74          * \r
75          * @param slot\r
76          *                      The StaticSlot used to store the object.\r
77          * @param value\r
78          *                      The object to store.\r
79          */\r
80         public abstract void put(StaticSlot slot, Object value);\r
81 \r
82         /**\r
83          * Returns an Object from the Organizer's static state, or the Default if null\r
84          * \r
85          * @param slot\r
86          *                      The StaticSlot to retrieve the data from.\r
87          * @return\r
88          *                      The Object located in the supplied StaticSlot of the Organizer's static state.\r
89          */\r
90         public abstract<T> T get(StaticSlot slot, T dflt);\r
91 \r
92         /**\r
93          * Returns an Object from the Organizer's static state \r
94          * \r
95          * @param slot\r
96          *                      The StaticSlot to retrieve the data from.\r
97          * @return\r
98          *                      The Object located in the supplied StaticSlot of the Organizer's static state.\r
99          */\r
100         public abstract<T> T get(StaticSlot slot);\r
101 \r
102 //      /** \r
103 //       * Transfer (targeted) Args to Slots\r
104 //       * \r
105 //       * Transfer Strings with format "tag=value" into Static Slots\r
106 //       */\r
107 //      public abstract void transfer(String args[], String ... tagss);\r
108 }