fr.paris.lutece.plugins.appointment.web
Class AppointmentApp

java.lang.Object
  extended by fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
      extended by 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.appointmentApp.defaultPath")
public class AppointmentApp
extends fr.paris.lutece.portal.util.mvc.xpage.MVCApplication

This class provides a simple implementation of an XPage

See Also:
Serialized Form

Field Summary
static String VIEW_APPOINTMENT_FORM_FIRST_STEP
          Name of the view of the first step of the form
static String VIEW_APPOINTMENT_FORM_SECOND_STEP
          Name of the view of the second step of the form
protected static String XPAGE_NAME
          The name of the XPage
 
Constructor Summary
AppointmentApp()
           
 
Method Summary
 fr.paris.lutece.portal.web.xpages.XPage displayRecapAppointment(javax.servlet.http.HttpServletRequest request)
          Display the recap before validating an appointment
 fr.paris.lutece.portal.web.xpages.XPage doCancelAppointment(javax.servlet.http.HttpServletRequest request)
          Do cancel an appointment
 fr.paris.lutece.portal.web.xpages.XPage doMakeAppointment(javax.servlet.http.HttpServletRequest request)
          Do save an appointment into the database if it is valid
 String doRemoveAsynchronousUploadedFile(javax.servlet.http.HttpServletRequest request)
          Removes the uploaded fileItem
 fr.paris.lutece.portal.web.xpages.XPage doSelectSlot(javax.servlet.http.HttpServletRequest request)
          Do select a slot
 fr.paris.lutece.portal.web.xpages.XPage doValidateForm(javax.servlet.http.HttpServletRequest request)
          Do validate data entered by a user to fill a form
 fr.paris.lutece.portal.web.xpages.XPage getAppointmentCalendar(javax.servlet.http.HttpServletRequest request)
          Get the page with the calendar with opened and closed days for an appointment form
 fr.paris.lutece.portal.web.xpages.XPage getAppointmentCanceled(javax.servlet.http.HttpServletRequest request)
          Get the page to confirm that the appointment has been canceled
 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
 fr.paris.lutece.portal.web.xpages.XPage getAppointmentFormFirstStep(javax.servlet.http.HttpServletRequest request)
          Get the first step of the form
static String getAppointmentFormHtml(javax.servlet.http.HttpServletRequest request, AppointmentForm form, AppointmentFormService appointmentFormService, Locale locale)
          Get the HTML code of an appointment form
 fr.paris.lutece.portal.web.xpages.XPage getAppointmentFormSecondStep(javax.servlet.http.HttpServletRequest request)
          Get the second step of the form
 fr.paris.lutece.portal.web.xpages.XPage getCancelAppointment(javax.servlet.http.HttpServletRequest request)
          Get the page to cancel an appointment
static String getCancelAppointmentUrl(javax.servlet.http.HttpServletRequest request, Appointment appointment)
          Get the URL
 fr.paris.lutece.portal.web.xpages.XPage getFormList(javax.servlet.http.HttpServletRequest request)
          Get the list of appointment form list
 fr.paris.lutece.portal.web.xpages.XPage getMyAppointments(javax.servlet.http.HttpServletRequest request)
          Get the page to view the appointments of a user
static String getMyAppointmentsXPage(javax.servlet.http.HttpServletRequest request, Locale locale)
          Get the HTML content of the my appointment page of a user
 fr.paris.lutece.portal.web.xpages.XPage getViewForm(javax.servlet.http.HttpServletRequest request)
          Get the page to complete a form
 
Methods inherited from class fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
addError, addError, addInfo, addInfo, download, download, fillCommons, getActionFullUrl, getActionUrl, getDefaultPagePath, getDefaultPageTitle, getLocale, getModel, getPage, getViewFullUrl, getViewUrl, getXPage, getXPage, getXPage, getXPage, getXPageName, populate, redirect, redirect, redirect, redirect, redirectMessageBox, redirectView, responseJSON, responseXML, validateBean, validateBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_APPOINTMENT_FORM_FIRST_STEP

public static final String VIEW_APPOINTMENT_FORM_FIRST_STEP
Name of the view of the first step of the form

See Also:
Constant Field Values

VIEW_APPOINTMENT_FORM_SECOND_STEP

public static final String VIEW_APPOINTMENT_FORM_SECOND_STEP
Name of the view of the second step of the form

See Also:
Constant Field Values

XPAGE_NAME

protected static final String XPAGE_NAME
The name of the XPage

See Also:
Constant Field Values
Constructor Detail

AppointmentApp

