Updating licenses in all files
[appc.git] / appc-dg / appc-dg-shared / appc-dg-mdsal-store / src / main / java / org / openecomp / appc / mdsal / MDSALStore.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright (C) 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  */
22
23 package org.openecomp.appc.mdsal;
24
25 import org.openecomp.appc.mdsal.exception.MDSALStoreException;
26 import org.openecomp.appc.mdsal.objects.BundleInfo;
27
28 import java.util.Date;
29
30 /**
31  * Provides APIs for interacting with MD-SAL store
32  */
33 public interface MDSALStore {
34
35     /**
36      * Checks the presence of any yang module in the MD-SAL store,
37      * <i>Due to limitation of SchemaContext interface of ODL that it does not
38      * contain the information about dynamically loaded yang modules, it
39      * checks the presence of OSGI bundle</i>
40      * @param moduleName Name of the Module
41      * @param revision revision of the Module
42      * @return returns true- module is present, false - module is absent
43      */
44     boolean isModulePresent(String moduleName, Date revision);
45
46     /**
47      * This method will be used to store yang module to MD-SAL store
48      * @param yang - yang module that need to be stored. In String format
49      * @param bundleInfo - Bundle Information that contains name , description,  version , location. These parameters used to create bundle which will push yang to MD-SAL store.
50      * @throws MDSALStoreException
51      */
52     void storeYangModule(String yang, BundleInfo bundleInfo) throws MDSALStoreException;
53
54     /**
55      * This method is used to store configuration JSON to MD-SAL store. It invokes store configuration Operation with required parameters
56      * @param moduleName - Yang module name where JSON need to be posted
57      * @param requestId - Request ID which is used as unique key for configuration JSON
58      * @param configJSON - String value of configuration JSON that needs to be stored in MD-SAl store
59      * @throws MDSALStoreException
60      */
61     void storeJson(String moduleName , String requestId , String configJSON ) throws MDSALStoreException;
62
63 }