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
public abstract class AbstractResult extends AbstractMessage implements Result
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 Classes Modifier and Type Class Description protected static class
AbstractResult.AbstractBuilder<B,T extends AbstractResult>
protected static class
AbstractResult.DiagnosticMessageHandler
Parse handler implementation for the LDAP diagnostic message.protected static class
AbstractResult.MatchedDNHandler
Parse handler implementation for the LDAP matched DN.protected static class
AbstractResult.ReferralHandler
Parse handler implementation for the LDAP referral.protected static class
AbstractResult.ResultCodeHandler
Parse handler implementation for the LDAP result code.-
Nested classes/interfaces inherited from class org.ldaptive.AbstractMessage
AbstractMessage.ControlParser, AbstractMessage.ControlsHandler, AbstractMessage.MessageIDHandler
-
-
Field Summary
Fields Modifier and Type Field Description private String
diagnosticMessage
Diagnostic message.private String
matchedDN
Matched DN.private List<String>
referralURLs
Referral URLS.private ResultCode
resultCode
Result code.-
Fields inherited from interface org.ldaptive.Result
ENCODE_CNTRL_CHARS
-
-
Constructor Summary
Constructors Constructor Description AbstractResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReferralURLs(String... urls)
Adds referral URLs to the result.protected <T extends Result>
voidcopyValues(T result)
Copies the property values from the supplied result to this result.boolean
equals(Object o)
String
getDiagnosticMessage()
Returns the diagnostic message.String
getMatchedDN()
Returns the matched DN.String[]
getReferralURLs()
Returns the referral URLs.ResultCode
getResultCode()
Returns the result code.void
setDiagnosticMessage(String message)
void
setMatchedDN(String dn)
void
setResultCode(ResultCode code)
String
toString()
-
Methods inherited from class org.ldaptive.AbstractMessage
addControls, copyValues, getControls, getMessageID, hashCode, setMessageID
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ldaptive.Message
getControl, getControls, getMessageID
-
Methods inherited from interface org.ldaptive.Result
getEncodedDiagnosticMessage, isSuccess
-
-
-
-
Field Detail
-
resultCode
private ResultCode resultCode
Result code.
-
matchedDN
private String matchedDN
Matched DN.
-
diagnosticMessage
private String diagnosticMessage
Diagnostic message.
-
-
Method Detail
-
getResultCode
public ResultCode getResultCode()
Description copied from interface:Result
Returns the result code.- Specified by:
getResultCode
in interfaceResult
- Returns:
- result code
-
setResultCode
public void setResultCode(ResultCode code)
-
getMatchedDN
public String getMatchedDN()
Description copied from interface:Result
Returns the matched DN.- Specified by:
getMatchedDN
in interfaceResult
- Returns:
- matched DN
-
setMatchedDN
public void setMatchedDN(String dn)
-
getDiagnosticMessage
public String getDiagnosticMessage()
Description copied from interface:Result
Returns the diagnostic message.- Specified by:
getDiagnosticMessage
in interfaceResult
- Returns:
- diagnostic message
-
setDiagnosticMessage
public void setDiagnosticMessage(String message)
-
getReferralURLs
public String[] getReferralURLs()
Description copied from interface:Result
Returns the referral URLs.- Specified by:
getReferralURLs
in interfaceResult
- Returns:
- referral URLs
-
addReferralURLs
public void addReferralURLs(String... urls)
Adds referral URLs to the result.- Parameters:
urls
- to add
-
copyValues
protected <T extends Result> void copyValues(T result)
Copies the property values from the supplied result to this result.- Type Parameters:
T
- type of result- Parameters:
result
- to copy from
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractMessage
-
toString
public String toString()
- Overrides:
toString
in classAbstractMessage
-
-