aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
authorpriyanshu <pagarwal@amdocs.com>2019-01-14 15:46:55 +0530
committerpriyanshu <pagarwal@amdocs.com>2019-01-14 15:46:55 +0530
commit5b9d9a134778d4dc7bf45474ba13be6ba0c46282 (patch)
treea9dde66cc370513384670ad9587605795774bfbd /common-be/src
parentefc185c60153bed4988abbb159e2103ec7653f83 (diff)
Interface operation feature enhancements
1. API restructuring to enhance model and provide more capabilities. 2. Allowed multiple interface creation under same resource/service. 3. Enhanced validations to align with updated model. 4. API restructuring to align UI model with Tosca model. 5. Enhanced Junit and code coverage. 6. Added BDD and CI-API tests. Change-Id: I2d8ac8a6154fd9be8254836ba0da1540210031c0 Issue-ID: SDC-1999 Signed-off-by: priyanshu <pagarwal@amdocs.com>
Diffstat (limited to 'common-be/src')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java162
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java131
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java87
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java232
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java29
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinitionTest.java159
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinitionTest.java61
7 files changed, 205 insertions, 656 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java
index c0505c2b3d..7ffd74772c 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java
@@ -20,93 +20,91 @@
package org.openecomp.sdc.be.datatypes.elements;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
+import com.fasterxml.jackson.annotation.JsonCreator;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
-
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
public class InterfaceDataDefinition extends ToscaDataDefinition implements Serializable {
- @JsonCreator
- public InterfaceDataDefinition() {
- super();
- setOperations(new HashMap<>());
- }
-
- public InterfaceDataDefinition(String type, String description) {
- this();
- setType(type);
- setDescription(description);
-
- }
-
- public InterfaceDataDefinition(InterfaceDataDefinition p) {
- setUniqueId(p.getUniqueId());
- setType(p.getType());
- setDescription(p.getDescription());
- setToscaResourceName(p.getToscaResourceName());
- setOperations(p.getOperations());
- }
-
- public String getUniqueId() {
- return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
- }
-
- public void setUniqueId(String uniqueId) {
- setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
- }
-
- public String getType() {
- return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
- }
-
- public void setType(String type) {
- setToscaPresentationValue(JsonPresentationFields.TYPE, type);
- }
-
- public Long getCreationDate() {
- return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
- }
-
- public void setCreationDate(Long creationDate) {
- setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
- }
-
- public Long getLastUpdateDate() {
- return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
- }
-
- public void setLastUpdateDate(Long lastUpdateDate) {
- setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
- }
-
- public String getDescription() {
- return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
- }
-
- public void setDescription(String description) {
- setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
- }
-
- public Map<String, OperationDataDefinition> getOperations() {
- return (Map<String, OperationDataDefinition>)
- getToscaPresentationValue(JsonPresentationFields.INTERFACE_OPERATION);
- }
-
- public void setOperations(Map<String, OperationDataDefinition> operations) {
- setToscaPresentationValue(JsonPresentationFields.INTERFACE_OPERATION, operations);
- }
-
- public String getToscaResourceName() {
- return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
- }
-
- public void setToscaResourceName(String toscaResourceName) {
- setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
- }
+ public InterfaceDataDefinition(String type, String description) {
+ this();
+ setType(type);
+ setDescription(description);
+
+ }
+
+ @JsonCreator
+ public InterfaceDataDefinition() {
+ super();
+ setOperations(new HashMap<>());
+ }
+
+ public InterfaceDataDefinition(InterfaceDataDefinition p) {
+ setUniqueId(p.getUniqueId());
+ setType(p.getType());
+ setDescription(p.getDescription());
+ setToscaResourceName(p.getToscaResourceName());
+ setOperations(p.getOperations());
+ }
+
+ public String getUniqueId() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
+ }
+
+ public void setUniqueId(String uniqueId) {
+ setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
+ }
+
+ public String getType() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
+ }
+
+ public void setType(String type) {
+ setToscaPresentationValue(JsonPresentationFields.TYPE, type);
+ }
+
+ public String getDescription() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
+ }
+
+ public void setDescription(String description) {
+ setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
+ }
+
+ public String getToscaResourceName() {
+ return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
+ }
+
+ public Map<String, OperationDataDefinition> getOperations() {
+ return (Map<String, OperationDataDefinition>) getToscaPresentationValue(JsonPresentationFields.OPERATIONS);
+ }
+
+ public void setOperations(Map<String, OperationDataDefinition> operations) {
+ setToscaPresentationValue(JsonPresentationFields.OPERATIONS, operations);
+ }
+
+ public void setToscaResourceName(String toscaResourceName) {
+ setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
+ }
+
+ public Long getCreationDate() {
+ return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
+ }
+
+ public void setCreationDate(Long creationDate) {
+ setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
+ }
+
+ public Long getLastUpdateDate() {
+ return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
+ }
+
+ public void setLastUpdateDate(Long lastUpdateDate) {
+ setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
+ }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
deleted file mode 100644
index 29093e9382..0000000000
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright © 2016-2018 European Support Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openecomp.sdc.be.datatypes.elements;
-
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
-
-import java.io.Serializable;
-
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.ARTIFACT_UUID;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRIPTION;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_INPUT_PARAMETERS;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OPERATION_TYPE;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OUTPUT_PARAMETERS;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.UNIQUE_ID;
-
-public class InterfaceOperationDataDefinition extends ToscaDataDefinition implements Serializable {
-
- @JsonCreator
- public InterfaceOperationDataDefinition() {
- super();
- }
-
- public InterfaceOperationDataDefinition(InterfaceOperationDataDefinition iodd) {
- super();
- setUniqueId(iodd.getUniqueId());
- setInputParams(iodd.getInputParams());
- setOutputParams(iodd.getOutputParams());
- setDescription(iodd.getDescription());
- setToscaResourceName(iodd.getToscaResourceName());
- setOperationType(iodd.getOperationType());
- setArtifactUUID(iodd.getArtifactUUID());
- setWorkflowId(iodd.getWorkflowId());
- setWorkflowVersionId(iodd.getWorkflowVersionId());
- setWorkflowAssociationType(iodd.getWorkflowAssociationType());
- }
-
- public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
- return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
- getToscaPresentationValue(IO_INPUT_PARAMETERS);
- }
- public void setInputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
- inputParams) {
- setToscaPresentationValue(IO_INPUT_PARAMETERS, inputParams);
- }
-
- public ListDataDefinition<InterfaceOperationParamDataDefinition> getOutputParams() {
- return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
- getToscaPresentationValue(IO_OUTPUT_PARAMETERS);
- }
- public void setOutputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
- outputParams) {
- setToscaPresentationValue(IO_OUTPUT_PARAMETERS, outputParams);
- }
-
- public String getUniqueId() {
- return (String) getToscaPresentationValue(UNIQUE_ID);
- }
- public void setUniqueId(String uid) {
- setToscaPresentationValue(UNIQUE_ID, uid);
- }
-
- public String getDescription() {
- return (String) getToscaPresentationValue(DESCRIPTION);
- }
- public void setDescription(String description) {
- setToscaPresentationValue(DESCRIPTION, description);
- }
-
- public String getOperationType() {
- return (String) getToscaPresentationValue(IO_OPERATION_TYPE);
- }
- public void setOperationType(String operationType) {
- setToscaPresentationValue(IO_OPERATION_TYPE, operationType);
- }
-
- public String getToscaResourceName() {
- return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
- }
- public void setToscaResourceName(String toscaResourceName) {
- setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
- }
-
- public String getWorkflowId(){
- return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
- }
- public void setWorkflowId(String workflowId) {
- setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
- }
-
- public String getWorkflowVersionId() {
- return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
- }
- public void setWorkflowVersionId(String workflowVersionId) {
- setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
- }
-
- public String getArtifactUUID() {
- return (String) getToscaPresentationValue(ARTIFACT_UUID);
- }
- public void setArtifactUUID(String artifactUUID) {
- setToscaPresentationValue(ARTIFACT_UUID, artifactUUID);
- }
-
- public String getWorkflowAssociationType() {
- return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
- }
-
- public void setWorkflowAssociationType(String workflowAssociationType) {
- setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
- }
-}
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
deleted file mode 100644
index b8372d6793..0000000000
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinition.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright © 2016-2018 European Support Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openecomp.sdc.be.datatypes.elements;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
-
-import java.io.Serializable;
-
-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 {
-
- @JsonCreator
- public InterfaceOperationParamDataDefinition() {
- super();
- }
-
- public InterfaceOperationParamDataDefinition(InterfaceOperationParamDataDefinition iopdd) {
- super();
- setName(iopdd.getName());
- setProperty(iopdd.getProperty());
- setMandatory(iopdd.getMandatory());
- setType(iopdd.getType());
- }
-
- public InterfaceOperationParamDataDefinition(String name, String property, boolean mandatory, String type) {
- super();
- setName(name);
- setProperty(property);
- setMandatory(mandatory);
- setType(type);
- }
-
- //used for OperationOutputDefinition
- public InterfaceOperationParamDataDefinition(String name, boolean mandatory, String type) {
- super();
- setName(name);
- setMandatory(mandatory);
- setType(type);
- }
-
- public String getName() {
- return (String) getToscaPresentationValue(IO_NAME);
- }
- public void setName(String name) {
- setToscaPresentationValue(IO_NAME, name);
- }
-
- public String getProperty() {
- return (String) getToscaPresentationValue(IO_PROPERTY);
- }
- public void setProperty(String property) {
- setToscaPresentationValue(IO_PROPERTY, property);
- }
-
- public Boolean getMandatory() {
- return (Boolean) getToscaPresentationValue(IO_MANDATORY);
- }
- 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/OperationDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java
index 722d605743..84b6124b97 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java
@@ -20,127 +20,127 @@
package org.openecomp.sdc.be.datatypes.elements;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
-
-import java.io.Serializable;
-
import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE;
import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.io.Serializable;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+
public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
- @JsonCreator
- public OperationDataDefinition() {
- super();
- }
-
- public OperationDataDefinition(String description) {
- super();
- setDescription(description);
- }
-
- public OperationDataDefinition(OperationDataDefinition p) {
- setDescription(p.getDescription());
- setImplementation(p.getImplementation());
- setInputs(p.getInputs());
- setOutputs(p.getOutputs());
- setName(p.getName());
- setUniqueId(p.getUniqueId());
- setWorkflowId(p.getWorkflowId());
- setWorkflowVersionId(p.getWorkflowVersionId());
- setWorkflowAssociationType(p.getWorkflowAssociationType());
- }
-
-
- public String getUniqueId() {
- return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
- }
-
- public void setUniqueId(String uniqueId) {
- setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
- }
-
-
- public Long getCreationDate() {
- return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
- }
-
- public void setCreationDate(Long creationDate) {
- setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
- }
-
- public Long getLastUpdateDate() {
- return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
- }
-
- public void setLastUpdateDate(Long lastUpdateDate) {
- setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
- }
-
- public String getDescription() {
- return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
- }
-
- public void setDescription(String description) {
- setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
- }
-
- public ArtifactDataDefinition getImplementation() {
- return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
- }
-
- public void setImplementation(ArtifactDataDefinition implementation) {
- setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
- }
-
- public ListDataDefinition<OperationInputDefinition> getInputs() {
- return (ListDataDefinition<OperationInputDefinition>)
- getToscaPresentationValue(JsonPresentationFields.OPERATION_INPUT);
- }
-
- public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
- setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUT,inputs);
- }
-
- public ListDataDefinition<OperationOutputDefinition> getOutputs() {
- return (ListDataDefinition<OperationOutputDefinition>)
- getToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUT);
- }
-
- public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
- setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUT, outputs);
- }
- public String getName() {
- return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
- }
-
- public void setName(String name) {
- setToscaPresentationValue(JsonPresentationFields.NAME, name);
- }
-
- public String getWorkflowId(){
- return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
- }
- public void setWorkflowId(String workflowId) {
- setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
- }
-
- public String getWorkflowVersionId() {
- return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
- }
- public void setWorkflowVersionId(String workflowVersionId) {
- setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
- }
-
- public String getWorkflowAssociationType() {
- return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
- }
-
- public void setWorkflowAssociationType(String workflowAssociationType) {
- setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
- }
+ @JsonCreator
+ public OperationDataDefinition() {
+ super();
+ }
+
+ public OperationDataDefinition(String description) {
+ super();
+ setDescription(description);
+ }
+
+ public OperationDataDefinition(OperationDataDefinition p) {
+ setDescription(p.getDescription());
+ setImplementation(p.getImplementation());
+ setInputs(p.getInputs());
+ setOutputs(p.getOutputs());
+ setName(p.getName());
+ setUniqueId(p.getUniqueId());
+ setWorkflowId(p.getWorkflowId());
+ setWorkflowVersionId(p.getWorkflowVersionId());
+ setWorkflowAssociationType(p.getWorkflowAssociationType());
+ }
+
+ public String getDescription() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
+ }
+
+ public void setDescription(String description) {
+ setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
+ }
+
+ public ArtifactDataDefinition getImplementation() {
+ return (ArtifactDataDefinition) getToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION);
+ }
+
+ public void setImplementation(ArtifactDataDefinition implementation) {
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_IMPLEMENTATION, implementation);
+ }
+
+ public ListDataDefinition<OperationInputDefinition> getInputs() {
+ return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(
+ JsonPresentationFields.OPERATION_INPUTS);
+ }
+
+ public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
+ }
+
+ public ListDataDefinition<OperationOutputDefinition> getOutputs() {
+ return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(
+ JsonPresentationFields.OPERATION_OUTPUTS);
+ }
+
+ public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
+ }
+
+ public String getName() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
+ }
+
+ public String getUniqueId() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
+ }
+
+ public void setUniqueId(String uniqueId) {
+ setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
+ }
+
+ public String getWorkflowId() {
+ return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
+ }
+
+ public void setWorkflowId(String workflowId) {
+ setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
+ }
+
+ public String getWorkflowVersionId() {
+ return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
+ }
+
+ public void setWorkflowVersionId(String workflowVersionId) {
+ setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
+ }
+
+ public String getWorkflowAssociationType() {
+ return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
+ }
+
+ public void setWorkflowAssociationType(String workflowAssociationType) {
+ setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
+ }
+
+ public void setName(String name) {
+ setToscaPresentationValue(JsonPresentationFields.NAME, name);
+ }
+
+ public Long getCreationDate() {
+ return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
+ }
+
+ public void setCreationDate(Long creationDate) {
+ setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
+ }
+
+ public Long getLastUpdateDate() {
+ return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
+ }
+
+ public void setLastUpdateDate(Long lastUpdateDate) {
+ setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
+ }
}
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 d5283c6dc3..40d6a70110 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
@@ -120,7 +120,7 @@ public enum JsonPresentationFields {
CAPABILITY_SOURCES("capabilitySources", null),
MAX_OCCURRENCES("maxOccurrences", null),
MIN_OCCURRENCES("minOccurrences", null),
- OWNER_TYPE ("ownerType", null),
+ OWNER_TYPE("ownerType",null),
OWNER_NAME("ownerName", null),
OWNER_ID("ownerId", null),
LEFT_OCCURRENCES("leftOccurences", null),
@@ -210,26 +210,15 @@ public enum JsonPresentationFields {
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_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 Operation
+ IO_WORKFLOW_ID("workflowId", null),
+ IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null),
-
- //Interface
- INTERFACE ("interface", null),
- INTERFACE_OPERATION ("operation", null),
- OPERATION_IMPLEMENTATION("operationImplementation",null),
- OPERATION_INPUT("operationInput",null),
- OPERATION_OUTPUT("operationOutput", null)
- ;
-
+ INTERFACES("interfaces", null),
+ OPERATIONS("operations", null),
+ OPERATION_IMPLEMENTATION("implementation",null),
+ OPERATION_INPUTS("inputs",null),
+ OPERATION_OUTPUTS("outputs", null);
private String presentation;
private GraphPropertyEnum storedAs;
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinitionTest.java
deleted file mode 100644
index e0e07fd259..0000000000
--- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinitionTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package org.openecomp.sdc.be.datatypes.elements;
-
-import org.junit.Test;
-
-public class InterfaceOperationDataDefinitionTest {
-
- private InterfaceOperationDataDefinition createTestSubject() {
- return new InterfaceOperationDataDefinition();
- }
-
- @Test
- public void testCopyConstructor() throws Exception {
- InterfaceOperationDataDefinition testSubject;
-
- // default test
- testSubject = createTestSubject();
- new InterfaceOperationDataDefinition(testSubject);
- }
-
- @Test
- public void testGetInputParams() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- ListDataDefinition<InterfaceOperationParamDataDefinition> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getInputParams();
- }
-
- @Test
- public void testSetInputParams() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- ListDataDefinition<InterfaceOperationParamDataDefinition> inputParams = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setInputParams(inputParams);
- }
-
- @Test
- public void testGetOutputParams() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- ListDataDefinition<InterfaceOperationParamDataDefinition> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getOutputParams();
- }
-
- @Test
- public void testSetOutputParams() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- ListDataDefinition<InterfaceOperationParamDataDefinition> outputParams = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setOutputParams(outputParams);
- }
-
- @Test
- public void testGetUniqueId() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getUniqueId();
- }
-
- @Test
- public void testSetUniqueId() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String uid = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setUniqueId(uid);
- }
-
- @Test
- public void testGetDescription() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getDescription();
- }
-
- @Test
- public void testSetDescription() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String description = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setDescription(description);
- }
-
- @Test
- public void testGetOperationType() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getOperationType();
- }
-
- @Test
- public void testSetOperationType() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String operationType = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setOperationType(operationType);
- }
-
- @Test
- public void testGetToscaResourceName() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getToscaResourceName();
- }
-
- @Test
- public void testSetToscaResourceName() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String toscaResourceName = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setToscaResourceName(toscaResourceName);
- }
-
- @Test
- public void testGetArtifactUUID() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getArtifactUUID();
- }
-
- @Test
- public void testSetArtifactUUID() throws Exception {
- InterfaceOperationDataDefinition testSubject;
- String artifactUUID = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setArtifactUUID(artifactUUID);
- }
-} \ No newline at end of file
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinitionTest.java
deleted file mode 100644
index e25adb3c2f..0000000000
--- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationParamDataDefinitionTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.openecomp.sdc.be.datatypes.elements;
-
-import org.junit.Test;
-
-public class InterfaceOperationParamDataDefinitionTest {
-
- private InterfaceOperationParamDataDefinition createTestSubject() {
- return new InterfaceOperationParamDataDefinition();
- }
-
- @Test
- public void testOverloadConstructor() throws Exception {
- InterfaceOperationParamDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- new InterfaceOperationParamDataDefinition(testSubject);
- new InterfaceOperationParamDataDefinition("", "",true, "");
- }
-
- @Test
- public void testGetParamName() throws Exception {
- InterfaceOperationParamDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getName();
- }
-
- @Test
- public void testSetParamName() throws Exception {
- InterfaceOperationParamDataDefinition testSubject;
- String paramName = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setName(paramName);
- }
-
- @Test
- public void testGetParamId() throws Exception {
- InterfaceOperationParamDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getProperty();
- }
-
- @Test
- public void testSetParamId() throws Exception {
- InterfaceOperationParamDataDefinition testSubject;
- String paramId = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setProperty(paramId);
- }
-} \ No newline at end of file