Class AppointmentApp
- java.lang.Object
-
- fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
-
- fr.paris.lutece.plugins.appointment.web.AppointmentApp
-
- All Implemented Interfaces:
fr.paris.lutece.portal.web.xpages.XPageApplication,Serializable
@Controller(xpageName="appointment", pageTitleI18nKey="appointment.appointmentApp.defaultTitle", pagePathI18nKey="appointment.appointment.name") public class AppointmentApp extends fr.paris.lutece.portal.util.mvc.xpage.MVCApplicationThis class provides a simple implementation of an Appointment XPage (On Front Office)- Author:
- Laurent Payen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringMESSAGE_DEFAULT_PAGE_TITLEDefault page title of XPages of this appstatic StringMESSAGE_DEFAULT_PATHDefault page of XPages of this appstatic StringVIEW_APPOINTMENT_CALENDARstatic StringVIEW_APPOINTMENT_FORM
-
Constructor Summary
Constructors Constructor Description AppointmentApp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description fr.paris.lutece.portal.web.xpages.XPagedisplayRecapAppointment(javax.servlet.http.HttpServletRequest request)Display the recap before validating an appointmentfr.paris.lutece.portal.web.xpages.XPagedoCancelAppointment(javax.servlet.http.HttpServletRequest request)Cancel an appointmentfr.paris.lutece.portal.web.xpages.XPagedoMakeAppointment(javax.servlet.http.HttpServletRequest request)Do save an appointment into the database if it is validfr.paris.lutece.portal.web.xpages.XPagedoProcessWorkflowAction(javax.servlet.http.HttpServletRequest request)Do process a workflow action over an appointmentfr.paris.lutece.portal.web.xpages.XPagedoValidateForm(javax.servlet.http.HttpServletRequest request)Do validate data entered by a user to fill a formfr.paris.lutece.portal.web.xpages.XPagegetAppointmentCanceled(javax.servlet.http.HttpServletRequest request)Get the page to confirm that the appointment has been canceledfr.paris.lutece.portal.web.xpages.XPagegetAppointmentCreated(javax.servlet.http.HttpServletRequest request)Get the page to notify the user that the appointment has been createdstatic StringgetCancelAppointmentUrl(Appointment appointment)Get the URLstatic StringgetCancelAppointmentUrl(javax.servlet.http.HttpServletRequest request, Appointment appointment)Get the URLfr.paris.lutece.portal.web.xpages.XPagegetFormList(javax.servlet.http.HttpServletRequest request)Get the view of all the forms on front office sidestatic StringgetFormListHtml(Locale locale, Map<String,Object> model)Get the html content of the list of formsfr.paris.lutece.portal.web.xpages.XPagegetMyAppointments(javax.servlet.http.HttpServletRequest request)Get the page to view the appointments of a userstatic StringgetMyAppointmentsXPage(javax.servlet.http.HttpServletRequest request, Locale locale, Map<String,Object> model)Get the HTML content of the my appointment page of a userstatic StringgetReportAppointmentUrl(AppointmentDTO appointment)Get the URLfr.paris.lutece.portal.web.xpages.XPagegetViewAppointmentCalendar(javax.servlet.http.HttpServletRequest request)Get the calendar viewfr.paris.lutece.portal.web.xpages.XPagegetViewAppointmentForm(javax.servlet.http.HttpServletRequest request)Get the form appointment view (front office)fr.paris.lutece.portal.web.xpages.XPagegetViewCancelAppointment(javax.servlet.http.HttpServletRequest request)Get the view for the user who wants to cancel its appointmentfr.paris.lutece.portal.web.xpages.XPagegetViewChangeDateAppointment(javax.servlet.http.HttpServletRequest request)Return to the display recap view with the new date selected on the calendarfr.paris.lutece.portal.web.xpages.XPagegetWorkflowActionForm(javax.servlet.http.HttpServletRequest request)Get the workflow action form before processing the action.voidsetUserInfo(javax.servlet.http.HttpServletRequest request, AppointmentDTO appointment)Set the user infos to the appointment DTO
-
-
-
Field Detail
-
MESSAGE_DEFAULT_PATH
public static final String MESSAGE_DEFAULT_PATH
Default page of XPages of this app- See Also:
- Constant Field Values
-
MESSAGE_DEFAULT_PAGE_TITLE
public static final String MESSAGE_DEFAULT_PAGE_TITLE
Default page title of XPages of this app- See Also:
- Constant Field Values
-
VIEW_APPOINTMENT_FORM
public static final String VIEW_APPOINTMENT_FORM
- See Also:
- Constant Field Values
-
VIEW_APPOINTMENT_CALENDAR
public static final String VIEW_APPOINTMENT_CALENDAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getViewAppointmentCalendar
@View("getViewAppointmentCalendar") public fr.paris.lutece.portal.web.xpages.XPage getViewAppointmentCalendar(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.admin.AccessDeniedExceptionGet the calendar view- Parameters:
request-- Returns:
- the Xpage
- Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedException
-
getViewAppointmentForm
@View("getViewAppointmentForm") public fr.paris.lutece.portal.web.xpages.XPage getViewAppointmentForm(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedExceptionGet the form appointment view (front office)- Parameters:
request- the request- Returns:
- the xpage
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedExceptionfr.paris.lutece.portal.service.admin.AccessDeniedException
-
doValidateForm
@Action("doValidateForm") public fr.paris.lutece.portal.web.xpages.XPage doValidateForm(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedExceptionDo 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.message.SiteMessageExceptionfr.paris.lutece.portal.service.security.UserNotSignedExceptionfr.paris.lutece.portal.service.admin.AccessDeniedException
-
displayRecapAppointment
@View("displayRecapAppointment") public fr.paris.lutece.portal.web.xpages.XPage displayRecapAppointment(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedExceptionDisplay the recap before validating an appointment- Parameters:
request- The request- Returns:
- The HTML content to display or the next URL to redirect to
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedExceptionfr.paris.lutece.portal.service.admin.AccessDeniedException
-
doMakeAppointment
@Action("doMakeAppointment") public fr.paris.lutece.portal.web.xpages.XPage doMakeAppointment(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedExceptionDo 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.security.UserNotSignedExceptionfr.paris.lutece.portal.service.admin.AccessDeniedException
-
getAppointmentCreated
@View("getAppointmentCreated") public fr.paris.lutece.portal.web.xpages.XPage getAppointmentCreated(javax.servlet.http.HttpServletRequest request)Get the page to notify the user that the appointment has been created- Parameters:
request- The request- Returns:
- The XPage to display
-
getViewChangeDateAppointment
@View("viewChangeDateAppointment") public fr.paris.lutece.portal.web.xpages.XPage 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:
fr.paris.lutece.portal.service.admin.AccessDeniedExceptionfr.paris.lutece.portal.service.message.SiteMessageException
-
getFormList
@View(value="getViewFormList", defaultView=true) public fr.paris.lutece.portal.web.xpages.XPage getFormList(javax.servlet.http.HttpServletRequest request)Get the view of all the forms on front office side- Parameters:
request- the request- Returns:
- the xpage
-
getViewCancelAppointment
@View("getViewCancelAppointment") public fr.paris.lutece.portal.web.xpages.XPage getViewCancelAppointment(javax.servlet.http.HttpServletRequest request)Get the view for the user who wants to cancel its appointment- Parameters:
request-- Returns:
- the view
-
doCancelAppointment
@Action("doCancelAppointment") public fr.paris.lutece.portal.web.xpages.XPage doCancelAppointment(javax.servlet.http.HttpServletRequest request)Cancel an appointment- Parameters:
request-- Returns:
- the confirmation view of the appointment cancelled
-
getAppointmentCanceled
@View("getAppointmentCanceled") public fr.paris.lutece.portal.web.xpages.XPage getAppointmentCanceled(javax.servlet.http.HttpServletRequest request)Get the page to confirm that the appointment has been canceled- Parameters:
request- The request- Returns:
- The XPage to display
-
getMyAppointments
@View("getMyAppointments") public fr.paris.lutece.portal.web.xpages.XPage getMyAppointments(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedExceptionGet the page to view the appointments of a user- Parameters:
request- The request- Returns:
- The XPage to display
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedException- If the authentication is enabled and the user has not signed in
-
getMyAppointmentsXPage
public static String getMyAppointmentsXPage(javax.servlet.http.HttpServletRequest request, Locale locale, Map<String,Object> model) throws fr.paris.lutece.portal.service.security.UserNotSignedException
Get the HTML content of the my appointment page of a user- Parameters:
request- The requestlocale- The locale- Returns:
- The HTML content, or null if the
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedException- If the user has not signed in
-
getFormListHtml
public static String getFormListHtml(Locale locale, Map<String,Object> model)
Get the html content of the list of forms- Parameters:
appointmentFormService- The service to usestrTitle- The title to display, or null to display the default title.locale- The locale- Returns:
- The HTML content to display
-
getWorkflowActionForm
@View("viewWorkflowActionForm") public fr.paris.lutece.portal.web.xpages.XPage getWorkflowActionForm(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedExceptionGet 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
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedException
-
doProcessWorkflowAction
@Action("doProcessWorkflowAction") public fr.paris.lutece.portal.web.xpages.XPage doProcessWorkflowAction(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedExceptionDo process a workflow action over an appointment- Parameters:
request- The request- Returns:
- The next URL to redirect to
- Throws:
fr.paris.lutece.portal.service.security.UserNotSignedException
-
getCancelAppointmentUrl
public static String getCancelAppointmentUrl(javax.servlet.http.HttpServletRequest request, Appointment appointment)
Get the URL- Parameters:
request- Get the URL to cancel an appointment in FOappointment- The appointment- Returns:
- The URL to cancel the appointment
-
getCancelAppointmentUrl
public static String getCancelAppointmentUrl(Appointment appointment)
Get the URL- Parameters:
request- Get the URL to cancel an appointment in FOappointment- The appointment- Returns:
- The URL to cancel the appointment
-
getReportAppointmentUrl
public static String getReportAppointmentUrl(AppointmentDTO appointment)
Get the URL- Parameters:
request- Get the URL to report an appointment in FOappointment- The appointment- Returns:
- The URL to report the appointment
-
setUserInfo
public void setUserInfo(javax.servlet.http.HttpServletRequest request, AppointmentDTO appointment)Set the user infos to the appointment DTO- Parameters:
request- the requestappointment- the appointment DTO
-
-