Ejemplo n.º 1
0
  protected String calcLoadPercent(LocalTransaction localTransaction) {
    ApplicationVersion applicationVersion =
        applicationVersionManager.getAidAndVersionNo(
            localTransaction.getAid(), localTransaction.getAppVersion());
    int totalCount = applicationVersion.getApplicationLoadFiles().size();
    int currentIndex = localTransaction.getCurrentLoadFileIndex();

    Integer percent = 5 + (int) (((new Double(currentIndex - 1) / totalCount) * 0.85) * 100);

    return percent.toString();
  }
Ejemplo n.º 2
0
 protected boolean isAllLoadFileDelete(LocalTransaction localTransaction) {
   List<ApplicationLoadFile> deleteOrder = transactionHelper.getDeleteOrder(localTransaction);
   return localTransaction.getCurrentLoadFileIndex() == deleteOrder.size() + 1;
 }