Package in.partake.model

Examples of in.partake.model.UserEx.toSafeJSON()


        UserEx user = new GetAPITransaction(userId).execute();
        if (user == null)
            return renderInvalid(UserErrorCode.INVALID_USER_ID);

        return renderOK(user.toSafeJSON());
    }
}

class GetAPITransaction extends DBAccess<UserEx> {
    private String userId;
View Full Code Here


                if (editor == null)
                    continue;

                // OK.
                editorIds.add(editor.getId());
                array.add(editor.toSafeJSON());
            }

            event.setEditorIds(editorIds);
            json.put("editors", array);
        }
View Full Code Here

        UserEx user = ensureLogin();

        GetAPITransaction transaction = new GetAPITransaction(user.getId());
        transaction.execute();

        ObjectNode obj = user.toSafeJSON();
        obj.put("preference", transaction.getPreference().toSafeJSON());
        obj.put("openIds", Util.toJSONArray(transaction.getOpenIds()));
        return renderOK(obj);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.