Examples of IEventActivityAccess


Examples of in.partake.model.dao.access.IEventActivityAccess

        return array;
    }

    @Override
    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventActivityAccess dao = daos.getEventActivityAccess();
        dao.truncate(con);
    }
View Full Code Here

Examples of in.partake.model.dao.access.IEventActivityAccess

        if (oldEnrollment == null)
            newEnrollment.setModifiedAt(TimeUtil.getCurrentDateTime());

        //
        if (status != null) {
            IEventActivityAccess eaa = daos.getEventActivityAccess();

            String title;
            switch (status) {
            case ENROLLED:      title = user.getTwitterScreenName() + " さんが参加しました";        break;
            case CANCELLED:     title = user.getTwitterScreenName() + " さんが参加を取りやめました";     break;
            case RESERVED:      title = user.getTwitterScreenName() + " さんが仮参加しました";      break;
            case NOT_ENROLLED:  title = user.getTwitterScreenName() + " さんはもう参加していません"; break;
            default:            title = user.getTwitterScreenName() + " さんが不明なステータスになっています"; break; // TODO: :-P
            }

            String content = String.format("<p>詳細は <a href=\"%s\">%s</a> をごらんください。</p>", event.getEventURL(), event.getEventURL());
            eaa.put(con, new EventActivity(eaa.getFreshId(con), eventId, title, content, TimeUtil.getCurrentDateTime()));
        }

        daos.getEnrollmentAccess().put(con, newEnrollment);
    }
View Full Code Here

Examples of in.partake.model.dao.access.IEventActivityAccess

        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

Examples of in.partake.model.dao.access.IEventActivityAccess

        event = new Event(event);
        event.setDraft(false);
        daos.getEventAccess().put(con, event);

        // Event Activity に挿入
        IEventActivityAccess eaa = daos.getEventActivityAccess();
        EventActivity activity = new EventActivity(eaa.getFreshId(con), event.getId(), "イベントが更新されました : " + event.getTitle(), event.getDescription(), event.getCreatedAt());
        eaa.put(con, activity);

        // さらに、twitter bot がつぶやく (private の場合はつぶやかない)
        if (event.isSearchable())
            EventDAOFacade.tweetNewEventArrival(con, daos, event);
View Full Code Here

Examples of in.partake.model.dao.access.IEventActivityAccess

            daos.getEventFeedAccess().put(con, new EventFeed(feedId, eventId));
        }

        // Event Activity にも挿入
        {
            IEventActivityAccess eaa = daos.getEventActivityAccess();
            EventActivity activity = new EventActivity(eaa.getFreshId(con), eventEmbryo.getId(), "イベントが登録されました : " + eventEmbryo.getTitle(), eventEmbryo.getDescription(), eventEmbryo.getCreatedAt());
            eaa.put(con, activity);
        }

        // さらに、twitter bot がつぶやく (private の場合はつぶやかない)
        if (eventEmbryo.isSearchable())
            tweetNewEventArrival(con, daos, eventEmbryo);
View Full Code Here

Examples of in.partake.model.dao.access.IEventActivityAccess

        // master を update
        daos.getEventAccess().put(con, eventEmbryo);

        // Event Activity にも挿入
        {
            IEventActivityAccess eaa = daos.getEventActivityAccess();
            EventActivity activity = new EventActivity(eaa.getFreshId(con), eventEmbryo.getId(), "イベントが更新されました : " + eventEmbryo.getTitle(), eventEmbryo.getDescription(), eventEmbryo.getCreatedAt());
            eaa.put(con, activity);
        }

        // TODO: twitter bot が更新をつぶやいてもいいような気がする。
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.