Get cm-handle state endpoint
[cps.git] / cps-ncmp-service / src / main / java / org / onap / cps / ncmp / api / impl / NetworkCmProxyDataServiceImpl.java
index f44c28c..bfc7407 100755 (executable)
@@ -221,6 +221,18 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
         return cmHandlePublicProperties;
     }
 
+    /**
+     * Get cm handle composite state for a given cm handle id.
+     *
+     * @param cmHandleId cm handle identifier
+     * @return cm handle state
+     */
+    @Override
+    public CompositeState getCmHandleCompositeState(final String cmHandleId) {
+        CpsValidator.validateNameCharacters(cmHandleId);
+        return inventoryPersistence.getYangModelCmHandle(cmHandleId).getCompositeState();
+    }
+
     /**
      * THis method registers a cm handle and initiates modules sync.
      *