Class CombiningValidator<T>
java.lang.Object
com.sap.cloud.security.token.validation.CombiningValidator<T>
- Type Parameters:
T
- the type to be validated.
- All Implemented Interfaces:
Validator<T>
This is a special validator that combines several validators into one. By
default the validation stops after one invalid result has been found.
-
Constructor Summary
ConstructorsConstructorDescriptionCombiningValidator
(Validator<T>... validators) CombiningValidator
(List<Validator<T>> validators) -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerValidationListener
(ValidationListener validationListener) Components that are interested in the result of the token validation can register a validation listener which is called whenever a token is validated.void
removeValidationListener
(ValidationListener validationListener) Use this method to remove a registered listener so that it is not called anymore.toString()
Validates the given object.
-
Constructor Details
-
CombiningValidator
-
CombiningValidator
-
-
Method Details
-
validate
Description copied from interface:Validator
Validates the given object.- Specified by:
validate
in interfaceValidator<T>
- Parameters:
t
- the object of typeValidator
to be validated.- Returns:
- the validation result as
ValidationResult
.
-
getValidators
-
toString
-
registerValidationListener
Components that are interested in the result of the token validation can register a validation listener which is called whenever a token is validated. Listener must implement theValidationListener
interface.- Parameters:
validationListener
- the listener to be added.
-
removeValidationListener
Use this method to remove a registered listener so that it is not called anymore.- Parameters:
validationListener
- the listener to be removed.
-