|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.ControlDecorator<PasswordPolicy>
org.apache.directory.shared.ldap.extras.controls.ppolicy_impl.PasswordPolicyDecorator
public class PasswordPolicyDecorator
PasswordPolicyResponseControl.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.controls.ControlDecorator |
|---|
value |
| Fields inherited from interface org.apache.directory.shared.ldap.extras.controls.PasswordPolicy |
|---|
OID |
| Constructor Summary | |
|---|---|
PasswordPolicyDecorator(LdapCodecService codec)
|
|
PasswordPolicyDecorator(LdapCodecService codec,
boolean hasResponse)
|
|
PasswordPolicyDecorator(LdapCodecService codec,
PasswordPolicy policy)
|
|
| Method Summary | |
|---|---|
int |
computeLength()
Compute the object length, which is the sum of all inner length. |
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control. |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the object to a PDU. |
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. |
void |
setValue(byte[] value)
Set the encoded control value |
String |
toString()
Return a String representing a Control |
| Methods inherited from class org.apache.directory.shared.ldap.codec.controls.ControlDecorator |
|---|
equals, getCodecService, getDecorated, getOid, getValue, hashCode, hasValue, isCritical, setCritical, setDecorated |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Control |
|---|
getOid, isCritical, setCritical |
| Constructor Detail |
|---|
public PasswordPolicyDecorator(LdapCodecService codec)
public PasswordPolicyDecorator(LdapCodecService codec,
boolean hasResponse)
public PasswordPolicyDecorator(LdapCodecService codec,
PasswordPolicy policy)
| Method Detail |
|---|
public void setValue(byte[] value)
setValue in interface CodecControl<PasswordPolicy>setValue in class ControlDecorator<PasswordPolicy>value - The encoded control value to storepublic int computeLength()
ControlDecorator
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<PasswordPolicy>computeLength in class ControlDecorator<PasswordPolicy>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
Decorator
encode in interface Asn1Objectencode in interface Decorator<PasswordPolicy>encode in class AbstractAsn1Objectbuffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encodedpublic String toString()
ControlDecorator
toString in class ControlDecorator<PasswordPolicy>
public Asn1Object decode(byte[] controlBytes)
throws DecoderException
decode in interface CodecControl<PasswordPolicy>controlBytes - the encoded control bytes
DecoderException - if anything goes wrongpublic boolean hasResponse()
hasResponse in interface PasswordPolicypublic void setResponse(PasswordPolicyResponse response)
setResponse in interface PasswordPolicyresponse - a valid response object, or null to make this a requestpublic PasswordPolicyResponse setResponse(boolean hasResponse)
setResponse in interface PasswordPolicyhasResponse - true to create default response, false to clear it
public PasswordPolicyResponse getResponse()
PasswordPolicy.hasResponse() returns true, this will return a non-null
policy response object.
getResponse in interface PasswordPolicyPasswordPolicy.hasResponse()
returns false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||