Ejemplo n.º 1
0
 private void logImportFailed(DataRecord r, String msg, Exception e) {
   if (e != null) {
     Logger.logdebug(e);
   }
   logInfo(
       "\nERROR: "
           + LogString.operationFailed(
               International.getMessage("Import von Datensatz {record}", r.toString()), msg));
   errorCount++;
 }
Ejemplo n.º 2
0
  public void run() {
    setRunning(true);
    this.logInfo(International.getString("Importiere Datensätze ..."));
    if (isXmlFile(filename)) {
      runXmlImport();
    } else {
      runCsvImport();
    }
    this.logInfo(
        "\n\n"
            + International.getMessage("{count} Datensätze erfolgreich importiert.", importCount));
    this.logInfo("\n" + International.getMessage("{count} Fehler.", errorCount));
    this.logInfo("\n" + International.getMessage("{count} Warnungen.", warningCount));

    // Start the Audit in the background to find any eventual inconsistencies
    (new Audit(Daten.project)).start();

    setDone();
  }
Ejemplo n.º 3
0
 public String getSuccessfullyDoneMessage() {
   return International.getMessage("{count} Datensätze erfolgreich importiert.", importCount);
 }
  protected void iniDialog() throws Exception {
    // create GUI items
    mainPanel.setLayout(new GridBagLayout());

    ItemTypeLabel label1 =
        new ItemTypeLabel(
            "LABEL1",
            IItemType.TYPE_PUBLIC,
            "",
            International.getMessage(
                "Gültigkeitszeitraum von Version {version} ändern", version + 1));
    label1.setPadding(0, 0, 0, 10);
    label1.displayOnGui(this, mainPanel, 0, 0);

    validFrom =
        new ItemTypeDateTime(
            "VALID_FROM",
            (rCurrent.getValidFrom() == 0 ? null : new DataTypeDate(rCurrent.getValidFrom())),
            (rCurrent.getValidFrom() == 0 ? null : new DataTypeTime(rCurrent.getValidFrom())),
            IItemType.TYPE_PUBLIC,
            "",
            International.getString("gültig ab"));
    validFrom.registerItemListener(this);
    if (rPrev != null && rPrev.getValidFrom() != 0) {
      validFrom.setMustBeAfter(
          new ItemTypeDateTime(
              "PREVRECORD_VALID_FROM",
              new DataTypeDate(rPrev.getValidFrom()),
              new DataTypeTime(rPrev.getValidFrom()),
              IItemType.TYPE_INTERNAL,
              "",
              ""),
          false);
    }
    validFrom.setNotNull(rPrev != null);
    validFrom.displayOnGui(this, mainPanel, 0, 1);
    validFrom.requestFocus();
    validUntil =
        new ItemTypeDateTime(
            "VALID_UNTIL",
            (rCurrent.getInvalidFrom() == Long.MAX_VALUE
                ? null
                : new DataTypeDate(rCurrent.getInvalidFrom() - 1)),
            (rCurrent.getInvalidFrom() == Long.MAX_VALUE
                ? null
                : new DataTypeTime(rCurrent.getInvalidFrom() - 1)),
            IItemType.TYPE_PUBLIC,
            "",
            International.getString("gültig bis"));
    validUntil.registerItemListener(this);
    validUntil.setMustBeAfter(validFrom, true);
    if (rNext != null && rNext.getInvalidFrom() != Long.MAX_VALUE) {
      validUntil.setMustBeBefore(
          new ItemTypeDateTime(
              "NEXTRECORD_VALID_UNTIL",
              new DataTypeDate(rNext.getInvalidFrom() - 1),
              new DataTypeTime(rNext.getInvalidFrom() - 1),
              IItemType.TYPE_INTERNAL,
              "",
              ""),
          false);
    }
    validUntil.setNotNull(rNext != null);

    validUntil.displayOnGui(this, mainPanel, 0, 2);

    closeButton.setIcon(getIcon(BaseDialog.IMAGE_ACCEPT));
    closeButton.setIconTextGap(10);
  }