Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.search
Class SearchBusinessDelegate

java.lang.Object
  extended by org.nuxeo.ecm.webapp.search.SearchBusinessDelegate
All Implemented Interfaces:
Serializable

@Name(value="searchDelegate")
@Scope(value=SESSION)
public class SearchBusinessDelegate
extends Object
implements Serializable

This business delegate is available on session instance as a Seam component and offers services to different action beans (like search action bean).

It delegates the calls to the server side and insure consistency over multiple independent calls.

Author:
DM
See Also:
Serialized Form

Constructor Summary
SearchBusinessDelegate()
           
 
Method Summary
 String getDocLocation(DocumentModel doc)
          Creates a logical path for the given DocumentModel.
 DocumentModelIterator pagedSearchForText(String keywords, Filter filter, int pageSize)
          Searches the repository by the given keywords.
 DocumentModelIterator pagedSearchWithNXQL(String nxql, Filter filter, int max)
          Performs an NXQL search with limit for the given query.
 DocumentModelList searchForText(String keywords)
          Searches the repository by the given keywords.
 DocumentModelList searchForText(String keywords, Filter filter)
          Searches the repository by the given keywords.
 List<DocumentModel> searchForText(String keywords, Filter filter, int maxResultsCount)
           
 DocumentModelList searchWithNXQL(String nxql)
           
 DocumentModelList searchWithNXQL(String nxql, Filter filter)
          Performs an NXQL search for the given query and filter.
 List<DocumentModel> searchWithNXQL(String nxql, Filter filter, int max)
          Performs an NXQL search with limit for the given query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchBusinessDelegate

public SearchBusinessDelegate()
Method Detail

searchWithNXQL

public DocumentModelList searchWithNXQL(String nxql)
                                 throws ClientException,
                                        SearchException
Throws:
ClientException
SearchException

searchWithNXQL

public DocumentModelList searchWithNXQL(String nxql,
                                        Filter filter)
                                 throws ClientException,
                                        SearchException
Performs an NXQL search for the given query and filter.

Throws:
ClientException - this can be thrown further to be intercepted
SearchException - this should be handled by the calling code

searchWithNXQL

public List<DocumentModel> searchWithNXQL(String nxql,
                                          Filter filter,
                                          int max)
                                   throws SearchException,
                                          ClientException
Performs an NXQL search with limit for the given query.

Throws:
ClientException - this can be thrown further to be intercepted
SearchException - this should be handled by the calling code

pagedSearchWithNXQL

public DocumentModelIterator pagedSearchWithNXQL(String nxql,
                                                 Filter filter,
                                                 int max)
                                          throws SearchException,
                                                 ClientException
Performs an NXQL search with limit for the given query.

Throws:
ClientException - this can be thrown further to be intercepted
SearchException - this should be handled by the calling code

searchForText

public DocumentModelList searchForText(String keywords)
                                throws ClientException,
                                       SearchException
Searches the repository by the given keywords.

The result consists of a list of DocumentModel that can be rendered to UI.

Throws:
ClientException
SearchException
See Also:
org.nuxeo.ecm.webapp.search.SearchActions#searchForText(String)

searchForText

public DocumentModelList searchForText(String keywords,
                                       Filter filter)
                                throws ClientException,
                                       SearchException
Searches the repository by the given keywords.

The result consists of a list of DocumentModel that can be rendered to UI.

Returns:
a list of DocumentModels (a DocumentModelList) matching the request.
Throws:
ClientException
SearchException
See Also:
org.nuxeo.ecm.webapp.search.SearchActions#searchForText(java.lang.String)

pagedSearchForText

public DocumentModelIterator pagedSearchForText(String keywords,
                                                Filter filter,
                                                int pageSize)
                                         throws ClientException,
                                                SearchException
Searches the repository by the given keywords.

Returns:
DocumentModelIterator lazy loading iterator over the result containing DocumentModel objects
Throws:
ClientException
SearchException
See Also:
org.nuxeo.ecm.webapp.search.SearchActions#searchForText(java.lang.String)

searchForText

public List<DocumentModel> searchForText(String keywords,
                                         Filter filter,
                                         int maxResultsCount)
                                  throws SearchException,
                                         ClientException
Throws:
SearchException
ClientException

getDocLocation

public String getDocLocation(DocumentModel doc)
Creates a logical path for the given DocumentModel.


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.