Class BeanShellValidationStrategy

java.lang.Object
de.hybris.platform.validation.validators.BeanShellValidationStrategy
All Implemented Interfaces:
DynamicValidationStrategy

public class BeanShellValidationStrategy extends Object implements DynamicValidationStrategy

Bean shell validation mechanism evals provided expression and checks if the result might somehow interpreted as boolean value. Creates instance of Interpreter per validation call.

At this moment in beanshell context current validated object is accessible as current e.g ProductModel.CODE will be available as getCode(). There is also available explicit JaloSession object as "jaloSession". (It might somehow inefficient to create BSH interpreter for every validation.)