Package in.partake.model

Examples of in.partake.model.EventEx


        addFormParameter(proxy, "amount[]", new String[] { "0" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(UNPUBLISHED_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();

        assertThat(tickets.size(), is(1));
        assertThat(tickets.get(0).getName(), is("name"));
        assertThat(tickets.get(0).getApplicationStart(), is(TicketApplicationStart.ANYTIME));
        assertThat(tickets.get(0).getApplicationEnd(), is(TicketApplicationEnd.TILL_TIME_BEFORE_EVENT));
View Full Code Here


        addFormParameter(proxy, "amount[]", new String[] { "10" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(UNPUBLISHED_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();

        assertThat(tickets.size(), is(1));
        assertThat(tickets.get(0).getName(), is("name"));
        assertThat(tickets.get(0).getApplicationStart(), is(TicketApplicationStart.ANYTIME));
        assertThat(tickets.get(0).getApplicationEnd(), is(TicketApplicationEnd.TILL_TIME_BEFORE_EVENT));
View Full Code Here

        addFormParameter(proxy, "amount[]", new String[] { "10" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(DEFAULT_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();

        assertThat(tickets.size(), is(1));
        assertThat(tickets.get(0).getName(), is("name"));
        assertThat(tickets.get(0).getApplicationStart(), is(TicketApplicationStart.ANYTIME));
        assertThat(tickets.get(0).getApplicationEnd(), is(TicketApplicationEnd.TILL_TIME_BEFORE_EVENT));
View Full Code Here

        addFormParameter(proxy, "amount[]", new String[] {});

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(DEFAULT_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();

        assertThat(tickets.size(), is(0));
    }
View Full Code Here

        UserEx user = getLoginUser();
        String passcode = getParameter("passcode");
        if (passcode == null)
            passcode = session().get("event:" + eventId);

        EventEx event = new GetTransaction(user, eventId, passcode).execute();

        ObjectNode obj = new ObjectNode(JsonNodeFactory.instance);
        obj.put("event", event.toSafeJSON());
        return renderOK(obj);
    }
View Full Code Here

        this.passcode = passcode;
    }

    @Override
    protected EventEx doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
        EventEx event = EventDAOFacade.getEventEx(con, daos, eventId);
        if (event == null)
            throw new PartakeException(UserErrorCode.INVALID_EVENT_ID);

        if (!StringUtils.isBlank(event.getPasscode())) {
            // owner および manager は見ることが出来る。
            if (user != null && PrivateEventShowPermission.check(event, user)) {
                // OK. You have the right to show this event.
            } else if (StringUtils.equals(event.getPasscode(), passcode)) {
                // OK. The same passcode.
            } else {
                // public でなければ、passcode を入れなければ見ることが出来ない
                throw new PartakeException(UserErrorCode.FORBIDDEN_EVENT_SHOW);
            }
View Full Code Here

            while (it.hasNext()) {
                Event e = it.next();
                if (e == null) { continue; }
                String eventId = e.getId();
                if (eventId == null) { continue; }
                EventEx event = EventDAOFacade.getEventEx(con, daos, eventId);
                if (event == null) { continue; }
                if (event.getBeginDate().isBefore(now)) { continue; }

                List<EventTicket> tickets = daos.getEventTicketAccess().findEventTicketsByEventId(con, eventId);
                for (EventTicket ticket : tickets)
                    sendEventNotification(con, daos, ticket, event, topPath, now);
            }
View Full Code Here

                if (relatedEvent != null)
                    relatedEvents.add(relatedEvent);
            }
        }

        return new EventEx(event, owner, feedId, tickets, editors, relatedEvents);
    }
View Full Code Here

                if (!Util.isUUID(eventId)) {
                    Logger.warn("eventId is not UUID.... Should not happen. : " + eventId);
                    continue;
                }

                EventEx event = EventDAOFacade.getEventEx(con, daos, eventId);
                if (event == null)
                    continue;

                if (!now.isBefore(event.getBeginDate()))
                    continue;

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

        checkIdParameterIsValid(eventId, UserErrorCode.INVALID_NOTFOUND, UserErrorCode.INVALID_NOTFOUND);

        ParticipantsListTransaction transaction = new ParticipantsListTransaction(user, eventId);
        transaction.execute();

        EventEx event = transaction.getEvent();
        List<Pair<EventTicket, EventTicketHolderList>> ticketAndHolders = transaction.getTicketAndHolders();
        Map<String, List<String>> userTicketInfoMap = transaction.getUserTicketInfoMap();

        try {
            byte[] body = createCSVInputStream(event, ticketAndHolders, userTicketInfoMap);
View Full Code Here

TOP

Related Classes of in.partake.model.EventEx

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.