Package in.partake.model

Examples of in.partake.model.UserEx


        // Message Envelop should be removed.
        MessageEnvelope modified = loadEnvelope(envelopeId.toString());
        assertThat(modified, is(nullValue()));

        // User should be unauthorized.
        UserEx user = loadUserEx(DEFAULT_USER_ID);
        assertThat(user.getTwitterLinkage().getAccessToken(), is(nullValue()));
        assertThat(user.getTwitterLinkage().getAccessTokenSecret(), is(nullValue()));
    }
View Full Code Here


    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        String eventId = getValidEventIdParameter();
        UserEx user = getLoginUser();
        String passcode = getParameter("passcode");
        if (passcode == null)
            passcode = session().get("event:" + eventId);

        EventEx event = new GetTransaction(user, eventId, passcode).execute();
View Full Code Here

        return new ModifyTicketAPI().execute();
    }

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

        String[] ids = getParameters("id[]");
        int N = ids != null ? ids.length : 0;
View Full Code Here

        return new GetBanAPI().execute();
    }

    @Override
    public Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureAdmin();
        String targetUserId = getQueryStringParameter("targetUserId");

        GetBanAPITransaction transaction = new GetBanAPITransaction(user.getId(), targetUserId);
        User targetUser = transaction.execute();
        if (targetUser == null) {
            return renderInvalid(UserErrorCode.INVALID_ARGUMENT);
        } else {
            // Admin専用APIなのでtoSafeJSONの代わりにtoJSONを呼ぶ
View Full Code Here

        return new ApplyAPI().execute();
    }

    @Override
    protected Result doExecute() throws PartakeException, DAOException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        UUID ticketId = getValidTicketIdParameter();
        String status = getParameter("status");
        String comment = getParameter("comment");
        Map<UUID, List<String>> enqueteAnswers = convertToMap(getParameter("enqueteAnswers"));
View Full Code Here

    }

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

        String targetUserId = getFormParameter("targetUserId");
        boolean state = getBooleanParameter("targetState"); // true if administrator wants to ban

        BanAPITransaction transaction = new BanAPITransaction(user.getId(), targetUserId, state);
        User bannedUser = transaction.execute();
        if (bannedUser == null) {
            return renderInvalid(UserErrorCode.INVALID_ARGUMENT);
        } else {
            // Admin専用APIなのでtoSafeJSONの代わりにtoJSONを呼ぶ
View Full Code Here

        return new CreateAPI().execute();
    }

    @Override
    protected Result doExecute() throws DAOException, PartakeException {
        UserEx user = ensureLogin();
        ensureValidSessionToken();
        if (user.isBanned()) {
            throw new PartakeException(UserErrorCode.BANNED_USER);
        }

        Event embryo = new Event();
        embryo.setOwnerId(user.getId());
        embryo.setDraft(optBooleanParameter("draft", true));
        embryo.setCreatedAt(TimeUtil.getCurrentDateTime());

        // Title
        String title = getParameter("title");
View Full Code Here

        return new RemoveCommentAPI().execute();
    }

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

        new RemoveCommentTransaction(user, commentId).execute();
        return renderOK();
View Full Code Here

        return new GetNotificationsAPI().execute();
    }

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

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

        // --- まず、EnrollmentEx を作成
        List<UserTicketEx> ps = new ArrayList<UserTicketEx>();
        for (UserTicket p : daos.getEnrollmentAccess().findByTicketId(con, ticket.getId(), 0, Integer.MAX_VALUE)) {
            if (p == null) { continue; }
            UserEx user = UserDAOFacade.getUserEx(con, daos, p.getUserId());
            if (user == null) { continue; }
            UserTicketEx pe = new UserTicketEx(p, user);
            pe.freeze();
            ps.add(pe);
        }
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.