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