use of com.willshex.blogwt.shared.api.datatype.User in project blogwt by billy1380.
the class ChangeUserDetailsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.datatype.User in project blogwt by billy1380.
the class FollowUsersRequest method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
if (jsonObject.has("others")) {
JsonElement jsonOthers = jsonObject.get("others");
if (jsonOthers != null) {
others = new ArrayList<User>();
User item = null;
for (int i = 0; i < jsonOthers.getAsJsonArray().size(); i++) {
if (jsonOthers.getAsJsonArray().get(i) != null) {
(item = new User()).fromJson(jsonOthers.getAsJsonArray().get(i).getAsJsonObject());
others.add(item);
}
}
}
}
if (jsonObject.has("un")) {
JsonElement jsonUn = jsonObject.get("un");
if (jsonUn != null) {
un = Boolean.valueOf(jsonUn.getAsBoolean());
}
}
}
use of com.willshex.blogwt.shared.api.datatype.User in project blogwt by billy1380.
the class GetRolesAndPermissionsRequest method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("idsOnly")) {
JsonElement jsonIdsOnly = jsonObject.get("idsOnly");
if (jsonIdsOnly != null) {
idsOnly = Boolean.valueOf(jsonIdsOnly.getAsBoolean());
}
}
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
if (jsonObject.has("expandRoles")) {
JsonElement jsonExpandRoles = jsonObject.get("expandRoles");
if (jsonExpandRoles != null) {
expandRoles = Boolean.valueOf(jsonExpandRoles.getAsBoolean());
}
}
if (jsonObject.has("rolesOnly")) {
JsonElement jsonRolesOnly = jsonObject.get("rolesOnly");
if (jsonRolesOnly != null) {
rolesOnly = Boolean.valueOf(jsonRolesOnly.getAsBoolean());
}
}
if (jsonObject.has("permissionOnly")) {
JsonElement jsonPermissionOnly = jsonObject.get("permissionOnly");
if (jsonPermissionOnly != null) {
permissionOnly = Boolean.valueOf(jsonPermissionOnly.getAsBoolean());
}
}
}
use of com.willshex.blogwt.shared.api.datatype.User in project blogwt by billy1380.
the class GetUserDetailsRequest method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.datatype.User in project blogwt by billy1380.
the class GetUserDetailsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
}
Aggregations