public enum WsRestResponseContentType extends java.lang.Enum<WsRestResponseContentType>
Enum Constant and Description |
---|
json
json content type
|
xhtml
default xhtml content type
|
xml
xml content type
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getContentType()
get the content type
|
abstract java.lang.Object |
parseString(java.lang.String input)
parse a string to an object
|
static WsRestResponseContentType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WsRestResponseContentType |
valueOfIgnoreCase(java.lang.String string,
boolean exceptionOnNotFound)
do a case-insensitive matching
|
static WsRestResponseContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
abstract void |
writeString(java.lang.Object object,
java.io.Writer writer)
write a string representation to an outputstream
|
static XStream |
xstream(boolean isJson)
setup an xstream object for input/output
|
public static final WsRestResponseContentType xhtml
public static final WsRestResponseContentType xml
public static final WsRestResponseContentType json
public static WsRestResponseContentType[] values()
for (WsRestResponseContentType c : WsRestResponseContentType.values()) System.out.println(c);
public static WsRestResponseContentType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract void writeString(java.lang.Object object, java.io.Writer writer)
object
- to write to outputwriter
- to write to (e.g. back to http client)public abstract java.lang.Object parseString(java.lang.String input)
input
- public abstract java.lang.String getContentType()
public static XStream xstream(boolean isJson)
isJson
- driver for jsonpublic static WsRestResponseContentType valueOfIgnoreCase(java.lang.String string, boolean exceptionOnNotFound) throws GrouperRestInvalidRequest
string
- exceptionOnNotFound
- true to throw exception on not foundGrouperRestInvalidRequest
- if problem