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

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


                }
            });

        discussion = forum.startDiscussion(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD");

        DomainRegistry.discussionRepository().save(discussion);

        assertNotNull(tenant);
View Full Code Here


                }
            });

        discussion = forum.startDiscussion(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD");

        DomainRegistry.discussionRepository().save(discussion);

        post = discussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "Subject",
                "Body text.");

        DomainRegistry.postRepository().save(post);
View Full Code Here

        this.userInRoleAdapter = aUserInRoleAdapter;
    }

    @Override
    public Author authorFrom(Tenant aTenant, String anIdentity) {
        Author author =
                this.userInRoleAdapter()
                    .toCollaborator(
                            aTenant,
                            anIdentity,
                            "Author",
View Full Code Here

    protected Discussion discussionAggregate(Forum aForum) {

        Discussion discussion = aForum.startDiscussionFor(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD",
                UUID.randomUUID().toString().toUpperCase());

        return discussion;
    }
View Full Code Here

    protected Discussion[] discussionAggregates(Forum aForum) {

        Discussion discussion1 = aForum.startDiscussionFor(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD",
                UUID.randomUUID().toString().toUpperCase());

        Discussion discussion2 = aForum.startDiscussionFor(
                DomainRegistry.forumIdentityService(),
                new Author("zoe", "Zoe Doe", "zoe@saasovation.com"),
                "I Already Know That, Too",
                UUID.randomUUID().toString().toUpperCase());

        Discussion discussion3 = aForum.startDiscussionFor(
                DomainRegistry.forumIdentityService(),
                new Author("joe", "Joe Smith", "joe@saasovation.com"),
                "I've Forgotten More Than Zoe Knows",
                UUID.randomUUID().toString().toUpperCase());

        return new Discussion[] { discussion1, discussion2, discussion3 };
    }
View Full Code Here

    protected Post postAggregate(Discussion aDiscussion) {

        Post post = aDiscussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "I Am All About DDD",
                "That's what I'm talk'n about.");

        return post;
    }
View Full Code Here

    protected Post[] postAggregates(Discussion aDiscussion) {

        Post post1 = aDiscussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "I Am All About DDD",
                "That's what I'm talk'n about.");

        Post post2 = aDiscussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("zoe", "Zoe Doe", "zoe@saasovation.com"),
                "RE: I Am All About DDD",
                "No, no, no. That's what *I'm* talk'n about.");

        Post post3 = aDiscussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("joe", "Joe Smith", "joe@saasovation.com"),
                "RE: I Am All About DDD",
                "Did I mention that I've forgotten more than you will ever know?");

        return new Post[] { post1, post2, post3 };
    }
View Full Code Here

                }
            });

        discussion = forum.startDiscussion(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD");

        DomainRegistry.discussionRepository().save(discussion);

        assertNotNull(discussion);
        assertNotNull(discussionId);

        post = discussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD",
                "I'd like to start a discussion all about doing domain-driven design.");

        DomainRegistry.postRepository().save(post);
View Full Code Here

                }
            });

        discussion = forum.startDiscussion(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD");

        DomainRegistry.discussionRepository().save(discussion);

        DomainEventPublisher
            .instance()
            .subscribe(new DomainEventSubscriber<PostedToDiscussion>() {
            public void handleEvent(PostedToDiscussion aDomainEvent) {
                tenant = aDomainEvent.tenant();
                forumId = aDomainEvent.forumId();
                discussionId = aDomainEvent.discussionId();
                postId = aDomainEvent.postId();
                subject = aDomainEvent.subject();
                bodyText = aDomainEvent.bodyText();
            }
            public Class<PostedToDiscussion> subscribedToEventType() {
                return PostedToDiscussion.class;
            }
        });

        post = discussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("jdoe", "John Doe", "jdoe@saasovation.com"),
                "All About DDD",
                "I'd like to start a discussion all about doing domain-driven design.");

        postAgain = discussion.post(
                DomainRegistry.forumIdentityService(),
                new Author("bobw", "Bob Williams", "bobw@saasovation.com"),
                "RE: All About DDD",
                "Well, I think it's a great idea!");

        DomainRegistry.postRepository().save(post);
        DomainRegistry.postRepository().save(postAgain);
View Full Code Here

                                     tenant,
                                     new DiscussionId(discussionId));
        }

        if (discussion == null) {
            Author author =
                    this.collaboratorService().authorFrom(tenant, anAuthorId);

            discussion =
                    forum.startDiscussionFor(
                            this.forumIdentityService(),
View Full Code Here

TOP

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

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.