Examples of DocumentStatus


Examples of com.gcrm.domain.DocumentStatus

     * @return the SUCCESS result
     */
    public String get() throws Exception {
        if (this.getId() != null) {
            document = baseService.getEntityById(Document.class, this.getId());
            DocumentStatus status = document.getStatus();
            if (status != null) {
                statusID = status.getId();
            }
            DocumentCategory category = document.getCategory();
            if (category != null) {
                categoryID = category.getId();
            }
View Full Code Here

Examples of com.gcrm.domain.DocumentStatus

            document.setOpportunities(originalDocument.getOpportunities());
            document.setCreated_on(originalDocument.getCreated_on());
            document.setCreated_by(originalDocument.getCreated_by());
        }

        DocumentStatus status = null;
        if (statusID != null) {
            status = documentStatusService.getEntityById(DocumentStatus.class,
                    statusID);
        }
        document.setStatus(status);
View Full Code Here

Examples of com.suarte.core.DocumentStatus

    public InvoiceList() {
        setSortColumn("id"); // sets the default sort column
    }

    public String execute() {
        DocumentStatus status = stStatus != null ? DocumentStatus.valueOf(stStatus) : null;
        invoices = sort(invoiceManager.findInvoices(id, quotationId, description, date, company, contact, status, fromExpiration, toExpiration));

        return "list";
    }
View Full Code Here

Examples of org.jbake.model.DocumentStatus

                    StringBuilder sb = new StringBuilder();
                    sb.append("Processing [").append(sourceFile.getPath()).append("]... ");
                    String sha1 = buildHash(sourceFile);
                    String uri = buildURI(sourceFile);
                    boolean process = true;
                    DocumentStatus status = DocumentStatus.NEW;
                    for (String docType : DocumentTypes.getDocumentTypes()) {
                        status = findDocumentStatus(docType, uri, sha1);
                        switch (status) {
                            case UPDATED:
                                sb.append(" : modified ");
View Full Code Here

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

        if (sortOption.equals(SortingType.SortOption.LAST_SOURCE_UPDATE)
                || sortOption.equals(SortingType.SortOption.LAST_TRANSLATED)) {
            if (sortOption.equals(SortingType.SortOption.LAST_SOURCE_UPDATE)) {
                date = document.getLastChanged();
            } else {
                DocumentStatus docStat =
                        translationStateCacheImpl.getDocumentStatus(
                                document.getId(), localeId);
                date = docStat.getLastTranslatedDate();
            }
        }

        return getDisplayUnit(sortOption, statistic, date);
    }
View Full Code Here

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

                return DateUtil.compareDate(o1.getLastChanged(),
                        o2.getLastChanged());
            } else if (selectedSortOption
                    .equals(SortingType.SortOption.LAST_TRANSLATED)) {
                if (selectedLocaleId != null) {
                    DocumentStatus docStat1 =
                            translationStateCacheImpl.getDocumentStatus(
                                    o1.getId(), selectedLocaleId);
                    DocumentStatus docStat2 =
                            translationStateCacheImpl.getDocumentStatus(
                                    o2.getId(), selectedLocaleId);

                    return DateUtil.compareDate(
                            docStat1.getLastTranslatedDate(),
                            docStat2.getLastTranslatedDate());
                }
            } else {
                WordStatistic wordStatistic1;
                WordStatistic wordStatistic2;
                if (selectedLocaleId != null) {
View Full Code Here

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

            ContainerTranslationStatistics stats =
                    statisticsServiceImpl.getDocStatistics(documentId.getId(),
                            action.getWorkspaceId().getLocaleId());
            statsMap.put(documentId, stats);

            DocumentStatus docStat =
                    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.DocumentStatus

        for (LocaleId localeId : localeIds) {
            ContainerTranslationStatistics docStats =
                    getDocStatistics(document.getId(), localeId);

            DocumentStatus docStatus =
                    translationStateCacheImpl.getDocumentStatus(
                            document.getId(), localeId);

            TranslationStatistics docWordStatistic =
                    docStats.getStats(localeId.getId(), StatUnit.WORD);
            TranslationStatistics docMsgStatistic =
                    docStats.getStats(localeId.getId(), StatUnit.MESSAGE);

            docMsgStatistic
                    .setLastTranslatedBy(docStatus.getLastTranslatedBy());
            docMsgStatistic.setLastTranslatedDate(docStatus
                    .getLastTranslatedDate());
            docMsgStatistic.setLastTranslated(getLastTranslated(
                    docStatus.getLastTranslatedDate(),
                    docStatus.getLastTranslatedBy()));
            docStatistics.addStats(docMsgStatistic);

            // word level stats
            if (includeWordStats) {
                docWordStatistic.setLastTranslatedBy(docStatus
                        .getLastTranslatedBy());
                docWordStatistic.setLastTranslatedDate(docStatus
                        .getLastTranslatedDate());
                docWordStatistic.setLastTranslated(getLastTranslated(
                        docStatus.getLastTranslatedDate(),
                        docStatus.getLastTranslatedBy()));
                docStatistics.addStats(docWordStatistic);
            }
        }
        return docStatistics;
    }
View Full Code Here

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

        // Given:
        Long documentId = new Long("100");
        LocaleId testLocaleId = LocaleId.DE;
        TranslationStateCacheImpl.DocumentLocaleKey key =
                new DocumentLocaleKey(documentId, testLocaleId);
        DocumentStatus docStats =
                new DocumentStatus(new DocumentId(documentId, ""), new Date(),
                        "");

        // When:
        when(docStatsLoader.load(key)).thenReturn(docStats);

        DocumentStatus result1 =
                tsCache.getDocumentStatus(documentId, testLocaleId);
        DocumentStatus result2 =
                tsCache.getDocumentStatus(documentId, testLocaleId);

        // Then:
        verify(docStatsLoader).load(key); // only load the value once
        assertThat(result1, equalTo(docStats));
View Full Code Here

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

        targetValidationCache.remove(event.getTextFlowTargetId());
    }

    private void updateDocStatusCache(DocumentLocaleKey key,
            Long updatedTargetId) {
        DocumentStatus documentStatus = docStatusCache.get(key);
        if(documentStatus != null) {
            HTextFlowTarget target =
                getTextFlowTargetDAO().findById(updatedTargetId, false);
            updateDocumentStatus(getDocumentDAO(), documentStatus,
                key.getDocumentId(), target);
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.