public AppointmentApp()
Method Detail

getFormList

@View(value="getViewFormList",
      defaultView=true)
public fr.paris.lutece.portal.web.xpages.XPage getFormList(javax.servlet.http.HttpServletRequest request)
Get the list of appointment form list

Parameters:
request - The request
Returns:
The XPage to display

getViewForm

public fr.paris.lutece.portal.web.xpages.XPage getViewForm(javax.servlet.http.HttpServletRequest request)
Get the page to complete a form

Parameters:
request - The request
Returns:
The XPage to display

doValidateForm

@Action(value="doValidateForm")
public fr.paris.lutece.portal.web.xpages.XPage doValidateForm(javax.servlet.http.HttpServletRequest request)
Do validate data entered by a user to fill a form

Parameters:
request - The request
Returns:
The next URL to redirect to

getAppointmentCalendar

public fr.paris.lutece.portal.web.xpages.XPage getAppointmentCalendar(javax.servlet.http.HttpServletRequest request)
Get the page with the calendar with opened and closed days for an appointment form

Parameters:
request - The request
Returns:
The XPage to display

doSelectSlot

@Action(value="doSelectSlot")
public fr.paris.lutece.portal.web.xpages.XPage doSelectSlot(javax.servlet.http.HttpServletRequest request)
Do select a slot

Parameters:
request - the request
Returns:
The XPage to display

displayRecapAppointment

@View(value="displayRecapAppointment")
public fr.paris.lutece.portal.web.xpages.XPage 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(value="doMakeAppointment")
public fr.paris.lutece.portal.web.xpages.XPage doMakeAppointment(javax.servlet.http.HttpServletRequest request)
Do save an appointment into the database if it is valid

Parameters:
request - The request
Returns:
The XPage to display

getAppointmentCreated

@View(value="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

getCancelAppointment

@View(value="getCancelAppointment")
public fr.paris.lutece.portal.web.xpages.XPage getCancelAppointment(javax.servlet.http.HttpServletRequest request)
Get the page to cancel an appointment

Parameters:
request - The request
Returns:
The XPage to display

doCancelAppointment

@Action(value="doCancelAppointment")
public fr.paris.lutece.portal.web.xpages.XPage doCancelAppointment(javax.servlet.http.HttpServletRequest request)
                                                            throws fr.paris.lutece.portal.service.message.SiteMessageException
Do cancel an appointment

Parameters:
request - The request
Returns:
The XPage to display
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - If a site message needs to be displayed

getAppointmentCanceled

@View(value="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(value="getMyAppointments")
public fr.paris.lutece.portal.web.xpages.XPage getMyAppointments(javax.servlet.http.HttpServletRequest request)
                                                          throws fr.paris.lutece.portal.service.security.UserNotSignedException
Get 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

getAppointmentFormFirstStep

@View(value="getAppointmentFormFirstStep")
public fr.paris.lutece.portal.web.xpages.XPage getAppointmentFormFirstStep(javax.servlet.http.HttpServletRequest request)
Get the first step of the form

Parameters:
request - The request
Returns:
The first step of the form

getAppointmentFormSecondStep

@View(value="getAppointmentFormSecondStep")
public fr.paris.lutece.portal.web.xpages.XPage getAppointmentFormSecondStep(javax.servlet.http.HttpServletRequest request)
Get the second step of the form

Parameters:
request - The request
Returns:
The second step of the form

getMyAppointmentsXPage

public static String getMyAppointmentsXPage(javax.servlet.http.HttpServletRequest request,
                                            Locale locale)
                                     throws fr.paris.lutece.portal.service.security.UserNotSignedException
Get the HTML content of the my appointment page of a user

Parameters:
request - The request
locale - 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

getAppointmentFormHtml

public static String getAppointmentFormHtml(javax.servlet.http.HttpServletRequest request,
                                            AppointmentForm form,
                                            AppointmentFormService appointmentFormService,
                                            Locale locale)
Get the HTML code of an appointment form

Parameters:
request - The request
form - The form to display. The form must not be null and must be active
appointmentFormService - The appointment form service to use
locale - the locale
Returns:
The HTML code to display, or an empty string if the form is null or not active

doRemoveAsynchronousUploadedFile

public String doRemoveAsynchronousUploadedFile(javax.servlet.http.HttpServletRequest request)
Removes the uploaded fileItem

Parameters:
request - the request
Returns:
The JSON result

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 FO
appointment - The appointment
Returns:
The URL to cancel the appointment


Copyright © 2014 Mairie de Paris. All Rights Reserved.