org.camunda.bpm.engine.impl.form.validator
Class DelegateFormFieldValidator

java.lang.Object
  extended by org.camunda.bpm.engine.impl.form.validator.DelegateFormFieldValidator
All Implemented Interfaces:
FormFieldValidator

public class DelegateFormFieldValidator
extends Object
implements FormFieldValidator

FormFieldValidator delegating to a custom, user-provided validator implementation. The implementation is resolved either using a fully qualified classname of a Java Class or using a java delegate implementation.

Author:
Daniel Meyer

Field Summary
protected  String clazz
           
protected  Expression delegateExpression
           
 
Constructor Summary
DelegateFormFieldValidator()
           
DelegateFormFieldValidator(Expression expression)
           
DelegateFormFieldValidator(String clazz)
           
 
Method Summary
protected  boolean doValidate(Object submittedValue, FormFieldValidatorContext validatorContext)
           
protected  boolean shouldPerformPaContextSwitch(DelegateExecution execution)
           
 boolean validate(Object submittedValue, FormFieldValidatorContext validatorContext)
          return true if the submitted value is valid for the given form field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

protected String clazz

delegateExpression

protected Expression delegateExpression
Constructor Detail

DelegateFormFieldValidator

public DelegateFormFieldValidator(Expression expression)

DelegateFormFieldValidator

public DelegateFormFieldValidator(String clazz)

DelegateFormFieldValidator

public DelegateFormFieldValidator()
Method Detail

validate

public boolean validate(Object submittedValue,
                        FormFieldValidatorContext validatorContext)
Description copied from interface: FormFieldValidator
return true if the submitted value is valid for the given form field.

Specified by:
validate in interface FormFieldValidator
Parameters:
submittedValue - the value submitted to the form field
validatorContext - object providing access to additional information useful wile validating the form
Returns:
true if the value is valid, false otherwise.

shouldPerformPaContextSwitch

protected boolean shouldPerformPaContextSwitch(DelegateExecution execution)

doValidate

protected boolean doValidate(Object submittedValue,
                             FormFieldValidatorContext validatorContext)


Copyright © 2016 camunda services GmbH. All rights reserved.