public class PasswordPolicyDecorator extends ControlDecorator<PasswordPolicy> implements PasswordPolicy
value, valueLengthOID| Constructor and Description |
|---|
PasswordPolicyDecorator(LdapApiService codec) |
PasswordPolicyDecorator(LdapApiService codec,
boolean hasResponse) |
PasswordPolicyDecorator(LdapApiService codec,
PasswordPolicy policy) |
| Modifier and Type | Method and Description |
|---|---|
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
|
equals, getCodecService, getDecorated, getOid, getValue, hashCode, hasValue, isCritical, setCritical, setDecoratedclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOid, isCritical, setCriticalpublic PasswordPolicyDecorator(LdapApiService codec)
public PasswordPolicyDecorator(LdapApiService codec, boolean hasResponse)
public PasswordPolicyDecorator(LdapApiService codec, PasswordPolicy policy)
public void setValue(byte[] value)
setValue in interface CodecControl<PasswordPolicy>setValue in class ControlDecorator<PasswordPolicy>value - The encoded control value to storepublic int computeLength()
ControlDecoratorcomputeLength in interface Asn1ObjectcomputeLength in interface Decorator<PasswordPolicy>computeLength in class ControlDecorator<PasswordPolicy>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Decoratorencode in interface Asn1Objectencode in interface Decorator<PasswordPolicy>buffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedpublic String toString()
ControlDecoratortoString in class ControlDecorator<PasswordPolicy>public Asn1Object decode(byte[] controlBytes) throws DecoderException
decode in interface CodecControl<PasswordPolicy>controlBytes - the encoded control bytesDecoderException - 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 itpublic PasswordPolicyResponse getResponse()
PasswordPolicy.hasResponse() returns true, this will return a non-null
policy response object.getResponse in interface PasswordPolicyPasswordPolicy.hasResponse()
returns falseCopyright © 2021. All rights reserved.