- private DataNode getCmHandleDataNode(final String cmHandle) {
- return cpsDataService.getDataNode(NCMP_DATASPACE_NAME,
- NCMP_DMI_REGISTRY_ANCHOR,
- String.format(XPATH_TO_CM_HANDLE, cmHandle),
- FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS);
+ /**
+ * Get data node via xpath.
+ *
+ * @param xpath xpath
+ * @return data node
+ */
+ public DataNode getDataNode(final String xpath) {
+ return cpsDataPersistenceService.getDataNode(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR,
+ xpath, INCLUDE_ALL_DESCENDANTS);
+ }
+
+ /**
+ * Get data node of given cm handle.
+ *
+ * @param cmHandleId cmHandle ID
+ * @return data node
+ */
+ public DataNode getCmHandleDataNode(final String cmHandleId) {
+ return this.getDataNode(String.format(CM_HANDLE_XPATH_TEMPLATE, cmHandleId));
+ }
+
+ /**
+ * Query anchors via module names.
+ *
+ * @param moduleNamesForQuery module names
+ * @return Collection of anchors
+ */
+ public Collection<Anchor> queryAnchors(final Collection<String> moduleNamesForQuery) {
+ return cpsAdminPersistenceService.queryAnchors(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME, moduleNamesForQuery);
+ }
+
+ /**
+ * Method to get all anchors.
+ *
+ * @return Collection of anchors
+ */
+ public Collection<Anchor> getAnchors() {
+ return cpsAdminPersistenceService.getAnchors(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME);