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

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


    public void testAssignModerator() throws Exception {

        forum = this.forumAggregate();

        forum.assignModerator(new Moderator("zdoe", "Zoe Doe", "zdoe@saasovation.com"));

        assertEquals("zdoe", forum.moderator().identity());
        assertEquals("zdoe@saasovation.com", forum.moderator().emailAddress());

        DomainRegistry.forumRepository().save(forum);
View Full Code Here


        Forum forum =
            new Forum(
                    tenant,
                    DomainRegistry.forumRepository().nextIdentity(),
                    new Creator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    new Moderator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    "John Doe Does DDD",
                    "A set of discussions about DDD for anonymous developers.",
                    null);

        return forum;
View Full Code Here

                this.forumRepository()
                    .forumOfId(
                            tenant,
                            new ForumId(aForumId));

        Moderator moderator =
                this.collaboratorService().moderatorFrom(tenant, aModeratorId);

        Post post = this.postRepository().postOfId(tenant, new PostId(aPostId));

        forum.moderatePost(post, moderator, aSubject, aBodyText);
View Full Code Here

        return creator;
    }

    @Override
    public Moderator moderatorFrom(Tenant aTenant, String anIdentity) {
        Moderator moderator =
                this.userInRoleAdapter()
                    .toCollaborator(
                            aTenant,
                            anIdentity,
                            "Moderator",
View Full Code Here

        Forum forum =
            new Forum(
                    tenant,
                    DomainRegistry.forumRepository().nextIdentity(),
                    new Creator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    new Moderator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    "John Doe Does DDD",
                    "A set of discussions about DDD for anonymous developers.",
                    UUID.randomUUID().toString().toUpperCase());

        return forum;
View Full Code Here

        Forum forum1 =
            new Forum(
                    tenant,
                    DomainRegistry.forumRepository().nextIdentity(),
                    new Creator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    new Moderator("jdoe", "John Doe", "jdoe@saasovation.com"),
                    "John Doe Does DDD",
                    "A set of discussions about DDD for anonymous developers.",
                    UUID.randomUUID().toString().toUpperCase());

        Forum forum2 =
                new Forum(
                        tenant,
                        DomainRegistry.forumRepository().nextIdentity(),
                        new Creator("zdoe", "Zoe Doe", "zoe@saasovation.com"),
                        new Moderator("zoe", "Zoe Doe", "jdoe@saasovation.com"),
                        "Zoe Doe Knows DDD",
                        "Discussions about how ubiquitous Zoe's knows is.",
                        UUID.randomUUID().toString().toUpperCase());

        Forum forum3 =
                new Forum(
                        tenant,
                        DomainRegistry.forumRepository().nextIdentity(),
                        new Creator("joe", "Joe Smith", "joe@saasovation.com"),
                        new Moderator("joe", "Joe Smith", "joe@saasovation.com"),
                        "Joe Owns DDD",
                        "Discussions about Joe's Values.",
                        UUID.randomUUID().toString().toUpperCase());

        return new Forum[] { forum1, forum2, forum3 };
View Full Code Here

                this.forumRepository()
                    .forumOfId(
                            tenant,
                            new ForumId(aForumId));

        Moderator moderator =
                this.collaboratorService().moderatorFrom(tenant, aModeratorId);

        forum.assignModerator(moderator);

        this.forumRepository().save(forum);
View Full Code Here

            String anExclusiveOwner) {

        Creator creator =
                this.collaboratorService().creatorFrom(aTenant, aCreatorId);

        Moderator moderator =
                this.collaboratorService().moderatorFrom(aTenant, aModeratorId);

        Forum newForum =
            new Forum(
                    aTenant,
View Full Code Here

TOP

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

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.