Package org.ldaptive
Class AbstractResult
java.lang.Object
org.ldaptive.AbstractMessage
org.ldaptive.AbstractResult
- Direct Known Subclasses:
AddResponse,AuthenticationHandlerResponse,AuthenticationResponse,BindResponse,CompareResponse,DeleteResponse,ExtendedResponse,ModifyDnResponse,ModifyResponse,SearchResponse
LDAP result message defined as:
LDAPResult ::= SEQUENCE {
resultCode ENUMERATED {
... },
matchedDN LDAPDN,
diagnosticMessage LDAPString,
referral [3] Referral OPTIONAL }
Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI
URI ::= LDAPString -- limited to characters permitted in
-- URIs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractResult.AbstractBuilder<B,T extends AbstractResult> protected static classParse handler implementation for the LDAP diagnostic message.protected static classParse handler implementation for the LDAP matched DN.protected static classParse handler implementation for the LDAP referral.protected static classParse handler implementation for the LDAP result code.Nested classes/interfaces inherited from class org.ldaptive.AbstractMessage
AbstractMessage.ControlParser, AbstractMessage.ControlsHandler, AbstractMessage.MessageIDHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDiagnostic message.private StringMatched DN.Referral URLS.private ResultCodeResult code. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddReferralURLs(String... urls) Adds referral URLs to the result.protected final <T extends Result>
voidcopyValues(T result) Copies the property values from the supplied result to this result.booleanfinal booleanequalsResult(Result result) Returns whether the base properties of this result are equal.final StringReturns the diagnostic message.final StringReturns the matched DN.final String[]Returns the referral URLs.final ResultCodeReturns the result code.protected final voidsetDiagnosticMessage(String message) Sets the diagnostic message.protected final voidsetMatchedDN(String dn) Sets the matched DN.protected final voidsetResultCode(ResultCode code) Sets the result code.toString()Methods inherited from class org.ldaptive.AbstractMessage
addControls, copyValues, equalsMessage, getControls, getMessageID, hashCode, setMessageIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.Message
getControl, getControls, getMessageIDMethods inherited from interface org.ldaptive.Result
getEncodedDiagnosticMessage, isSuccess
-
Field Details
-
referralURLs
Referral URLS. -
resultCode
Result code. -
matchedDN
Matched DN. -
diagnosticMessage
Diagnostic message.
-
-
Constructor Details
-
AbstractResult
public AbstractResult()
-
-
Method Details
-
getResultCode
Returns the result code.- Specified by:
getResultCodein interfaceResult- Returns:
- result code
-
setResultCode
Sets the result code.- Parameters:
code- result code
-
getMatchedDN
Returns the matched DN.- Specified by:
getMatchedDNin interfaceResult- Returns:
- matched DN
-
setMatchedDN
Sets the matched DN.- Parameters:
dn- matched DN
-
getDiagnosticMessage
Returns the diagnostic message.- Specified by:
getDiagnosticMessagein interfaceResult- Returns:
- diagnostic message
-
setDiagnosticMessage
Sets the diagnostic message.- Parameters:
message- diagnostic message
-
getReferralURLs
Returns the referral URLs.- Specified by:
getReferralURLsin interfaceResult- Returns:
- referral URLs
-
addReferralURLs
Adds referral URLs to the result.- Parameters:
urls- to add
-
copyValues
Copies the property values from the supplied result to this result.- Type Parameters:
T- type of result- Parameters:
result- to copy from
-
equalsResult
Returns whether the base properties of this result are equal. Those include message ID, controls, result code, matched DN, diagnostic message and referral URLs.- Parameters:
result- to compare- Returns:
- whether result properties are equal
-
equals
- Overrides:
equalsin classAbstractMessage
-
toString
- Overrides:
toStringin classAbstractMessage
-