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 ConnectionFactory
Connection factory to validate.private final org.slf4j.Logger
Class logger.private boolean
Whether validate should throw, default value istrue
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the connection factory.boolean
Returns whetherValidator.validate()
should throw or log errors.void
setConnectionFactory
(ConnectionFactory factory) Sets the connection factory.void
setThrowValidateError
(boolean what) Sets whetherValidator.validate()
should throw or log errors.void
validate()
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:
setThrowValidateError
in interfaceValidator
- Parameters:
what
- whetherValidator.validate()
should throw or log errors
-
isThrowValidateError
public boolean isThrowValidateError()Returns whetherValidator.validate()
should throw or log errors.- Specified by:
isThrowValidateError
in 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:
validate
in interfaceValidator
- Throws:
ValidationException
- thrown if validation fails andValidator.isThrowValidateError()
is true
-