public class DocumentSearchCriteriaTranslatorImpl extends Object implements DocumentSearchCriteriaTranslator
DocumentSearchCriteriaTranslator
.Constructor and Description |
---|
DocumentSearchCriteriaTranslatorImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDateRangeField(DocumentSearchCriteria.Builder criteria,
String fieldName,
String fieldValue) |
protected void |
applyDocumentAttribute(DocumentSearchCriteria.Builder criteria,
String documentAttributeName,
String attributeValue) |
protected static void |
convertAttributeRangeField(String attrKey,
List<String> attrValues,
Map<String,String[]> values)
Convert a ranged document search attribute field into a form field.
|
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
|
protected static void |
convertCriteriaPropertyToField(DocumentSearchCriteria criteria,
String property,
String fieldName,
Map<String,String[]> values)
Looks up a property on the criteria object and sets it as a key/value pair in the values Map
|
protected static void |
convertCriteriaRangeField(DocumentSearchCriteria criteria,
String property,
Map<String,String[]> values)
Convenience method for converting a set of doc search criteria range fields into form fields
|
protected Map<String,AttributeLookupSettings> |
getAttributeLookupSettings(DocumentSearchCriteriaContract criteria)
Returns a map of attributelookupsettings for the custom search attributes of the document if specified in the criteria
|
Map<String,String[]> |
translateCriteriaToFields(DocumentSearchCriteria criteria)
Converts the DocumentSearchCriteria to a Map of values that can be applied to the Lookup form fields.
|
protected void |
translateDocumentAttributeFieldsToCriteria(Map<String,String> fieldValues,
List<String> fields,
DocumentSearchCriteria.Builder criteria) |
DocumentSearchCriteria |
translateFieldsToCriteria(Map<String,String> fieldValues)
Translates the given map of fields values into a
DocumentSearchCriteria . |
protected String |
translateRangePropertyToExpression(Map<String,String> fieldValues,
String property,
String prefix,
AttributeLookupSettings settings) |
public DocumentSearchCriteriaTranslatorImpl()
public DocumentSearchCriteria translateFieldsToCriteria(Map<String,String> fieldValues)
DocumentSearchCriteriaTranslator
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.translateFieldsToCriteria
in interface DocumentSearchCriteriaTranslator
fieldValues
- the map of field names and values from which to populate the criteriapublic Map<String,String[]> translateCriteriaToFields(DocumentSearchCriteria criteria)
translateCriteriaToFields
in interface DocumentSearchCriteriaTranslator
criteria
- the criteria to translateprotected static void convertAttributeRangeField(String attrKey, List<String> attrValues, Map<String,String[]> values)
attrKey
- the attribute keyattrValues
- the attribute valueprotected static void convertCriteriaRangeField(DocumentSearchCriteria criteria, String property, Map<String,String[]> values)
criteria
- the dscproperty
- the abstract property namevalues
- the form field valuesprotected static void convertCriteriaPropertyToField(DocumentSearchCriteria criteria, String property, Map<String,String[]> values)
criteria
- the DocumentSearchCriteriaproperty
- the DocumentSearchCriteria property name and destination field namevalues
- the map of values to updateprotected static void convertCriteriaPropertyToField(DocumentSearchCriteria criteria, String property, String fieldName, Map<String,String[]> values)
criteria
- the DocumentSearchCriteriaproperty
- the DocumentSearchCriteria property namefieldName
- the destination field namevalues
- the map of values to updateprotected void applyDateRangeField(DocumentSearchCriteria.Builder criteria, String fieldName, String fieldValue) throws Exception
Exception
protected Map<String,AttributeLookupSettings> getAttributeLookupSettings(DocumentSearchCriteriaContract criteria)
criteria
- the doc search criteriaprotected String translateRangePropertyToExpression(Map<String,String> fieldValues, String property, String prefix, AttributeLookupSettings settings)
protected void translateDocumentAttributeFieldsToCriteria(Map<String,String> fieldValues, List<String> fields, DocumentSearchCriteria.Builder criteria)
protected void applyDocumentAttribute(DocumentSearchCriteria.Builder criteria, String documentAttributeName, String attributeValue)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.