org.apache.directory.api.ldap.extras.controls.ppolicy
Interface PasswordPolicy

All Superinterfaces:
org.apache.directory.api.ldap.model.message.Control
All Known Implementing Classes:
PasswordPolicyImpl

public interface PasswordPolicy
extends org.apache.directory.api.ldap.model.message.Control

The password policy Control interface.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
static String OID
          the password policy request control
 
Method Summary
 PasswordPolicyResponse getResponse()
          Get's the response component of this control if this control carries a response.
 boolean hasResponse()
          Checks whether this Control is the password policy request or the response by carrying with it an IPasswordPolicyResponse object.
 PasswordPolicyResponse setResponse(boolean hasResponse)
          If true sets the response to a default newly initialized response object.
 void setResponse(PasswordPolicyResponse response)
          Sets the response.
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
 

Field Detail

OID

static final String OID
the password policy request control

See Also:
Constant Field Values
Method Detail

hasResponse

boolean hasResponse()
Checks whether this Control is the password policy request or the response by carrying with it an IPasswordPolicyResponse object. If it is a request, then no response component will be associated with the control: getResponse() will return null.

Returns:
true if this Control carries a response, false if it is a request

setResponse

void setResponse(PasswordPolicyResponse response)
Sets the response. If null hasResponse() will return null and this will be handled as a password policy request control rather than a response control.

Parameters:
response - a valid response object, or null to make this a request

setResponse

PasswordPolicyResponse setResponse(boolean hasResponse)
If true sets the response to a default newly initialized response object. If this was previously a request, it automatically becomes a response. If it was not a request with an already existing response object then that response is replace with a new one and the old is returned. If false then any response object set will be cleared to null. Effectively this will cause hasResponse() to return whatever you plug into it.

Parameters:
hasResponse - true to create default response, false to clear it
Returns:
the old response object, if one did not exist null is returned

getResponse

PasswordPolicyResponse getResponse()
Get's the response component of this control if this control carries a response. If hasResponse() returns true, this will return a non-null policy response object.

Returns:
a non-null policy response or null, if hasResponse() returns false


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.