8 | | 6. Java servlet class/file `LibPrepServlet.java` in `src/net/sf/basedb/meludi/servlet/` updated:[[BR]]a. `LibPrepServlet` constructor updated to initialize new private hash maps `Map<Integer,String> indexToRowLetterHashMap` and `Map<String,Integer> rowLetterToIndexHashMap`.[[BR]]b. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated for command "`GetLibPrepKitData`" to call new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with library preparation kit data.[[BR]]c. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated with new command "`GetLibPrepKitsAsPlates`". It calls new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with kit data for available library preparation kits, and returns a JSONArray with information on unused, effectively unused, and reserved wells for FPA DNA aliquots for the the kits.[[BR]]d. New private method `JSONObject fetchJsonKitDataForUpdate(String libPrepKitName, List<String> reservedWellsList)` calls new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with kit data for a single library preparation kit, updates the latter regarding number of times used, available flag (if number of times used is >= 6 after update), last updated date, and comma-separated list string of locations for unused wells for FPA DNA aliquotes. The updated JSONObject for the selected library preparation kit is then returned.[[BR]]e. New private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` retrieves the requested data from the library preparation kit storage, and returns it as a JSONObject.[[BR]]f. Protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` updated for command "`RegisterReagentLotNoFile`" to retrieve new boolean parameter "`update`" and string parameter "`referenceName`" from request (the latter parameter was previously retrieved from submitted JSONData). If parameter "`update`" has value `true`, the list of reserved wells is retrieved, after which new private method `JSONObject fetchJsonKitDataForUpdate(String libPrepKitName, List<String> reservedWellsList)` to obtain a JSONObject with kit data for the updated library preparation kit. At the end, the submitted JSON data is transferred to the returned JSONObject, in order for the latter to be available for further processing when creating a new start plate. |
| 8 | 6. Java servlet class/file `LibPrepServlet.java` in `src/net/sf/basedb/meludi/servlet/` updated:[[BR]]a. `LibPrepServlet` constructor updated to initialize new private hash maps `Map<Integer,String> indexToRowLetterHashMap` and `Map<String,Integer> rowLetterToIndexHashMap`.[[BR]]b. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated for command "`GetLibPrepKitData`" to call new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with library preparation kit data.[[BR]]c. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated with new command "`GetLibPrepKitsAsPlates`". It calls new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with kit data for available library preparation kits, and returns a JSONArray with information on unused, effectively unused, and reserved wells for FPA DNA aliquots for the the kits.[[BR]]d. New private method `JSONObject fetchJsonKitDataForUpdate(String libPrepKitName, List<String> reservedWellsList)` calls new private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` to obtain a JSONObject with kit data for a single library preparation kit, updates the latter regarding number of times used, available flag (if number of times used is >= 6 after update), last updated date, and comma-separated list string of locations for unused wells for FPA DNA aliquotes. The updated JSONObject for the selected library preparation kit is then returned.[[BR]]e. New private method `JSONObject fetchJsonKitData(String libPrepKitNameFilter, Boolean availableFilter, Boolean usedFilter, Integer minUnusedFpaPlateLocs)` retrieves the requested data from the library preparation kit storage, and returns it as a JSONObject.[[BR]]f. Protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` updated for command "`RegisterReagentLotNoFile`" to retrieve new boolean parameter "`update`" and string parameter "`referenceName`" from request (the latter parameter was previously retrieved from submitted JSONData). If parameter "`update`" has value `true`, the list of reserved wells is retrieved, after which new private method `JSONObject fetchJsonKitDataForUpdate(String libPrepKitName, List<String> reservedWellsList)` is called to obtain a JSONObject with kit data for the updated library preparation kit. At the end, the submitted JSON data is transferred to the returned JSONObject, in order for the latter to be available for further processing when creating a new start plate. |