Class DocumentSearchServiceImpl
java.lang.Object
org.kuali.rice.kew.docsearch.service.impl.DocumentSearchServiceImpl
- All Implemented Interfaces:
DocumentSearchService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAbbreviatedMultiValuedString(Map<String, String> abbreviatedStringMap, String label, Collection<? extends Object> values) protected voidaddAbbreviatedRangeString(Map<String, String> abbreviatedStringMap, String label, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo) protected voidprotected DocumentSearchCriteriaapplyCriteriaCustomizations(DocumentType documentType, DocumentSearchCriteria criteria) Applies any document type-specific customizations to the lookup criteria.protected DocumentSearchCriteriaapplyCriteriaDefaults(DocumentSearchCriteria criteria) protected voidapplyResultCustomization(DocumentSearchResult.Builder result, org.kuali.rice.kew.framework.document.search.DocumentSearchResultValue value) clearCriteria(DocumentType documentType, DocumentSearchCriteria criteria) voidclearNamedSearches(String principalId) Clears all saved searches for the specified user (named and automatic)protected DocumentSearchCriteria.Builderprotected List<RemotableAttributeField>determineSearchFields(DocumentType documentType) protected DocumentSearchCriteriagetCriteriaFromSavedSearch(UserOptions savedSearch) static DataDictionaryServicestatic DictionaryValidationServiceprotected DocumentSearchCustomizationMediatorintReturns 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 searchName) Returns an explicitly named saved search criteriagetNamedSearches(String principalId) Returns named saved searches for the specified userprotected StringgetSavedSearchCriteria(String principalId, String searchName) 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.voidsetDocumentSearchCustomizationMediator(DocumentSearchCustomizationMediator documentSearchCustomizationMediator) voidsetDocumentSearchDAO(DocumentSearchDAO docSearchDao) voidsetUserOptionsService(UserOptionsService userOptionsService) voidvalidateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria) protected List<WorkflowServiceError>
-
Constructor Details
-
DocumentSearchServiceImpl
public DocumentSearchServiceImpl()
-
-
Method Details
-
setDocumentSearchDAO
-
setUserOptionsService
-
setDocumentSearchCustomizationMediator
public void setDocumentSearchCustomizationMediator(DocumentSearchCustomizationMediator documentSearchCustomizationMediator) -
getDocumentSearchCustomizationMediator
-
clearNamedSearches
Description copied from interface:DocumentSearchServiceClears all saved searches for the specified user (named and automatic)- Specified by:
clearNamedSearchesin interfaceDocumentSearchService- Parameters:
principalId- user principal id
-
getNamedSearchCriteria
Description copied from interface:DocumentSearchServiceReturns an explicitly named saved search criteria- Specified by:
getNamedSearchCriteriain interfaceDocumentSearchService- Parameters:
principalId- the user principal idsearchName- the user-provided saved search name- Returns:
- the DocumentSearchCriteria or null if not found
-
getSavedSearchCriteria
Description copied from interface:DocumentSearchServiceReturns a saved search criteria, either explicitly named by the user, or saved automatically as a recent search- Specified by:
getSavedSearchCriteriain interfaceDocumentSearchService- Parameters:
principalId- the user principal idsearchName- the user option key under which the criteria is saved- Returns:
- the DocumentSearchCriteria or null if not found
-
getCriteriaFromSavedSearch
-
lookupDocuments
Description copied from interface:DocumentSearchServiceThis method performs a standard document search for the given criteria.- Specified by:
lookupDocumentsin interfaceDocumentSearchService- 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
public DocumentSearchResults lookupDocuments(String principalId, DocumentSearchCriteria criteria, boolean saveSearch) Description copied from interface:DocumentSearchServiceThis method performs a standard document search for the given criteria.- Specified by:
lookupDocumentsin interfaceDocumentSearchService- 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
-
applyResultCustomization
protected void applyResultCustomization(DocumentSearchResult.Builder result, org.kuali.rice.kew.framework.document.search.DocumentSearchResultValue value) -
applyCriteriaCustomizations
protected DocumentSearchCriteria applyCriteriaCustomizations(DocumentType documentType, DocumentSearchCriteria criteria) Applies any document type-specific customizations to the lookup criteria. If no customizations are configured for the document type, this method will simply return the criteria that is passed to it. If the given DocumentType is null, then this method will also simply return the criteria that is passed to it. -
applyCriteriaDefaults
-
createEmptyComparisonCriteria
protected DocumentSearchCriteria.Builder createEmptyComparisonCriteria(DocumentSearchCriteria criteria) -
determineSearchFields
-
getStandardDocumentSearchGenerator
- Specified by:
getStandardDocumentSearchGeneratorin interfaceDocumentSearchService
-
validateDocumentSearchCriteria
public void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria) - Specified by:
validateDocumentSearchCriteriain interfaceDocumentSearchService
-
validateWorkflowDocumentSearchCriteria
protected List<WorkflowServiceError> validateWorkflowDocumentSearchCriteria(DocumentSearchCriteria.Builder criteria) -
getDictionaryValidationService
-
getDataDictionaryService
-
getNamedSearches
Description copied from interface:DocumentSearchServiceReturns named saved searches for the specified user- Specified by:
getNamedSearchesin interfaceDocumentSearchService- Parameters:
principalId- the user principal id- Returns:
- list of search key/label
-
getMostRecentSearches
Description copied from interface:DocumentSearchServiceReturns automatically saved recent searches for the specified user- Specified by:
getMostRecentSearchesin interfaceDocumentSearchService- Parameters:
principalId- the user principal id- Returns:
- list of search key/label
-
clearCriteria
public DocumentSearchCriteria clearCriteria(DocumentType documentType, DocumentSearchCriteria criteria) - Specified by:
clearCriteriain interfaceDocumentSearchService
-
getSavedSearchAbbreviatedString
-
addAbbreviatedString
-
addAbbreviatedMultiValuedString
-
addAbbreviatedRangeString
-
getKualiConfigurationService
-
getMaxResultCap
Description copied from interface:DocumentSearchServiceReturns the maximum number of results that should be returned from the document search.- Specified by:
getMaxResultCapin interfaceDocumentSearchService- 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
public int getFetchMoreIterationLimit()Description copied from interface:DocumentSearchServiceReturns 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- Specified by:
getFetchMoreIterationLimitin interfaceDocumentSearchService- Returns:
- int
-