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 * Modifications Copyright (C) 2022 Bell Canada
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * SPDX-License-Identifier: Apache-2.0
21 * ============LICENSE_END=========================================================
24 package org.onap.cps.ncmp.api;
26 import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum;
28 import java.util.Collection;
31 import org.onap.cps.ncmp.api.models.CmHandleQueryApiParameters;
32 import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
33 import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse;
34 import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
35 import org.onap.cps.spi.model.ModuleReference;
38 * Datastore interface for handling CPS data.
40 public interface NetworkCmProxyDataService {
43 * Registration of New CM Handles.
45 * @param dmiPluginRegistration Dmi Plugin Registration
46 * @return dmiPluginRegistrationResponse
48 DmiPluginRegistrationResponse updateDmiRegistrationAndSyncModule(DmiPluginRegistration dmiPluginRegistration);
51 * Get resource data for data store pass-through operational
54 * @param cmHandleId cm handle identifier
55 * @param resourceIdentifier resource identifier
56 * @param optionsParamInQuery options query
57 * @param topicParamInQuery topic name for (triggering) async responses
58 * @param requestId unique requestId for async request
59 * @return {@code Object} resource data
61 Object getResourceDataOperationalForCmHandle(String cmHandleId,
62 String resourceIdentifier,
63 String optionsParamInQuery,
64 String topicParamInQuery,
68 * Get resource data for data store pass-through running
71 * @param cmHandleId cm handle identifier
72 * @param resourceIdentifier resource identifier
73 * @param optionsParamInQuery options query
74 * @param topicParamInQuery topic name for (triggering) async responses
75 * @param requestId unique requestId for async request
76 * @return {@code Object} resource data
78 Object getResourceDataPassThroughRunningForCmHandle(String cmHandleId,
79 String resourceIdentifier,
80 String optionsParamInQuery,
81 String topicParamInQuery,
85 * Write resource data for data store pass-through running
86 * using dmi for given cm-handle.
87 * @param cmHandleId cm handle identifier
88 * @param resourceIdentifier resource identifier
89 * @param operation required operation
90 * @param requestBody request body to create resource
91 * @param contentType content type in body
92 * @return {@code Object} return data
94 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandleId,
95 String resourceIdentifier,
96 OperationEnum operation,
101 * Retrieve module references for the given cm handle.
103 * @param cmHandleId cm handle identifier
104 * @return a collection of modules names and revisions
106 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
109 * Query cm handle details by cm handle's name.
111 * @param cmHandleId cm handle identifier
112 * @return a collection of cm handle details.
114 NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);
117 * Get cm handle public properties by cm handle id.
119 * @param cmHandleId cm handle identifier
120 * @return a collection of cm handle public properties.
122 Map<String, String> getCmHandlePublicProperties(String cmHandleId);
125 * Query and return cm handles that match the given query parameters.
127 * @param cmHandleQueryApiParameters the cm handle query parameters
128 * @return collection of cm handles
130 Set<NcmpServiceCmHandle> executeCmHandleSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);
133 * Query and return cm handle ids that match the given query parameters.
135 * @param cmHandleQueryApiParameters the cm handle query parameters
136 * @return collection of cm handle ids
138 Set<String> executeCmHandleIdSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);