This data structure contains some information about the result of an operation.
It's defined following the LDAP RFC 4511 definition :
In other words, it holds :
- a resultCode (a ResultCodeEnum)
- a matchedDN (Dn)
- an diagnosticMessage (String)
- an optional referral (list of LdapUrls) if the result code is referral
This data structure is usually created using the information returned by the server. Usually, one just access those information to know if the operation has been successful or not.
API
The API is pretty obvious : we have setters and getters.
Getters
We have five of them :
- getDiagnosticMessage() : Returns the diagnostic message. This message may vary from one server to another, it's purely informative
- getMatchedDn() : Get the Dn of the last entry that matches this Dn
- getReferral() : If the resultCode is Referral, a list of LdapUrls
- getResultCode() : The operation result
- isReferral() : tells if the response is a Referral
Setters
Again, we have a setter per field :
- setDiagnosticMessage( String message ) : Sets the diagnostic message
- setMatchedDn(Dn) : Sets the Dn of the last entry that matches this Dn;
- setReferral(Referral) : If the resultCode is Referral, sets a list of LdapUrls;
- setResultCode(ResultCodeEnum) : The operation result
ResultCodeEnum
We use an enum to list all the error codes. Here is the possible values :