Changeset 3927


Ignore:
Timestamp:
May 11, 2016, 3:03:31 PM (5 years ago)
Author:
olle
Message:

Refs #525. INCA importer updated in method creating INCA import report file:

  1. Java servlet class/file IncaServlet.java in src/net/sf/basedb/reggie/servlet/ updated:
    a. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "ImportInca" by not expecting private method createIncaImportReportFile(JSONObject jsonIncaFilePropDetails, List<String> missingIncaHeadersList, String message) to return a string with the report file path (the information was never used).
    b. Private method createIncaImportReportFile(JSONObject jsonIncaFilePropDetails, List<String> missingIncaHeadersList, String message) updated to no longer return a string with the report file path, but instead have type void. The file contents also updated by only referring to a single INCA file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/IncaServlet.java

    r3926 r3927  
    739739        }
    740740        // Create INCA import report file
    741         String reportFilePath = createIncaImportReportFile(jsonIncaFilePropDetails, missingIncaHeadersList, message);
     741        createIncaImportReportFile(jsonIncaFilePropDetails, missingIncaHeadersList, message);
    742742
    743743        json.put("incaFileProperties", jsonIncaFileProp);
     
    14071407  }
    14081408
    1409   private String createIncaImportReportFile(JSONObject jsonIncaFilePropDetails, List<String> missingIncaHeadersList, String message)
     1409  private void createIncaImportReportFile(JSONObject jsonIncaFilePropDetails, List<String> missingIncaHeadersList, String message)
    14101410  {
    14111411    String reportFilePath = fetchReportFilePath();
    1412     // Return path to report file with desired contents, using '/' as directory separator
    1413     String reportFilePathNoSlashes = reportFilePath.replaceAll("\\\\", "/");
    1414     //
    14151412    java.io.File file = new java.io.File(reportFilePath);
    14161413    FileWriter fileWriter = null;
     
    14391436      fileWriter.write("Simple check only flag:" + separator + simpleCheckOnly + "\n");
    14401437      fileWriter.write("\n");
    1441       fileWriter.write("INCA import files:\n");
     1438      fileWriter.write("INCA import file:\n");
    14421439      JSONObject jsonIncaFileProp = (JSONObject)jsonIncaFilePropDetails.get("jsonIncaFileProp");
    14431440      String incaImportFilename = (String)jsonIncaFileProp.get("filename");
     
    16431640      fileWriter.flush();
    16441641      fileWriter.close();
    1645 
    1646       // Return path to report file with desired contents, using '/' as directory separator
    1647       return reportFilePathNoSlashes;
    16481642    }
    16491643    catch(IOException ex)
    16501644    {
    16511645      System.out.println(new Date() + " IncaServlet::doPost(): Could not create filewriter for reportFilePath = " + reportFilePath);
    1652       return reportFilePathNoSlashes;
    16531646    }
    16541647  }
Note: See TracChangeset for help on using the changeset viewer.