Package in.partake.model

Examples of in.partake.model.UserEx


            // Since the message was null, we cannot update the message status. So we silently remove this MessageEnvelope.
            it.remove();
            return;
        }

        UserEx sender = UserDAOFacade.getUserEx(con, daos, message.getUserId());
        if (sender == null) {
            Logger.warn("sendTwitterMessage : sender is null.");
            failedSendingTwitterMessage(con, daos, it, envelope, message);
            return;
        }

        UserTwitterLink twitterLinkage = sender.getTwitterLinkage();
        if (twitterLinkage == null || !twitterLinkage.isAuthorized()) {
            Logger.warn("sendTwitterMessage : envelope id " + envelope.getId() + " could not be sent : No access token");
            failedSendingTwitterMessage(con, daos, it, envelope, message);
            return;
        }
View Full Code Here


        return new RemoveAttendantAPI().execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        UUID ticketId = getValidTicketIdParameter();
        String userId = getValidUserIdParameter();

        new RemoveAttendantTransaction(user, ticketId, userId).execute();
View Full Code Here

        if (notification == null) {
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }

        UserEx sender = UserDAOFacade.getUserEx(con, daos, notification.getUserId());
        if (sender == null) {
            Logger.warn("sendTwitterMessage : sender is null.");
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }

        UserTwitterLink twitterLinkage = sender.getTwitterLinkage();
        if (twitterLinkage == null || !twitterLinkage.isAuthorized()) {
            Logger.warn("sendTwitterMessage : envelope id " + envelope.getId() + " could not be sent : No access token");
            failedSendingUserNotification(con, daos, it, envelope, notification);
            return;
        }
View Full Code Here

        return new GetAPI().execute();
    }

    @Override
    public Result doExecute() throws DAOException, PartakeException {
        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

        return new SendMessageAPI().execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        String eventId = getValidEventIdParameter();

        String subject = getParameter("subject");
        String body = getParameter("body");
View Full Code Here

        return new GetEventsAPI().execute();
    }

    @Override
    public Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();

        String queryType = getParameter("queryType");

        int offset = optIntegerParameter("offset", 0);
        offset = Util.ensureRange(offset, 0, Integer.MAX_VALUE);
View Full Code Here

        return new AttendAPI().execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        String userId = getValidUserIdParameter();
        UUID ticketId = getValidTicketIdParameter();

        String status = getParameter("status");
View Full Code Here

        action.messageId = messageId;
        return action.execute();
    }

    public Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        checkIdParameterIsValid(messageId, UserErrorCode.INVALID_NOTFOUND, UserErrorCode.INVALID_NOTFOUND);

        ShowActionTransaction transaction = new ShowActionTransaction(user, UUID.fromString(messageId));
        message = transaction.execute();
View Full Code Here

        MessageCode messageCode = null;
        try {
            ITwitterService twitterService = PartakeApp.getTwitterService();
            UserTwitterLink linkage = twitterService.createTwitterLinkageFromLoginInformation(loginInformation, verifier);

            UserEx user = new VerifyForTwitterActionTransaction(linkage).execute();
            session().put(Constants.Session.USER_ID_KEY, user.getId());

            messageCode = MessageCode.MESSAGE_AUTH_LOGIN;
        } catch (TwitterException e) {
            return renderError(ServerErrorCode.TWITTER_OAUTH_ERROR, e);
        }
View Full Code Here

        try {
            // 1. まず TwitterLinkage をアップデート
            UserTwitterLink twitterLinkage = updateTwitterLinkage(con, daos, twitterLinkageEmbryo);
            // 2. 対応するユーザーを生成
            UserEx user = getUserFromTwitterLinkage(con, daos, twitterLinkage);
            return user;
        } catch (TwitterException e) {
            throw new PartakeException(ServerErrorCode.TWITTER_OAUTH_ERROR, e);
        }
    }
View Full Code Here

TOP

Related Classes of in.partake.model.UserEx

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.