+ public Status validate() {
+ Status validCheck = validateNodeId();
+ if (validCheck.isSuccess()) {
+ validCheck = validateNodeProperties();
+ }
+ return validCheck;
+ }
+
+ private Status validateNodeId() {
+ if (nodeId == null || nodeId.isEmpty()) {
+ return new Status(StatusCode.BADREQUEST, "NodeId cannot be empty");
+ }
+ return new Status(StatusCode.SUCCESS);
+ }
+
+ private Status validateNodeProperties() {
+ if (nodeProperties == null) {
+ return new Status(StatusCode.BADREQUEST, "nodeProperties cannot be null");
+ }
+ return new Status(StatusCode.SUCCESS);
+ }
+