Package org.zanata.webtrans.shared.model

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


                            new DocumentId(hDoc.getId(), hDoc.getDocId()),
                            hDoc.getName(),
                            hDoc.getPath(),
                            hDoc.getLocale().getLocaleId(),
                            null,
                            new AuditInfo(hDoc.getLastChanged(), lastModifiedBy),
                            downloadExtensions, null);
            docs.add(doc);
        }
        return new GetDocumentListResult(iterationId, docs);
    }
View Full Code Here


                    .getTransUnit());

            Integer row = pageRows.get(updatedDoc.getId());
            if (row != null) {
                display.updateStats(row, updatedDoc.getStats());
                AuditInfo lastTranslated =
                        new AuditInfo(event.getUpdateInfo().getTransUnit()
                                .getLastModifiedTime(), event.getUpdateInfo()
                                .getTransUnit().getLastModifiedBy());
                display.updateLastTranslated(row, lastTranslated);
            }
            eventBus.fireEvent(new DocumentStatsUpdatedEvent(
View Full Code Here

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

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

                    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

        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

                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

                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

        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

                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

    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

TOP

Related Classes of org.zanata.webtrans.shared.model.AuditInfo

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.