Package org.fluxtream.core.mvc.models.guest

Examples of org.fluxtream.core.mvc.models.guest.GuestModel


      IllegalAccessException, ClassNotFoundException {
        try{
            long guestId = AuthHelper.getGuestId();

            Guest guest = guestService.getGuestById(guestId);
            GuestModel guestModel = new GuestModel(guest, false);

            return guestModel;
        }
        catch (Exception e){
            return new StatusModel(false,"Failed to get current guest: " + e.getMessage());
View Full Code Here


    public List<GuestModel> getCoachees() {
        Guest guest = AuthHelper.getGuest();
        final List<Guest> coachees = buddiesService.getTrustedBuddies(guest.getId());
        final List<GuestModel> coacheeModels = new ArrayList<GuestModel>();
        for (Guest coachee : coachees)
            coacheeModels.add(new GuestModel(coachee, true));
        return coacheeModels;
    }
View Full Code Here

            try { coachee = AuthHelper.getCoachee(buddyToAccessParameter, buddiesService);
            } catch (CoachRevokedException e) {return Response.status(403).entity("Sorry, permission to access this data has been revoked. Please reload your browser window").build();}
            Guest guest = ApiHelper.getBuddyToAccess(guestService, coachee);
            if (guest==null)
                return Response.status(401).entity("You are no longer logged in").build();
            GuestModel guestModel = new GuestModel(guest, coachee!=null);
            if (includeAvatar)
                guestModel.avatar = getAvatarImageModel(buddyToAccessParameter, guest);
            return Response.ok(guestModel).build();
        }
        catch (Exception e){
View Full Code Here

    public List<GuestModel> getCoachees() {
        Guest guest = AuthHelper.getGuest();
        final List<Guest> coachees = buddiesService.getTrustedBuddies(guest.getId());
        final List<GuestModel> coacheeModels = new ArrayList<GuestModel>();
        for (Guest coachee : coachees)
            coacheeModels.add(new GuestModel(coachee, true));
        return coacheeModels;
    }
View Full Code Here

TOP

Related Classes of org.fluxtream.core.mvc.models.guest.GuestModel

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.