Enum Class WsRestResponseContentType
java.lang.Object
java.lang.Enum<WsRestResponseContentType>
edu.internet2.middleware.grouper.ws.rest.contentType.WsRestResponseContentType
- All Implemented Interfaces:
Serializable
,Comparable<WsRestResponseContentType>
,Constable
possible content types by grouper ws rest
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
get the content typeabstract Object
parseString
(String input) parse a string to an objectstatic WsRestResponseContentType
Returns the enum constant of this class with the specified name.static WsRestResponseContentType
valueOfIgnoreCase
(String string, boolean exceptionOnNotFound) do a case-insensitive matchingstatic WsRestResponseContentType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.abstract void
writeString
(Object object, Writer writer) write a string representation to an outputstreamstatic com.thoughtworks.xstream.XStream
xstream
(boolean isJson) setup an xstream object for input/output
-
Enum Constant Details
-
xml
xml content type -
json
json content type
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
writeString
write a string representation to an outputstream- Parameters:
object
- to write to outputwriter
- to write to (e.g. back to http client)
-
parseString
parse a string to an object- Parameters:
input
-- Returns:
- the object
-
getContentType
get the content type- Returns:
- the http content type
-
xstream
public static com.thoughtworks.xstream.XStream xstream(boolean isJson) setup an xstream object for input/output- Parameters:
isJson
- driver for json- Returns:
- the xstream object
-
valueOfIgnoreCase
public static WsRestResponseContentType valueOfIgnoreCase(String string, boolean exceptionOnNotFound) throws GrouperRestInvalidRequest do a case-insensitive matching- Parameters:
string
-exceptionOnNotFound
- true to throw exception on not found- Returns:
- the enum or null or exception if not found
- Throws:
GrouperRestInvalidRequest
- if problem
-