public abstract class AbstractPasswordPolicyResponder extends Object implements PasswordPolicyResponder
PasswordPolicyResponder
.
Extend this class and override success(PasswordPolicy)
,
fail(ResultResponse, PasswordPolicy, ResultCodeEnum)
, or
exception(LdapException)
. If that does not offer enough
flexibility, you must implement PasswordPolicyResponder yourself.Modifier | Constructor and Description |
---|---|
protected |
AbstractPasswordPolicyResponder(LdapApiService ldapApiService) |
Modifier and Type | Method and Description |
---|---|
protected PasswordException |
exception(LdapException e)
Translates an
LdapException to a
PasswordException to be thrown when
process(PasswordPolicyOperation) fails. |
protected PasswordException |
fail(ResultResponse resultResponse,
PasswordPolicy passwordPolicy,
ResultCodeEnum resultCode)
Returns an exception to be thrown in the case of a non SUCCESS
resultCode . |
PasswordWarning |
process(PasswordPolicyOperation operation)
Execute the
operation and translate the outcome as follows:
SUCCESS: return null
WARNING: return PasswordWarning
FAILURE: throw PasswordException
|
protected PasswordWarning |
success(PasswordPolicy passwordPolicy)
Returns a
PasswordWarning , or null if no
warnings were present in the supplied passwordPolicy . |
protected AbstractPasswordPolicyResponder(LdapApiService ldapApiService)
protected PasswordException exception(LdapException e)
LdapException
to a
PasswordException
to be thrown when
process(PasswordPolicyOperation)
fails.e
- protected PasswordException fail(ResultResponse resultResponse, PasswordPolicy passwordPolicy, ResultCodeEnum resultCode)
resultCode
.resultResponse
- passwordPolicy
- resultCode
- public final PasswordWarning process(PasswordPolicyOperation operation) throws PasswordException
PasswordPolicyResponder
operation
and translate the outcome as follows:
PasswordWarning
PasswordException
process
in interface PasswordPolicyResponder
operation
- An operation whose outcome implies password policy
informationPasswordWarning
if warnings are present, or null
if completely successful.PasswordException
- If the operation
was a failure.protected PasswordWarning success(PasswordPolicy passwordPolicy)
PasswordWarning
, or null
if no
warnings were present in the supplied passwordPolicy
.passwordPolicy
- Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.