public enum WsRestRequestContentType extends java.lang.Enum<WsRestRequestContentType>
Enum Constant and Description |
---|
http
http params set fields in a lite object
http request content type should not be set, or set to:
application/x-www-form-urlencoded
|
json
json content type, uses the pluggable json converter
http request content type should be set to application/json or text/x-json
|
xhtml
default xhtml content type
http request content type should be set to application/xhtml+xml
|
xml
xml content type
http request content type should be set to application/xml or text/xml
|
Modifier and Type | Method and Description |
---|---|
abstract WsRestResponseContentType |
calculateResponseContentType()
based on the request type, calculate the response type
|
static WsRestRequestContentType |
findByContentType(java.lang.String theContentType,
java.lang.String requestBody)
find a request content type by content type
|
java.lang.String |
getContentType()
Default content type from acceptable content-type options
|
java.lang.String[] |
getContentTypes()
Array of valid options content type header
|
static JsonConverter |
jsonConverter()
instantiate the json convert configured in the grouper-ws.properties file
|
static void |
main(java.lang.String[] args)
test out a parse
|
abstract java.lang.Object |
parseString(java.lang.String input,
java.lang.StringBuilder warnings)
parse a string to an object
|
static WsRestRequestContentType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WsRestRequestContentType |
valueOfIgnoreCase(java.lang.String string,
boolean exceptionOnNotFound)
do a case-insensitive matching
|
static WsRestRequestContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
abstract java.lang.String |
writeString(java.lang.Object object)
write a string representation to result string
|
public static final WsRestRequestContentType xhtml
public static final WsRestRequestContentType http
public static final WsRestRequestContentType xml
public static final WsRestRequestContentType json
public static WsRestRequestContentType[] values()
for (WsRestRequestContentType c : WsRestRequestContentType.values()) System.out.println(c);
public static WsRestRequestContentType 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 static JsonConverter jsonConverter()
public abstract WsRestResponseContentType calculateResponseContentType()
public static void main(java.lang.String[] args)
args
- public abstract java.lang.Object parseString(java.lang.String input, java.lang.StringBuilder warnings)
input
- warnings
- is where warnings should be written topublic abstract java.lang.String writeString(java.lang.Object object)
object
- to write to outputpublic java.lang.String[] getContentTypes()
public java.lang.String getContentType()
public static WsRestRequestContentType findByContentType(java.lang.String theContentType, java.lang.String requestBody)
theContentType
- requestBody
- is the request onverted to a bodypublic static WsRestRequestContentType valueOfIgnoreCase(java.lang.String string, boolean exceptionOnNotFound) throws GrouperRestInvalidRequest
string
- exceptionOnNotFound
- true to throw exception on not foundGrouperRestInvalidRequest
- if problem