summaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
Diffstat (limited to 'common-be')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/FilterDataDefinition.java47
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MilestoneDataDefinition.java8
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java1
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java1
4 files changed, 57 insertions, 0 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/FilterDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/FilterDataDefinition.java
new file mode 100644
index 0000000000..d1b9c98129
--- /dev/null
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/FilterDataDefinition.java
@@ -0,0 +1,47 @@
+/*
+ *
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2023 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.be.datatypes.elements;
+
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@NoArgsConstructor
+public class FilterDataDefinition extends PropertyDataDefinition implements Serializable {
+
+ @Getter
+ @Setter
+ private Object filterValue;
+
+ @Getter
+ @Setter
+ private String constraint;
+
+ public FilterDataDefinition(FilterDataDefinition activity) {
+ setName(activity.getName());
+ setConstraint(activity.getConstraint());
+ setValue(activity.getValue());
+ setToscaFunction(activity.getToscaFunction());
+ }
+
+}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MilestoneDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MilestoneDataDefinition.java
index 78681e1434..a608e1cd03 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MilestoneDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MilestoneDataDefinition.java
@@ -41,4 +41,12 @@ public class MilestoneDataDefinition extends ToscaDataDefinition implements Seri
setToscaPresentationValue(JsonPresentationFields.OPERATION_ACTIVITIES, activities);
}
+ public ListDataDefinition<FilterDataDefinition> getFilters() {
+ return (ListDataDefinition<FilterDataDefinition>) getToscaPresentationValue(JsonPresentationFields.OPERATION_FILTERS);
+ }
+
+ public void setFilters(ListDataDefinition<FilterDataDefinition> activities) {
+ setToscaPresentationValue(JsonPresentationFields.OPERATION_FILTERS, activities);
+ }
+
}
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 c4d22a037f..e96477dc68 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
@@ -258,6 +258,7 @@ public enum JsonPresentationFields {
OPERATION_INPUTS("inputs", null),
OPERATION_OUTPUTS("outputs", null),
OPERATION_MILESTONES("milestones", null),
+ OPERATION_FILTERS("filters", null),
OPERATION_ACTIVITIES("activities", null),
OPERATION_ACTIVITIES_WORKFLOW("workflow", null),
INPUTS("inputs", null),
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java b/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
index d4076aee5c..6d291da375 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
@@ -79,6 +79,7 @@ public class TypeUtils {
IMPLEMENTATION("implementation"),
MILESTONES("milestones"),
ACTIVITIES("activities"),
+ FILTERS("filters"),
WORKFLOW("workflow"),
SUBSTITUTION_FILTERS("substitution_filter"),
DERIVED_FROM_NAME("derivedFromName"),