public class ERXRestUtils
extends java.lang.Object
| Properties | |
er.rest.dateFormat | er.rest.dateFormat |
er.rest.timestampFormat | er.rest.timestampFormat |
er.rest.rfcDateFormat | (default "rfc822") |
| Constructor and Description |
|---|
ERXRestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
coerceValueToAttributeType(java.lang.Object value,
EOClassDescription parentEntity,
java.lang.Object parentObject,
java.lang.String attributeName,
ERXRestContext context)
Parses the given String and returns an object.
|
static java.lang.String |
coerceValueToString(java.lang.Object value,
ERXRestContext context)
Convert the given object to a String (using REST formats).
|
static java.lang.Object |
coerceValueToTypeNamed(java.lang.Object value,
java.lang.String valueTypeName,
ERXRestContext context,
boolean resolveEntities) |
protected static java.text.Format |
dateFormat(boolean spaces,
ERXRestContext context) |
static boolean |
isPrimitive(java.lang.Class<?> valueType)
Returns whether or not the given class represents a primitive in REST.
|
static boolean |
isPrimitive(java.lang.Object obj)
Returns whether or not the given object represents a primitive in REST.
|
protected static DateTimeFormatter |
jodaLocalDateFormat(boolean spaces,
ERXRestContext context) |
protected static DateTimeFormatter |
jodaLocalDateTimeFormat(boolean spaces,
ERXRestContext context) |
protected static java.text.Format |
timestampFormat(boolean spaces,
ERXRestContext context) |
public static boolean isPrimitive(java.lang.Object obj)
obj - the object to checkpublic static boolean isPrimitive(java.lang.Class<?> valueType)
valueType - the class to checkpublic static java.lang.String coerceValueToString(java.lang.Object value,
ERXRestContext context)
value - the value to convertprotected static java.text.Format timestampFormat(boolean spaces,
ERXRestContext context)
protected static java.text.Format dateFormat(boolean spaces,
ERXRestContext context)
protected static DateTimeFormatter jodaLocalDateFormat(boolean spaces, ERXRestContext context)
protected static DateTimeFormatter jodaLocalDateTimeFormat(boolean spaces, ERXRestContext context)
public static java.lang.Object coerceValueToTypeNamed(java.lang.Object value,
java.lang.String valueTypeName,
ERXRestContext context,
boolean resolveEntities)
public static java.lang.Object coerceValueToAttributeType(java.lang.Object value,
EOClassDescription parentEntity,
java.lang.Object parentObject,
java.lang.String attributeName,
ERXRestContext context)
value - the value of the attributeparentEntity - the entityattributeName - the name of the propertyparentObject - the parent objectCopyright © 2002 – 2022 Project Wonder.