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 * @param topicParamInQuery topic name for (triggering) async responses
53 * @return {@code Object} resource data
55 Object getResourceDataOperationalForCmHandle(String cmHandleId,
56 String resourceIdentifier,
57 String acceptParamInHeader,
58 String optionsParamInQuery,
59 String topicParamInQuery);
62 * Get resource data for data store pass-through running
65 * @param cmHandleId cm handle identifier
66 * @param resourceIdentifier resource identifier
67 * @param acceptParamInHeader accept param
68 * @param optionsParamInQuery options query
69 * @param topicParamInQuery topic query
70 * @return {@code Object} resource data
72 Object getResourceDataPassThroughRunningForCmHandle(String cmHandleId,
73 String resourceIdentifier,
74 String acceptParamInHeader,
75 String optionsParamInQuery,
76 String topicParamInQuery);
79 * Write resource data for data store pass-through running
80 * using dmi for given cm-handle.
81 * @param cmHandleId cm handle identifier
82 * @param resourceIdentifier resource identifier
83 * @param operation required operation
84 * @param requestBody request body to create resource
85 * @param contentType content type in body
86 * @return {@code Object} return data
88 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandleId,
89 String resourceIdentifier,
90 OperationEnum operation,
95 * Retrieve module references for the given cm handle.
97 * @param cmHandleId cm handle identifier
98 * @return a collection of modules names and revisions
100 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
103 * Query cm handle identifiers for the given collection of module names.
105 * @param moduleNames module names.
106 * @return a collection of cm handle identifiers. The schema set for each cm handle must include all the
109 Collection<String> executeCmHandleHasAllModulesSearch(Collection<String> moduleNames);
112 * Query cm handle details by cm handle's name.
114 * @param cmHandleId cm handle identifier
115 * @return a collection of cm handle details.
117 NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);