Examples of CopyTransTaskHandle


Examples of org.zanata.async.handle.CopyTransTaskHandle

        copyTransOptionsModel.update(action, value);
    }

    @Override
    public String getCompletedPercentage() {
       CopyTransTaskHandle handle =
                copyTransManager
                        .getCopyTransProcessHandle(getProjectIteration());
        if (handle != null) {
            double completedPercent =
                    (double) handle.getCurrentProgress() / (double) handle
                            .getMaxProgress() * 100;
            if (Double.compare(completedPercent, 100) == 0) {
                conversationScopeMessages
                        .setMessage(
                                FacesMessage.SEVERITY_INFO,
View Full Code Here

Examples of org.zanata.async.handle.CopyTransTaskHandle

        conversationScopeMessages.setMessage(FacesMessage.SEVERITY_INFO,
                msgs.get("jsf.iteration.CopyTrans.Cancelled"));
    }

    public String getCurrentProgress() {
        CopyTransTaskHandle handle =
                copyTransManager
                        .getCopyTransProcessHandle(getProjectIteration());
        if (handle != null) {
            return String.valueOf(handle.getCurrentProgress());
        }
        return "";
    }
View Full Code Here

Examples of org.zanata.async.handle.CopyTransTaskHandle

        }
        return "";
    }

    public String getMaxProgress() {
        CopyTransTaskHandle handle =
                copyTransManager
                        .getCopyTransProcessHandle(getProjectIteration());
        if (handle != null) {
            return String.valueOf(handle.getMaxProgress());
        }
        return "";
    }
View Full Code Here

Examples of org.zanata.async.handle.CopyTransTaskHandle

                    + projectSlug + "/" + iterationSlug + "/" + docId);
        }

        identity.checkPermission("copy-trans", document.getProjectIteration());

        CopyTransTaskHandle processHandle =
                copyTransManager.getCopyTransProcessHandle(document);

        if (processHandle == null) {
            throw new NoSuchEntityException(
                    "There are no current or recently finished Copy Trans processes for this document.");
        }

        CopyTransStatus status = new CopyTransStatus();
        status.setInProgress(!processHandle.isDone());
        float percent =
                ((float) processHandle.getCurrentProgress() / processHandle
                        .getMaxProgress()) * 100;
        status.setPercentageComplete((int) percent);
        return status;
    }
View Full Code Here

Examples of org.zanata.async.handle.CopyTransTaskHandle

        }
        return "";
    }

    public String getCopyTransEstimatedTimeLeft() {
        CopyTransTaskHandle handle =
                copyTransManager
                        .getCopyTransProcessHandle(getProjectIteration());
        if (handle != null) {
            Optional<Long> estimatedTimeRemaining =
                    handle.getEstimatedTimeRemaining();
            if (estimatedTimeRemaining.isPresent()) {
                return DateUtil
                        .getTimeRemainingDescription(estimatedTimeRemaining
                                .get());
            }
View Full Code Here

Examples of org.zanata.async.handle.CopyTransTaskHandle

                        execution.getDocumentMismatchAction(),
                        execution.getProjectMismatchAction());
        CopyTransService copyTransService =
                seam.autowire(CopyTransServiceImpl.class);
        copyTransService.copyTransForIteration(projectIteration, options,
                new CopyTransTaskHandle());
        getEm().flush();

        // Validate execution
        HTextFlow targetTextFlow =
                (HTextFlow) getEm()
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.