X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-rest%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fncmp%2Frest%2Fcontroller%2FNetworkCmProxyController.java;h=f2f43c989725ba5e5ce251d239fac96ffd4e62be;hb=db1e983f40be1db7bca5acacf5a3369d74a29c95;hp=a6b09e845ce8ad138d8b9ed2e5b7e5176d47f499;hpb=ecd7f5e418c17d8f0f3f12af4fd0a543084e8254;p=cps.git diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java index a6b09e845..f2f43c989 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java @@ -1,7 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2021 Pantheon.tech - * Modifications (C) 2021 Nordix Foundation + * Modifications (C) 2021-2022 Nordix Foundation * Modification Copyright (C) 2021 highstreet technologies GmbH * Modifications (C) 2021 Bell Canada * ================================================================================ @@ -48,9 +48,6 @@ import org.onap.cps.ncmp.rest.model.Conditions; import org.onap.cps.ncmp.rest.model.ModuleNameAsJsonObject; import org.onap.cps.ncmp.rest.model.ModuleNamesAsJsonArray; import org.onap.cps.ncmp.rest.model.ModuleReference; -import org.onap.cps.spi.FetchDescendantsOption; -import org.onap.cps.spi.model.DataNode; -import org.onap.cps.utils.DataMapUtils; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; @@ -75,89 +72,6 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { this.networkCmProxyDataService = networkCmProxyDataService; } - /** - * Create Node. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity createNode(final String cmHandle, @Valid final Object jsonData, - @Valid final String parentNodeXpath) { - networkCmProxyDataService.createDataNode(cmHandle, parentNodeXpath, GSON.toJson(jsonData)); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - /** - * Add List-node Child Element. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity addListNodeElements(@NotNull @Valid final String parentNodeXpath, - final String cmHandle, @Valid final Object jsonData) { - networkCmProxyDataService.addListNodeElements(cmHandle, parentNodeXpath, GSON.toJson(jsonData)); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - /** - * Get Node By CM Handle and X-Path. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity getNodeByCmHandleAndXpath(final String cmHandle, @Valid final String xpath, - @Valid final Boolean includeDescendants) { - final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants) - ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS; - final var dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption); - return new ResponseEntity<>(DataMapUtils.toDataMap(dataNode), HttpStatus.OK); - } - - /** - * Query Data Nodes. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity queryNodesByCmHandleAndCpsPath(final String cmHandle, @Valid final String cpsPath, - @Valid final Boolean includeDescendants) { - final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants) - ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS; - final Collection dataNodes = - networkCmProxyDataService.queryDataNodes(cmHandle, cpsPath, fetchDescendantsOption); - return new ResponseEntity<>(GSON.toJson(dataNodes), HttpStatus.OK); - } - - /** - * Replace Node With Descendants. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity replaceNode(final String cmHandle, @Valid final Object jsonData, - @Valid final String parentNodeXpath) { - networkCmProxyDataService.replaceNodeTree(cmHandle, parentNodeXpath, GSON.toJson(jsonData)); - return new ResponseEntity<>(HttpStatus.OK); - } - - /** - * Update Node Leaves. - * @deprecated This Method is no longer used as part of NCMP. - */ - // All deprecated APIs methods will be address into https://jira.onap.org/browse/CPS-642 - @Override - @Deprecated(forRemoval = false) - public ResponseEntity updateNodeLeaves(final String cmHandle, @Valid final Object jsonData, - @Valid final String parentNodeXpath) { - networkCmProxyDataService.updateNodeLeaves(cmHandle, parentNodeXpath, GSON.toJson(jsonData)); - return new ResponseEntity<>(HttpStatus.OK); - } - /** * Get resource data from operational datastore. *