Class ActionControllerConditionValidator

java.lang.Object
ru.cg.webbpm.studio.subsystems.ui_scripting.validation.impl.ActionControllerConditionValidator
All Implemented Interfaces:
PropertyValidator
Direct Known Subclasses:
ActionControllerV2ConditionValidator

@Component @Deprecated public class ActionControllerConditionValidator extends Object implements PropertyValidator
Deprecated.
Author:
krylov This validator checks ActionController conditions recursively. For each condition, it checks that - behavior is not empty, if condition is not group - group condition has at least one child condition - value property is valid, if ConditionOperation requires an argument
  • Field Details

    • metadataManager

      protected final MetadataManager metadataManager
      Deprecated.
  • Constructor Details

    • ActionControllerConditionValidator

      @Autowired public ActionControllerConditionValidator(MetadataManager metadataManager)
      Deprecated.
  • Method Details

    • accept

      public boolean accept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext)
      Deprecated.
      Specified by:
      accept in interface PropertyValidator
      Parameters:
      propertyValue - property to check
      propertyType - property type
      propertyContext - context of the property (e.g script or complex property)
      Returns:
      true if validator accepts given property TODO it's possible to depend on metadata and type here
    • validate

      public Set<String> validate(PropertyValue propertyValue, Object scriptContext, PropertyContext propertyContext)
      Deprecated.
      Description copied from interface: PropertyValidator
      Check if property is valid
      Specified by:
      validate in interface PropertyValidator
      Parameters:
      propertyValue - property to validate
      scriptContext - context of the script which property belongs to (e.g. page object or BPMN process)
      propertyContext - context of the property which property belongs to (e.g. Script or PropertyValue)
      Returns:
      Violation messages. If there are no violations returns empty set.
    • checkCondition

      protected void checkCondition(ComplexValue conditionProperty, Set<String> errors)
      Deprecated.
      Check if given Condition is valid
      Parameters:
      conditionProperty - Condition type property
      errors - Set to add errors to
    • checkConditionOne

      protected void checkConditionOne(ComplexValue conditionOneProperty, Set<String> errors)
      Deprecated.
    • isGroup

      protected boolean isGroup(ComplexValue condition)
      Deprecated.
      Check if given Condition is a group condition
      Parameters:
      condition - Condition type property to check
      Returns:
      true if given Condition is a group condition
    • isGroupEmpty

      protected boolean isGroupEmpty(ComplexValue conditionProperty)
      Deprecated.
      Check if given Condition is an empty group
      Parameters:
      conditionProperty - Condition type property to check
      Returns:
      true if given Condition is an empty group
    • isConditionEmpty

      protected boolean isConditionEmpty(ComplexValue conditionProperty)
      Deprecated.
      Check if given single condition is not empty
      Parameters:
      conditionProperty - Condition type property to check
      Returns:
      true if given single condition is not empty