Class DocumentSearchServiceImpl

java.lang.Object
org.kuali.rice.kew.docsearch.service.impl.DocumentSearchServiceImpl
All Implemented Interfaces:
DocumentSearchService

public class DocumentSearchServiceImpl extends Object implements DocumentSearchService
  • Constructor Details

    • DocumentSearchServiceImpl

      public DocumentSearchServiceImpl()
  • Method Details

    • setDocumentSearchDAO

      public void setDocumentSearchDAO(DocumentSearchDAO docSearchDao)
    • setUserOptionsService

      public void setUserOptionsService(UserOptionsService userOptionsService)
    • setDocumentSearchCustomizationMediator

      public void setDocumentSearchCustomizationMediator(DocumentSearchCustomizationMediator documentSearchCustomizationMediator)
    • getDocumentSearchCustomizationMediator

      protected DocumentSearchCustomizationMediator getDocumentSearchCustomizationMediator()
    • clearNamedSearches

      public void clearNamedSearches(String principalId)
      Description copied from interface: DocumentSearchService
      Clears all saved searches for the specified user (named and automatic)
      Specified by:
      clearNamedSearches in interface DocumentSearchService
      Parameters:
      principalId - user principal id
    • getNamedSearchCriteria

      public org.kuali.rice.kew.api.document.search.DocumentSearchCriteria getNamedSearchCriteria(String principalId, String searchName)
      Description copied from interface: DocumentSearchService
      Returns an explicitly named saved search criteria
      Specified by:
      getNamedSearchCriteria in interface DocumentSearchService
      Parameters:
      principalId - the user principal id
      searchName - the user-provided saved search name
      Returns:
      the DocumentSearchCriteria or null if not found
    • getSavedSearchCriteria

      public org.kuali.rice.kew.api.document.search.DocumentSearchCriteria getSavedSearchCriteria(String principalId, String searchName)
      Description copied from interface: DocumentSearchService
      Returns a saved search criteria, either explicitly named by the user, or saved automatically as a recent search
      Specified by:
      getSavedSearchCriteria in interface DocumentSearchService
      Parameters:
      principalId - the user principal id
      searchName - the user option key under which the criteria is saved
      Returns:
      the DocumentSearchCriteria or null if not found
    • getCriteriaFromSavedSearch

      protected org.kuali.rice.kew.api.document.search.DocumentSearchCriteria getCriteriaFromSavedSearch(UserOptions savedSearch)
    • lookupDocuments

      public org.kuali.rice.kew.api.document.search.DocumentSearchResults lookupDocuments(String principalId, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
      Description copied from interface: DocumentSearchService
      This method performs a standard document search for the given criteria.
      Specified by:
      lookupDocuments in interface DocumentSearchService
      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
    • lookupDocuments

      public org.kuali.rice.kew.api.document.search.DocumentSearchResults lookupDocuments(String principalId, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria, boolean saveSearch)
      Description copied from interface: DocumentSearchService
      This method performs a standard document search for the given criteria.
      Specified by:
      lookupDocuments in interface DocumentSearchService
      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
    • applyResultCustomization

      protected void applyResultCustomization(org.kuali.rice.kew.api.document.search.DocumentSearchResult.Builder result, org.kuali.rice.kew.framework.document.search.DocumentSearchResultValue value)
    • applyCriteriaCustomizations

      protected org.kuali.rice.kew.api.document.search.DocumentSearchCriteria applyCriteriaCustomizations(DocumentType documentType, org.kuali.rice.kew.api.document.search.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

      protected org.kuali.rice.kew.api.document.search.DocumentSearchCriteria applyCriteriaDefaults(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
    • createEmptyComparisonCriteria

      protected org.kuali.rice.kew.api.document.search.DocumentSearchCriteria.Builder createEmptyComparisonCriteria(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
    • determineSearchFields

      protected List<org.kuali.rice.core.api.uif.RemotableAttributeField> determineSearchFields(DocumentType documentType)
    • getStandardDocumentSearchGenerator

      public DocumentSearchGenerator getStandardDocumentSearchGenerator()
      Specified by:
      getStandardDocumentSearchGenerator in interface DocumentSearchService
    • validateDocumentSearchCriteria

      public void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria.Builder criteria)
      Specified by:
      validateDocumentSearchCriteria in interface DocumentSearchService
    • validateWorkflowDocumentSearchCriteria

      protected List<WorkflowServiceError> validateWorkflowDocumentSearchCriteria(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria.Builder criteria)
    • getDictionaryValidationService

      public static org.kuali.rice.kns.service.DictionaryValidationService getDictionaryValidationService()
    • getDataDictionaryService

      public static org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
    • getNamedSearches

      public List<org.kuali.rice.core.api.util.KeyValue> getNamedSearches(String principalId)
      Description copied from interface: DocumentSearchService
      Returns named saved searches for the specified user
      Specified by:
      getNamedSearches in interface DocumentSearchService
      Parameters:
      principalId - the user principal id
      Returns:
      list of search key/label
    • getMostRecentSearches

      public List<org.kuali.rice.core.api.util.KeyValue> getMostRecentSearches(String principalId)
      Description copied from interface: DocumentSearchService
      Returns automatically saved recent searches for the specified user
      Specified by:
      getMostRecentSearches in interface DocumentSearchService
      Parameters:
      principalId - the user principal id
      Returns:
      list of search key/label
    • clearCriteria

      public org.kuali.rice.kew.api.document.search.DocumentSearchCriteria clearCriteria(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
      Specified by:
      clearCriteria in interface DocumentSearchService
    • getSavedSearchAbbreviatedString

      protected String getSavedSearchAbbreviatedString(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
    • addAbbreviatedString

      protected void addAbbreviatedString(Map<String,String> abbreviatedStringMap, String label, String value)
    • addAbbreviatedMultiValuedString

      protected void addAbbreviatedMultiValuedString(Map<String,String> abbreviatedStringMap, String label, Collection<? extends Object> values)
    • addAbbreviatedRangeString

      protected void addAbbreviatedRangeString(Map<String,String> abbreviatedStringMap, String label, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
    • getKualiConfigurationService

      public org.kuali.rice.core.api.config.property.ConfigurationService getKualiConfigurationService()
    • getMaxResultCap

      public int getMaxResultCap(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria criteria)
      Description copied from interface: DocumentSearchService
      Returns the maximum number of results that should be returned from the document search.
      Specified by:
      getMaxResultCap in interface DocumentSearchService
      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: DocumentSearchService
      Returns the number of results that should be returned from an additional fetch against the document search. Default:
      invalid reference
      org.kuali.rice.kew.docsearch.dao.impl.DocumentSearchDAOJdbcImpl.DEFAULT_FETCH_MORE_ITERATION_LIMIT
      Override: KewApiConstants.DOC_SEARCH_FETCH_MORE_ITERATION_LIMIT
      Specified by:
      getFetchMoreIterationLimit in interface DocumentSearchService
      Returns:
      int