Class ConnectionFactoryValidator
java.lang.Object
net.shibboleth.idp.attribute.resolver.dc.ldap.impl.ConnectionFactoryValidator
- All Implemented Interfaces:
Validator
Validator implementation that invokes
Connection.open() to determine if the ConnectionFactory is properly
configured.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionFactoryConnection factory to validate.private final org.slf4j.LoggerClass logger.private booleanWhether validate should throw, default value istrue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the connection factory.booleanReturns whetherValidator.validate()should throw or log errors.voidsetConnectionFactory(ConnectionFactory factory) Sets the connection factory.voidsetThrowValidateError(boolean what) Sets whetherValidator.validate()should throw or log errors.voidvalidate()Probe the data connector and conditionally fails if it is not valid and ready for use.
-
Field Details
-
log
private final org.slf4j.Logger logClass logger. -
connectionFactory
Connection factory to validate. -
throwOnValidateError
private boolean throwOnValidateErrorWhether validate should throw, default value istrue.
-
-
Constructor Details
-
ConnectionFactoryValidator
public ConnectionFactoryValidator()
-
-
Method Details
-
setConnectionFactory
Sets the connection factory.- Parameters:
factory- the connection factory
-
getConnectionFactory
Returns the connection factory.- Returns:
- connection factory
-
setThrowValidateError
public void setThrowValidateError(boolean what) Sets whetherValidator.validate()should throw or log errors.- Specified by:
setThrowValidateErrorin interfaceValidator- Parameters:
what- whetherValidator.validate()should throw or log errors
-
isThrowValidateError
public boolean isThrowValidateError()Returns whetherValidator.validate()should throw or log errors.- Specified by:
isThrowValidateErrorin interfaceValidator- Returns:
- whether
Validator.validate()should throw or log errors
-
validate
Probe the data connector and conditionally fails if it is not valid and ready for use.- Specified by:
validatein interfaceValidator- Throws:
ValidationException- thrown if validation fails andValidator.isThrowValidateError()is true
-