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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActionControllerConditionValidator
(MetadataManager metadataManager) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) Deprecated.protected void
checkCondition
(ComplexValue conditionProperty, Set<String> errors) Deprecated.Check if given Condition is validprotected void
checkConditionOne
(ComplexValue conditionOneProperty, Set<String> errors) Deprecated.protected boolean
isConditionEmpty
(ComplexValue conditionProperty) Deprecated.Check if given single condition is not emptyprotected boolean
isGroup
(ComplexValue condition) Deprecated.Check if given Condition is a group conditionprotected boolean
isGroupEmpty
(ComplexValue conditionProperty) Deprecated.Check if given Condition is an empty groupvalidate
(PropertyValue propertyValue, Object scriptContext, PropertyContext propertyContext) Deprecated.Check if property is valid
-
Field Details
-
metadataManager
Deprecated.
-
-
Constructor Details
-
ActionControllerConditionValidator
Deprecated.
-
-
Method Details
-
accept
public boolean accept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) Deprecated.- Specified by:
accept
in interfacePropertyValidator
- Parameters:
propertyValue
- property to checkpropertyType
- property typepropertyContext
- 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 interfacePropertyValidator
- Parameters:
propertyValue
- property to validatescriptContext
- 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
Deprecated.Check if given Condition is valid- Parameters:
conditionProperty
- Condition type propertyerrors
- Set to add errors to
-
checkConditionOne
Deprecated. -
isGroup
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
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
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
-