Changes between Initial Version and Version 1 of Ticket #525, comment 35


Ignore:
Timestamp:
Apr 18, 2016, 9:55:51 AM (8 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #525, comment 35

    initial v1  
    88 * In addition to code changes to implement the functional specification updates above, some code updates have been made in order to make the code more complete and increase clarity.
    99
    10  1. Javascript file `import-inca.js` in `resources/personal/` updated:[[BR]]a. Function `initPage()` updated to not hide and disable the button for downloading a report file, but instead call new function `checkForReportFile()`.[[BR]]b. New function `checkForReportFile()` added. It calls servlet `IncaServlet` with new command "`CheckForIncaImportReportFile`" in a "Get" request with callback function `reportFileDownloadButtonDisplay(response)`.[[BR]]c. New function `reportFileDownloadButtonDisplay(response)` added. It retrieves a boolean flag indicating an existing report file from the servlet response, and an optional path to the report file. If a report file exists, the path for the file is stored in hidden input field `reportFilePath` and the button for downloading the report file is shown, otherwise the button is disabled and hidden.[[BR]]d. Function `initializeStep2(response)` updated to call "`Wizard.setCurrentStep(2)`" at start of the function.
    11  2. Java servlet class/file `IncaServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated:[[BR]]a. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated with new command "`CheckForIncaImportReportFile`". It calls new private convenience method `String fetchReportFilePath()` to obtain the path for an optional report file, and returns a JSON object with the path for key "`reportFilePath`", and a boolean flag indicating if a report file exists for key "`incaReportFileExists`".[[BR]]b. New private convenience method `String fetchReportFilePath()` added. It returns the path for an optional report file.[[BR]]c. The name to use for the report file is now stored in private String `INCA_IMPORT_REPORT_FILENAME`.[[BR]]d. Protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` updated for command "`ImportInca`". A time stamp is obtained at the start of the method, and is stored in JSONObject `jsonIncaFilePropDetails` for key "`incaImportStart`".[[BR]]e. Private method `String createIncaImportReportFile(JSONArray jsonIncaFilePropDetailsArr, List<String> missingIncaHeadersList, String message)` updated to call new private convenience method `String fetchReportFilePath()` to obtain the path for the report file, and retrieves the value for the import start time stamp from JSONObject `jsonIncaFilePropDetails`. The start and end times of the import/test are now written at the beginning of the report.[[BR]]f. References to the report file in the code has been updated to avoid referring to it as a temporary file, since the file is not removed, when to import/test is finished.
     10 1. Outermost Ant build file `build.xml` in `/` updated to set BASE version to `3.8.0`, since the recommended way of adding INCA annotation types is through use of an annotation type importer, that was introduced in that BASE version. (This also opens the possibility to use planned additions to the annotation API in BASE 3.8.0 in the INCA import code.)
     11 2. Javascript file `import-inca.js` in `resources/personal/` updated:[[BR]]a. Function `initPage()` updated to not hide and disable the button for downloading a report file, but instead call new function `checkForReportFile()`.[[BR]]b. New function `checkForReportFile()` added. It calls servlet `IncaServlet` with new command "`CheckForIncaImportReportFile`" in a "Get" request with callback function `reportFileDownloadButtonDisplay(response)`.[[BR]]c. New function `reportFileDownloadButtonDisplay(response)` added. It retrieves a boolean flag indicating an existing report file from the servlet response, and an optional path to the report file. If a report file exists, the path for the file is stored in hidden input field `reportFilePath` and the button for downloading the report file is shown, otherwise the button is disabled and hidden.[[BR]]d. Function `initializeStep2(response)` updated to call "`Wizard.setCurrentStep(2)`" at start of the function.
     12 3. Java servlet class/file `IncaServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated:[[BR]]a. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated with new command "`CheckForIncaImportReportFile`". It calls new private convenience method `String fetchReportFilePath()` to obtain the path for an optional report file, and returns a JSON object with the path for key "`reportFilePath`", and a boolean flag indicating if a report file exists for key "`incaReportFileExists`".[[BR]]b. New private convenience method `String fetchReportFilePath()` added. It returns the path for an optional report file.[[BR]]c. The name to use for the report file is now stored in private String `INCA_IMPORT_REPORT_FILENAME`.[[BR]]d. Protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` updated for command "`ImportInca`". A time stamp is obtained at the start of the method, and is stored in JSONObject `jsonIncaFilePropDetails` for key "`incaImportStart`".[[BR]]e. Private method `String createIncaImportReportFile(JSONArray jsonIncaFilePropDetailsArr, List<String> missingIncaHeadersList, String message)` updated to call new private convenience method `String fetchReportFilePath()` to obtain the path for the report file, and retrieves the value for the import start time stamp from JSONObject `jsonIncaFilePropDetails`. The start and end times of the import/test are now written at the beginning of the report.[[BR]]f. References to the report file in the code has been updated to avoid referring to it as a temporary file, since the file is not removed, when to import/test is finished.