public class ValidationBindHandler extends AbstractBindHandler
BindHandler to apply Validators to bound results.DEFAULT| Constructor and Description |
|---|
ValidationBindHandler(BindHandler parent,
org.springframework.validation.Validator... validators) |
ValidationBindHandler(org.springframework.validation.Validator... validators) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCreatepublic ValidationBindHandler(org.springframework.validation.Validator... validators)
public ValidationBindHandler(BindHandler parent, org.springframework.validation.Validator... validators)
public <T> Bindable<T> onStart(ConfigurationPropertyName name, Bindable<T> target, BindContext context)
BindHandleronStart in interface BindHandleronStart in class AbstractBindHandlerT - the bindable source typename - the name of the element being boundtarget - the item being boundcontext - the bind contextnull)public java.lang.Object onSuccess(ConfigurationPropertyName name, Bindable<?> target, BindContext context, java.lang.Object result)
BindHandleronSuccess in interface BindHandleronSuccess in class AbstractBindHandlername - the name of the element being boundtarget - the item being boundcontext - the bind contextresult - the bound result (never null)null)public java.lang.Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, java.lang.Exception error) throws java.lang.Exception
BindHandlerBindHandler.onSuccess(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object) or BindHandler.onCreate(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object) calls). Implementations may choose to
swallow exceptions and return an alternative result.onFailure in interface BindHandleronFailure in class AbstractBindHandlername - the name of the element being boundtarget - the item being boundcontext - the bind contexterror - the cause of the error (if the exception stands it may be re-thrown)null).java.lang.Exception - if the binding isn't validpublic void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, java.lang.Object result) throws java.lang.Exception
BindHandlerBindHandler.onFailure(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Exception).onFinish in interface BindHandleronFinish in class AbstractBindHandlername - the name of the element being boundtarget - the item being boundcontext - the bind contextresult - the bound result (may be null)java.lang.Exception - if the binding isn't valid