org.kuali.rice.kew.docsearch
Class DocumentSearchCustomizationHandlerServiceImpl

java.lang.Object
  extended by org.kuali.rice.kew.docsearch.DocumentSearchCustomizationHandlerServiceImpl
All Implemented Interfaces:
DocumentSearchCustomizationHandlerService

public class DocumentSearchCustomizationHandlerServiceImpl
extends Object
implements DocumentSearchCustomizationHandlerService

TODO...

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

Constructor Summary
DocumentSearchCustomizationHandlerServiceImpl()
           
 
Method Summary
 DocumentSearchCriteria customizeClearCriteria(DocumentSearchCriteria documentSearchCriteria, String customizerName)
          Executes custom criteria clearing against the given criteria using the DocumentSearchCustomizer with the given customizer name.
 DocumentSearchCriteria customizeCriteria(DocumentSearchCriteria documentSearchCriteria, String customizerName)
          Executes criteria customization against the given criteria using the DocumentSearchCustomizer with the given customizer name.
 DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria, List<DocumentSearchResult> defaultResults, String customizerName)
          Executes customization of document search results using the DocumentSearchCustomizer with the given customizer name.
 DocumentSearchResultSetConfiguration customizeResultSetConfiguration(DocumentSearchCriteria documentSearchCriteria, String customizerName)
          Executes customization of document search result set configuration using the DocumentSearchCustomizer with the given customizer name.
 DocumentSearchCriteriaConfiguration getDocumentSearchConfiguration(String documentTypeName, List<String> searchableAttributeNames)
          Retrieves the custom DocumentSearchCriteriaConfiguration to use for the document type with the given name and for the given list of searchable attributes.
 Set<DocumentSearchCustomization> getEnabledCustomizations(String documentTypeName, String customizerName)
          Returns the set of customizations that are enabled and should be executed for the DocumentSearchCustomizer with the given customizer name.
protected  ExtensionRepositoryService getExtensionRepositoryService()
           
 void setExtensionRepositoryService(ExtensionRepositoryService extensionRepositoryService)
           
 List<RemotableAttributeError> validateCriteria(DocumentSearchCriteria documentSearchCriteria, List<String> searchableAttributeNames)
          Executes validation of the given DocumentSearchCriteria against the searchable attributes with the given names..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSearchCustomizationHandlerServiceImpl

public DocumentSearchCustomizationHandlerServiceImpl()
Method Detail

getDocumentSearchConfiguration

public DocumentSearchCriteriaConfiguration getDocumentSearchConfiguration(String documentTypeName,
                                                                          List<String> searchableAttributeNames)
Description copied from interface: DocumentSearchCustomizationHandlerService
Retrieves the custom DocumentSearchCriteriaConfiguration to use for the document type with the given name and for the given list of searchable attributes. This method is invoked by the document search implementation in order to help assemble the final criteria attribute fields (which includes configuration for all searchable attributes on the document type).

The given list of searchable attribute names may not necessary include all searchable attribute on the document type, only those which need to be handled by the client application hosting this service. This determination is made based on the applicationId which is associated with the searchable attribute. Implementations of this method will assemble this information by invoking the SearchableAttribute.getSearchFields(org.kuali.rice.kew.api.extension.ExtensionDefinition, String) methods on each of the requested searchable attributes.

Specified by:
getDocumentSearchConfiguration in interface DocumentSearchCustomizationHandlerService
Parameters:
documentTypeName - the document type name for which to retrieve the configuration
searchableAttributeNames - the names of the searchable attributes from which to assemble criteria configuration which are owned by the application hosting this service
Returns:
the custom document search criteria configuration for the given searchable attribute, or null if no custom configuration is needed

validateCriteria

public List<RemotableAttributeError> validateCriteria(DocumentSearchCriteria documentSearchCriteria,
                                                      List<String> searchableAttributeNames)
Description copied from interface: DocumentSearchCustomizationHandlerService
Executes validation of the given DocumentSearchCriteria against the searchable attributes with the given names.. This method is invoked by the document search implementation in order to allow for validation to be customized via custom searchable attribute implementations.

The given list of searchable attribute names may not necessary include all searchable attribute on the document type, only those which need to be handled by the client application hosting this service. This determination is made based on the applicationId which is associated with the searchable attribute. Implementations of this method execute this validationby invoking the SearchableAttribute.validateDocumentAttributeCriteria(org.kuali.rice.kew.api.extension.ExtensionDefinition, org.kuali.rice.kew.api.document.search.DocumentSearchCriteria) methods on each of the requested searchable attributes.

Specified by:
validateCriteria in interface DocumentSearchCustomizationHandlerService
Parameters:
documentSearchCriteria - the criteria against which to perform the validation
searchableAttributeNames - the names of the searchable attributes against which to execute validation which are owned by the application hosting this service
Returns:
a list or remotable attribute errors in the case that any validation errors were raised by the requested searchable attributes

customizeCriteria

public DocumentSearchCriteria customizeCriteria(DocumentSearchCriteria documentSearchCriteria,
                                                String customizerName)
                                         throws RiceIllegalArgumentException
