AT&T 2.0.19 Code drop, stage 1
[aaf/authz.git] / misc / env / src / main / java / org / onap / aaf / misc / env / Store.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
4  * ===========================================================================
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6  * ===========================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END====================================================
19  *
20  */
21
22 package org.onap.aaf.misc.env;
23
24 import java.util.List;
25
26 public interface Store {
27         /**
28          * Returns the Slot assigned to the supplied name.
29          * 
30          * @param name
31          *                      The name of the Slot to acquire.
32          * @return
33          *                      The Slot associated with the supplied name.
34          */
35         public abstract Slot slot(String name);
36
37         /**
38          * Returns the existing Slot associated with the supplied name, or null if it doesn't exist.
39          * 
40          * @param name
41          *                      The name of the Slot to get.
42          * @return
43          *                      The Slot assigned to the supplied name, or null if it doesn't exist.
44          *                      
45          */
46         public abstract Slot existingSlot(String name);
47
48         /**
49          * Returns the names used while creating Slots in a List
50          * 
51          * @return
52          */
53         public abstract List<String> existingSlotNames();
54
55         /**
56          * Returns the StaticSlot assigned to the supplied name.
57          * 
58          * @param name
59          *                      The name of the StaticSlot to acquire.
60          * @return
61          *                      The StaticSlot associated with the supplied name.
62          */
63         public abstract StaticSlot staticSlot(String name);
64
65         /**
66          * Returns the names used while creating Static Slots in a List
67          * 
68          * @return
69          */
70         public abstract List<String> existingStaticSlotNames();
71         
72         /**
73          * Store the supplied value in the StaticSlot of the Organizer's static state.
74          * 
75          * @param slot
76          *                      The StaticSlot used to store the object.
77          * @param value
78          *                      The object to store.
79          */
80         public abstract void put(StaticSlot slot, Object value);
81
82         /**
83          * Returns an Object from the Organizer's static state, or the Default if null
84          * 
85          * @param slot
86          *                      The StaticSlot to retrieve the data from.
87          * @return
88          *                      The Object located in the supplied StaticSlot of the Organizer's static state.
89          */
90         public abstract<T> T get(StaticSlot slot, T dflt);
91
92         /**
93          * Returns an Object from the Organizer's static state 
94          * 
95          * @param slot
96          *                      The StaticSlot to retrieve the data from.
97          * @return
98          *                      The Object located in the supplied StaticSlot of the Organizer's static state.
99          */
100         public abstract<T> T get(StaticSlot slot);
101
102 //      /** 
103 //       * Transfer (targeted) Args to Slots
104 //       * 
105 //       * Transfer Strings with format "tag=value" into Static Slots
106 //       */
107 //      public abstract void transfer(String args[], String ... tagss);
108 }