summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java13
1 files changed, 7 insertions, 6 deletions
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 e9e022345f..3d771b6c51 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
@@ -27,6 +27,7 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.Collection;
import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
@@ -66,8 +67,8 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
*/
@Override
@Deprecated(forRemoval = false)
- public ResponseEntity<Void> createNode(final String jsonData, final String cmHandle,
- final String parentNodeXpath) {
+ public ResponseEntity<Void> createNode(final String cmHandle, @Valid final String jsonData,
+ @Valid final String parentNodeXpath) {
networkCmProxyDataService.createDataNode(cmHandle, parentNodeXpath, jsonData);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -78,8 +79,8 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
*/
@Override
@Deprecated(forRemoval = false)
- public ResponseEntity<Void> addListNodeElements(final String jsonData, final String parentNodeXpath,
- final String cmHandle) {
+ public ResponseEntity<Void> addListNodeElements(@NotNull @Valid final String parentNodeXpath,
+ final String cmHandle, @Valid final String jsonData) {
networkCmProxyDataService.addListNodeElements(cmHandle, parentNodeXpath, jsonData);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@@ -132,7 +133,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
*/
@Override
@Deprecated(forRemoval = false)
- public ResponseEntity<Object> replaceNode(@Valid final String jsonData, final String cmHandle,
+ public ResponseEntity<Object> replaceNode(final String cmHandle, @Valid final String jsonData,
@Valid final String parentNodeXpath) {
networkCmProxyDataService.replaceNodeTree(cmHandle, parentNodeXpath, jsonData);
return new ResponseEntity<>(HttpStatus.OK);
@@ -144,7 +145,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
*/
@Override
@Deprecated(forRemoval = false)
- public ResponseEntity<Object> updateNodeLeaves(@Valid final String jsonData, final String cmHandle,
+ public ResponseEntity<Object> updateNodeLeaves(final String cmHandle, @Valid final String jsonData,
@Valid final String parentNodeXpath) {
networkCmProxyDataService.updateNodeLeaves(cmHandle, parentNodeXpath, jsonData);
return new ResponseEntity<>(HttpStatus.OK);