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
Modifier and TypeMethodDescriptionclearCriteria(DocumentType documentType, DocumentSearchCriteria criteria) voidclearNamedSearches(String principalId) Clears all saved searches for the specified user (named and automatic)intReturns the number of results that should be returned from an additional fetch against the document search.intgetMaxResultCap(DocumentSearchCriteria criteria) Returns the maximum number of results that should be returned from the document search.getMostRecentSearches(String principalId) Returns automatically saved recent searches for the specified usergetNamedSearchCriteria(String principalId, String savedSearchName) Returns an explicitly named saved search criteriagetNamedSearches(String principalId) Returns named saved searches for the specified usergetSavedSearchCriteria(String principalId, String key) Returns a saved search criteria, either explicitly named by the user, or saved automatically as a recent searchlookupDocuments(String principalId, DocumentSearchCriteria criteria) This method performs a standard document search for the given criteria.lookupDocuments(String principalId, DocumentSearchCriteria criteria, boolean saveSearch) This method performs a standard document search for the given criteria.voidvalidateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria)
-
Method Details
-
lookupDocuments
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 usercriteria- criteria to use to search documents- Returns:
- the results of the search, will never return null
-
lookupDocuments
DocumentSearchResults lookupDocuments(String principalId, DocumentSearchCriteria criteria, boolean saveSearch) 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 usercriteria- criteria to use to search documentsboolean- to indicate if search criteria should be saved to the users preferences- Returns:
- the results of the search, will never return null
-
getSavedSearchCriteria
Returns a saved search criteria, either explicitly named by the user, or saved automatically as a recent search- Parameters:
principalId- the user principal idkey- the user option key under which the criteria is saved- Returns:
- the DocumentSearchCriteria or null if not found
-
getNamedSearchCriteria
Returns an explicitly named saved search criteria- Parameters:
principalId- the user principal idsavedSearchName- the user-provided saved search name- Returns:
- the DocumentSearchCriteria or null if not found
-
clearNamedSearches
Clears all saved searches for the specified user (named and automatic)- Parameters:
principalId- user principal id
-
getNamedSearches
Returns named saved searches for the specified user- Parameters:
principalId- the user principal id- Returns:
- list of search key/label
-
getMostRecentSearches
Returns automatically saved recent searches for the specified user- Parameters:
principalId- the user principal id- Returns:
- list of search key/label
-
clearCriteria
-
getStandardDocumentSearchGenerator
DocumentSearchGenerator getStandardDocumentSearchGenerator() -
validateDocumentSearchCriteria
void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria) -
getMaxResultCap
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_LIMITOverride:KewApiConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT- Returns:
- int
-