Interface PropertyValidator
- All Known Implementing Classes:
ActionControllerActionValidator,ActionControllerConditionValidator,ActionControllerEventRefValidator,ActionControllerV2ConditionValidator,BpmnVariableValidator,ClassRefPropertyTypeValidator,EntityColumnValidator,EntityGraphValidator,HandlerBpmnVariableArrayValidator,HandlerBpmnVariableValidator,MinMaxValidator,NotNullValidator,ObjectClassRefValidator,ReportTemplateValidator,SizeValidator
public interface PropertyValidator
- Author:
- Abdulin Ildar
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) validate(PropertyValue propertyValue, Object scriptContext, PropertyContext propertyContext) Check if property is valid
-
Method Details
-
accept
boolean accept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) - 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
Set<String> validate(PropertyValue propertyValue, Object scriptContext, PropertyContext propertyContext) Check if property is valid- 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.
-