import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
-
import javax.annotation.PostConstruct;
import javax.annotation.Priority;
-
import org.camunda.bpm.engine.delegate.BpmnError;
import org.javatuples.Pair;
import org.onap.so.bpmn.common.BuildingBlockExecution;
/**
* Controls running all pre and post validation for building blocks.
*
- * To define a validation you must make it a spring bean and implement either {@link org.onap.so.bpmn.common.validation.PreBuildingBlockValidator} or
- * {@link org.onap.so.bpmn.common.validation.PostBuildingBlockValidator} your validation will automatically be
- * run by this class.
+ * To define a validation you must make it a spring bean and implement either
+ * {@link org.onap.so.bpmn.common.validation.PreBuildingBlockValidator} or
+ * {@link org.onap.so.bpmn.common.validation.PostBuildingBlockValidator} your validation will automatically be run by
+ * this class.
*
*/
@Component
-public class BuildingBlockValidatorRunner extends FlowValidatorRunner<PreBuildingBlockValidator, PostBuildingBlockValidator> {
-
- @PostConstruct
- protected void init() {
-
- preFlowValidators = new ArrayList<>(
- Optional.ofNullable(context.getBeansOfType(PreBuildingBlockValidator.class)).orElse(new HashMap<>()).values());
- postFlowValidators = new ArrayList<>(
- Optional.ofNullable(context.getBeansOfType(PostBuildingBlockValidator.class)).orElse(new HashMap<>()).values());
- }
-
- protected List<PreBuildingBlockValidator> getPreFlowValidators() {
- return this.preFlowValidators;
- }
-
- protected List<PostBuildingBlockValidator> getPostFlowValidators() {
- return this.postFlowValidators;
- }
-
+public class BuildingBlockValidatorRunner
+ extends FlowValidatorRunner<PreBuildingBlockValidator, PostBuildingBlockValidator> {
+
+ @PostConstruct
+ protected void init() {
+
+ preFlowValidators = new ArrayList<>(Optional.ofNullable(context.getBeansOfType(PreBuildingBlockValidator.class))
+ .orElse(new HashMap<>()).values());
+ postFlowValidators = new ArrayList<>(Optional
+ .ofNullable(context.getBeansOfType(PostBuildingBlockValidator.class)).orElse(new HashMap<>()).values());
+ }
+
+ protected List<PreBuildingBlockValidator> getPreFlowValidators() {
+ return this.preFlowValidators;
+ }
+
+ protected List<PostBuildingBlockValidator> getPostFlowValidators() {
+ return this.postFlowValidators;
+ }
+
}