Package in.partake.model

Examples of in.partake.model.UserEx


        return new PostCommentAPI().execute();
    }

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

        String comment = getParameter("comment");
        if (StringUtils.isBlank(comment))
            return renderInvalid(UserErrorCode.MISSING_COMMENT);
        if (comment.length() > MAX_COMMENT_LENGTH)
            return renderInvalid(UserErrorCode.INVALID_COMMENT_TOOLONG);

        EventComment embryo = new EventComment(null, eventId, user.getId(), comment, true, TimeUtil.getCurrentDateTime());
        new PostCommentTransaction(embryo).execute();

        return renderOK();
    }
View Full Code Here


        commentEmbryo.setId(daos.getCommentAccess().getFreshId(con));
        daos.getCommentAccess().put(con, commentEmbryo);

        // TODO: コメント消したときにこれも消したいか? まずいコメントが feed され続けるのは問題となりうるか?
        IEventActivityAccess eaa = daos.getEventActivityAccess();
        UserEx user = UserDAOFacade.getUserEx(con, daos, commentEmbryo.getUserId());
        String title = user.getTwitterScreenName() + " さんがコメントを投稿しました";
        String content = commentEmbryo.getComment();
        eaa.put(con, new EventActivity(eaa.getFreshId(con), commentEmbryo.getEventId(), title, content, commentEmbryo.getCreatedAt()));

        return null;
    }
View Full Code Here

        return new ModifyEnqueteAPI().execute();
    }

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

        String[] questionIds = getParameters("ids[]");
        String[] questions = getParameters("questions[]");
View Full Code Here

        return new PublishAPI().execute();
    }

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

        PublishTransaction transaction = new PublishTransaction(user, eventId);
        Event event = transaction.execute();
View Full Code Here

    public static final int URL_LENGTH = 23;

    public static EventEx getEventEx(PartakeConnection con, IPartakeDAOs daos, String eventId) throws DAOException {
        Event event = daos.getEventAccess().find(con, eventId);
        if (event == null) { return null; }
        UserEx owner = UserDAOFacade.getUserEx(con, daos, event.getOwnerId());
        if (owner == null) { return null; }

        String feedId = daos.getEventFeedAccess().findByEventId(con, eventId);

        List<EventTicket> tickets = daos.getEventTicketAccess().findEventTicketsByEventId(con, eventId);
View Full Code Here

    // Comments

    public static EventCommentEx getCommentEx(PartakeConnection con, IPartakeDAOs daos, String commentId) throws DAOException {
        EventComment comment = daos.getCommentAccess().find(con, commentId);
        if (comment == null) { return null; }
        UserEx user = UserDAOFacade.getUserEx(con, daos, comment.getUserId());
        if (user == null) { return null; }
        return new EventCommentEx(comment, user);
    }
View Full Code Here

        return new CopyAPI().execute();
    }

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

        String eventId = getValidEventIdParameter();
        String newEventId = new CopyTransaction(user, eventId).execute();
View Full Code Here

        return new CreateImageAPI().execute();
    }

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

        FilePart filePart = request().body().asMultipartFormData().getFile("file");
        if (filePart == null)
            return renderInvalid(UserErrorCode.INVALID_NOIMAGE);
View Full Code Here

    public static UserMessageEx findUserReceivedMessage(PartakeConnection con, IPartakeDAOs daos, UUID messageId) throws DAOException {
        UserReceivedMessage receivedMessage = daos.getUserReceivedMessageAccess().find(con, messageId);
        if (receivedMessage == null)
            return null;

        UserEx sender = UserDAOFacade.getUserEx(con, daos, receivedMessage.getSenderId());
        if (sender == null)
            return null;

        Event event = daos.getEventAccess().find(con, receivedMessage.getEventId());
        if (event == null)
View Full Code Here

        List<UserMessageEx> userMessageExs = new ArrayList<UserMessageEx>();
        for (UserReceivedMessage userMessage : userMessages) {
            if (userMessage == null)
                continue;

            UserEx sender = UserDAOFacade.getUserEx(con, daos, userMessage.getSenderId());
            if (sender == null)
                continue;

            Event event = daos.getEventAccess().find(con, userMessage.getEventId());
            if (event == null)
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.