aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-19 17:55:41 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-19 17:59:34 -0500
commit6ca9bedf6206a98991acb742206ce0b8113684fa (patch)
treeace99046a689c9f4d39bda8799e659df1b0551e5 /bpmn/MSOCommonBPMN/src/main/java
parentfb37bbac02e3e404e61fbae88c17d91a8172d874 (diff)
flowvaldiator will allow more flexible filtering
fixed unit tests that reference forItems() forItems is now shouldRunFor allowing more flexibility Change-Id: I497f3a2899ae4df555e781c7c85a238e657fcba8 Issue-ID: SO-1533 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidator.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidator.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidator.java
index a2e6804a7f..c457a349c2 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidator.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidator.java
@@ -28,10 +28,10 @@ import org.onap.so.bpmn.common.BuildingBlockExecution;
public interface FlowValidator {
/**
- * Names of items to be validated
+ * Should this validator run for given bb
* @return
*/
- public Set<String> forItems();
+ public boolean shouldRunFor(String bbName);
/**
* Determines whether or not the workflow should be executed
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
index 9e6ea53a47..636c8e32cf 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
@@ -122,7 +122,7 @@ public abstract class FlowValidatorRunner<S extends FlowValidator, E extends Flo
protected List<FlowValidator> filterValidators(List<? extends FlowValidator> validators, String bbName) {
return validators.stream()
.filter(item -> {
- return item.forItems().contains(bbName);
+ return item.shouldRunFor(bbName);
})
.sorted(Comparator.comparing(item -> {
Priority p = Optional.ofNullable(item.getClass().getAnnotation(Priority.class)).orElse(new Priority() {