2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2021 highstreet technologies GmbH
4 * Modifications Copyright (C) 2021-2022 Nordix Foundation
5 * Modifications Copyright (C) 2021 Pantheon.tech
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * SPDX-License-Identifier: Apache-2.0
20 * ============LICENSE_END=========================================================
23 package org.onap.cps.ncmp.api;
25 import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum;
27 import java.util.Collection;
28 import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
29 import org.onap.cps.spi.model.ModuleReference;
32 * Datastore interface for handling CPS data.
34 public interface NetworkCmProxyDataService {
37 * Registration of New CM Handles.
39 * @param dmiPluginRegistration Dmi Plugin Registration
41 void updateDmiRegistrationAndSyncModule(DmiPluginRegistration dmiPluginRegistration);
44 * Get resource data for data store pass-through operational
47 * @param cmHandle cm handle
48 * @param resourceIdentifier resource identifier
49 * @param acceptParamInHeader accept param
50 * @param optionsParamInQuery options query
51 * @return {@code Object} resource data
53 Object getResourceDataOperationalForCmHandle(String cmHandle,
54 String resourceIdentifier,
55 String acceptParamInHeader,
56 String optionsParamInQuery);
59 * Get resource data for data store pass-through running
62 * @param cmHandle cm handle
63 * @param resourceIdentifier resource identifier
64 * @param acceptParamInHeader accept param
65 * @param optionsParamInQuery options query
66 * @return {@code Object} resource data
68 Object getResourceDataPassThroughRunningForCmHandle(String cmHandle,
69 String resourceIdentifier,
70 String acceptParamInHeader,
71 String optionsParamInQuery);
74 * Write resource data for data store pass-through running
75 * using dmi for given cm-handle.
76 * @param cmHandle cm handle
77 * @param resourceIdentifier resource identifier
78 * @param operation required operation
79 * @param requestBody request body to create resource
80 * @param contentType content type in body
81 * @return {@code Object} return data
83 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandle,
84 String resourceIdentifier,
85 OperationEnum operation,
90 * Retrieve module references for the given cm handle.
92 * @param cmHandle cm handle
93 * @return a collection of modules names and revisions
95 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandle);
98 * Query cm handle identifiers for the given collection of module names.
100 * @param moduleNames module names.
101 * @return a collection of cm handle identifiers. The schema set for each cm handle must include all the
104 Collection<String> executeCmHandleHasAllModulesSearch(Collection<String> moduleNames);