/**
   * @see
   *     org.kuali.kfs.module.tem.batch.service.CreditCardDataImportService#importCreditCardDataFile(java.lang.String,
   *     org.kuali.kfs.sys.batch.BatchInputFileType)
   */
  @Override
  public boolean importCreditCardDataFile(String dataFileName, BatchInputFileType inputFileType) {

    try {
      FileInputStream fileContents = new FileInputStream(dataFileName);

      byte[] fileByteContent = IOUtils.toByteArray(fileContents);
      CreditCardImportData creditCardData =
          (CreditCardImportData) batchInputFileService.parse(inputFileType, fileByteContent);
      IOUtils.closeQuietly(fileContents);

      LOG.info("Credit Card Import - validating: " + dataFileName);
      List<CreditCardStagingData> validCreditCardList =
          validateCreditCardData(creditCardData, dataFileName);
      if (!validCreditCardList.isEmpty()) {
        businessObjectService.save(validCreditCardList);
      }
    } catch (Exception ex) {
      LOG.error("Failed to process the file : " + dataFileName, ex);
      moveErrorFile(dataFileName, creditCardDataFileErrorDirectory);
      return false;
    } finally {
      removeDoneFiles(dataFileName);
    }
    return true;
  }
  /**
   * @see org.kuali.kfs.module.tem.batch.service.CreditCardDataImportService#importCreditCardData()
   */
  @Override
  public boolean importCreditCardData() {
    boolean success = true;

    for (BatchInputFileType inputFileType : creditCardDataImportFileTypes) {
      List<String> inputFileNames =
          batchInputFileService.listInputFileNamesWithDoneFile(inputFileType);

      for (String dataFileName : inputFileNames) {
        success &= importCreditCardDataFile(dataFileName, inputFileType);
      }
    }

    return success;
  }