public class LdapResultDsml extends Object implements DsmlDecorator<LdapResult>, LdapResult
Constructor and Description |
---|
LdapResultDsml(LdapApiService codec,
LdapResult result,
Message message)
Creates a new instance of LdapResultDsml.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferral(LdapUrl referral)
Add a referral
|
LdapResult |
getDecorated()
Gets the Message this DsmlDecorator decorates.
|
String |
getDiagnosticMessage()
Gets the descriptive diagnostic message associated with the error code.
|
Dn |
getMatchedDn()
Get the matched Dn
|
Referral |
getReferral()
Gets the Referral associated with this LdapResult if the resultCode
property is set to the REFERRAL ResultCodeEnum.
|
List<String> |
getReferrals()
Get the referrals
|
ResultCodeEnum |
getResultCode()
Get the result code
|
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 matchedDn)
Set the Matched Dn
|
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)
Set the result code
|
org.dom4j.Element |
toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format
|
public LdapResultDsml(LdapApiService codec, LdapResult result, Message message)
codec
- The LDAP Service to useresult
- the LdapResult to decoratemessage
- the associated messagepublic org.dom4j.Element toDsml(org.dom4j.Element root)
toDsml
in interface DsmlDecorator<LdapResult>
root
- the root dom4j Elementpublic String getDiagnosticMessage()
getDiagnosticMessage
in interface LdapResult
public void setDiagnosticMessage(String diagnosticMessage)
setDiagnosticMessage
in interface LdapResult
diagnosticMessage
- the descriptive diagnostic message.public Dn getMatchedDn()
getMatchedDn
in interface LdapResult
public void setMatchedDn(Dn matchedDn)
setMatchedDn
in interface LdapResult
matchedDn
- The matchedDn to set.LdapResult.getMatchedDn()
public List<String> getReferrals()
public void addReferral(LdapUrl referral)
referral
- The referral to add.public ResultCodeEnum getResultCode()
getResultCode
in interface LdapResult
public void setResultCode(ResultCodeEnum resultCode)
setResultCode
in interface LdapResult
resultCode
- The resultCode to set.public LdapResult getDecorated()
getDecorated
in interface DsmlDecorator<LdapResult>
public boolean isReferral()
isReferral
in interface LdapResult
public Referral getReferral()
getReferral
in interface LdapResult
public void setReferral(Referral referral)
setReferral
in interface LdapResult
referral
- optional referral on REFERRAL errors.public boolean isDefaultSuccess()
isDefaultSuccess
in interface LdapResult
Copyright © 2003–2023 The Apache Software Foundation. All rights reserved.