org.kuali.rice.kew.impl.document.search
Class DocumentSearchCriteriaTranslatorImpl

java.lang.Object
  extended by org.kuali.rice.kew.impl.document.search.DocumentSearchCriteriaTranslatorImpl
All Implemented Interfaces:
DocumentSearchCriteriaTranslator

public class DocumentSearchCriteriaTranslatorImpl
extends Object
implements DocumentSearchCriteriaTranslator

Reference implementation of DocumentSearchCriteriaTranslator.

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

Constructor Summary
DocumentSearchCriteriaTranslatorImpl()
           
 
Method Summary
protected  void applyDateRangeField(DocumentSearchCriteria.Builder criteria, String fieldName, String fieldValue)
           
protected  void applyDocumentAttribute(DocumentSearchCriteria.Builder criteria, String documentAttributeName, String attributeValue)
           
protected static void convertCriteriaPropertyToField(DocumentSearchCriteria criteria, String property, Map<String,String[]> values)
          Looks up a property on the criteria object and sets it as a key/value pair in the values Map
 Map<String,String[]> translateCriteriaToFields(DocumentSearchCriteria criteria)
          Converts the DocumentSearchCriteria to a Map of values that can be applied to the Lookup form fields.
 DocumentSearchCriteria translateFieldsToCriteria(Map<String,String> fieldValues)
          Translates the given map of fields values into a DocumentSearchCriteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSearchCriteriaTranslatorImpl

public DocumentSearchCriteriaTranslatorImpl()
Method Detail

translateFieldsToCriteria

public DocumentSearchCriteria translateFieldsToCriteria(Map<String,String> fieldValues)
Description copied from interface: DocumentSearchCriteriaTranslator
Translates the given map of fields values into a DocumentSearchCriteria. The given map of field values is keyed based on the name of the field being submitted and the value represents that field value, which may contain wildcards and other logical operators supported by the KNS lookup framework.

Specified by:
translateFieldsToCriteria in interface DocumentSearchCriteriaTranslator
Parameters:
fieldValues - the map of field names and values from which to populate the criteria
Returns:
populated document search criteria which contains the various criteria components populated based on the interpretation of the given field values

translateCriteriaToFields

public Map<String,String[]> translateCriteriaToFields(DocumentSearchCriteria criteria)
Converts the DocumentSearchCriteria to a Map of values that can be applied to the Lookup form fields.

Specified by:
translateCriteriaToFields in interface DocumentSearchCriteriaTranslator
Parameters:
criteria - the criteria to translate
Returns:
a Map of values that can be applied to the Lookup form fields.

convertCriteriaPropertyToField

protected static void convertCriteriaPropertyToField(DocumentSearchCriteria criteria,
                                                     String property,
                                                     Map<String,String[]> values)
Looks up a property on the criteria object and sets it as a key/value pair in the values Map

Parameters:
criteria - the DocumentSearchCriteria
property - the DocumentSearchCriteria property name
values - the map of values to update

applyDateRangeField

protected void applyDateRangeField(DocumentSearchCriteria.Builder criteria,
                                   String fieldName,
                                   String fieldValue)
                            throws Exception
Throws:
Exception

applyDocumentAttribute

protected void applyDocumentAttribute(DocumentSearchCriteria.Builder criteria,
                                      String documentAttributeName,
                                      String attributeValue)


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