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

public enum WsRestResponseContentType extends Enum<WsRestResponseContentType>
possible content types by grouper ws rest
  • Enum Constant Details

  • Method Details

    • values

      public static WsRestResponseContentType[] 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

      public static WsRestResponseContentType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • writeString

      public abstract void writeString(Object object, Writer writer)
      write a string representation to an outputstream
      Parameters:
      object - to write to output
      writer - to write to (e.g. back to http client)
    • parseString

      public abstract Object parseString(String input)
      parse a string to an object
      Parameters:
      input -
      Returns:
      the object
    • getContentType

      public abstract String 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