Examples of AuditInfo


Examples of org.zanata.webtrans.shared.model.AuditInfo

                .newArrayList(nodes.values())));
    }

    private void updateLastTranslatedInfo(DocumentInfo doc,
            TransUnit updatedTransUnit) {
        doc.setLastTranslated(new AuditInfo(updatedTransUnit
                .getLastModifiedTime(), updatedTransUnit.getLastModifiedBy()));
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

                    translationStateCacheImpl.getDocumentStatus(documentId
                            .getId(), action.getWorkspaceId().getLocaleId());

            lastTranslatedMap.put(
                    documentId,
                    new AuditInfo(docStat.getLastTranslatedDate(), docStat
                            .getLastTranslatedBy()));
        }
        return new GetDocumentStatsResult(statsMap, lastTranslatedMap);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

        HashMap<String, String> extensions = new HashMap<String, String>();
        extensions.put(".po", "");

        ArrayList<DocumentInfo> names = new ArrayList<DocumentInfo>();
        names.add(new DocumentInfo(new DocumentId(new Long(0), ""), "name0",
                "", LocaleId.EN_US, newStats(0), new AuditInfo(new Date(),
                        "Translator"), extensions, new AuditInfo(new Date(),
                        "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(1), ""),
                "path1name1", "path/1", LocaleId.EN_US, newStats(1),
                new AuditInfo(new Date(), "Translator"), extensions,
                new AuditInfo(new Date(), "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(2), ""),
                "path1name2", "path/1", LocaleId.EN_US, newStats(2),
                new AuditInfo(new Date(), "Translator"), extensions,
                new AuditInfo(new Date(), "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(3), ""),
                "path2name1", "path/2", LocaleId.EN_US, newStats(3),
                new AuditInfo(new Date(), "Translator"), extensions,
                new AuditInfo(new Date(), "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(4), ""),
                "path2name2", "path/2", LocaleId.EN_US, newStats(4),
                new AuditInfo(new Date(), "Translator"), extensions,
                new AuditInfo(new Date(), "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(5), ""), "name2",
                "", LocaleId.EN_US, newStats(5), new AuditInfo(new Date(),
                        "Translator"), extensions, new AuditInfo(new Date(),
                        "last translator")));
        names.add(new DocumentInfo(new DocumentId(new Long(6), ""), "name1",
                "", LocaleId.EN_US, newStats(6), new AuditInfo(new Date(),
                        "Translator"), extensions, new AuditInfo(new Date(),
                        "last translator")));
        names.add(new DocumentInfo(
                new DocumentId(new Long(7), ""),
                "long name, a name which is really quite long, too wide to be displayed without scrolling (in most cases)",
                "", LocaleId.EN_US, newStats(7), new AuditInfo(new Date(),
                        "Translator"), extensions, new AuditInfo(new Date(),
                        "last translator")));
        names.add(new DocumentInfo(
                new DocumentId(new Long(8), ""),
                "another long name, a name which is really quite long, too wide to be displayed without scrolling (in most cases)",
                "long path, a path which is, again, really quite long, and also too wide to be displayed without scrolling (in most cases)",
                LocaleId.EN_US, newStats(8), new AuditInfo(new Date(),
                        "Translator"), extensions, new AuditInfo(new Date(),
                        "last translator")));
        for (int n = 0; n < 100; n++) {
            // two digit numbers, to make sorting happier
            names.add(new DocumentInfo(new DocumentId(new Long(n), ""), "multi"
                    + n, "", LocaleId.EN_US, newStats(n), new AuditInfo(
                    new Date(), "Translator"), extensions, new AuditInfo(
                    new Date(), "last translator")));
        }
        return names;
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

                new WorkspaceRestrictions(true, true, true, true, true);
        UserWorkspaceContext userWorkspaceContext =
                new UserWorkspaceContext(context, workspaceRestrictions);
        userWorkspaceContext.setSelectedDoc(new DocumentInfo(new DocumentId(
                new Long(1), "Dummy path/Dummy doc"), "Dummy doc",
                "Dummy path", LocaleId.EN_US, null, new AuditInfo(new Date(),
                        "Translator"), new HashMap<String, String>(),
                new AuditInfo(new Date(), "last translator")));

        Identity identity =
                new Identity(
                        new EditorClientId("123456", 1),
                        new Person(new PersonId("bob"), "Bob The Builder",
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

                1, 2, 3), LocaleId.EN_US.toString()));
        newSelectedStats.addStats(new TranslationStatistics(new TransUnitWords(
                4, 5, 6), LocaleId.EN_US.toString()));
        DocumentInfo documentInfo =
                new DocumentInfo(docId, "a.po", "pot/", new LocaleId("en-US"),
                        newSelectedStats, new AuditInfo(new Date(),
                                "Translator"), new HashMap<String, String>(),
                        new AuditInfo(new Date(), "last translator"));
        when(documentListPresenter.getDocumentInfo(docId)).thenReturn(
                documentInfo);
        // current view is editor
        presenter.showView(MainView.Editor);
        verify(display).setStats(statsCaptor.capture(), eq(true));
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

        newSelectedStats.addStats(new TranslationStatistics(new TransUnitWords(
                4, 5, 6), LocaleId.EN_US.toString()));

        DocumentInfo documentInfo =
                new DocumentInfo(docId, "a.po", "pot/", new LocaleId("en-US"),
                        newSelectedStats, new AuditInfo(new Date(),
                                "Translator"), new HashMap<String, String>(),
                        new AuditInfo(new Date(), "last translator"));
        when(documentListPresenter.getDocumentInfo(docId)).thenReturn(
                documentInfo);

        // When:
        presenter.selectDocument(docId);
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

                null);
        presenter.showView(MainView.Editor);
        DocumentId docId = new DocumentId(1L, "");
        DocumentInfo documentInfo =
                new DocumentInfo(docId, "a.po", "pot/", new LocaleId("en-US"),
                        selectedDocumentStats, new AuditInfo(new Date(),
                                "Translator"), new HashMap<String, String>(),
                        new AuditInfo(new Date(), "last translator"));
        when(documentListPresenter.getDocumentInfo(docId)).thenReturn(
                documentInfo);
        presenter.selectDocument(docId);
        verify(display, atLeastOnce()).setStats(selectedDocumentStats, true);
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

    public void onDocumentsClickWillFireNewHistoryItemAndSwitchToDocumentView() {
        // Given: current token is search view and has selected doc
        DocumentId docId = new DocumentId(1L, "");
        DocumentInfo documentInfo =
                new DocumentInfo(docId, "a.po", "pot/", new LocaleId("en-US"),
                        selectedDocumentStats, new AuditInfo(new Date(),
                                "Translator"), new HashMap<String, String>(),
                        new AuditInfo(new Date(), "last translator"));
        when(documentListPresenter.getDocumentInfo(docId)).thenReturn(
                documentInfo);
        when(history.getToken()).thenReturn("view:search;doc:pot/a.po");
        presenter.selectDocument(docId);
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

            .toString()));

        DocumentInfo docInfo =
            new DocumentInfo(new DocumentId(1111L, "no/filter/matches"),
                "matches", "no/filter", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        docInfo =
            new DocumentInfo(new DocumentId(2222L, "match/exact/filter"),
                "filter", "match/exact/", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        docInfo =
            new DocumentInfo(new DocumentId(3333L,
                "does/not/match/exact/filter"), "filter",
                "does/not/match/exact/", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        return docList;
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.AuditInfo

        // simulate document click on second document
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(2222L, ""), "doc122",
                        "second/path/", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
        documentListPresenter.fireDocumentSelection(docInfo);

        verify(mockHistory).newItem(capturedHistoryToken.capture());
        verify(mockUserWorkspaceContext).setSelectedDoc(docInfo);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.