org.kuali.rice.kew.docsearch
Interface DocumentSearchCustomizationMediator

All Known Implementing Classes:
DocumentSearchCustomizationMediatorImpl

public interface DocumentSearchCustomizationMediator

Handles communication between DocumentSearchCustomizationHandlerService endpoints in order to invoke document search customizations which might be hosted from various applications.

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

Method Summary
 DocumentSearchCriteria customizeClearCriteria(DocumentType documentType, DocumentSearchCriteria documentSearchCriteria)
          Optionally performs a custom clearing of the given document search criteria if the given document type implements a customized clear algorithm.
 DocumentSearchCriteria customizeCriteria(DocumentType documentType, DocumentSearchCriteria documentSearchCriteria)
          Optionally performs customization of the given document search criteria in the cases where the document type implements criteria customization.
 DocumentSearchResultValues customizeResults(DocumentType documentType, DocumentSearchCriteria documentSearchCriteria, DocumentSearchResults results)
          Optionally performs customization on the given set of document search results.
 DocumentSearchResultSetConfiguration customizeResultSetConfiguration(DocumentType documentType, DocumentSearchCriteria documentSearchCriteria)
          Optionally provides configuration information that allows for document search result set customization to occur.
 DocumentSearchCriteriaConfiguration getDocumentSearchCriteriaConfiguration(DocumentType documentType)
          Retrieves the document search criteria configuration for the given document type.
 List<RemotableAttributeError> validateLookupFieldParameters(DocumentType documentType, DocumentSearchCriteria documentSearchCriteria)
          Performs optional validation of document search criteria prior to execution of the search.
 

Method Detail

getDocumentSearchCriteriaConfiguration

DocumentSearchCriteriaConfiguration getDocumentSearchCriteriaConfiguration(DocumentType documentType)
Retrieves the document search criteria configuration for the given document type. This should include attribute fields that should be included in the document search user interface when displaying criteria by which a user can search for documents. If this method returns null then no additional criteria should be presented on the search screen.

Parameters:
documentType - the document type for which to find document search criteria configuration, must not be null
Returns:
configuration information containing additional criteria (beyond the default set) which should be displayed to the user when performing a search against documents of the given type, if null is returned this indicates that the default document search criteria configuration should be used

validateLookupFieldParameters

List<RemotableAttributeError> validateLookupFieldParameters(DocumentType documentType,
                                                            DocumentSearchCriteria documentSearchCriteria)
Performs optional validation of document search criteria prior to execution of the search.

Parameters:
documentType - the document type against which the lookup is being performed
documentSearchCriteria - the criteria representing the submission of the document search
Returns:
a list of error messages generated by the validation, may an empty list in which case the calling code may safely ignore the response and assume that the given criteria validated successfully

customizeCriteria

DocumentSearchCriteria customizeCriteria(DocumentType documentType,
                                         DocumentSearchCriteria documentSearchCriteria)
Optionally performs customization of the given document search criteria in the cases where the document type implements criteria customization. If this method returns a non-null value, then the calling code should use the returned criteria in order to execute the search. If this method returns a null value, it means the criteria that was given did not require any customization. In this case, the calling code should proceed with search execution using the originally provided criteria.

Parameters:
documentType - the document type against which to perform the criteria customization, should never be null
documentSearchCriteria - the criteria to use as the starting point for customization
Returns:
a customized version of the given criteria, or null if the criteria was not customized

customizeClearCriteria

DocumentSearchCriteria customizeClearCriteria(DocumentType documentType,
                                              DocumentSearchCriteria documentSearchCriteria)
Optionally performs a custom clearing of the given document search criteria if the given document type implements a customized clear algorithm. If this method returns a non-null value, then the value returned should be instated by the calling code as the "cleared" version of the criteria. If null is returned, then the default implementation of criteria clearing should be used.

Parameters:
documentType - the document type against which to check for a custom implementation of criteria clearing
documentSearchCriteria - the current criteria of the document search prior to being cleared
Returns:
the result of clearing the criteria, if this returns null it means the given document type does not implement custom clearing and the default behavior should be used

customizeResults

DocumentSearchResultValues customizeResults(DocumentType documentType,
                                            DocumentSearchCriteria documentSearchCriteria,
                                            DocumentSearchResults results)
Optionally performs customization on the given set of document search results. This could include changing existing document values or synthesizing new ones. The results of this method include a list of DocumentSearchResultValue objects, each of which are mapped to a specific document id from the results and include additional key-value pairs for customized or synthesized values for that document. This method can return a null value if no customization was performed.

Parameters:
documentType - the document type to use when determining what customization logic (if any) should be invoked
documentSearchCriteria - the criteria of the document search which produced the supplied results
results - the results of the document search which are being considered for customization
Returns:
the customized result values, or null if not result customization was performed

customizeResultSetConfiguration

DocumentSearchResultSetConfiguration customizeResultSetConfiguration(DocumentType documentType,
                                                                     DocumentSearchCriteria documentSearchCriteria)
Optionally provides configuration information that allows for document search result set customization to occur. The resulting DocumentSearchResultSetConfiguration can be used by the calling code to determine how best to render the lookup results.

Parameters:
documentType - the document type for which to customize result set configuration
documentSearchCriteria - the criteria that was used to perform the lookup
Returns:
the customized document search result set configuration, or null if no result set customization was performed


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