Package in.partake.model

Examples of in.partake.model.UserEx


    @Override
    protected List<UserEx> doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
        List<UserTwitterLink> links = daos.getTwitterLinkageAccess().findByScreenNamePrefix(con, userNamePrefix, limit);
        List<UserEx> users = new ArrayList<UserEx>();
        for (UserTwitterLink link : links) {
            UserEx user = UserDAOFacade.getUserEx(con, daos, link.getUserId());
            if (user == null)
                continue;
            users.add(user);
        }
        return users;
View Full Code Here


        return new GetImagesAPI().execute();
    }

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

        int offset = optIntegerParameter("offset", 0);
        offset = Util.ensureRange(offset, 0, Integer.MAX_VALUE);

        int limit = optIntegerParameter("limit", 10);
View Full Code Here

        return new ModifyAPI().execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        String eventId = getValidEventIdParameter();
        Map<String, String[]> params = getFormParameters();

        ModifyTransaction transaction = new ModifyTransaction(user, eventId, params);
View Full Code Here

    }


    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        checkIdParameterIsValid(eventId, UserErrorCode.INVALID_NOTFOUND, UserErrorCode.INVALID_NOTFOUND);

        ParticipantsListTransaction transaction = new ParticipantsListTransaction(user, eventId);
        transaction.execute();
View Full Code Here

        return new RevokeCalendarAPI().execute();
    }

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

        String newCalendarId = new RevokeCalendarAPITransaction(user).execute();

        ObjectNode obj = new ObjectNode(JsonNodeFactory.instance);
View Full Code Here

        return action.execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        checkIdParameterIsValid(eventId, UserErrorCode.INVALID_NOTFOUND, UserErrorCode.INVALID_NOTFOUND);

        event = new EventEditTransaction(eventId).execute();
        if (event == null)
            return renderNotFound();
View Full Code Here

                if (visitedIds.contains(editorId))
                    continue;
                visitedIds.add(editorId);

                UserEx editor = UserDAOFacade.getUserEx(con, daos, editorId);
                if (editor == null)
                    continue;

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

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

        return new RemoveOpenIDAPI().execute();
    }

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

        // check arguments
        String identifier = getParameter("identifier");
        if (identifier == null)
            return renderInvalid(UserErrorCode.MISSING_OPENID);

        // identifier が user と結び付けられているか検査して消去
        new RemoveOpenIDLinkageTransaction(user.getId(), identifier).execute();
        return renderOK();
    }
View Full Code Here

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        checkIdParameterIsValid(eventId, UserErrorCode.INVALID_NOTFOUND, UserErrorCode.INVALID_NOTFOUND);

        // User might be logged in, might not be logged in. So using ensureLoginUser() is inappropriate.
        UserEx user = getLoginUser();

        EventShowTransaction transaction = new EventShowTransaction(user, eventId, session());
        transaction.execute();

        event = transaction.getEvent();
View Full Code Here

        if (userMessage == null) {
            didSendUserMessage(con, daos, it, envelope, userMessage, MessageDelivery.FAIL);
            return;
        }

        UserEx receiver = UserDAOFacade.getUserEx(con, daos, userMessage.getReceiverId());
        if (receiver == null) {
            didSendUserMessage(con, daos, it, envelope, userMessage, MessageDelivery.FAIL);
            return;
        }

        UserPreference pref = daos.getUserPreferenceAccess().find(con, receiver.getId());
        if (pref == null)
            pref = UserPreference.getDefaultPreference(receiver.getId());

        // twitter message を受け取らない設定になっていれば送らない。
        if (!pref.isReceivingTwitterMessage()) {
            didSendUserMessage(con, daos, it, envelope, userMessage, MessageDelivery.NOT_DELIVERED);
            return;
        }

        UserTwitterLink twitterLinkage = receiver.getTwitterLinkage();
        if (twitterLinkage == null || !twitterLinkage.isAuthorized()) {
            Logger.warn("sendDirectMessage : envelope id " + envelope.getId() + " could not be sent : No access token");
            didSendUserMessage(con, daos, it, envelope, userMessage, MessageDelivery.FAIL);
            return;
        }
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.