summaryrefslogtreecommitdiffstats
path: root/common-be/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src/main')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java4
-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.java8
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java21
5 files changed, 11 insertions, 240 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..d3a6903091 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
@@ -95,11 +95,11 @@ public class InterfaceDataDefinition extends ToscaDataDefinition implements Seri
public Map<String, OperationDataDefinition> getOperations() {
return (Map<String, OperationDataDefinition>)
- getToscaPresentationValue(JsonPresentationFields.INTERFACE_OPERATION);
+ getToscaPresentationValue(JsonPresentationFields.OPERATIONS);
}
public void setOperations(Map<String, OperationDataDefinition> operations) {
- setToscaPresentationValue(JsonPresentationFields.INTERFACE_OPERATION, operations);
+ setToscaPresentationValue(JsonPresentationFields.OPERATIONS, operations);
}
public String getToscaResourceName() {
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..2c76411b3b 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
@@ -99,20 +99,20 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
public ListDataDefinition<OperationInputDefinition> getInputs() {
return (ListDataDefinition<OperationInputDefinition>)
- getToscaPresentationValue(JsonPresentationFields.OPERATION_INPUT);
+ getToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS);
}
public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
- setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUT,inputs);
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS, inputs);
}
public ListDataDefinition<OperationOutputDefinition> getOutputs() {
return (ListDataDefinition<OperationOutputDefinition>)
- getToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUT);
+ getToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS);
}
public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
- setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUT, outputs);
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS, outputs);
}
public String getName() {
return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
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..d621fedabe 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
@@ -211,25 +211,14 @@ public enum JsonPresentationFields {
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),
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;