summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2019-03-18 11:55:56 +0530
committerojasdubey <ojas.dubey@amdocs.com>2019-03-18 12:18:42 +0530
commit2ca2fc5c0da1eb862fcd79d1f9345aa89e62b396 (patch)
tree15d2cf2c7d6e9024430f735addf9e947d2814830 /common-be/src/main/java/org/openecomp
parent532b6da80ebd6977aa27300ab3cbe7b21d88609a (diff)
Service Consumption BE
1. Service consumption feature backend implementation 2. Operation output bug fix for delete operation not allowed for mapped operation output Change-Id: Ib2554eed4f940b003955263a0c8bf795a23cac9a Issue-ID: SDC-1990 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'common-be/src/main/java/org/openecomp')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapInterfaceDataDefinition.java40
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java34
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java8
4 files changed, 80 insertions, 5 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapInterfaceDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapInterfaceDataDefinition.java
new file mode 100644
index 0000000000..7b1b43ebd7
--- /dev/null
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapInterfaceDataDefinition.java
@@ -0,0 +1,40 @@
+/*
+ * 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 com.fasterxml.jackson.annotation.JsonValue;
+
+import java.util.Map;
+
+public class MapInterfaceDataDefinition extends MapDataDefinition<InterfaceDataDefinition> {
+
+ public MapInterfaceDataDefinition() {
+
+ }
+
+ @JsonCreator
+ public MapInterfaceDataDefinition(Map<String, InterfaceDataDefinition > mapToscaDataDefinition) {
+ super(mapToscaDataDefinition);
+ }
+
+ @JsonValue
+ @Override
+ public Map<String, InterfaceDataDefinition> getMapToscaDataDefinition() {
+ return mapToscaDataDefinition;
+ }
+}
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 35b760a677..1e8ef50564 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
@@ -16,24 +16,29 @@
package org.openecomp.sdc.be.datatypes.elements;
-
import com.fasterxml.jackson.annotation.JsonCreator;
+
import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
public class OperationInputDefinition extends InputDataDefinition {
+ private String source;
+ private String sourceProperty;
+ private String toscaDefaultValue;
@JsonCreator
public OperationInputDefinition() {
super();
}
- public OperationInputDefinition(String name, InputDataDefinition inputDefinition) {
+ public OperationInputDefinition(String name, InputDataDefinition inputDefinition, String source, String sourceProperty) {
super(inputDefinition);
setName(name);
+ setSource(source);
+ setSourceProperty(sourceProperty);
}
- public OperationInputDefinition(String name, String property, Boolean mandatory, String type) {
+ public OperationInputDefinition(String name, String property, Boolean mandatory, String type) {
super();
setName(name);
setInputId(property);
@@ -49,4 +54,27 @@ public class OperationInputDefinition extends InputDataDefinition {
setToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL, name);
}
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public String getSourceProperty() {
+ return sourceProperty;
+ }
+
+ public void setSourceProperty(String sourceProperty) {
+ this.sourceProperty = sourceProperty;
+ }
+
+ public String getToscaDefaultValue() {
+ return toscaDefaultValue;
+ }
+
+ public void setToscaDefaultValue(String toscaDefaultValue) {
+ this.toscaDefaultValue = toscaDefaultValue;
+ }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
index abc426cf85..a0843eb81f 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
@@ -44,7 +44,8 @@ public enum ComponentFieldsEnum {
FORWARDING_PATHS("forwardingPaths"),
POLICIES("policies"),
NON_EXCLUDED_POLICIES("nonExcludedPolicies"),
- NODE_FILTER("nodeFilter")
+ NODE_FILTER("nodeFilter"),
+ COMPONENT_INSTANCES_INTERFACES("componentInstancesInterfaces")
;
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 a72984ab7d..fa4afe1251 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
@@ -224,12 +224,18 @@ public enum JsonPresentationFields {
IO_WORKFLOW_ID("workflowId", null),
IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null),
+
+ //Interface
INTERFACES("interfaces", null),
OPERATIONS("operations", null),
OPERATION_IMPLEMENTATION("implementation",null),
OPERATION_INPUTS("inputs",null),
OPERATION_OUTPUTS("outputs", null),
- INPUTS("inputs", null);
+ INPUTS("inputs", null),
+
+ GET_PROPERTY("get_property", null),
+ GET_INPUT("get_input", null),
+ GET_OPERATION_OUTPUT("get_operation_output", null);
private String presentation;
private GraphPropertyEnum storedAs;