|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.docsearch.DocumentSearchInternalUtils
public class DocumentSearchInternalUtils
Defines various utilities for internal use in the reference implementation of the document search functionality.
Nested Class Summary | |
---|---|
static class |
DocumentSearchInternalUtils.SearchableAttributeConfiguration
|
Field Summary | |
---|---|
static List<Class<? extends SearchableAttributeValue>> |
SEARCHABLE_ATTRIBUTE_BASE_CLASS_LIST
|
Constructor Summary | |
---|---|
DocumentSearchInternalUtils()
|
Method Summary | |
---|---|
static DataType |
convertValueToDataType(String dataTypeValue)
Converts a searchable attribute field data type into a UI data type |
static String |
getAttributeTableName(RemotableAttributeField attributeField)
|
static Class<?> |
getDataTypeClass(RemotableAttributeField attributeField)
|
static String |
getDisplayValueWithDateOnly(org.joda.time.DateTime value)
|
static String |
getDisplayValueWithDateOnly(Timestamp value)
|
static org.joda.time.DateTime |
getLowerDateTimeBound(String dateRange)
|
static SearchableAttributeValue |
getSearchableAttributeValueByDataTypeString(String dataType)
|
static List<SearchableAttributeValue> |
getSearchableAttributeValueObjectTypes()
|
static org.joda.time.DateTime |
getUpperDateTimeBound(String dateRange)
|
static boolean |
isLookupCaseSensitive(RemotableAttributeField remotableAttributeField)
|
static String |
marshalDocumentSearchCriteria(DocumentSearchCriteria criteria)
Marshals a DocumentSearchCriteria to JSON string |
static DocumentSearchCriteria |
unmarshalDocumentSearchCriteria(String string)
Unmarshals a DocumentSearchCriteria from JSON string |
static Collection<RemotableAttributeError> |
validateParsedSearchFieldValue(String fieldName,
SearchableAttributeValue attributeValue,
String parsedValue,
String errorMessagePrefix,
List<String> resultingValues,
com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
Validates a single terminal value from a single search field (list of values); calls a custom validator if default validation passes and custom validator is given |
static List<RemotableAttributeError> |
validateSearchFieldValue(String fieldName,
SearchableAttributeValue attributeValue,
String enteredValue,
String errorMessagePrefix,
List<String> resultingValues,
com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
Validates a single DocumentSearchCriteria searchable attribute field value (of the list of possibly multiple values) |
static List<RemotableAttributeError> |
validateSearchFieldValues(String fieldName,
SearchableAttributeValue attributeValue,
List<String> searchValues,
String errorMessagePrefix,
List<String> resultingValues,
com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final List<Class<? extends SearchableAttributeValue>> SEARCHABLE_ATTRIBUTE_BASE_CLASS_LIST
Constructor Detail |
---|
public DocumentSearchInternalUtils()
Method Detail |
---|
public static boolean isLookupCaseSensitive(RemotableAttributeField remotableAttributeField)
public static String getAttributeTableName(RemotableAttributeField attributeField)
public static Class<?> getDataTypeClass(RemotableAttributeField attributeField)
public static List<SearchableAttributeValue> getSearchableAttributeValueObjectTypes()
public static SearchableAttributeValue getSearchableAttributeValueByDataTypeString(String dataType)
public static String getDisplayValueWithDateOnly(org.joda.time.DateTime value)
public static String getDisplayValueWithDateOnly(Timestamp value)
public static org.joda.time.DateTime getLowerDateTimeBound(String dateRange) throws ParseException
ParseException
public static org.joda.time.DateTime getUpperDateTimeBound(String dateRange) throws ParseException
ParseException
public static DocumentSearchCriteria unmarshalDocumentSearchCriteria(String string) throws IOException
string
- the JSON
IOException
public static String marshalDocumentSearchCriteria(DocumentSearchCriteria criteria) throws IOException
criteria
- the criteria
IOException
public static List<RemotableAttributeError> validateSearchFieldValues(String fieldName, SearchableAttributeValue attributeValue, List<String> searchValues, String errorMessagePrefix, List<String> resultingValues, com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
public static List<RemotableAttributeError> validateSearchFieldValue(String fieldName, SearchableAttributeValue attributeValue, String enteredValue, String errorMessagePrefix, List<String> resultingValues, com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
attributeValue
- the searchable attribute value typeenteredValue
- the incoming DSC field valuefieldName
- the name of the searchable attribute field/keyerrorMessagePrefix
- error message prefixresultingValues
- optional list of accumulated parsed valuescustomValidator
- custom value validator to invoke on default validation success
public static Collection<RemotableAttributeError> validateParsedSearchFieldValue(String fieldName, SearchableAttributeValue attributeValue, String parsedValue, String errorMessagePrefix, List<String> resultingValues, com.google.common.base.Function<String,Collection<RemotableAttributeError>> customValidator)
attributeValue
- the searchable value typeparsedValue
- the parsed value to validatefieldName
- the field name for error messageerrorMessagePrefix
- the prefix for error messageresultingValues
- parsed value is appended to this list if present (non-null)
public static DataType convertValueToDataType(String dataTypeValue)
dataTypeValue
- the SearchableAttributeValue
data type
DataType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |