Package com.saasovation.common.notification

Examples of com.saasovation.common.notification.NotificationReader


        @Override
        protected void filteredDispatch(String aType, String aTextMessage) {

            System.out.println("AllPhoneNumbersListed (to total)...");

            NotificationReader reader = new NotificationReader(aTextMessage);

            String allPhoneNumbers = reader.eventStringValue("allPhoneNumbers");

            String[] allPhoneNumbersToCount = allPhoneNumbers.split("\n");

            Notification notification =
                    new Notification(
                            1L,
                            new AllPhoneNumbersCounted(
                                    reader.eventStringValue("processId"),
                                    allPhoneNumbersToCount.length));

            send(notification);
        }
View Full Code Here


        return Exchanges.COLLABORATION_EXCHANGE_NAME;
    }

    @Override
    protected void filteredDispatch(String aType, String aTextMessage) {
        NotificationReader reader = new NotificationReader(aTextMessage);

        String tenantId = reader.eventStringValue("tenantId");
        String exclusiveOwnerId = reader.eventStringValue("exclusiveOwnerId");
        String creatorId = reader.eventStringValue("creatorId");
        String moderatorId = reader.eventStringValue("moderatorId");
        String authorId = reader.eventStringValue("authorId");
        String forumSubject = reader.eventStringValue("forumTitle");
        String forumDescription = reader.eventStringValue("forumDescription");
        String discussionSubject = reader.eventStringValue("discussionSubject");

        forumApplicationService
            .startExclusiveForumWithDiscussion(
                    tenantId,
                    exclusiveOwnerId,
View Full Code Here

        return Exchanges.COLLABORATION_EXCHANGE_NAME;
    }

    @Override
    protected void filteredDispatch(String aType, String aTextMessage) {
        NotificationReader reader = new NotificationReader(aTextMessage);

        String ownerId = reader.eventStringValue("exclusiveOwner");

        if (!ProductDiscussionExclusiveOwnerId.isValid(ownerId)) {
            return;
        }

        String tenantId = reader.eventStringValue("tenant.id");
        String productId =
                ProductDiscussionExclusiveOwnerId
                    .fromEncodedId(ownerId)
                    .id();
        String discussionId = reader.eventStringValue("discussionId.id");

        this.productApplicationService().initiateDiscussion(
                new InitiateDiscussionCommand(
                    tenantId,
                    productId,
View Full Code Here

        return Exchanges.AGILEPM_EXCHANGE_NAME;
    }

    @Override
    protected void filteredDispatch(String aType, String aTextMessage) {
        NotificationReader reader = new NotificationReader(aTextMessage);

        if (!reader.eventBooleanValue("requestingDiscussion")) {
            return;
        }

        String tenantId = reader.eventStringValue("tenantId.id");
        String productId = reader.eventStringValue("product.id");

        this.productApplicationService().startDiscussionInitiation(
                new StartDiscussionInitiationCommand(
                        tenantId,
                        productId));
View Full Code Here

    protected String exchangeName() {
        return Exchanges.IDENTITY_ACCESS_EXCHANGE_NAME;
    }

    protected void filteredDispatch(String aType, String aTextMessage) {
        NotificationReader reader = new NotificationReader(aTextMessage);

        String roleName = reader.eventStringValue("roleName");

        if (!roleName.equals("ScrumProductOwner") &&
            !roleName.equals("ScrumTeamMember")) {
            return;
        }

        String tenantId = reader.eventStringValue("tenantId.id");
        String username = reader.eventStringValue("username");
        Date occurredOn = reader.occurredOn();

        if (roleName.equals("ScrumProductOwner")) {
            this.teamApplicationService().disableProductOwner(
                    new DisableProductOwnerCommand(
                        tenantId,
View Full Code Here

    protected String exchangeName() {
        return Exchanges.IDENTITY_ACCESS_EXCHANGE_NAME;
    }

    protected void filteredDispatch(String aType, String aTextMessage) {
        NotificationReader reader = new NotificationReader(aTextMessage);

        String firstName = reader.eventStringValue("name.firstName");
        String lastName = reader.eventStringValue("name.lastName");
        String tenantId = reader.eventStringValue("tenantId.id");
        String username = reader.eventStringValue("username");
        Date occurredOn = reader.occurredOn();

        this.teamApplicationService().changeTeamMemberName(
                new ChangeTeamMemberNameCommand(
                    tenantId,
                    username,
View Full Code Here

TOP

Related Classes of com.saasovation.common.notification.NotificationReader

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.