Description copied from interface: DocumentSearchCustomizationHandlerService
Executes criteria customization against the given criteria using the DocumentSearchCustomizer with the given customizer name. This name is the name of the ExtensionDefinition that defines the customizer where the customizer extension's applicationId is the same as the application hosting this service.

This method effectively invokes the DocumentSearchCustomizer.customizeCriteria(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria) on the requested customizer which is owned by this application.

Specified by:
customizeCriteria in interface DocumentSearchCustomizationHandlerService
Parameters:
documentSearchCriteria - the criteria to customize
customizerName - the name of the extension definition for the DocumentSearchCustomizer which should be used in order to execute the customization
Returns:
the customized criteria, or null if no customization was performed
Throws:
RiceIllegalArgumentException - if documentSearchCriteria is null

customizeClearCriteria

public DocumentSearchCriteria customizeClearCriteria(DocumentSearchCriteria documentSearchCriteria,
                                                     String customizerName)
                                              throws RiceIllegalArgumentException
Description copied from interface: DocumentSearchCustomizationHandlerService
Executes custom criteria clearing against the given criteria using the DocumentSearchCustomizer with the given customizer name. This name is the name of the ExtensionDefinition that defines the customizer where the customizer extension's applicationId is the same as the application hosting this service.

This method effectively invokes the DocumentSearchCustomizer.customizeClearCriteria(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria) on the requested customizer which is owned by this application.

Specified by:
customizeClearCriteria in interface DocumentSearchCustomizationHandlerService
Parameters:
documentSearchCriteria - the criteria on which to perform custom clearing
customizerName - the name of the extension definition for the DocumentSearchCustomizer which should be used in order to execute the customization
Returns:
the cleared criteria, or null if no custom clear was performed
Throws:
RiceIllegalArgumentException - if documentSearchCriteria is null

customizeResults

public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
                                                   List<DocumentSearchResult> defaultResults,
                                                   String customizerName)
                                            throws RiceIllegalArgumentException
Description copied from interface: DocumentSearchCustomizationHandlerService
Executes customization of document search results using the DocumentSearchCustomizer with the given customizer name. This name is the name of the ExtensionDefinition that defines the customizer where the customizer extension's applicationId is the same as the application hosting this service.

This method effectively invokes the DocumentSearchCustomizer.customizeResults(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria, java.util.List) on the requested customizer which is owned by this application.

Specified by:
customizeResults in interface DocumentSearchCustomizationHandlerService
Parameters:
documentSearchCriteria - the criteria that was used to perform the lookup
defaultResults - the results that were returned from the lookup
customizerName - the name of the extension definition for the DocumentSearchCustomizer which should be used in order to execute the customization
Returns:
the customized document search results values, or null if no customization was performed
Throws:
RiceIllegalArgumentException - if documentSearchCriteria is null

customizeResultSetConfiguration

public DocumentSearchResultSetConfiguration customizeResultSetConfiguration(DocumentSearchCriteria documentSearchCriteria,
                                                                            String customizerName)
                                                                     throws RiceIllegalArgumentException
Description copied from interface: DocumentSearchCustomizationHandlerService
Executes customization of document search result set configuration using the DocumentSearchCustomizer with the given customizer name. This name is the name of the ExtensionDefinition that defines the customizer where the customizer extension's applicationId is the same as the application hosting this service.

This method effectively invokes the DocumentSearchCustomizer.customizeResultSetConfiguration(org.kuali.rice.kew.api.document.search.DocumentSearchCriteria) on the requested customizer which is owned by this application.

Specified by:
customizeResultSetConfiguration in interface DocumentSearchCustomizationHandlerService
Parameters:
documentSearchCriteria - the criteria that was used to perform the lookup
customizerName - the name of the extension definition for the DocumentSearchCustomizer which should be used in order to execute the customization
Returns:
the customized document search result configuration, or null if no customization was performed
Throws:
RiceIllegalArgumentException - if documentSearchCriteria is null

getEnabledCustomizations

public Set<DocumentSearchCustomization> getEnabledCustomizations(String documentTypeName,
                                                                 String customizerName)
                                                          throws RiceIllegalArgumentException
Description copied from interface: DocumentSearchCustomizationHandlerService
Returns the set of customizations that are enabled and should be executed for the DocumentSearchCustomizer with the given customizer name. This name is the name of the ExtensionDefinition that defines the customizer where the customizer extension's applicationId is the same as the application hosting this service.

This method essentially invokes the various boolean methods on the DocumentSearchCustomizer which indicate which customizations the implementation provides. This primarily serves as a means of optimization to reduce the number of remote callbacks that the document search implementation needs to make to the various customizations provided by this service and the customizers it delegates too.

Specified by:
getEnabledCustomizations in interface DocumentSearchCustomizationHandlerService
Parameters:
documentTypeName - the name of the document type against which to check for enabled customizations on the specified customizer
customizerName - the name of the extension definition for the DocumentSearchCustomizer which should be used in order to check for enabled customizations
Returns:
the set of customizations that are enabled
Throws:
RiceIllegalArgumentException - if documentTypeName is a null or blank value

getExtensionRepositoryService

protected ExtensionRepositoryService getExtensionRepositoryService()

setExtensionRepositoryService

public void setExtensionRepositoryService(ExtensionRepositoryService extensionRepositoryService)


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