public class JsonResponse extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static JsonResponse |
AUTH_FAIL |
static Integer |
ERR |
static JsonResponse |
NEED_LOGIN |
static Integer |
OK |
static JsonResponse |
PARAM_MISSING |
static Integer |
REDIRECT |
static JsonResponse |
SERVER_ERR |
| Constructor and Description |
|---|
JsonResponse() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getData() |
Object |
getErr() |
Integer |
getStatus() |
Boolean |
isSuccess() |
static JsonResponse |
notOk(Integer status,
Object err) |
static JsonResponse |
notOk(Object err) |
static JsonResponse |
ok() |
static JsonResponse |
ok(Object data) |
static JsonResponse |
redirect(String url) |
void |
setData(Object data) |
void |
setErr(Object err) |
String |
toString() |
public static final Integer OK
public static final Integer REDIRECT
public static final Integer ERR
public static final JsonResponse NEED_LOGIN
public static final JsonResponse AUTH_FAIL
public static final JsonResponse PARAM_MISSING
public static final JsonResponse SERVER_ERR
public static JsonResponse ok()
public static JsonResponse ok(Object data)
public static JsonResponse notOk(Object err)
public static JsonResponse notOk(Integer status, Object err)
public static JsonResponse redirect(String url)
public Integer getStatus()
public Object getErr()
public void setErr(Object err)
public Object getData()
public void setData(Object data)
public Boolean isSuccess()
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.