org.kuali.rice.kew.docsearch
Class DocumentSearchCriteriaProcessorKEWAdapter

java.lang.Object
  extended by org.kuali.rice.kew.docsearch.DocumentSearchCriteriaProcessorKEWAdapter
All Implemented Interfaces:
DocumentSearchCriteriaProcessor

public class DocumentSearchCriteriaProcessorKEWAdapter
extends Object
implements DocumentSearchCriteriaProcessor

This class adapts the RemotableAttributeField instances from the various attributes associated with a document type and combines with the "default" rows for the search, returning the final List of Row objects to render for the document search.

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

Field Summary
static String ADVANCED_SEARCH_FIELD
          Name if the hidden input field containing basic/detailed search toggle state
static String CLEARSAVED_SEARCH_FIELD
          Name if the hidden input field containing the clear saved search flag
static String SUPERUSER_SEARCH_FIELD
          Name if the hidden input field containing non-superuser/superuser search toggle state
 
Constructor Summary
DocumentSearchCriteriaProcessorKEWAdapter()
           
 
Method Summary
protected  void addHiddenFields(List<Row> rows, boolean advancedSearch, boolean superUserSearch)
           
protected  List<Row> getDocumentAttributeRows(DocumentType documentType)
           
 List<Row> getRows(DocumentType documentType, List<Row> defaultRows, boolean advancedSearch, boolean superUserSearch)
          Constructs the list of rows and fields to display in the lookup criteria section of the document search screen.
protected  List<Row> loadRowsForAdvancedSearch(List<Row> defaultRows, DocumentType documentType)
           
protected  List<Row> loadRowsForBasicSearch(List<Row> defaultRows, DocumentType documentType)
           
protected  void loadRowsWithFields(List<Row> rowsToLoad, List<Row> defaultRows, String[] fieldNames, DocumentType documentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADVANCED_SEARCH_FIELD

public static final String ADVANCED_SEARCH_FIELD
Name if the hidden input field containing basic/detailed search toggle state

See Also:
Constant Field Values

SUPERUSER_SEARCH_FIELD

public static final String SUPERUSER_SEARCH_FIELD
Name if the hidden input field containing non-superuser/superuser search toggle state

See Also:
Constant Field Values

CLEARSAVED_SEARCH_FIELD

public static final String CLEARSAVED_SEARCH_FIELD
Name if the hidden input field containing the clear saved search flag

See Also:
Constant Field Values
Constructor Detail

DocumentSearchCriteriaProcessorKEWAdapter

public DocumentSearchCriteriaProcessorKEWAdapter()
Method Detail

getRows

public List<Row> getRows(DocumentType documentType,
                         List<Row> defaultRows,
                         boolean advancedSearch,
                         boolean superUserSearch)
Description copied from interface: DocumentSearchCriteriaProcessor
Constructs the list of rows and fields to display in the lookup criteria section of the document search screen. The documentType parameter passed to this method will generally be supplied in cases where the document type name was supplied to the lookup via a query parameter or when refreshing the criteria after making a change to it (like the user doing a document type lookup to fill in the value and then returning it back to the document search).

This method should look at the given document type (if there is one) to determine if there are any custom rows to render for that document type. It should also look at the request for detailed and super user search and adjust the rows accordingly for either of those conditions.

Specified by:
getRows in interface DocumentSearchCriteriaProcessor
Parameters:
documentType - supplies the document type in use on this search if one is specified, will be null otherwise
defaultRows - the default set of rows that are supplied from the data dictionary for the document search
advancedSearch - indicates whether or not a detailed search has been requested
superUserSearch - indicates whether or not a super user search has been requested
Returns:
the rows to render is the criteria section of the document search.

loadRowsForAdvancedSearch

protected List<Row> loadRowsForAdvancedSearch(List<Row> defaultRows,
                                              DocumentType documentType)

loadRowsForBasicSearch

protected List<Row> loadRowsForBasicSearch(List<Row> defaultRows,
                                           DocumentType documentType)

loadRowsWithFields

protected void loadRowsWithFields(List<Row> rowsToLoad,
                                  List<Row> defaultRows,
                                  String[] fieldNames,
                                  DocumentType documentType)

getDocumentAttributeRows

protected List<Row> getDocumentAttributeRows(DocumentType documentType)

addHiddenFields

protected void addHiddenFields(List<Row> rows,
                               boolean advancedSearch,
                               boolean superUserSearch)


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