Class JsonResponse<T>

  • Type Parameters:
    T - Type of the data object, can be Map

    public class JsonResponse<T>
    extends java.lang.Object
    A response object that is passed back to morpheus-ui to render json and response. Optionally strongly typed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      T data  
      java.lang.Integer status  
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonResponse()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JsonResponse<?> of​(java.lang.Object data)
      Helper method to create a successful JsonResponse of an object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • data

        public T data
      • status

        public java.lang.Integer status
    • Constructor Detail

      • JsonResponse

        public JsonResponse()
    • Method Detail

      • of

        public static JsonResponse<?> of​(java.lang.Object data)
        Helper method to create a successful JsonResponse of an object
        Parameters:
        data - The object to base the model off of
        Returns:
        a ViewModel