Class AppointmentJspBean

  • All Implemented Interfaces:
    java.io.Serializable

    @Controller(controllerJsp="ManageAppointments.jsp",
                controllerPath="jsp/admin/plugins/appointment/",
                right="APPOINTMENT_FORM_MANAGEMENT")
    public class AppointmentJspBean
    extends fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
    This class provides the user interface to manage Appointment features ( manage, create, modify, remove )
    Author:
    Laurent Payen
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      AppointmentJspBean()
      Default constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String displayRecapAppointment​(javax.servlet.http.HttpServletRequest request)
      Display the recap before validating an appointment
      java.lang.String doChangeAppointmentStatus​(javax.servlet.http.HttpServletRequest request)
      Do change the status of an appointment
      java.lang.String doExportAppointments​(javax.servlet.http.HttpServletRequest request)
      Do download a file from an appointment response
      java.lang.String doMakeAppointment​(javax.servlet.http.HttpServletRequest request)
      Do save an appointment into the database if it is valid
      java.lang.String doProcessWorkflowAction​(javax.servlet.http.HttpServletRequest request)
      Do process a workflow action over an appointment
      java.lang.String doRemoveAppointment​(javax.servlet.http.HttpServletRequest request)
      Handles the removal form of a appointment
      java.lang.String doRemoveMassAppointment​(javax.servlet.http.HttpServletRequest request)
      Handles the removal form of a appointment
      java.lang.String doValidateForm​(javax.servlet.http.HttpServletRequest request)
      Do validate data entered by a user to fill a form
      java.lang.String getConfirmRemoveAppointment​(javax.servlet.http.HttpServletRequest request)
      Manages the removal form of a appointment whose identifier is in the HTTP request
      java.lang.String getConfirmRemoveMassAppointment​(javax.servlet.http.HttpServletRequest request, int nIdForm)
      Manages the removal form of a appointment whose identifier is in the HTTP request
      java.lang.String getDownloadFile​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse httpResponse)
      Do download a file from an appointment response
      java.lang.String getDownloadFileFromSession​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse httpResponse)
      Do download a file from an appointment response stored in session and not yet on server fs
      java.lang.String getManageAppointments​(javax.servlet.http.HttpServletRequest request)
      Get the page to manage appointments
      static java.lang.String getUrlExecuteWorkflowAction​(javax.servlet.http.HttpServletRequest request, java.lang.String strIdAppointment, java.lang.String strIdAction)
      Get the URL to display the form of a workflow action.
      java.lang.String getViewAppointment​(javax.servlet.http.HttpServletRequest request)
      View details of an appointment
      java.lang.String getViewCalendarManageAppointments​(javax.servlet.http.HttpServletRequest request)
      Get the page to manage appointments.
      java.lang.String getViewChangeDateAppointment​(javax.servlet.http.HttpServletRequest request)
      Return to the display recap view with the new date selected on the calendar
      java.lang.String getViewCreateAppointment​(javax.servlet.http.HttpServletRequest request)
      Returns the form to create an appointment
      java.lang.String getWorkflowActionForm​(javax.servlet.http.HttpServletRequest request)
      Get the workflow action form before processing the action.
      • Methods inherited from class fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean

        processController
      • Methods inherited from class fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean

        getPlugin, init
      • Methods inherited from class fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean

        getAdminPage, getFeatureIcon, getHomeUrl, getLocale, getPageTitle, getUser, setFeatureGroup, setFeatureIcon, setPageTitleProperty, validate, validate, validate
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ACTIVATEWORKFLOW

        public static final java.lang.String ACTIVATEWORKFLOW
    • Constructor Detail

      • AppointmentJspBean

        public AppointmentJspBean()
        Default constructor
    • Method Detail

      • getViewCalendarManageAppointments

        @View(value="viewCalendarManageAppointment",
              defaultView=true)
        public java.lang.String getViewCalendarManageAppointments​(javax.servlet.http.HttpServletRequest request)
                                                           throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Get the page to manage appointments. Appointments are displayed in a calendar.
        Parameters:
        request - The request
        Returns:
        The HTML code to display
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException
      • getManageAppointments

        @View("manageAppointments")
        public java.lang.String getManageAppointments​(javax.servlet.http.HttpServletRequest request)
                                               throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Get the page to manage appointments
        Parameters:
        request - The request
        Returns:
        The HTML code to display
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException
      • getConfirmRemoveAppointment

        @Action("confirmRemoveAppointment")
        public java.lang.String getConfirmRemoveAppointment​(javax.servlet.http.HttpServletRequest request)
        Manages the removal form of a appointment whose identifier is in the HTTP request
        Parameters:
        request - The HTTP request
        Returns:
        the HTML code to confirm
      • doRemoveAppointment

        @Action("removeAppointment")
        public java.lang.String doRemoveAppointment​(javax.servlet.http.HttpServletRequest request)
                                             throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Handles the removal form of a appointment
        Parameters:
        request - The HTTP request
        Returns:
        the JSP URL to display the form to manage appointments
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getConfirmRemoveMassAppointment

        @Action("confirmRemoveMassAppointment")
        public java.lang.String getConfirmRemoveMassAppointment​(javax.servlet.http.HttpServletRequest request,
                                                                int nIdForm)
        Manages the removal form of a appointment whose identifier is in the HTTP request
        Parameters:
        request - The HTTP request
        Returns:
        the HTML code to confirm
      • doRemoveMassAppointment

        @Action("removeMassAppointment")
        public java.lang.String doRemoveMassAppointment​(javax.servlet.http.HttpServletRequest request)
                                                 throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Handles the removal form of a appointment
        Parameters:
        request - The HTTP request
        Returns:
        the JSP URL to display the form to manage appointments
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getViewAppointment

        @View("viewAppointment")
        public java.lang.String getViewAppointment​(javax.servlet.http.HttpServletRequest request)
                                            throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        View details of an appointment
        Parameters:
        request - The request
        Returns:
        The HTML content to display
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
        FileServiceException - If there is an error with the file service
      • doExportAppointments

        @Action("doExportAppointments")
        public java.lang.String doExportAppointments​(javax.servlet.http.HttpServletRequest request)
                                              throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do download a file from an appointment response
        Parameters:
        request - The request
        response - The response
        Returns:
        nothing.
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getViewCreateAppointment

        @View("createAppointment")
        public java.lang.String getViewCreateAppointment​(javax.servlet.http.HttpServletRequest request)
                                                  throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Returns the form to create an appointment
        Parameters:
        request - The HTTP request
        Returns:
        the HTML code of the appointment form
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • doValidateForm

        @Action("doValidateForm")
        public java.lang.String doValidateForm​(javax.servlet.http.HttpServletRequest request)
                                        throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do validate data entered by a user to fill a form
        Parameters:
        request - The request
        Returns:
        The next URL to redirect to
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getViewChangeDateAppointment

        @View("viewChangeDateAppointment")
        public java.lang.String getViewChangeDateAppointment​(javax.servlet.http.HttpServletRequest request)
        Return to the display recap view with the new date selected on the calendar
        Parameters:
        request - the request
        Returns:
        to the display recap view
        Throws:
        FileServiceException - If there is an error with the file service
      • displayRecapAppointment

        @View("displayRecapAppointment")
        public java.lang.String displayRecapAppointment​(javax.servlet.http.HttpServletRequest request)
        Display the recap before validating an appointment
        Parameters:
        request - The request
        Returns:
        The HTML content to display or the next URL to redirect to
      • doMakeAppointment

        @Action("doMakeAppointment")
        public java.lang.String doMakeAppointment​(javax.servlet.http.HttpServletRequest request)
                                           throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do save an appointment into the database if it is valid
        Parameters:
        request - The request
        Returns:
        The XPage to display
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getDownloadFileFromSession

        public java.lang.String getDownloadFileFromSession​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse httpResponse)
                                                    throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do download a file from an appointment response stored in session and not yet on server fs
        Parameters:
        request - The request
        httpResponse - The response
        Returns:
        nothing.
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
      • getDownloadFile

        public java.lang.String getDownloadFile​(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse httpResponse)
                                         throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do download a file from an appointment response
        Parameters:
        request - The request
        httpResponse - The response
        Returns:
        nothing.
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature
        FileServiceException - If there is an error with the file service
      • getUrlExecuteWorkflowAction

        public static java.lang.String getUrlExecuteWorkflowAction​(javax.servlet.http.HttpServletRequest request,
                                                                   java.lang.String strIdAppointment,
                                                                   java.lang.String strIdAction)
        Get the URL to display the form of a workflow action. If the action has no form, then the user is redirected to the page to execute the workflow action
        Parameters:
        request - The request
        strIdAppointment - The id of the appointment
        strIdAction - The id of the workflow action
        Returns:
        The URL
      • getWorkflowActionForm

        @View("viewWorkflowActionForm")
        public java.lang.String getWorkflowActionForm​(javax.servlet.http.HttpServletRequest request)
        Get the workflow action form before processing the action. If the action does not need to display any form, then redirect the user to the workflow action processing page.
        Parameters:
        request - The request
        Returns:
        The HTML content to display, or the next URL to redirect the user to
      • doProcessWorkflowAction

        @Action("doProcessWorkflowAction")
        public java.lang.String doProcessWorkflowAction​(javax.servlet.http.HttpServletRequest request)
        Do process a workflow action over an appointment
        Parameters:
        request - The request
        Returns:
        The next URL to redirect to
      • doChangeAppointmentStatus

        @Action("doChangeAppointmentStatus")
        public java.lang.String doChangeAppointmentStatus​(javax.servlet.http.HttpServletRequest request)
                                                   throws fr.paris.lutece.portal.service.admin.AccessDeniedException
        Do change the status of an appointment
        Parameters:
        request - The request
        Returns:
        The next URL to redirect to
        Throws:
        fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user is not authorized to access this feature