|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.codec.decorators.LdapResultDecorator
public class LdapResultDecorator
A decorator for the LdapResultResponse message
| Constructor Summary | |
|---|---|
LdapResultDecorator(LdapResult decoratedLdapResult)
Makes a LdapResult encodable. |
|
| Method Summary | |
|---|---|
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. |
byte[] |
getErrorMessageBytes()
|
Dn |
getMatchedDn()
Gets the lowest entry in the directory that was matched. |
byte[] |
getMatchedDnBytes()
|
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 |
setErrorMessageBytes(byte[] errorMessageBytes)
Set the encoded message's bytes |
void |
setMatchedDn(Dn dn)
Sets the lowest entry in the directory that was matched. |
void |
setMatchedDnBytes(byte[] matchedDnBytes)
Sets the encoded value for MatchedDn |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LdapResultDecorator(LdapResult decoratedLdapResult)
decoratedLdapResult - the decorated LdapResult| Method Detail |
|---|
public byte[] getErrorMessageBytes()
public void setErrorMessageBytes(byte[] errorMessageBytes)
errorMessageBytes - The encoded bytespublic void setMatchedDnBytes(byte[] matchedDnBytes)
matchedDnBytes - The encoded MatchedDNpublic byte[] getMatchedDnBytes()
public 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 String toString()
toString in class Objectpublic 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 PDU
EncoderException - 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 LdapResult
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||