Package org.cyclos.impl.utils.validation
Interface ValidationHandler
-
public interface ValidationHandlerContains helper methods for validating objects
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddValidatedKey(Bean bean, String validatedKey)Adds the given key to the validated keys in the given beanvoidclearAlreadyValidated(Bean bean)Deprecated.This is no more necessary, instead use ValidationHandler#validate(Validator, Object, String) with a different validation keybooleanisAlreadyValidated(Bean bean)Deprecated.Instead use ValidationHandler#isAlreadyValidated(Bean, String)booleanisAlreadyValidated(Bean bean, String validationKey)Indicates whether the given bean was already validated for the given validation key.voidsetAlreadyValidated(Bean bean, boolean validated)Deprecated.Instead use ValidationHandler#addValidatedKey(Bean, String)voidvalidate(Validator validator, Object object)Deprecated.Instead use ValidationHandler#validate(Validator, Object, String) with a custom validation keyvoidvalidate(Validator validator, Object object, String validationKey)Validates the given object.
-
-
-
Method Detail
-
addValidatedKey
void addValidatedKey(Bean bean, String validatedKey)
Adds the given key to the validated keys in the given bean
-
clearAlreadyValidated
@Deprecated void clearAlreadyValidated(Bean bean)
Deprecated.This is no more necessary, instead use ValidationHandler#validate(Validator, Object, String) with a different validation keyRemoves the already validated attribute
-
isAlreadyValidated
@Deprecated boolean isAlreadyValidated(Bean bean)
Deprecated.Instead use ValidationHandler#isAlreadyValidated(Bean, String)Indicates whether the given bean was already validated
-
isAlreadyValidated
boolean isAlreadyValidated(Bean bean, String validationKey)
Indicates whether the given bean was already validated for the given validation key.
-
setAlreadyValidated
@Deprecated void setAlreadyValidated(Bean bean, boolean validated)
Deprecated.Instead use ValidationHandler#addValidatedKey(Bean, String)Marks the given bean as already validated.
-
validate
@Deprecated void validate(Validator validator, Object object) throws com.google.api.pathtemplate.ValidationException
Deprecated.Instead use ValidationHandler#validate(Validator, Object, String) with a custom validation keyValidates the given object. Skips if the object is aBeanwhich was already validated- Throws:
com.google.api.pathtemplate.ValidationException
-
validate
void validate(Validator validator, Object object, String validationKey) throws com.google.api.pathtemplate.ValidationException
Validates the given object. Skips if the object is aBeanwhich was already validated for the given validation key.- Throws:
com.google.api.pathtemplate.ValidationException
-
-