org.apache.directory.shared.dsmlv2.reponse
Class LdapResultDsml

java.lang.Object
  extended by org.apache.directory.shared.dsmlv2.reponse.LdapResultDsml
All Implemented Interfaces:
DsmlDecorator

public class LdapResultDsml
extends java.lang.Object
implements DsmlDecorator

DSML Decorator for the LdapResult class.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
LdapResultDsml(LdapResultCodec result, LdapMessageCodec message)
          Creates a new instance of LdapResultDsml.
 
Method Summary
 void addReferral(LdapURL referral)
          Add a referral
 java.lang.String getErrorMessage()
          Get the error message
 java.lang.String getMatchedDN()
          Get the matched DN
 java.util.List<LdapURL> getReferrals()
          Get the referrals
 ResultCodeEnum getResultCode()
          Get the result code
 void initReferrals()
          Initialize the referrals list
 void setErrorMessage(java.lang.String errorMessage)
          Set the error message
 void setMatchedDN(DN matchedDN)
          Set the Matched DN
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapResultDsml

public LdapResultDsml(LdapResultCodec result,
                      LdapMessageCodec message)
Creates a new instance of LdapResultDsml.

Parameters:
result - the LdapResult to decorate
message - the associated message
Method Detail

toDsml

public org.dom4j.Element toDsml(org.dom4j.Element root)
Description copied from interface: DsmlDecorator
Converts the request/reponse to its XML representation in the DSMLv2 format

Specified by:
toDsml in interface DsmlDecorator
Parameters:
root - the root dom4j Element
Returns:
the dom4j Element corresponding to the entry.

initReferrals

public void initReferrals()
Initialize the referrals list


getErrorMessage

public java.lang.String getErrorMessage()
Get the error message

Returns:
Returns the errorMessage.

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)
Set the error message

Parameters:
errorMessage - The errorMessage to set.

getMatchedDN

public java.lang.String getMatchedDN()
Get the matched DN

Returns:
Returns the matchedDN.

setMatchedDN

public void setMatchedDN(DN matchedDN)
Set the Matched DN

Parameters:
matchedDN - The matchedDN to set.

getReferrals

public java.util.List<LdapURL> getReferrals()
Get the referrals

Returns:
Returns the referrals.

addReferral

public void addReferral(LdapURL referral)
Add a referral

Parameters:
referral - The referral to add.

getResultCode

public ResultCodeEnum getResultCode()
Get the result code

Returns:
Returns the resultCode.

setResultCode

public void setResultCode(ResultCodeEnum resultCode)
Set the result code

Parameters:
resultCode - The resultCode to set.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.