org.kuali.rice.kew.docsearch
Class StandardDocumentSearchResultProcessor

java.lang.Object
  extended by org.kuali.rice.kew.docsearch.StandardDocumentSearchResultProcessor
All Implemented Interfaces:
DocumentSearchResultProcessor
Direct Known Subclasses:
DocumentSearchXMLResultProcessorImpl

public class StandardDocumentSearchResultProcessor
extends Object
implements DocumentSearchResultProcessor

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
 class StandardDocumentSearchResultProcessor.DisplayValues
           
 
Field Summary
private  Map<String,String> labelsByKey
           
private static org.apache.log4j.Logger LOG
           
private  boolean processFinalResults
           
private  DocSearchCriteriaDTO searchCriteria
           
private  String searchingUser
           
private  Map<String,Boolean> sortableByKey
           
 
Constructor Summary
StandardDocumentSearchResultProcessor()
           
 
Method Summary
 void addAllCustomColumns(List<Column> columns, DocSearchCriteriaDTO criteria, List<Column> customDisplayColumns)
           
 void addColumnUsingKey(List<Column> columns, String key)
           
 void addColumnUsingKey(List<Column> columns, String key, Boolean sortable)
           
 void addColumnUsingKey(List<Column> columns, String key, String label)
           
 void addColumnUsingKey(List<Column> columns, String key, String label, Boolean sortable)
           
 void addCustomColumn(List<Column> columns, Column customColumn)
           
 void addCustomStandardCriteriaColumns(List<Column> columns, DocSearchCriteriaDTO criteria, List<Column> customDisplayColumns)
           
 void addDocStatusColumn(List<Column> columns, List<DocSearchDTO> docSearchResultRows)
           
 void addRouteHeaderIdColumn(List<Column> columns)
           
 void addRouteLogColumn(List<Column> columns)
           
 void addSearchableAttributeColumnsBasedOnFields(List<Column> columns, DocSearchCriteriaDTO criteria, List<String> searchAttributeFieldNames)
           
 void addSearchableAttributeColumnsNoOverrides(List<Column> columns, DocSearchCriteriaDTO criteria)
           
 void addSearchableAttributeColumnUsingKey(List<Column> columns, Formatter formatter, String key, String label, Boolean sortableOverride, Boolean defaultSortable)
           
 void addSearchableAttributeColumnUsingKey(List<Column> columns, String key, String label, Boolean sortableOverride, Boolean defaultSortable)
           
 void addStandardSearchColumns(List<Column> columns, List<DocSearchDTO> docSearchResultRows)
           
 List<Column> constructColumnList(DocSearchCriteriaDTO criteria, List<DocSearchDTO> docSearchResultRows)
          Method to construct a list of columns in order of how they should appear in the search results
 Column constructColumnUsingKey(String key, String label, Boolean sortable)
           
 Map<String,String> constructLabelsByKey()
           
 Map<String,Boolean> constructSortableByKey()
           
 Map<String,Boolean> constructSortableColumnByKey()
           
 KeyValueSort generateSearchResult(DocSearchDTO docCriteriaDTO, Column column, Map<String,Object> sortValuesByColumnKey)
           
 DocumentSearchResult generateSearchResult(DocSearchDTO docCriteriaDTO, List<Column> columns)
           
 List<Column> getAndSetUpCustomDisplayColumns(DocSearchCriteriaDTO criteria)
           
 List<Column> getCustomDisplayColumns()
           
 String getDocHandlerUrlPrefix(String routeHeaderId, boolean superUserSearch, String documentTypeName)
           
 String getDocHandlerUrlSuffix(boolean superUserSearch)
           
 DocumentType getDocumentType(String documentTypeName)
           
 List<Field> getFields(DocSearchCriteriaDTO criteria)
           
 List<Field> getFields(DocSearchCriteriaDTO criteria, List<String> searchAttributeFieldNames)
           
 StandardDocumentSearchResultProcessor.DisplayValues getInitiatorFieldDisplayValue(String fieldLinkTextValue, String initiatorWorkflowId)
           
 Map<String,String> getLabelsByKey()
           
 boolean getOverrideSearchableAttributes()
           
 StandardDocumentSearchResultProcessor.DisplayValues getRouteHeaderIdFieldDisplayValue(String routeHeaderId, boolean isSuperUserSearch, String documentTypeName)
           
 StandardDocumentSearchResultProcessor.DisplayValues getRouteLogFieldDisplayValue(String routeHeaderId)
           
 SearchAttributeCriteriaComponent getSearchableAttributeByFieldName(String name)
          Convenience method to find a specific searchable attribute
 DocSearchCriteriaDTO getSearchCriteria()
           
 String getSearchingUser()
           
 boolean getShowAllStandardFields()
           
 Map<String,Boolean> getSortableByKey()
           
 Map<String,Boolean> getSortableColumnByKey()
           
 Map<String,Object> getSortValuesMap(DocSearchDTO docCriteriaDTO)
           
 StandardDocumentSearchResultProcessor.DisplayValues getValueEncodedWithDocHandlerUrl(String value, String routeHeaderId, boolean isSuperUserSearch, String documentTypeName)
          Convenience method to allow child classes to use a custom value string and wrap that string in the document handler URL
 boolean isDocumentHandlerPopup()
           
 boolean isProcessFinalResults()
          This overridden method ...
 boolean isRouteLogPopup()
           
 DocumentSearchResultComponents processIntoFinalResults(List<DocSearchDTO> docSearchResultRows, DocSearchCriteriaDTO criteria, String principalId)
           
 void setProcessFinalResults(boolean isProcessFinalResults)
          This overridden method ...
 void setSearchCriteria(DocSearchCriteriaDTO searchCriteria)
           
 void setSearchingUser(String searchingUser)
           
 List<Column> setUpCustomDisplayColumns(DocSearchCriteriaDTO criteria, List<Column> columns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

sortableByKey

private Map<String,Boolean> sortableByKey

labelsByKey

private Map<String,String> labelsByKey

searchCriteria

private DocSearchCriteriaDTO searchCriteria

searchingUser

private String searchingUser

processFinalResults

private boolean processFinalResults
Constructor Detail

StandardDocumentSearchResultProcessor

public StandardDocumentSearchResultProcessor()
Method Detail

getSearchCriteria

public DocSearchCriteriaDTO getSearchCriteria()
Returns:
the searchCriteria

setSearchCriteria

public void setSearchCriteria(DocSearchCriteriaDTO searchCriteria)
Parameters:
searchCriteria - the searchCriteria to set

getSearchingUser

public String getSearchingUser()
Returns:
the searchingUser

setSearchingUser

public void setSearchingUser(String searchingUser)
Parameters:
searchingUser - the searchingUser to set

getCustomDisplayColumns

public List<Column> getCustomDisplayColumns()

setUpCustomDisplayColumns

public List<Column> setUpCustomDisplayColumns(DocSearchCriteriaDTO criteria,
                                              List<Column> columns)

getAndSetUpCustomDisplayColumns

public List<Column> getAndSetUpCustomDisplayColumns(DocSearchCriteriaDTO criteria)

getShowAllStandardFields

public boolean getShowAllStandardFields()

getOverrideSearchableAttributes

public boolean getOverrideSearchableAttributes()

getSearchableAttributeByFieldName

public SearchAttributeCriteriaComponent getSearchableAttributeByFieldName(String name)
Convenience method to find a specific searchable attribute

Parameters:
name - - name of search attribute savable property name
Returns:
the SearchAttributeCriteriaComponent object related to the given key name or null if component is not found

processIntoFinalResults

public DocumentSearchResultComponents processIntoFinalResults(List<DocSearchDTO> docSearchResultRows,
                                                              DocSearchCriteriaDTO criteria,
                                                              String principalId)
Specified by:
processIntoFinalResults in interface DocumentSearchResultProcessor

constructColumnList

public List<Column> constructColumnList(DocSearchCriteriaDTO criteria,
                                        List<DocSearchDTO> docSearchResultRows)
Method to construct a list of columns in order of how they should appear in the search results

Returns:
a list of columns in an ordered list that will be used to generate the final search results

addStandardSearchColumns

public void addStandardSearchColumns(List<Column> columns,
                                     List<DocSearchDTO> docSearchResultRows)

addRouteHeaderIdColumn

public void addRouteHeaderIdColumn(List<Column> columns)

addRouteLogColumn

public void addRouteLogColumn(List<Column> columns)

addDocStatusColumn

public void addDocStatusColumn(List<Column> columns,
                               List<DocSearchDTO> docSearchResultRows)

addSearchableAttributeColumnsNoOverrides

public void addSearchableAttributeColumnsNoOverrides(List<Column> columns,
                                                     DocSearchCriteriaDTO criteria)

addSearchableAttributeColumnsBasedOnFields

public void addSearchableAttributeColumnsBasedOnFields(List<Column> columns,
                                                       DocSearchCriteriaDTO criteria,
                                                       List<String> searchAttributeFieldNames)

addAllCustomColumns

public void addAllCustomColumns(List<Column> columns,
                                DocSearchCriteriaDTO criteria,
                                List<Column> customDisplayColumns)

addCustomStandardCriteriaColumns

public void addCustomStandardCriteriaColumns(List<Column> columns,
                                             DocSearchCriteriaDTO criteria,
                                             List<Column> customDisplayColumns)

addCustomColumn

public void addCustomColumn(List<Column> columns,
                            Column customColumn)

getFields

public List<Field> getFields(DocSearchCriteriaDTO criteria)

getDocumentType

public DocumentType getDocumentType(String documentTypeName)

getFields

public List<Field> getFields(DocSearchCriteriaDTO criteria,
                             List<String> searchAttributeFieldNames)

generateSearchResult

public DocumentSearchResult generateSearchResult(DocSearchDTO docCriteriaDTO,
                                                 List<Column> columns)

generateSearchResult

public KeyValueSort generateSearchResult(DocSearchDTO docCriteriaDTO,
                                         Column column,
                                         Map<String,Object> sortValuesByColumnKey)

getRouteLogFieldDisplayValue

public StandardDocumentSearchResultProcessor.DisplayValues getRouteLogFieldDisplayValue(String routeHeaderId)

getRouteHeaderIdFieldDisplayValue

public StandardDocumentSearchResultProcessor.DisplayValues getRouteHeaderIdFieldDisplayValue(String routeHeaderId,
                                                                                             boolean isSuperUserSearch,
                                                                                             String documentTypeName)

getInitiatorFieldDisplayValue

public StandardDocumentSearchResultProcessor.DisplayValues getInitiatorFieldDisplayValue(String fieldLinkTextValue,
                                                                                         String initiatorWorkflowId)

getValueEncodedWithDocHandlerUrl

public StandardDocumentSearchResultProcessor.DisplayValues getValueEncodedWithDocHandlerUrl(String value,
                                                                                            String routeHeaderId,
                                                                                            boolean isSuperUserSearch,
                                                                                            String documentTypeName)
Convenience method to allow child classes to use a custom value string and wrap that string in the document handler URL

Parameters:
value - - the value that will show on screen as the clickable link
routeHeaderId - - the string value of the route header id the doc handler should point to
isSuperUserSearch - - boolean indicating whether this search is a super user search or not see DocSearchDTO.isUsingSuperUserSearch()
Returns:
the fully encoded html for a link using the text from the input parameter 'value'

getSortValuesMap

public Map<String,Object> getSortValuesMap(DocSearchDTO docCriteriaDTO)

getSortableByKey

public Map<String,Boolean> getSortableByKey()

constructSortableColumnByKey

public Map<String,Boolean> constructSortableColumnByKey()

getSortableColumnByKey

public Map<String,Boolean> getSortableColumnByKey()

constructSortableByKey

public Map<String,Boolean> constructSortableByKey()

getLabelsByKey

public Map<String,String> getLabelsByKey()

constructLabelsByKey

public Map<String,String> constructLabelsByKey()

addColumnUsingKey

public void addColumnUsingKey(List<Column> columns,
                              String key)

addColumnUsingKey

public void addColumnUsingKey(List<Column> columns,
                              String key,
                              String label)

addColumnUsingKey

public void addColumnUsingKey(List<Column> columns,
                              String key,
                              Boolean sortable)

addColumnUsingKey

public void addColumnUsingKey(List<Column> columns,
                              String key,
                              String label,
                              Boolean sortable)

addSearchableAttributeColumnUsingKey

public void addSearchableAttributeColumnUsingKey(List<Column> columns,
                                                 String key,
                                                 String label,
                                                 Boolean sortableOverride,
                                                 Boolean defaultSortable)

addSearchableAttributeColumnUsingKey

public void addSearchableAttributeColumnUsingKey(List<Column> columns,
                                                 Formatter formatter,
                                                 String key,
                                                 String label,
                                                 Boolean sortableOverride,
                                                 Boolean defaultSortable)

constructColumnUsingKey

public Column constructColumnUsingKey(String key,
                                      String label,
                                      Boolean sortable)

isDocumentHandlerPopup

public boolean isDocumentHandlerPopup()

isRouteLogPopup

public boolean isRouteLogPopup()

getDocHandlerUrlPrefix

public String getDocHandlerUrlPrefix(String routeHeaderId,
                                     boolean superUserSearch,
                                     String documentTypeName)

getDocHandlerUrlSuffix

public String getDocHandlerUrlSuffix(boolean superUserSearch)

setProcessFinalResults

public void setProcessFinalResults(boolean isProcessFinalResults)
This overridden method ...

Specified by:
setProcessFinalResults in interface DocumentSearchResultProcessor
See Also:
org.kuali.rice.kew.docsearch.DocumentSearchResultProcessor#setProcessResultSet(boolean)

isProcessFinalResults

public boolean isProcessFinalResults()
This overridden method ...

Specified by:
isProcessFinalResults in interface DocumentSearchResultProcessor
See Also:
org.kuali.rice.kew.docsearch.DocumentSearchResultProcessor#isProcessResultSet()


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.