org.kuali.rice.kew.docsearch.service.impl
Class DocumentSearchServiceImpl
java.lang.Object
org.kuali.rice.kew.docsearch.service.impl.DocumentSearchServiceImpl
- All Implemented Interfaces:
- DocumentSearchService
public class DocumentSearchServiceImpl
- extends Object
- implements DocumentSearchService
Method Summary |
private String |
buildSearchableAttributeString(List<SearchAttributeCriteriaComponent> searchableAttributes)
Build String of searchable attributes that can be saved with search criteria |
private boolean |
checkDateRanges(String fromDate,
String toDate)
|
void |
clearNamedSearches(String principalId)
|
private DocSearchCriteriaDTO |
getCriteriaFromSavedSearch(UserOptions savedSearch)
|
static DataDictionaryService |
getDataDictionaryService()
|
static DictionaryValidationService |
getDictionaryValidationService()
|
static ConfigurationService |
getKualiConfigurationService()
|
DocumentSearchResultComponents |
getList(String principalId,
DocSearchCriteriaDTO criteria)
This method performs a standard document search |
private DocumentSearchResultComponents |
getList(String principalId,
DocSearchCriteriaDTO criteria,
boolean useCriteriaRestrictions)
|
DocumentSearchResultComponents |
getListRestrictedByCriteria(String principalId,
DocSearchCriteriaDTO criteria)
This method performs a standard document search but uses the value returned by
DocSearchCriteriaDTO.getThreshold() as the maximum search results returned |
List<KeyValue> |
getMostRecentSearches(String principalId)
|
List<KeyValue> |
getNamedSearches(String principalId)
|
private String |
getOptionCriteriaField(UserOptions userOption,
String fieldName)
|
SavedSearchResult |
getSavedSearchResults(String principalId,
String savedSearchName)
|
SqlBuilder |
getSqlBuilder()
|
DocumentSearchGenerator |
getStandardDocumentSearchGenerator()
|
DocumentSearchResultProcessor |
getStandardDocumentSearchResultProcessor()
|
private static DocumentType |
getValidDocumentType(String docTypeName)
retrieve a document type. |
private DocumentType |
getValidDocumentTypeOld(String documentTypeFullName)
|
void |
performPreSearchConditions(DocumentSearchGenerator docSearchGenerator,
String principalId,
DocSearchCriteriaDTO criteria)
|
private void |
saveSearch(String principalId,
DocSearchCriteriaDTO criteria)
|
void |
setDocumentSearchDAO(DocumentSearchDAO docSearchDao)
|
void |
setSqlBuilder(SqlBuilder sqlBuilder)
|
void |
setUserOptionsService(UserOptionsService userOptionsService)
|
private List<String> |
tokenizeCriteria(String input)
|
private boolean |
validateDate(String dateFieldName,
String dateFieldValue,
String dateFieldErrorKey)
|
void |
validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator,
DocSearchCriteriaDTO criteria)
|
private boolean |
validateNetworkId(List<String> networkIds)
|
private boolean |
validateNetworkId(String networkId)
|
private boolean |
validateNumber(List<String> integers)
|
private boolean |
validateNumber(String integer)
|
private boolean |
validatePersonByPrincipalName(String principalName)
|
protected List<WorkflowServiceError> |
validateWorkflowDocumentSearchCriteria(DocSearchCriteriaDTO criteria)
|
private boolean |
validateWorkgroup(String id,
String workgroupName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final org.apache.log4j.Logger LOG
MAX_SEARCH_ITEMS
private static final int MAX_SEARCH_ITEMS
- See Also:
- Constant Field Values
LAST_SEARCH_ORDER_OPTION
private static final String LAST_SEARCH_ORDER_OPTION
- See Also:
- Constant Field Values
NAMED_SEARCH_ORDER_BASE
private static final String NAMED_SEARCH_ORDER_BASE
- See Also:
- Constant Field Values
LAST_SEARCH_BASE_NAME
private static final String LAST_SEARCH_BASE_NAME
- See Also:
- Constant Field Values
DOC_SEARCH_CRITERIA_DTO_CLASS
private static final String DOC_SEARCH_CRITERIA_DTO_CLASS
- See Also:
- Constant Field Values
dictionaryValidationService
private static DictionaryValidationService dictionaryValidationService
dataDictionaryService
private static DataDictionaryService dataDictionaryService
kualiConfigurationService
private static ConfigurationService kualiConfigurationService
docSearchDao
private DocumentSearchDAO docSearchDao
userOptionsService
private UserOptionsService userOptionsService
sqlBuilder
private SqlBuilder sqlBuilder
DocumentSearchServiceImpl
public DocumentSearchServiceImpl()
setDocumentSearchDAO
public void setDocumentSearchDAO(DocumentSearchDAO docSearchDao)
setUserOptionsService
public void setUserOptionsService(UserOptionsService userOptionsService)
clearNamedSearches
public void clearNamedSearches(String principalId)
- Specified by:
clearNamedSearches
in interface DocumentSearchService
getSavedSearchResults
public SavedSearchResult getSavedSearchResults(String principalId,
String savedSearchName)
- Specified by:
getSavedSearchResults
in interface DocumentSearchService
getList
public DocumentSearchResultComponents getList(String principalId,
DocSearchCriteriaDTO criteria)
- Description copied from interface:
DocumentSearchService
- This method performs a standard document search
- Specified by:
getList
in interface DocumentSearchService
- Parameters:
principalId
- - user executing the searchcriteria
- - criteria to use to search documents
- Returns:
- a
DocumentSearchResultComponents
object holding the search result columns and search result rows
represented by a list of DocumentSearchResult
objects
getListRestrictedByCriteria
public DocumentSearchResultComponents getListRestrictedByCriteria(String principalId,
DocSearchCriteriaDTO criteria)
- Description copied from interface:
DocumentSearchService
- This method performs a standard document search but uses the value returned by
DocSearchCriteriaDTO.getThreshold()
as the maximum search results returned
- Specified by:
getListRestrictedByCriteria
in interface DocumentSearchService
- Parameters:
principalId
- - user executing the searchcriteria
- - criteria to use to search documents
- Returns:
- a
DocumentSearchResultComponents
object holding the search result columns and search result rows
represented by a list of DocumentSearchResult
objects
getList
private DocumentSearchResultComponents getList(String principalId,
DocSearchCriteriaDTO criteria,
boolean useCriteriaRestrictions)
getStandardDocumentSearchGenerator
public DocumentSearchGenerator getStandardDocumentSearchGenerator()
- Specified by:
getStandardDocumentSearchGenerator
in interface DocumentSearchService
getStandardDocumentSearchResultProcessor
public DocumentSearchResultProcessor getStandardDocumentSearchResultProcessor()
- Specified by:
getStandardDocumentSearchResultProcessor
in interface DocumentSearchService
performPreSearchConditions
public void performPreSearchConditions(DocumentSearchGenerator docSearchGenerator,
String principalId,
DocSearchCriteriaDTO criteria)
validateDocumentSearchCriteria
public void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator,
DocSearchCriteriaDTO criteria)
- Specified by:
validateDocumentSearchCriteria
in interface DocumentSearchService
validateWorkflowDocumentSearchCriteria
protected List<WorkflowServiceError> validateWorkflowDocumentSearchCriteria(DocSearchCriteriaDTO criteria)
validateNetworkId
private boolean validateNetworkId(List<String> networkIds)
validateNetworkId
private boolean validateNetworkId(String networkId)
validatePersonByPrincipalName
private boolean validatePersonByPrincipalName(String principalName)
validateDate
private boolean validateDate(String dateFieldName,
String dateFieldValue,
String dateFieldErrorKey)
checkDateRanges
private boolean checkDateRanges(String fromDate,
String toDate)
validateNumber
private boolean validateNumber(List<String> integers)
validateNumber
private boolean validateNumber(String integer)
validateWorkgroup
private boolean validateWorkgroup(String id,
String workgroupName)
getNamedSearches
public List<KeyValue> getNamedSearches(String principalId)
- Specified by:
getNamedSearches
in interface DocumentSearchService
getMostRecentSearches
public List<KeyValue> getMostRecentSearches(String principalId)
- Specified by:
getMostRecentSearches
in interface DocumentSearchService
saveSearch
private void saveSearch(String principalId,
DocSearchCriteriaDTO criteria)
buildSearchableAttributeString
private String buildSearchableAttributeString(List<SearchAttributeCriteriaComponent> searchableAttributes)
- Build String of searchable attributes that can be saved with search criteria
- Parameters:
searchableAttributes
- searchable attributes to save
- Returns:
- String representation of searchable attributes
getValidDocumentType
private static DocumentType getValidDocumentType(String docTypeName)
- retrieve a document type. This is not a case sensitive search so "TravelRequest" == "Travelrequest"
- Parameters:
docTypeName
-
- Returns:
getValidDocumentTypeOld
private DocumentType getValidDocumentTypeOld(String documentTypeFullName)
getCriteriaFromSavedSearch
private DocSearchCriteriaDTO getCriteriaFromSavedSearch(UserOptions savedSearch)
getOptionCriteriaField
private String getOptionCriteriaField(UserOptions userOption,
String fieldName)
getDictionaryValidationService
public static DictionaryValidationService getDictionaryValidationService()
getDataDictionaryService
public static DataDictionaryService getDataDictionaryService()
getKualiConfigurationService
public static ConfigurationService getKualiConfigurationService()
tokenizeCriteria
private List<String> tokenizeCriteria(String input)
getSqlBuilder
public SqlBuilder getSqlBuilder()
- Returns:
- the sqlBuilder
setSqlBuilder
public void setSqlBuilder(SqlBuilder sqlBuilder)
- Parameters:
sqlBuilder
- the sqlBuilder to set
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.