org.kuali.rice.kew.docsearch.service.impl
Class DocumentSearchServiceImpl

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

public class DocumentSearchServiceImpl
extends Object
implements DocumentSearchService


Constructor Summary
DocumentSearchServiceImpl()
           
 
Method Summary
protected  void addAbbreviatedMultiValuedString(Map<String,String> abbreviatedStringMap, String label, Collection<? extends Object> values)
           
protected  void addAbbreviatedRangeString(Map<String,String> abbreviatedStringMap, String label, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
           
protected  void addAbbreviatedString(Map<String,String> abbreviatedStringMap, String label, String value)
           
protected  DocumentSearchCriteria applyCriteriaCustomizations(DocumentType documentType, DocumentSearchCriteria criteria)
          Applies any document type-specific customizations to the lookup criteria.
protected  DocumentSearchCriteria applyCriteriaDefaults(DocumentSearchCriteria criteria)
           
protected  void applyResultCustomization(DocumentSearchResult.Builder result, DocumentSearchResultValue value)
           
 DocumentSearchCriteria clearCriteria(DocumentType documentType, DocumentSearchCriteria criteria)
           
 void clearNamedSearches(String principalId)
          Clears all saved searches for the specified user (named and automatic)
protected  DocumentSearchCriteria.Builder createEmptyComparisonCriteria(DocumentSearchCriteria criteria)
           
protected  List<RemotableAttributeField> determineSearchFields(DocumentType documentType)
           
protected  DocumentSearchCriteria getCriteriaFromSavedSearch(UserOptions savedSearch)
           
static DataDictionaryService getDataDictionaryService()
           
static DictionaryValidationService getDictionaryValidationService()
           
protected  DocumentSearchCustomizationMediator getDocumentSearchCustomizationMediator()
           
 ConfigurationService getKualiConfigurationService()
           
 List<KeyValue> getMostRecentSearches(String principalId)
          Returns automatically saved recent searches for the specified user
 DocumentSearchCriteria getNamedSearchCriteria(String principalId, String searchName)
          Returns an explicitly named saved search criteria
 List<KeyValue> getNamedSearches(String principalId)
          Returns named saved searches for the specified user
protected  String getSavedSearchAbbreviatedString(DocumentSearchCriteria criteria)
           
 DocumentSearchCriteria getSavedSearchCriteria(String principalId, String searchName)
          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 setDocumentSearchCustomizationMediator(DocumentSearchCustomizationMediator documentSearchCustomizationMediator)
           
 void setDocumentSearchDAO(DocumentSearchDAO docSearchDao)
           
 void setUserOptionsService(UserOptionsService userOptionsService)
           
 void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator, DocumentSearchCriteria.Builder criteria)
           
protected  List<WorkflowServiceError> validateWorkflowDocumentSearchCriteria(DocumentSearchCriteria.Builder criteria)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSearchServiceImpl

public DocumentSearchServiceImpl()
Method Detail

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 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 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 DocumentSearchCriteria getCriteriaFromSavedSearch(UserOptions savedSearch)

lookupDocuments

public DocumentSearchResults lookupDocuments(String principalId,
                                             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

applyResultCustomization

protected void applyResultCustomization(DocumentSearchResult.Builder result,
                                        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

protected DocumentSearchCriteria applyCriteriaDefaults(DocumentSearchCriteria criteria)

createEmptyComparisonCriteria

protected DocumentSearchCriteria.Builder createEmptyComparisonCriteria(DocumentSearchCriteria criteria)

determineSearchFields

protected List<RemotableAttributeField> determineSearchFields(DocumentType documentType)

getStandardDocumentSearchGenerator

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

validateDocumentSearchCriteria

public void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator,
                                           DocumentSearchCriteria.Builder criteria)
Specified by:
validateDocumentSearchCriteria in interface DocumentSearchService

validateWorkflowDocumentSearchCriteria

protected List<WorkflowServiceError> validateWorkflowDocumentSearchCriteria(DocumentSearchCriteria.Builder criteria)

getDictionaryValidationService

public static DictionaryValidationService getDictionaryValidationService()

getDataDictionaryService

public static DataDictionaryService getDataDictionaryService()

getNamedSearches

public List<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<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 DocumentSearchCriteria clearCriteria(DocumentType documentType,
                                            DocumentSearchCriteria criteria)
Specified by:
clearCriteria in interface DocumentSearchService

getSavedSearchAbbreviatedString

protected String getSavedSearchAbbreviatedString(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 ConfigurationService getKualiConfigurationService()


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