Esempio n. 1
0
  /**
   * \brief doExportDetail
   *
   * <p>\details
   *
   * <p>\return
   *
   * @throws Exception
   */
  @Override
  public void doTransferDetail() {
    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::doImportDetail";
    jadeTransferDBLayer = new JadeTransferDBLayer(configurationFile);
    jadeTransferDBLayer.beginTransaction();
    JadeTransferDetailDBItem transferDetailItem = new JadeTransferDetailDBItem();

    if (transferItem == null) {
      throw new JobSchedulerException(
          String.format("%1$s transfer Item is not set. Cannot import.", conMethodName));
    } else {
      copyFields(jadeTransferDetailImportData, transferDetailItem);
      transferItem.addTransferDetail(transferDetailItem);
      jadeTransferDBLayer.save(transferItem);
    }
  } // private void storeTransferHistory
Esempio n. 2
0
 private void copyFields(
     final IJadeTransferHistoryData jadeTransferImportData, final JadeTransferDBItem transfertem) {
   transferItem.setCommand(jadeTransferImportData.getCommand());
   transferItem.setMandator(jadeTransferImportData.getMandator());
   transferItem.setSourceHost(jadeTransferImportData.getSourceHost());
   transferItem.setSourceHostIp(jadeTransferImportData.getSourceHostIp());
   transferItem.setSourceUser(jadeTransferImportData.getSourceUser());
   transferItem.setSourceDir(jadeTransferImportData.getSourceDir());
   transferItem.setTargetHost(jadeTransferImportData.getTargetHost());
   transferItem.setTargetHostIp(jadeTransferImportData.getTargetHostIp());
   transferItem.setTargetUser(jadeTransferImportData.getTargetUser());
   transferItem.setTargetDir(jadeTransferImportData.getTargetDir());
   transferItem.setProtocolType(jadeTransferImportData.getProtocolType());
   transferItem.setPort(jadeTransferImportData.getPort());
   transferItem.setStatus(jadeTransferImportData.getStatus());
   transferItem.setLastErrorMessage(jadeTransferImportData.getLastErrorMessage());
   transferItem.setFilesCount(jadeTransferImportData.getFilesCount());
   transferItem.setProfileName(jadeTransferImportData.getProfileName());
   transferItem.setProfile(jadeTransferImportData.getProfile());
   transferItem.setLog(jadeTransferImportData.getLog());
   transferItem.setCommandType(jadeTransferImportData.getCommandType());
   transferItem.setStartTime(jadeTransferImportData.getStartTime());
   transferItem.setEndTime(jadeTransferImportData.getEndTime());
   transferItem.setFileSize(jadeTransferImportData.getFileSize());
   transferItem.setCreated(new Date());
   transferItem.setCreatedBy(jadeTransferImportData.getCreatedBy());
   transferItem.setModified(new Date());
   transferItem.setModifiedBy(jadeTransferImportData.getModifiedBy());
 }