- case DesignServiceConstants.GETDESIGNS:
- if(payloadObject.get(DesignServiceConstants.USER_ID) == null || payloadObject.get(DesignServiceConstants.USER_ID).textValue().isEmpty())
- errorString = DesignServiceConstants.USER_ID;
- break;
- case DesignServiceConstants.GETARTIFACT:
- if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_TYPE;
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_NAME) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_NAME).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_NAME;
- break;
- case DesignServiceConstants.GETSTATUS:
- if(payloadObject.get(DesignServiceConstants.USER_ID) == null || payloadObject.get(DesignServiceConstants.USER_ID).textValue().isEmpty())
- errorString = DesignServiceConstants.USER_ID;
- else if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
- break;
- case DesignServiceConstants.SETSTATUS:
- if(payloadObject.get(DesignServiceConstants.USER_ID) == null || payloadObject.get(DesignServiceConstants.USER_ID).textValue().isEmpty())
- errorString = DesignServiceConstants.USER_ID;
- else if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
- else if(payloadObject.get(DesignServiceConstants.ACTION) == null || payloadObject.get(DesignServiceConstants.ACTION).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION;
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_TYPE;
- else if(payloadObject.get(DesignServiceConstants.STATUS) == null || payloadObject.get(DesignServiceConstants.STATUS).textValue().isEmpty())
- errorString = DesignServiceConstants.STATUS;
- break;
- case DesignServiceConstants.UPLOADARTIFACT:
- if(payloadObject.get(DesignServiceConstants.ARTIFACT_NAME) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_NAME).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_NAME;
- else if(! payloadObject.get(DesignServiceConstants.ARTIFACT_NAME).textValue().contains("reference")){
- if(payloadObject.get(DesignServiceConstants.ACTION) == null || payloadObject.get(DesignServiceConstants.ACTION).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION;
- }
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_VERSOIN) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_VERSOIN).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_VERSOIN;
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_CONTENTS) == null)
- errorString = DesignServiceConstants.ARTIFACT_CONTENTS;
- else if(payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE) == null || payloadObject.get(DesignServiceConstants.ARTIFACT_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.ARTIFACT_TYPE;
-
- else if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
-
-
- break;
- case DesignServiceConstants.SETPROTOCOLREFERENCE:
- if(payloadObject.get(DesignServiceConstants.ACTION) == null || payloadObject.get(DesignServiceConstants.ACTION).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION;
- else if(payloadObject.get(DesignServiceConstants.ACTION_LEVEL) == null || payloadObject.get(DesignServiceConstants.ACTION_LEVEL).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION_LEVEL;
- else if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
- else if(payloadObject.get(DesignServiceConstants.PROTOCOL) == null || payloadObject.get(DesignServiceConstants.PROTOCOL).textValue().isEmpty())
- errorString = DesignServiceConstants.PROTOCOL;
-
- case DesignServiceConstants.SETINCART:
- if(payloadObject.get(DesignServiceConstants.ACTION) == null || payloadObject.get(DesignServiceConstants.ACTION).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION;
- else if(payloadObject.get(DesignServiceConstants.ACTION_LEVEL) == null || payloadObject.get(DesignServiceConstants.ACTION_LEVEL).textValue().isEmpty())
- errorString = DesignServiceConstants.ACTION_LEVEL;
- else if(payloadObject.get(DesignServiceConstants.VNF_TYPE) == null || payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue().isEmpty())
- errorString = DesignServiceConstants.VNF_TYPE;
- else if(payloadObject.get(DesignServiceConstants.PROTOCOL) == null || payloadObject.get(DesignServiceConstants.PROTOCOL).textValue().isEmpty())
- errorString = DesignServiceConstants.PROTOCOL;
- break;
- default:
- throw new Exception(" Action " + action + " not found while processing request ");