org.apache.directory.api.dsmlv2.reponse
Class SearchResponseDsml

java.lang.Object
  extended by org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
      extended by org.apache.directory.api.dsmlv2.reponse.AbstractResponseDsml<Response>
          extended by org.apache.directory.api.dsmlv2.reponse.SearchResponseDsml
All Implemented Interfaces:
DsmlDecorator<Response>, Message, Response

public class SearchResponseDsml
extends AbstractResponseDsml<Response>

This class represents the Search Response Dsml Container. It is used to store Search Responses (Search Result Entry, Search Result Reference and SearchResultDone).

Author:
Apache Directory Project

Constructor Summary
SearchResponseDsml(LdapApiService codec)
          Creates a new getDecoratedMessage() of SearchResponseDsml.
SearchResponseDsml(LdapApiService codec, Message response)
          Creates a new getDecoratedMessage() of SearchResponseDsml.
 
Method Summary
 boolean addResponse(DsmlDecorator<? extends Response> response)
          Adds a response.
 boolean removeResponse(DsmlDecorator<? extends Response> response)
          Removes a response.
 org.dom4j.Element toDsml(org.dom4j.Element root)
          Converts the request/reponse to its XML representation in the DSMLv2 format
 
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
addAllControls, addControl, get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, getType, hasControl, put, removeControl, setMessageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

Constructor Detail

SearchResponseDsml

public SearchResponseDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of SearchResponseDsml.


SearchResponseDsml

public SearchResponseDsml(LdapApiService codec,
                          Message response)
Creates a new getDecoratedMessage() of SearchResponseDsml.

Parameters:
response - the LDAP response message to decorate
Method Detail

addResponse

public boolean addResponse(DsmlDecorator<? extends Response> response)
Adds a response.

Parameters:
response - the response to add
Returns:
true (as per the general contract of the Collection.add method).

removeResponse

public boolean removeResponse(DsmlDecorator<? extends Response> response)
Removes a response.

Parameters:
response - the response to remove
Returns:
true if this list contained the specified element.

toDsml

public org.dom4j.Element toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format

Parameters:
root - the root dom4j Element
Returns:
the dom4j Element corresponding to the entry.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.