예제 #1
0
 public String getMaxProgress() {
   CopyTransTaskHandle handle = copyTransManager.getCopyTransProcessHandle(getProjectIteration());
   if (handle != null) {
     return String.valueOf(handle.getMaxProgress());
   }
   return "";
 }
예제 #2
0
 public String getCopyTransEstimatedTimeLeft() {
   CopyTransTaskHandle handle = copyTransManager.getCopyTransProcessHandle(getProjectIteration());
   if (handle != null) {
     Optional<Long> estimatedTimeRemaining = handle.getEstimatedTimeRemaining();
     if (estimatedTimeRemaining.isPresent()) {
       return DateUtil.getTimeRemainingDescription(estimatedTimeRemaining.get());
     }
   }
   return "";
 }
예제 #3
0
  public void startCopyTrans() {
    identity.checkPermission(getProjectIteration(), "copy-trans");
    if (isInProgress()) {
      return;
    } else if (getProjectIteration().getDocuments().size() <= 0) {
      conversationScopeMessages.setMessage(
          FacesMessage.SEVERITY_INFO, msgs.get("jsf.iteration.CopyTrans.NoDocuments"));
      return;
    }

    HCopyTransOptions options = copyTransOptionsModel.getInstance();

    copyTransManager.startCopyTrans(getProjectIteration(), options);
    conversationScopeMessages.setMessage(
        FacesMessage.SEVERITY_INFO, msgs.get("jsf.iteration.CopyTrans.Started"));
  }
예제 #4
0
 public boolean isInProgress() {
   return copyTransManager.isCopyTransRunning(getProjectIteration());
 }
예제 #5
0
 public void cancel() {
   copyTransManager.cancelCopyTrans(getProjectIteration());
   conversationScopeMessages.setMessage(
       FacesMessage.SEVERITY_INFO, msgs.get("jsf.iteration.CopyTrans.Cancelled"));
 }
예제 #6
0
 @Override
 protected CopyTransTaskHandle getHandle() {
   return copyTransManager.getCopyTransProcessHandle(getProjectIteration());
 }