Package org.zanata.events

Examples of org.zanata.events.DocumentMilestoneEvent


                    projectIterationDAO.findById(event.getProjectIterationId());
            HProject project = version.getProject();

            if (!project.getWebHooks().isEmpty()) {
                HDocument document = documentDAO.getById(event.getDocumentId());
                DocumentMilestoneEvent milestoneEvent =
                        new DocumentMilestoneEvent(project.getSlug(),
                                version.getSlug(), document.getDocId(),
                                event.getLocaleId(), message);
                for (WebHook webHook : project.getWebHooks()) {
                    publishDocumentMilestoneEvent(webHook, milestoneEvent);
                }
View Full Code Here


        WordStatistic stats = new WordStatistic(0, 0, 0, 10, 0);
        runDocumentStatisticUpdatedTest(spyService, ContentState.New,
                ContentState.Translated, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug, versionSlug,
                        docIdString, localeId,
                        msgs.format("jsf.webhook.response.state", milestone,
                                ContentState.Translated));

        verify(spyService).publishDocumentMilestoneEvent(webHooks.get(0),
View Full Code Here

        WordStatistic stats = new WordStatistic(0, 1, 0, 9, 0);
        runDocumentStatisticUpdatedTest(spyService, ContentState.New,
                ContentState.Translated, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug, versionSlug,
                        docIdString, localeId,
                        msgs.format("jsf.webhook.response.state", milestone,
                                ContentState.Translated));

        verify(spyService, never()).publishDocumentMilestoneEvent(
View Full Code Here

        WordStatistic stats = new WordStatistic(10, 0, 0, 0, 0);
        runDocumentStatisticUpdatedTest(spyService, ContentState.Translated,
                ContentState.Approved, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug,
                        versionSlug, docIdString,
                        localeId, msgs.format("jsf.webhook.response.state",
                                milestone, ContentState.Approved));
        verify(spyService).publishDocumentMilestoneEvent(webHooks.get(0),
                milestoneEvent);
View Full Code Here

        WordStatistic stats = new WordStatistic(9, 0, 0, 1, 0);
        runDocumentStatisticUpdatedTest(spyService, ContentState.Translated,
                ContentState.Approved, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug, versionSlug,
                        docIdString, localeId, msgs.format(
                                "jsf.webhook.response.state", milestone,
                                ContentState.Approved));

        verify(spyService, never()).publishDocumentMilestoneEvent(
View Full Code Here

        WordStatistic stats = new WordStatistic(10, 0, 0, 0, 0);

        runDocumentStatisticUpdatedTest(spyService, ContentState.Approved,
                ContentState.Approved, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug, versionSlug,
                        docIdString, localeId, msgs.format(
                                "jsf.webhook.response.state", milestone,
                                ContentState.Approved));
        verify(spyService, never()).publishDocumentMilestoneEvent(
                webHooks.get(0), milestoneEvent);
View Full Code Here

        WordStatistic stats = new WordStatistic(0, 0, 0, 10, 0);

        runDocumentStatisticUpdatedTest(spyService, ContentState.Translated,
                ContentState.Translated, stats);

        DocumentMilestoneEvent milestoneEvent =
                new DocumentMilestoneEvent(projectSlug, versionSlug,
                        docIdString, localeId, msgs.format(
                                "jsf.webhook.response.state", milestone,
                                ContentState.Translated));
        verify(spyService, never()).publishDocumentMilestoneEvent(
                webHooks.get(0), milestoneEvent);
View Full Code Here

TOP

Related Classes of org.zanata.events.DocumentMilestoneEvent

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.