Package com.morpheusdata.views
Class JsonResponse<T>
- java.lang.Object
-
- com.morpheusdata.views.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.
-
-
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
-
-
-
Field Detail
-
data
public T data
-
status
public java.lang.Integer status
-
-
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
-
-