Class AppointmentImportJspBean
java.lang.Object
fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
fr.paris.lutece.plugins.appointment.modules.importer.web.AppointmentImportJspBean
- All Implemented Interfaces:
Serializable
@SessionScoped
@Named
@Controller(controllerJsp="ManageAppointmentImport.jsp",
controllerPath="jsp/admin/plugins/appointment/modules/importer/",
right="APPOINTMENT_IMPORT",
securityTokenEnabled=true)
public class AppointmentImportJspBean
extends fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
Administration views for persistent appointment imports.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoDownloadFailedRows(jakarta.servlet.http.HttpServletRequest request) Downloads the rows of an import whose appointment could not be created, in the layout of the source workbook.doDownloadReport(jakarta.servlet.http.HttpServletRequest request) Downloads the report of an import: one row per appointment, with its outcome.doDownloadValidationReport(jakarta.servlet.http.HttpServletRequest request) Downloads the validation report of a file rejected at validation.doImportWorkbook(jakarta.servlet.http.HttpServletRequest request) Handles the workbook upload form submission.doModifyImportRow(jakarta.servlet.http.HttpServletRequest request) Saves the corrected values of a row in error and retries it, or shows the errors of the new values.doRetryImportBatch(jakarta.servlet.http.HttpServletRequest request) Puts the rows in error of a completed batch back in the queue of the daemon, except the interrupted ones.doRetryImportFile(jakarta.servlet.http.HttpServletRequest request) Puts the rows in error of every completed batch of a file back in the queue of the daemon.doRetryImportRow(jakarta.servlet.http.HttpServletRequest request) Puts one row in error back in the queue of the daemon, interrupted rows included once checked by hand.getConfirmRetryImportFile(jakarta.servlet.http.HttpServletRequest request) Asks to confirm the retry of the rows in error of a file: the confirmation posts the action with its token.getConfirmRetryImportRow(jakarta.servlet.http.HttpServletRequest request) Asks to confirm the retry of one row in error, with a warning for an interrupted row whose appointment may exist.getImportBatch(jakarta.servlet.http.HttpServletRequest request) Renders the detail view of a single import batch, showing each appointment row and its status.getManageAppointmentImport(jakarta.servlet.http.HttpServletRequest request) Default view: renders the import form (tab "import") and the results table (tab "results").getModifyImportRow(jakarta.servlet.http.HttpServletRequest request) Shows the values of a row in error, to correct them before it is retried.Methods inherited from class fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
processControllerMethods inherited from class fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
getPlugin, initMethods inherited from class fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
getAdminPage, getFeatureIcon, getHomeUrl, getLocale, getPageTitle, getSecurityTokenService, getUser, setFeatureGroup, setFeatureIcon, setPageTitleProperty, validate, validate, validate
-
Constructor Details
-
AppointmentImportJspBean
public AppointmentImportJspBean()
-
-
Method Details
-
getManageAppointmentImport
@View(value="manageAppointmentImport", defaultView=true, securityTokenAction="doImportWorkbook") public String getManageAppointmentImport(jakarta.servlet.http.HttpServletRequest request) Default view: renders the import form (tab "import") and the results table (tab "results"). Filters applied on the results tab are persisted in the session so they survive tab switches and page navigation. On a plain GET the transient validation error state is cleared; on a POST (called by an action) it is kept. -
doImportWorkbook
@Action("doImportWorkbook") public String doImportWorkbook(jakarta.servlet.http.HttpServletRequest request) Handles the workbook upload form submission. Validates the CSRF token, the selected form, the uploaded file (presence, extension, duplicate hash), then delegates toAppointmentImportService.register(int, java.lang.String, byte[], java.lang.String, java.lang.String, java.util.Locale)which parses, validates and persists the rows. On success the user is redirected to the main view with a success info message. On validation failure the view is re-rendered with_validationErrorspopulated. -
getImportBatch
@View(value="viewImportBatch", securityTokenAction="doRetryImportBatch") public String getImportBatch(jakarta.servlet.http.HttpServletRequest request) Renders the detail view of a single import batch, showing each appointment row and its status. An optionalstatusrequest parameter filters the rows displayed (e.g. only errors). Return-navigation parameters are threaded through so the back button restores the previous page and filters. Redirects to the main view if the batch id is invalid or the user is not authorized for its form. -
doRetryImportBatch
@Action("doRetryImportBatch") public String doRetryImportBatch(jakarta.servlet.http.HttpServletRequest request) Puts the rows in error of a completed batch back in the queue of the daemon, except the interrupted ones.- Parameters:
request- the request- Returns:
- the redirection to the batch
-
getConfirmRetryImportFile
@View(value="confirmRetryImportFile", securityTokenAction="doRetryImportFile") public String getConfirmRetryImportFile(jakarta.servlet.http.HttpServletRequest request) Asks to confirm the retry of the rows in error of a file: the confirmation posts the action with its token.- Parameters:
request- the request- Returns:
- the redirection to the confirmation message
-
doRetryImportFile
@Action("doRetryImportFile") public String doRetryImportFile(jakarta.servlet.http.HttpServletRequest request) Puts the rows in error of every completed batch of a file back in the queue of the daemon.- Parameters:
request- the request- Returns:
- the redirection to the results
-
getConfirmRetryImportRow
@View(value="confirmRetryImportRow", securityTokenAction="doRetryImportRow") public String getConfirmRetryImportRow(jakarta.servlet.http.HttpServletRequest request) Asks to confirm the retry of one row in error, with a warning for an interrupted row whose appointment may exist.- Parameters:
request- the request- Returns:
- the redirection to the confirmation message
-
doRetryImportRow
@Action("doRetryImportRow") public String doRetryImportRow(jakarta.servlet.http.HttpServletRequest request) Puts one row in error back in the queue of the daemon, interrupted rows included once checked by hand.- Parameters:
request- the request- Returns:
- the redirection to its batch
-
getModifyImportRow
@View(value="modifyImportRow", securityTokenAction="doModifyImportRow") public String getModifyImportRow(jakarta.servlet.http.HttpServletRequest request) Shows the values of a row in error, to correct them before it is retried. The slot cannot be changed: it is the one of the batch.- Parameters:
request- the request- Returns:
- the page
-
doModifyImportRow
@Action("doModifyImportRow") public String doModifyImportRow(jakarta.servlet.http.HttpServletRequest request) Saves the corrected values of a row in error and retries it, or shows the errors of the new values.- Parameters:
request- the request- Returns:
- the redirection to the batch, or the page with the errors
-
doDownloadValidationReport
@View("downloadValidationReport") public String doDownloadValidationReport(jakarta.servlet.http.HttpServletRequest request) throws IOException Downloads the validation report of a file rejected at validation.- Parameters:
request- the request- Returns:
- null: the report is written to the response
- Throws:
IOException- if the report cannot be built
-
doDownloadReport
@View("downloadReport") public String doDownloadReport(jakarta.servlet.http.HttpServletRequest request) throws IOException Downloads the report of an import: one row per appointment, with its outcome.- Parameters:
request- the request- Returns:
- null: the report is written to the response
- Throws:
IOException- if the report cannot be built
-
doDownloadFailedRows
@View("downloadFailedRows") public String doDownloadFailedRows(jakarta.servlet.http.HttpServletRequest request) throws IOException Downloads the rows of an import whose appointment could not be created, in the layout of the source workbook.- Parameters:
request- the request- Returns:
- null: the workbook is written to the response
- Throws:
IOException- if the workbook cannot be built
-