public class ERXRestFormat
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ERXRestFormat.Delegate
An ERXRestFormat.Delegate is one component of an ERXRestFormat and is used to customize an ERXRequestNode
after parsing in the context of reading a request or before writing in the context of a response generation.
|
static class |
ERXRestFormat.NoOpDelegate |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BINARY_PLIST_KEY |
static java.lang.String |
EMBER_KEY |
static java.lang.String |
FORM_KEY |
static ERXRestFormat |
GIANDUIA_JSON
Deprecated.
|
static ERXRestFormat |
GIANDUIA_PERSISTENT_STORE
Deprecated.
|
static ERXRestFormat |
HTML
Deprecated.
|
static java.lang.String |
HTML_KEY |
static ERXRestFormat |
JS
Deprecated.
|
static java.lang.String |
JS_KEY |
static ERXRestFormat |
JSON
Deprecated.
|
static java.lang.String |
JSON_KEY |
static ERXRestFormat |
PLIST
Deprecated.
|
static java.lang.String |
PLIST_KEY |
static ERXRestFormat |
RAILS
Deprecated.
|
static java.lang.String |
RAILS_KEY |
static ERXRestFormat |
SPROUTCORE
Deprecated.
|
static java.lang.String |
SPROUTCORE_KEY |
static ERXRestFormat |
XML
Deprecated.
|
static java.lang.String |
XML_KEY |
| Constructor and Description |
|---|
ERXRestFormat(java.lang.String name,
IERXRestParser parser,
IERXRestWriter writer,
ERXRestFormat.Delegate delegate)
Constructs a new ERXRestFormat.
|
| Modifier and Type | Method and Description |
|---|---|
static ERXRestFormat |
bplist()
Returns the registered plist format.
|
ERXRestFormat.Delegate |
delegate() |
static ERXRestFormat |
form()
Returns the registered html form format.
|
static ERXRestFormat |
formatNamed(java.lang.String name) |
static boolean |
hasFormatNamed(java.lang.String name)
Returns true if there is a format registered with the given name.
|
static ERXRestFormat |
html()
Returns the registered html format.
|
static ERXRestFormat |
json()
Returns the registered json format.
|
java.lang.String |
name()
Returns the name of this format.
|
ERXRestRequestNode |
parse(IERXRestRequest request,
ERXRestContext context)
Returns a parsed ERXRestRequestNode using this format's parser.
|
ERXRestRequestNode |
parse(java.lang.String str)
Returns a parsed ERXRestRequestNode using this format's parser.
|
ERXRestRequestNode |
parse(java.lang.String str,
ERXRestContext context)
Returns a parsed ERXRestRequestNode using this format's parser.
|
IERXRestParser |
parser() |
static ERXRestFormat |
plist()
Returns the registered plist format.
|
static ERXRestFormat |
registerFormatNamed(ERXRestFormat format,
java.lang.String name) |
static ERXRestFormat |
registerFormatNamed(IERXRestParser parser,
IERXRestWriter writer,
ERXRestFormat.Delegate delegate,
java.lang.String... names) |
java.lang.String |
toString() |
java.lang.String |
toString(EOClassDescription classDescription,
java.util.List<?> list,
ERXKeyFilter filter,
ERXRestContext context)
Returns the formatted version of the given list.
|
java.lang.String |
toString(java.lang.Object obj)
Returns the formatted version of the given object using a recursive "All" filter and the default rest delegate.
|
java.lang.String |
toString(java.lang.Object obj,
ERXKeyFilter filter)
Returns the formatted version of the given object using a recursive "All" filter.
|
java.lang.String |
toString(java.lang.Object obj,
ERXKeyFilter filter,
ERXRestContext context)
Returns the formatted version of the given object.
|
java.lang.String |
toString(java.lang.Object obj,
ERXRestContext context)
Returns the formatted version of the given object using a recursive "All" filter.
|
IERXRestWriter |
writer() |
static ERXRestFormat |
xml()
Returns the registered xml format.
|
public static final java.lang.String HTML_KEY
public static final java.lang.String JSON_KEY
public static final java.lang.String JS_KEY
public static final java.lang.String RAILS_KEY
public static final java.lang.String PLIST_KEY
public static final java.lang.String SPROUTCORE_KEY
public static final java.lang.String XML_KEY
public static final java.lang.String FORM_KEY
public static final java.lang.String BINARY_PLIST_KEY
public static final java.lang.String EMBER_KEY
@Deprecated public static final ERXRestFormat JSON
@Deprecated public static final ERXRestFormat JS
@Deprecated public static final ERXRestFormat PLIST
@Deprecated public static final ERXRestFormat RAILS
@Deprecated public static final ERXRestFormat XML
@Deprecated public static final ERXRestFormat HTML
@Deprecated public static final ERXRestFormat GIANDUIA_JSON
@Deprecated public static final ERXRestFormat GIANDUIA_PERSISTENT_STORE
@Deprecated public static final ERXRestFormat SPROUTCORE
public ERXRestFormat(java.lang.String name,
IERXRestParser parser,
IERXRestWriter writer,
ERXRestFormat.Delegate delegate)
name - the name of the formatparser - the parserwriter - the writerdelegate - the delegate to use while parsing and writingpublic static ERXRestFormat form()
public static ERXRestFormat html()
public static ERXRestFormat json()
public static ERXRestFormat plist()
public static ERXRestFormat xml()
public static ERXRestFormat bplist()
public java.lang.String name()
public IERXRestParser parser()
public IERXRestWriter writer()
public ERXRestFormat.Delegate delegate()
public ERXRestRequestNode parse(java.lang.String str)
str - the string to parsepublic ERXRestRequestNode parse(java.lang.String str, ERXRestContext context)
str - the string to parsepublic ERXRestRequestNode parse(IERXRestRequest request, ERXRestContext context)
request - the requestpublic java.lang.String toString(java.lang.Object obj)
obj - the object to renderpublic java.lang.String toString(java.lang.Object obj,
ERXKeyFilter filter)
obj - the object to renderpublic java.lang.String toString(java.lang.Object obj,
ERXRestContext context)
obj - the object to renderpublic java.lang.String toString(java.lang.Object obj,
ERXKeyFilter filter,
ERXRestContext context)
obj - the object to renderfilter - the filter to apply to the objectcontext - the rest delegate to usepublic java.lang.String toString(EOClassDescription classDescription, java.util.List<?> list, ERXKeyFilter filter, ERXRestContext context)
classDescription - the class description for the elements of the listlist - the listfilter - the filtercontext - the rest delegate to usepublic java.lang.String toString()
toString in class java.lang.Objectpublic static boolean hasFormatNamed(java.lang.String name)
name - the name to lookuppublic static ERXRestFormat formatNamed(java.lang.String name)
public static ERXRestFormat registerFormatNamed(IERXRestParser parser, IERXRestWriter writer, ERXRestFormat.Delegate delegate, java.lang.String... names)
public static ERXRestFormat registerFormatNamed(ERXRestFormat format, java.lang.String name)
Copyright © 2002 – 2022 Project Wonder.