Package org.fluxtream.core.mvc.models

Examples of org.fluxtream.core.mvc.models.ApplicationModel


    public Response getApplication(@PathParam("uid") String uid) throws IOException {
        final long guestId = AuthHelper.getGuestId();
        try {
            final Application app = partnerAppsService.getApplication(guestId, uid);
            if (app!=null) {
                return Response.ok(mapper.writeValueAsString(new ApplicationModel(app))).build();
            } else {
                return Response.status(Response.Status.BAD_REQUEST).entity("No such application: " + uid).build();
            }
        }
        catch (Throwable e) {
View Full Code Here


        final long guestId = AuthHelper.getGuestId();
        try {
            final List<Application> applications = partnerAppsService.getApplications(guestId);
            List<ApplicationModel> apps = new ArrayList<ApplicationModel>();
            for (Application application : applications) {
                ApplicationModel app = new ApplicationModel(application);
                apps.add(app);
            }
            final String json = mapper.writeValueAsString(apps);
            return Response.ok(json).build();
        }
View Full Code Here

TOP

Related Classes of org.fluxtream.core.mvc.models.ApplicationModel

Copyright © 2018 www.massapicom. 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.