Package com.saasovation.collaboration.domain.model.collaborator

Examples of com.saasovation.collaboration.domain.model.collaborator.Participant


        Calendar calendar = this.calendarAggregate();

        DomainRegistry.calendarRepository().save(calendar);

        Set<Participant> invitees = new TreeSet<Participant>();
        invitees.add(new Participant("zoe", "Zoe Doe", "zoe@saasovation.com"));

        CalendarEntry calendarEntry1 =
            calendar.scheduleCalendarEntry(
                    DomainRegistry.calendarIdentityService(),
                    "A Doctor Checkup",
View Full Code Here


    protected Calendar[] calendarAggregates() {

        Tenant tenant = new Tenant("01234567");

        Set<CalendarSharer> invitees = new TreeSet<CalendarSharer>();
        invitees.add(new CalendarSharer(new Participant("zoe", "Zoe Doe", "zoe@saasovation.com")));

        Calendar calendar1 =
                new Calendar(
                        tenant,
                        DomainRegistry.calendarRepository().nextIdentity(),
View Full Code Here

        assertTrue(calendar.allSharedWith().isEmpty());

        calendar.shareCalendarWith(
                new CalendarSharer(
                        new Participant("zdoe", "Zoe Doe", "zdoe@saasovation.com")));

        calendar.shareCalendarWith(
                new CalendarSharer(
                        new Participant("jdoe", "John Doe", "jdoe@saasovation.com")));

        assertFalse(calendar.allSharedWith().isEmpty());

        CalendarSharer sharer = calendar.allSharedWith().iterator().next();
View Full Code Here

        assertTrue(calendar.allSharedWith().isEmpty());

        calendar.shareCalendarWith(
                new CalendarSharer(
                        new Participant("zdoe", "Zoe Doe", "zdoe@saasovation.com")));

        calendar.shareCalendarWith(
                new CalendarSharer(
                        new Participant("jdoe", "John Doe", "jdoe@saasovation.com")));

        assertFalse(calendar.allSharedWith().isEmpty());

        DomainRegistry.calendarRepository().save(calendar);
View Full Code Here

        CalendarEntry calendarEntry = this.calendarEntryAggregate();

        assertTrue(calendarEntry.allInvitees().isEmpty());

        Participant invitee1 = new Participant("jdoe", "John Doe", "jdoe@saasovation.com");

        calendarEntry.invite(invitee1);

        assertFalse(calendarEntry.allInvitees().isEmpty());
        assertEquals(1, calendarEntry.allInvitees().size());
        assertEquals(invitee1, calendarEntry.allInvitees().iterator().next());

        calendarEntry.uninvite(invitee1);

        assertTrue(calendarEntry.allInvitees().isEmpty());

        Participant invitee2 = new Participant("tsmith", "Tom Smith", "tsmith@saasovation.com");

        calendarEntry.invite(invitee1);
        calendarEntry.invite(invitee2);

        assertFalse(calendarEntry.allInvitees().isEmpty());
        assertEquals(2, calendarEntry.allInvitees().size());

        Iterator<Participant> iterator = calendarEntry.allInvitees().iterator();
        Participant participant1 = iterator.next();
        Participant participant2 = iterator.next();

        assertTrue(participant1.equals(invitee1) || participant1.equals(invitee2));
        assertTrue(participant2.equals(invitee1) || participant2.equals(invitee2));

        calendarEntry.uninvite(invitee1);

        assertFalse(calendarEntry.allInvitees().isEmpty());
View Full Code Here

            Set<String> aParticipantsToInvite) {

        Set<Participant> invitees = new HashSet<Participant>();

        for (String participatnId : aParticipantsToInvite) {
            Participant participant =
                    this.collaboratorService().participantFrom(aTenant, participatnId);

            invitees.add(participant);
        }
View Full Code Here

        Set<CalendarSharer> sharers =
                new HashSet<CalendarSharer>(aParticipantsToSharedWith.size());

        for (String participatnId : aParticipantsToSharedWith) {
            Participant participant =
                    this.collaboratorService().participantFrom(aTenant, participatnId);

            sharers.add(new CalendarSharer(participant));
        }
View Full Code Here

            Set<String> aParticipantsToInvite) {

        Set<Participant> invitees = new HashSet<Participant>();

        for (String participatnId : aParticipantsToInvite) {
            Participant participant =
                    this.collaboratorService().participantFrom(aTenant, participatnId);

            invitees.add(participant);
        }
View Full Code Here

        return owner;
    }

    @Override
    public Participant participantFrom(Tenant aTenant, String anIdentity) {
        Participant participant =
                this.userInRoleAdapter()
                    .toCollaborator(
                            aTenant,
                            anIdentity,
                            "Participant",
View Full Code Here

    public void testQueryCalendar() throws Exception {
        Calendar calendar = this.calendarAggregate();

        CalendarSharer sharerZoe = new CalendarSharer(
                new Participant("zoe", "Zoe Doe", "zoe@saasovation.com"));

        calendar.shareCalendarWith(sharerZoe);

        CalendarSharer sharerJoe = new CalendarSharer(
                new Participant("joe", "Joe Smith", "joe@saasovation.com"));

        calendar.shareCalendarWith(sharerJoe);

        DomainRegistry.calendarRepository().save(calendar);
View Full Code Here

TOP

Related Classes of com.saasovation.collaboration.domain.model.collaborator.Participant

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.