Examples of toSafeJSON()


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

            passcode = session().get("event:" + eventId);

        EventEx event = new GetTransaction(user, eventId, passcode).execute();

        ObjectNode obj = new ObjectNode(JsonNodeFactory.instance);
        obj.put("event", event.toSafeJSON());
        return renderOK(obj);
    }
}

class GetTransaction extends DBAccess<EventEx> {
View Full Code Here

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

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

                if (editor == null)
                    continue;

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

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

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

        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.