Merge "use separated get methods for every cmHandle instead of one "get all" query"
[cps.git] / cps-ncmp-service / src / main / java / org / onap / cps / ncmp / api / NetworkCmProxyDataService.java
index 058c42b..ea27d4a 100644 (file)
@@ -26,11 +26,14 @@ package org.onap.cps.ncmp.api;
 import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum;
 
 import java.util.Collection;
+import java.util.Map;
 import java.util.Set;
+import org.onap.cps.ncmp.api.inventory.CompositeState;
 import org.onap.cps.ncmp.api.models.CmHandleQueryApiParameters;
 import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
 import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse;
 import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
+import org.onap.cps.spi.model.ModuleDefinition;
 import org.onap.cps.spi.model.ModuleReference;
 
 /*
@@ -105,13 +108,12 @@ public interface NetworkCmProxyDataService {
     Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
 
     /**
-     * Query cm handle identifiers for the given collection of module names.
+     * Retrieve module definitions for the given cm handle.
      *
-     * @param moduleNames module names.
-     * @return a collection of cm handle identifiers. The schema set for each cm handle must include all the
-     *         given module names
+     * @param cmHandleId cm handle identifier
+     * @return a collection of module definition (moduleName, revision and yang resource content)
      */
-    Collection<String> executeCmHandleHasAllModulesSearch(Collection<String> moduleNames);
+    Collection<ModuleDefinition> getModuleDefinitionsByCmHandleId(String cmHandleId);
 
     /**
      * Query cm handle details by cm handle's name.
@@ -121,11 +123,35 @@ public interface NetworkCmProxyDataService {
      */
     NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);
 
+    /**
+     * Get cm handle public properties by cm handle id.
+     *
+     * @param cmHandleId cm handle identifier
+     * @return a collection of cm handle public properties.
+     */
+    Map<String, String> getCmHandlePublicProperties(String cmHandleId);
+
+    /**
+     * Get cm handle composite state by cm handle id.
+     *
+     * @param cmHandleId cm handle identifier
+     * @return a cm handle composite state
+     */
+    CompositeState getCmHandleCompositeState(String cmHandleId);
+
     /**
      * Query and return cm handles that match the given query parameters.
      *
      * @param cmHandleQueryApiParameters the cm handle query parameters
+     * @return collection of cm handles
+     */
+    Set<NcmpServiceCmHandle> executeCmHandleSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);
+
+    /**
+     * Query and return cm handle ids that match the given query parameters.
+     *
+     * @param cmHandleQueryApiParameters the cm handle query parameters
      * @return collection of cm handle ids
      */
-    Set<String> queryCmHandles(CmHandleQueryApiParameters cmHandleQueryApiParameters);
+    Set<String> executeCmHandleIdSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);
 }