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.ncmp.api.models.NcmpServiceCmHandle;
30 import org.onap.cps.spi.model.ModuleReference;
33 * Datastore interface for handling CPS data.
35 public interface NetworkCmProxyDataService {
38 * Registration of New CM Handles.
40 * @param dmiPluginRegistration Dmi Plugin Registration
42 void updateDmiRegistrationAndSyncModule(DmiPluginRegistration dmiPluginRegistration);
45 * Get resource data for data store pass-through operational
48 * @param cmHandleId cm handle identifier
49 * @param resourceIdentifier resource identifier
50 * @param acceptParamInHeader accept param
51 * @param optionsParamInQuery options query
52 * @return {@code Object} resource data
54 Object getResourceDataOperationalForCmHandle(String cmHandleId,
55 String resourceIdentifier,
56 String acceptParamInHeader,
57 String optionsParamInQuery);
60 * Get resource data for data store pass-through running
63 * @param cmHandleId cm handle identifier
64 * @param resourceIdentifier resource identifier
65 * @param acceptParamInHeader accept param
66 * @param optionsParamInQuery options query
67 * @return {@code Object} resource data
69 Object getResourceDataPassThroughRunningForCmHandle(String cmHandleId,
70 String resourceIdentifier,
71 String acceptParamInHeader,
72 String optionsParamInQuery);
75 * Write resource data for data store pass-through running
76 * using dmi for given cm-handle.
77 * @param cmHandleId cm handle identifier
78 * @param resourceIdentifier resource identifier
79 * @param operation required operation
80 * @param requestBody request body to create resource
81 * @param contentType content type in body
82 * @return {@code Object} return data
84 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandleId,
85 String resourceIdentifier,
86 OperationEnum operation,
91 * Retrieve module references for the given cm handle.
93 * @param cmHandleId cm handle identifier
94 * @return a collection of modules names and revisions
96 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
99 * Query cm handle identifiers for the given collection of module names.
101 * @param moduleNames module names.
102 * @return a collection of cm handle identifiers. The schema set for each cm handle must include all the
105 Collection<String> executeCmHandleHasAllModulesSearch(Collection<String> moduleNames);
108 * Query cm handle details by cm handle's name.
110 * @param cmHandleId cm handle identifier
111 * @return a collection of cm handle details.
113 NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);