Class DocumentSearchCustomizationMediatorImpl

java.lang.Object
org.kuali.rice.kew.docsearch.DocumentSearchCustomizationMediatorImpl
All Implemented Interfaces:
DocumentSearchCustomizationMediator

public class DocumentSearchCustomizationMediatorImpl extends Object implements DocumentSearchCustomizationMediator
Reference implementation of DocumentSearchCustomizationMediator.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.kuali.rice.kew.api.document.search.DocumentSearchCriteria
    customizeClearCriteria(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
    Optionally performs a custom clearing of the given document search criteria if the given document type implements a customized clear algorithm.
    org.kuali.rice.kew.api.document.search.DocumentSearchCriteria
    customizeCriteria(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
    Optionally performs customization of the given document search criteria in the cases where the document type implements criteria customization.
    org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues
    customizeResults(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria, org.kuali.rice.kew.api.document.search.DocumentSearchResults results)
    Optionally performs customization on the given set of document search results.
    org.kuali.rice.kew.framework.document.search.DocumentSearchResultSetConfiguration
    customizeResultSetConfiguration(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
    Optionally provides configuration information that allows for document search result set customization to occur.
    protected List<org.kuali.rice.kew.framework.document.search.AttributeFields>
    flattenOrderedFieldMap(LinkedHashMap<String,org.kuali.rice.kew.framework.document.search.AttributeFields> orderedFieldMap)
     
    org.kuali.rice.kew.framework.document.search.DocumentSearchCriteriaConfiguration
    Retrieves the document search criteria configuration for the given document type.
    protected org.kuali.rice.kew.framework.document.search.DocumentSearchCustomizationHandlerService
     
    protected void
    mergeAttributeFields(List<org.kuali.rice.kew.framework.document.search.AttributeFields> attributeFieldsList, LinkedHashMap<String,org.kuali.rice.kew.framework.document.search.AttributeFields> orderedFieldMap)
     
    List<org.kuali.rice.core.api.uif.RemotableAttributeError>
    validateLookupFieldParameters(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
    Performs optional validation of document search criteria prior to execution of the search.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DocumentSearchCustomizationMediatorImpl

      public DocumentSearchCustomizationMediatorImpl()
  • Method Details

    • getDocumentSearchCriteriaConfiguration

      public org.kuali.rice.kew.framework.document.search.DocumentSearchCriteriaConfiguration getDocumentSearchCriteriaConfiguration(DocumentType documentType)
      Description copied from interface: DocumentSearchCustomizationMediator
      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.
      Specified by:
      getDocumentSearchCriteriaConfiguration in interface DocumentSearchCustomizationMediator
      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

      public List<org.kuali.rice.core.api.uif.RemotableAttributeError> validateLookupFieldParameters(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
      Description copied from interface: DocumentSearchCustomizationMediator
      Performs optional validation of document search criteria prior to execution of the search.
      Specified by:
      validateLookupFieldParameters in interface DocumentSearchCustomizationMediator
      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

      public org.kuali.rice.kew.api.document.search.DocumentSearchCriteria customizeCriteria(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
      Description copied from interface: DocumentSearchCustomizationMediator
      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.
      Specified by:
      customizeCriteria in interface DocumentSearchCustomizationMediator
      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

      public org.kuali.rice.kew.api.document.search.DocumentSearchCriteria customizeClearCriteria(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
      Description copied from interface: DocumentSearchCustomizationMediator
      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.
      Specified by:
      customizeClearCriteria in interface DocumentSearchCustomizationMediator
      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

      public org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues customizeResults(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria, org.kuali.rice.kew.api.document.search.DocumentSearchResults results)
      Description copied from interface: DocumentSearchCustomizationMediator
      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.
      Specified by:
      customizeResults in interface DocumentSearchCustomizationMediator
      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

      public org.kuali.rice.kew.framework.document.search.DocumentSearchResultSetConfiguration customizeResultSetConfiguration(DocumentType documentType, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria documentSearchCriteria)
      Description copied from interface: DocumentSearchCustomizationMediator
      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.
      Specified by:
      customizeResultSetConfiguration in interface DocumentSearchCustomizationMediator
      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
    • loadCustomizationService

      protected org.kuali.rice.kew.framework.document.search.DocumentSearchCustomizationHandlerService loadCustomizationService(String applicationId)
    • mergeAttributeFields

      protected void mergeAttributeFields(List<org.kuali.rice.kew.framework.document.search.AttributeFields> attributeFieldsList, LinkedHashMap<String,org.kuali.rice.kew.framework.document.search.AttributeFields> orderedFieldMap)
    • flattenOrderedFieldMap

      protected List<org.kuali.rice.kew.framework.document.search.AttributeFields> flattenOrderedFieldMap(LinkedHashMap<String,org.kuali.rice.kew.framework.document.search.AttributeFields> orderedFieldMap)