diff options
author | mojahidi <mojahidul.islam@amdocs.com> | 2018-07-30 17:01:26 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-07-31 13:24:04 +0000 |
commit | eb736d244351be91e519a11d51217a3183329dd9 (patch) | |
tree | 4698a20bacec1f7345284e800ef2d495b504d01b /common-be/src/main/java/org | |
parent | a9fd70f3839766507a58e2eabb38c2d70b7a4330 (diff) |
Alligned operation ui model
Alligned operation ui model
Change-Id: I88f8a443f1a7a7d2e5258ff0dee0f5dc9809d050
Issue-ID: SDC-1535
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'common-be/src/main/java/org')
4 files changed, 59 insertions, 26 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java index 0044ffaf60..e2de5f0d64 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java @@ -21,8 +21,10 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; import java.io.Serializable; -import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_PARAM_ID; -import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_PARAM_NAME; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_MANDATORY; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_PROPERTY; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_NAME; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_TYPE; public class InterfaceOperationParamDataDefinition extends ToscaDataDefinition implements Serializable { @@ -33,28 +35,53 @@ public class InterfaceOperationParamDataDefinition extends ToscaDataDefinition i public InterfaceOperationParamDataDefinition(InterfaceOperationParamDataDefinition iopdd) { super(); - setParamName(iopdd.getParamName()); - setParamId(iopdd.getParamId()); + setName(iopdd.getName()); + setProperty(iopdd.getProperty()); + setMandatory(iopdd.getMandatory()); + setType(iopdd.getType()); } - public InterfaceOperationParamDataDefinition(String paramName, String paramId) { + public InterfaceOperationParamDataDefinition(String paramName, String paramId, boolean mandatory, String type) { super(); - setParamName(paramName); - setParamId(paramId); + setName(paramName); + setProperty(paramId); + setMandatory(mandatory); + setType(type); } - public String getParamName() { - return (String) getToscaPresentationValue(IO_PARAM_NAME); + //used for OperationOutputDefinition + public InterfaceOperationParamDataDefinition(String paramName, boolean mandatory, String type) { + super(); + setName(paramName); + setMandatory(mandatory); + setType(type); + } + + public String getName() { + return (String) getToscaPresentationValue(IO_NAME); + } + public void setName(String paramName) { + setToscaPresentationValue(IO_NAME, paramName); } - public void setParamName(String paramName) { - setToscaPresentationValue(IO_PARAM_NAME, paramName); + + public String getProperty() { + return (String) getToscaPresentationValue(IO_PROPERTY); + } + public void setProperty(String paramId) { + setToscaPresentationValue(IO_PROPERTY, paramId); } - public String getParamId() { - return (String) getToscaPresentationValue(IO_PARAM_ID); + public Boolean getMandatory() { + return (Boolean) getToscaPresentationValue(IO_MANDATORY); } - public void setParamId(String paramId) { - setToscaPresentationValue(IO_PARAM_ID, paramId); + public void setMandatory(Boolean mandatory) { + setToscaPresentationValue(IO_MANDATORY, mandatory); } + public String getType() { + return (String) getToscaPresentationValue(IO_TYPE); + } + public void setType(String type) { + setToscaPresentationValue(IO_TYPE, type); + } } diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java index 0228492bb6..4c941574ae 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java @@ -33,10 +33,12 @@ public class OperationInputDefinition extends InputDataDefinition { setName(name); } - public OperationInputDefinition(String paramName, String paramId) { + public OperationInputDefinition(String paramName, String paramId, Boolean mandatory, String type) { super(); setName(paramName); setInputId(paramId); + setRequired(mandatory); + setType(type); } public String getLabel() { diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationOutputDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationOutputDefinition.java index af046eaa17..82607d765d 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationOutputDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationOutputDefinition.java @@ -30,10 +30,11 @@ public class OperationOutputDefinition extends InputDataDefinition { super(definition); setName(name); } - public OperationOutputDefinition(String paramName, String paramId) { + public OperationOutputDefinition(String name, Boolean mandatory, String type) { super(); - setName(paramName); - setInputId(paramId); + setName(name); + setRequired(mandatory); + setType(type); } public String getLabel() { return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL); diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java index 912e3d94b1..689deec4c8 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java @@ -214,13 +214,16 @@ public enum JsonPresentationFields { ARCHIVE_TIME("archiveTime", GraphPropertyEnum.ARCHIVE_TIME), IS_VSP_ARCHIVED("isVspArchived", GraphPropertyEnum.IS_VSP_ARCHIVED), CI_IS_ORIGIN_ARCHIVED("isOriginArchived", null), - //Interface Operation - IO_OPERATION_TYPE("operationType",null), - IO_INPUT_PARAMETERS("inputParams",null), - IO_OUTPUT_PARAMETERS("outputParams",null), - IO_PARAM_NAME("paramName", null), - IO_PARAM_ID("paramId", null), - IO_WORKFLOW_ID("workflowId", null), + + //Interface Operation + IO_OPERATION_TYPE("operationType",null), + IO_INPUT_PARAMETERS("inputParams",null), + IO_OUTPUT_PARAMETERS("outputParams",null), + IO_NAME("name", null), + IO_MANDATORY("mandatory", null), + IO_TYPE("type", null), + IO_PROPERTY("property", null), + IO_WORKFLOW_ID("workflowId", null), IO_WORKFLOW_VERSION_ID("workflowVersionId", null), //Interface |