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

java.lang.Object
  extended by org.apache.directory.api.ldap.model.message.AbstractMessage
      extended by org.apache.directory.api.ldap.model.message.AbstractResponse
          extended by org.apache.directory.api.dsmlv2.reponse.SearchResponse
All Implemented Interfaces:
Message, Response

public class SearchResponse
extends AbstractResponse

This class represents the DSML Search Response

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
controls
 
Constructor Summary
SearchResponse()
          Creates a new instance of SearchResponse.
SearchResponse(int messageId)
          Creates a new instance of SearchResponse.
 
Method Summary
 boolean addSearchResultEntry(SearchResultEntryDsml searchResultEntry)
          Adds a Search Result Entry
 boolean addSearchResultReference(SearchResultReferenceDsml searchResultReference)
          Adds a Search Result Reference
 SearchResultEntryDsml getCurrentSearchResultEntry()
          Gets the Current Search Result Entry
 SearchResultReferenceDsml getCurrentSearchResultReference()
          Gets the current Search Result Reference
 SearchResultDoneDsml getSearchResultDone()
          Gets the Search Result Entry
 List<SearchResultEntryDsml> getSearchResultEntryList()
          Gets the Search Result Entry List
 List<SearchResultReferenceDsml> getSearchResultReferenceList()
          Gets the Search Result Reference List
 MessageTypeEnum getType()
          Gets the LDAP message type code associated with this Message.
 boolean removeSearchResultEntry(SearchResultEntryDsml searchResultEntry)
          Removes a Search Result Entry
 boolean removeSearchResultReference(SearchResultReferenceDsml searchResultReference)
          Removes a Search Result Reference
 void setSearchResultDone(SearchResultDoneDsml searchResultDone)
          Sets the Search Result Entry
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
addAllControls, addControl, equals, get, getControl, getControls, getMessageId, hasControl, hashCode, put, removeControl, setMessageId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, hasControl, put, removeControl, setMessageId
 

Constructor Detail

SearchResponse

public SearchResponse()
Creates a new instance of SearchResponse.


SearchResponse

public SearchResponse(int messageId)
Creates a new instance of SearchResponse.

Parameters:
messageId - the response eliciting this Request
Method Detail

addSearchResultEntry

public boolean addSearchResultEntry(SearchResultEntryDsml searchResultEntry)
Adds a Search Result Entry

Parameters:
searchResultEntry - the Search Result Entry to add
Returns:
true (as per the general contract of the Collection.add method)

removeSearchResultEntry

public boolean removeSearchResultEntry(SearchResultEntryDsml searchResultEntry)
Removes a Search Result Entry

Parameters:
searchResultEntry - the Search Result Entry to remove
Returns:
true (as per the general contract of the Collection.remove method)

getCurrentSearchResultEntry

public SearchResultEntryDsml getCurrentSearchResultEntry()
Gets the Current Search Result Entry

Returns:
the current Searche Result Entry

getSearchResultEntryList

public List<SearchResultEntryDsml> getSearchResultEntryList()
Gets the Search Result Entry List

Returns:
the Search Result Entry List

addSearchResultReference

public boolean addSearchResultReference(SearchResultReferenceDsml searchResultReference)
Adds a Search Result Reference

Parameters:
searchResultReference - the Search Result Reference to add
Returns:
true (as per the general contract of the Collection.add method)

removeSearchResultReference

public boolean removeSearchResultReference(SearchResultReferenceDsml searchResultReference)
Removes a Search Result Reference

Parameters:
searchResultReference - the Search Result Reference to remove
Returns:
true (as per the general contract of the Collection.remove method)

getCurrentSearchResultReference

public SearchResultReferenceDsml getCurrentSearchResultReference()
Gets the current Search Result Reference

Returns:
the current Search Result Reference

getSearchResultReferenceList

public List<SearchResultReferenceDsml> getSearchResultReferenceList()
Gets the Search Result Reference List

Returns:
the Search Result Reference List

getSearchResultDone

public SearchResultDoneDsml getSearchResultDone()
Gets the Search Result Entry

Returns:
the Search Result Entry

setSearchResultDone

public void setSearchResultDone(SearchResultDoneDsml searchResultDone)
Sets the Search Result Entry

Parameters:
searchResultDone - the Search Result Entry to set

getType

public MessageTypeEnum getType()
Description copied from class: AbstractMessage
Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.

Specified by:
getType in interface Message
Overrides:
getType in class AbstractMessage
Returns:
the message type code.


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