Class NotNullValidator
java.lang.Object
ru.cg.webbpm.studio.subsystems.script_editor.validation.impl.NotNullValidator
- All Implemented Interfaces:
PropertyValidator
- Author:
- Abdulin Ildar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) validate(PropertyValue propertyValue, Object scriptContext, PropertyContext propertyContext) Check if property is valid
-
Constructor Details
-
NotNullValidator
-
-
Method Details
-
accept
public boolean accept(PropertyValue propertyValue, PropertyType<?> propertyType, PropertyContext propertyContext) - Specified by:
acceptin 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) Description copied from interface:PropertyValidatorCheck if property is valid- Specified by:
validatein 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.
-