Class WorkRequirementValidator
java.lang.Object
co.yellowdog.platform.model.beanvalidation.CustomValidator<WorkRequirement>
co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator
@GroupSequence({WorkRequirementValidator.class,co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class})
public class WorkRequirementValidator
extends CustomValidator<WorkRequirement>
Custom validator applied to work requirements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@AssertTrue(message="must not have cyclic destinations between task group failure policies",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean@AssertTrue(message="must not have task group failure policy destinations that are task groups that will finish if all tasks finished") boolean@AssertTrue(message="must not contain task group failure policies declaring destinations on other task groups not in the same work requirement",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean@AssertTrue(message="must not contain task groups declaring dependencies on other task groups not in the same work requirement",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean@AssertTrue(message="must not contain task groups with duplicate names") boolean@AssertTrue(message="must not have cyclic dependencies between task groups",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) booleanMethods inherited from class CustomValidator
getTarget, onSetTargetModifier and TypeMethodDescriptionprotected WorkRequirementprotected voidOptional method that can be overridden to perform initialisation or setup when the validator is being prepared to validate a particular target instance.
-
Constructor Details
-
WorkRequirementValidator
public WorkRequirementValidator()
-
-
Method Details
-
isAllNonNullTaskGroupNamesUnique
@AssertTrue(message="must not contain task groups with duplicate names") public @AssertTrue(message="must not contain task groups with duplicate names") boolean isAllNonNullTaskGroupNamesUnique() -
isAllNonNullDependentOnNamesPresent
@AssertTrue(message="must not contain task groups declaring dependencies on other task groups not in the same work requirement", groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) public @AssertTrue(message="must not contain task groups declaring dependencies on other task groups not in the same work requirement",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean isAllNonNullDependentOnNamesPresent() -
isNoCyclicDependencies
@AssertTrue(message="must not have cyclic dependencies between task groups", groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) public @AssertTrue(message="must not have cyclic dependencies between task groups",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean isNoCyclicDependencies() -
isAllFailurePolicyDestinationsPresent
@AssertTrue(message="must not contain task group failure policies declaring destinations on other task groups not in the same work requirement", groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) public @AssertTrue(message="must not contain task group failure policies declaring destinations on other task groups not in the same work requirement",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean isAllFailurePolicyDestinationsPresent() -
isAllFailurePolicyDestinationsAreAcyclic
@AssertTrue(message="must not have cyclic destinations between task group failure policies", groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) public @AssertTrue(message="must not have cyclic destinations between task group failure policies",groups=co.yellowdog.platform.model.validation.customvalidators.WorkRequirementValidator.TaskGroupGraph.class) boolean isAllFailurePolicyDestinationsAreAcyclic() -
isAllFailurePolicyDestinationsNotFinishIfAllTasksFinished
@AssertTrue(message="must not have task group failure policy destinations that are task groups that will finish if all tasks finished") public @AssertTrue(message="must not have task group failure policy destinations that are task groups that will finish if all tasks finished") boolean isAllFailurePolicyDestinationsNotFinishIfAllTasksFinished()
-