public class LdapResultDecorator extends Object implements LdapResult, Decorator<LdapResult>
| Constructor and Description |
|---|
LdapResultDecorator(LdapApiService codec,
LdapResult decoratedLdapResult)
Makes a LdapResult encodable.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the LdapResult length
LdapResult :
0x0A 01 resultCode (0..80)
0x04 L1 matchedDN (L1 = Length(matchedDN))
0x04 L2 errorMessage (L2 = Length(errorMessage))
[0x83 L3] referrals
|
+--> 0x04 L4 referral
+--> 0x04 L5 referral
+--> ...
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the LdapResult message to a PDU.
|
LdapApiService |
getCodecService()
Gets the codec service responsible for managing the encoding and
decoding of the decorated objects.
|
LdapResult |
getDecorated()
Gets the object being decorated by this IDecorator.
|
String |
getDiagnosticMessage()
Gets the descriptive diagnostic message associated with the error code.
|
Dn |
getMatchedDn()
Gets the lowest entry in the directory that was matched.
|
Referral |
getReferral()
Gets the Referral associated with this LdapResult if the resultCode
property is set to the REFERRAL ResultCodeEnum.
|
ResultCodeEnum |
getResultCode()
Gets the result code enumeration associated with the response.
|
boolean |
isDefaultSuccess()
Tells if the LdapResult is a success, with no added information.
|
boolean |
isReferral()
Gets whether or not this result represents a Referral.
|
void |
setDiagnosticMessage(String diagnosticMessage)
Sets the descriptive diagnostic message associated with the error code.
|
void |
setMatchedDn(Dn dn)
Sets the lowest entry in the directory that was matched.
|
void |
setReferral(Referral referral)
Sets the Referral associated with this LdapResult if the resultCode
property is set to the REFERRAL ResultCodeEnum.
|
void |
setResultCode(ResultCodeEnum resultCode)
Sets the result code enumeration associated with the response.
|
String |
toString() |
public LdapResultDecorator(LdapApiService codec, LdapResult decoratedLdapResult)
decoratedLdapResult - the decorated LdapResultpublic ResultCodeEnum getResultCode()
getResultCode in interface LdapResultpublic void setResultCode(ResultCodeEnum resultCode)
setResultCode in interface LdapResultresultCode - the result code enum value.public Dn getMatchedDn()
getMatchedDn in interface LdapResultpublic void setMatchedDn(Dn dn)
setMatchedDn in interface LdapResultdn - the Dn of the lowest matched entry.LdapResult.getMatchedDn()public String getDiagnosticMessage()
getDiagnosticMessage in interface LdapResultpublic void setDiagnosticMessage(String diagnosticMessage)
setDiagnosticMessage in interface LdapResultdiagnosticMessage - the descriptive diagnostic message.public boolean isReferral()
isReferral in interface LdapResultpublic Referral getReferral()
getReferral in interface LdapResultpublic void setReferral(Referral referral)
setReferral in interface LdapResultreferral - optional referral on REFERRAL errors.public int computeLength()
computeLength in interface Decorator<LdapResult>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode in interface Decorator<LdapResult>buffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedpublic LdapResult getDecorated()
getDecorated in interface Decorator<LdapResult>public LdapApiService getCodecService()
getCodecService in interface Decorator<LdapResult>public boolean isDefaultSuccess()
isDefaultSuccess in interface LdapResultCopyright © 2021. All rights reserved.