org.kuali.rice.kew.docsearch.service
Interface DocumentSearchService

All Known Implementing Classes:
DocumentSearchServiceImpl

public interface DocumentSearchService

Service for data access for document searches.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 DocumentSearchCriteria clearCriteria(DocumentType documentType, DocumentSearchCriteria criteria)
           
 void clearNamedSearches(String principalId)
          Clears all saved searches for the specified user (named and automatic)
 int getFetchMoreIterationLimit()
          Returns the number of results that should be returned from an additional fetch against the document search.
 int getMaxResultCap(DocumentSearchCriteria criteria)
          Returns the maximum number of results that should be returned from the document search.
 List<KeyValue> getMostRecentSearches(String principalId)
          Returns automatically saved recent searches for the specified user
 DocumentSearchCriteria getNamedSearchCriteria(String principalId, String savedSearchName)
          Returns an explicitly named saved search criteria
 List<KeyValue> getNamedSearches(String principalId)
          Returns named saved searches for the specified user
 DocumentSearchCriteria getSavedSearchCriteria(String principalId, String key)
          Returns a saved search criteria, either explicitly named by the user, or saved automatically as a recent search
 DocumentSearchGenerator getStandardDocumentSearchGenerator()
           
 DocumentSearchResults lookupDocuments(String principalId, DocumentSearchCriteria criteria)
          This method performs a standard document search for the given criteria.
 void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria)
           
 

Method Detail

lookupDocuments

DocumentSearchResults lookupDocuments(String principalId,
                                      DocumentSearchCriteria criteria)
This method performs a standard document search for the given criteria.

Parameters:
principalId - the id of the principal who is executing the search, this may be null to indicate the search could be executed by an arbitrary user
criteria - criteria to use to search documents
Returns:
the results of the search, will never return null

getSavedSearchCriteria

DocumentSearchCriteria getSavedSearchCriteria(String principalId,
                                              String key)
Returns a saved search criteria, either explicitly named by the user, or saved automatically as a recent search

Parameters:
principalId - the user principal id
key - the user option key under which the criteria is saved
Returns:
the DocumentSearchCriteria or null if not found

getNamedSearchCriteria

DocumentSearchCriteria getNamedSearchCriteria(String principalId,
                                              String savedSearchName)
Returns an explicitly named saved search criteria

Parameters:
principalId - the user principal id
savedSearchName - the user-provided saved search name
Returns:
the DocumentSearchCriteria or null if not found

clearNamedSearches

void clearNamedSearches(String principalId)
Clears all saved searches for the specified user (named and automatic)

Parameters:
principalId - user principal id

getNamedSearches

List<KeyValue> getNamedSearches(String principalId)
Returns named saved searches for the specified user

Parameters:
principalId - the user principal id
Returns:
list of search key/label

getMostRecentSearches

List<KeyValue> getMostRecentSearches(String principalId)
Returns automatically saved recent searches for the specified user

Parameters:
principalId - the user principal id
Returns:
list of search key/label

clearCriteria

DocumentSearchCriteria clearCriteria(DocumentType documentType,
                                     DocumentSearchCriteria criteria)

getStandardDocumentSearchGenerator

DocumentSearchGenerator getStandardDocumentSearchGenerator()

validateDocumentSearchCriteria

void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator,
                                    DocumentSearchCriteria.Builder criteria)

getMaxResultCap

int getMaxResultCap(DocumentSearchCriteria criteria)
Returns the maximum number of results that should be returned from the document search.

Parameters:
criteria - the criteria in which to check for a max results value
Returns:
the maximum number of results that should be returned from a document search

getFetchMoreIterationLimit

int getFetchMoreIterationLimit()
Returns the number of results that should be returned from an additional fetch against the document search. Default: org.kuali.rice.kew.docsearch.dao.impl.DocumentSearchDAOJdbcImpl.DEFAULT_FETCH_MORE_ITERATION_LIMIT Override: KewApiConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT

Returns:
int


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.