summaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
authorshrek2000 <orenkle@amdocs.com>2019-01-29 13:04:42 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2019-01-30 12:18:32 +0000
commitade7fd243fe41b5056ba63d3584ea616ee8bf808 (patch)
tree4be93c8ddfd4577b29fe8553f92d2bd17dbe89b4 /common-be/src
parent614136b09c5d11bec99fe3c1e23e8c9e022eaa58 (diff)
Add dependent child service to service
Add dependent child service to service Issue-ID: SDC-1987 Change-Id: Ic542fe1bc13f2b77df9944f05421a42b4b21c437 Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'common-be/src')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CINodeFilterDataDefinition.java81
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterCapabilityDataDefinition.java47
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterPropertyDataDefinition.java41
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java1
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java9
5 files changed, 179 insertions, 0 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CINodeFilterDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CINodeFilterDataDefinition.java
new file mode 100644
index 0000000000..ffad1a4c16
--- /dev/null
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CINodeFilterDataDefinition.java
@@ -0,0 +1,81 @@
+/*
+ * 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 java.io.Serializable;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+
+public class CINodeFilterDataDefinition extends ToscaDataDefinition implements Serializable {
+
+ @JsonCreator
+ public CINodeFilterDataDefinition() {
+ }
+
+ public CINodeFilterDataDefinition(CINodeFilterDataDefinition inData){
+ super();
+ this.setID(inData.getID());
+ this.setName(inData.getName());
+ this.setTosca_id(inData.getTosca_id());
+ this.setProperties(inData.getProperties());
+ this.setCapabilities(inData.getCapabilities());
+ }
+
+ public void setTosca_id(Object tosca_id) {
+ setToscaPresentationValue(JsonPresentationFields.TOSCA_ID, tosca_id);
+ }
+
+ public Object getTosca_id() {
+ return getToscaPresentationValue(JsonPresentationFields.TOSCA_ID);
+ }
+
+ public ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> getProperties() {
+ return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(
+ JsonPresentationFields.PROPERTIES);
+ }
+
+ public void setProperties(ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties) {
+ setToscaPresentationValue(JsonPresentationFields.PROPERTIES, properties);
+ }
+
+ public ListDataDefinition<RequirementNodeFilterCapabilityDataDefinition> getCapabilities() {
+ return (ListDataDefinition<RequirementNodeFilterCapabilityDataDefinition>) getToscaPresentationValue(
+ JsonPresentationFields.NODE_FILTER_CAPABILITIES);
+ }
+
+ public void setCapabilities(ListDataDefinition<RequirementNodeFilterCapabilityDataDefinition> capabilities) {
+ setToscaPresentationValue(JsonPresentationFields.NODE_FILTER_CAPABILITIES, capabilities);
+ }
+
+ public String getName() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
+ }
+
+ public void setName(String name) {
+ setToscaPresentationValue(JsonPresentationFields.NAME, name);
+ }
+
+ public String getID() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
+ }
+
+ public void setID(String name) {
+ setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, name);
+ }
+
+
+}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterCapabilityDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterCapabilityDataDefinition.java
new file mode 100644
index 0000000000..3df0f28162
--- /dev/null
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterCapabilityDataDefinition.java
@@ -0,0 +1,47 @@
+/*
+ * 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 java.io.Serializable;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+
+public class RequirementNodeFilterCapabilityDataDefinition extends ToscaDataDefinition implements Serializable {
+
+ /**
+ * Default Constructor
+ */
+ public RequirementNodeFilterCapabilityDataDefinition() {
+ }
+
+ public String getName() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
+ }
+
+ public void setName(String name) {
+ setToscaPresentationValue(JsonPresentationFields.NAME, name);
+ }
+
+ public ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> getProperties() {
+ return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(
+ JsonPresentationFields.PROPERTIES);
+ }
+
+ public void setProperties(ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties) {
+ setToscaPresentationValue(JsonPresentationFields.PROPERTIES, properties);
+ }
+}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterPropertyDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterPropertyDataDefinition.java
new file mode 100644
index 0000000000..1ee33eeafe
--- /dev/null
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterPropertyDataDefinition.java
@@ -0,0 +1,41 @@
+/*
+ * 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 java.io.Serializable;
+import java.util.List;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+
+public class RequirementNodeFilterPropertyDataDefinition extends ToscaDataDefinition implements Serializable {
+
+
+ public List<String> getConstraints() {
+ return (List<String>) getToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_CONSTRAINT);
+ }
+
+ public void setConstraints(List<String> constraints) {
+ setToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_CONSTRAINT, constraints);
+ }
+
+ public String getName() {
+ return (String) getToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_NAME);
+ }
+
+ public void setName(String name) {
+ setToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_NAME, name);
+ }
+}
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 db0735a5c0..abc426cf85 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,6 +44,7 @@ public enum ComponentFieldsEnum {
FORWARDING_PATHS("forwardingPaths"),
POLICIES("policies"),
NON_EXCLUDED_POLICIES("nonExcludedPolicies"),
+ NODE_FILTER("nodeFilter")
;
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 40d6a70110..6829c72cb4 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
@@ -136,6 +136,15 @@ public enum JsonPresentationFields {
REQUIREMENT_ID("requirementId", null),
PARENT_NAME("parentName", null),
PREVIOUS_NAME("previousName", null),
+ NODE_FILTER_CAPABILITIES("capabilities",null),
+ PROPERTY_FILTER_NAME("propertyName",null),
+ PROPERTY_FILTER_CONSTRAINT("propertyFilterConstraint",null),
+ EQUAL_CONSTRAINT("equal",null),
+ CONSTRAINT_VALUE("constraintValue",null),
+ CONSTRAINT_FUNCTION("constraintFunction",null),
+ NODE_FILTER("nodeFilter",null),
+ TOSCA_ID("tosca_id",null),
+
//Relation
CAPABILTY_OWNER_ID("capabilityOwnerId", null),
REQUIREMENT_OWNER_ID("requirementOwnerId", null),