public class AppointmentFormService extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
Name of the bean of the service
|
| Constructor and Description |
|---|
AppointmentFormService() |
| Modifier and Type | Method and Description |
|---|---|
void |
convertMapResponseToList(AppointmentDTO appointment)
Convert an AppointmentDTO to an Appointment by transferring response from the map of class AppointmentDTO to the list of class Appointment.
|
String |
convertTimeIntoString(int nHour,
int nMinute)
Convert a time into string
|
boolean |
doMakeAppointment(Appointment appointment,
AppointmentForm form,
boolean bIsAdmin)
Do check if an appointment can be made and make an appointment.
|
AppointmentDTO |
getAppointmentFromSession(javax.servlet.http.HttpSession session)
Get the current appointment form from the session
|
AppointmentFormMessages |
getDefaultAppointmentFormMessage()
Get the default form message with values loaded from properties.
|
String |
getEntryUrl(fr.paris.lutece.plugins.genericattributes.business.Entry entry,
int nIdform)
Get the URL of the anchor of an entry
|
void |
getHtmlEntry(int nIdEntry,
StringBuffer stringBuffer,
Locale locale,
boolean bDisplayFront,
javax.servlet.http.HttpServletRequest request)
Insert in the string buffer the content of the HTML code of the entry
|
String |
getHtmlForm(AppointmentForm form,
AppointmentFormMessages formMessages,
Locale locale,
boolean bDisplayFront,
javax.servlet.http.HttpServletRequest request)
Return the HTML code of the form
|
String |
getHtmlForm(int nWeek,
String strDay,
String strSlot,
AppointmentForm form,
AppointmentFormMessages formMessages,
Locale locale,
boolean bDisplayFront,
javax.servlet.http.HttpServletRequest request)
Gets the html form.
|
String |
getHtmlForm(int nWeek,
String strDay,
String strSlot,
AppointmentForm form,
AppointmentFormMessages formMessages,
Locale locale,
boolean bDisplayFront,
javax.servlet.http.HttpServletRequest request,
String strCustomerId,
String strUserIdOpam)
Gets the html form.
|
List<fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError> |
getResponseEntry(javax.servlet.http.HttpServletRequest request,
int nIdEntry,
Locale locale,
AppointmentDTO appointment)
Get the responses associated with an entry.
|
Appointment |
getValidatedAppointmentFromSession(javax.servlet.http.HttpSession session)
Get a validated appointment from the session
|
Boolean |
isFieldInTheResponseList(int nIdField,
List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponse)
Check if a field is in a response list
|
boolean |
isFormFirstStep(int nAppointmentFormId)
Check if the form is the first step of the creation of appointments, or if it is the calendar.
|
void |
removeAppointmentFromSession(javax.servlet.http.HttpSession session)
Remove any appointment form responses stored in the session of the user
|
void |
removeValidatedAppointmentFromSession(javax.servlet.http.HttpSession session)
Remove a validated appointment stored in the session of the user
|
void |
saveAppointmentInSession(javax.servlet.http.HttpSession session,
AppointmentDTO appointment)
Save an appointment in the session of the user
|
void |
saveValidatedAppointmentForm(javax.servlet.http.HttpSession session,
Appointment appointment)
Save a validated appointment into the session of the user
|
void |
setUserInfo(javax.servlet.http.HttpServletRequest request,
Appointment appointment)
Set the info of the current LuteceUser to an appointment.
|
public static final String BEAN_NAME
public String getHtmlForm(int nWeek, String strDay, String strSlot, AppointmentForm form, AppointmentFormMessages formMessages, Locale locale, boolean bDisplayFront, javax.servlet.http.HttpServletRequest request)
nWeek - the n weekstrDay - the str daystrSlot - the str slotform - the formformMessages - the form messageslocale - the localebDisplayFront - the b display frontrequest - the requestpublic String getHtmlForm(int nWeek, String strDay, String strSlot, AppointmentForm form, AppointmentFormMessages formMessages, Locale locale, boolean bDisplayFront, javax.servlet.http.HttpServletRequest request, String strCustomerId, String strUserIdOpam)
nWeek - the n weekstrDay - the str daystrSlot - the str slotform - the formformMessages - the form messageslocale - the localebDisplayFront - the b display frontrequest - the requeststrCustomerId - the str customer idstrUserIdOpam - the str user id opampublic String getHtmlForm(AppointmentForm form, AppointmentFormMessages formMessages, Locale locale, boolean bDisplayFront, javax.servlet.http.HttpServletRequest request)
form - the form which HTML code must be returnformMessages - The form messages associated with the formlocale - the localebDisplayFront - True if the entry will be displayed in Front Office, false if it will be displayed in Back Office.request - HttpServletRequestpublic void setUserInfo(javax.servlet.http.HttpServletRequest request,
Appointment appointment)
request - The requestappointment - The appointment to set user infopublic void getHtmlEntry(int nIdEntry,
StringBuffer stringBuffer,
Locale locale,
boolean bDisplayFront,
javax.servlet.http.HttpServletRequest request)
nIdEntry - the key of the entry which HTML code must be insert in the stringBufferstringBuffer - the buffer which contains the HTML codelocale - the localebDisplayFront - True if the entry will be displayed in Front Office, false if it will be displayed in Back Office.request - HttpServletRequestpublic List<fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError> getResponseEntry(javax.servlet.http.HttpServletRequest request, int nIdEntry, Locale locale, AppointmentDTO appointment)
AppointmentDTO. The key of
the map is this id of the entry, and the value the list of responsesrequest - the requestnIdEntry - the key of the entrylocale - the localeappointment - The appointmentpublic Boolean isFieldInTheResponseList(int nIdField, List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponse)
nIdField - the id of the field to searchlistResponse - the list of responsespublic String getEntryUrl(fr.paris.lutece.plugins.genericattributes.business.Entry entry, int nIdform)
entry - the entrypublic void saveAppointmentInSession(javax.servlet.http.HttpSession session,
AppointmentDTO appointment)
session - The sessionappointment - The appointment to savepublic AppointmentDTO getAppointmentFromSession(javax.servlet.http.HttpSession session)
session - The session of the userpublic void removeAppointmentFromSession(javax.servlet.http.HttpSession session)
session - The sessionpublic void saveValidatedAppointmentForm(javax.servlet.http.HttpSession session,
Appointment appointment)
session - The sessionappointment - The appointment to savepublic Appointment getValidatedAppointmentFromSession(javax.servlet.http.HttpSession session)
session - The session of the userpublic void removeValidatedAppointmentFromSession(javax.servlet.http.HttpSession session)
session - The sessionpublic AppointmentFormMessages getDefaultAppointmentFormMessage()
public void convertMapResponseToList(AppointmentDTO appointment)
appointment - The appointment to convertpublic boolean isFormFirstStep(int nAppointmentFormId)
public String convertTimeIntoString(int nHour, int nMinute)
nHour - The hournMinute - The minutepublic boolean doMakeAppointment(Appointment appointment, AppointmentForm form, boolean bIsAdmin) throws fr.paris.lutece.portal.service.util.AppException
appointment - The appointment to makeform - The appointment form associated with the appointmentbIsAdmin - True if this method was called by an admin, false if it was called by a regular userfr.paris.lutece.portal.service.util.AppException - If an error occurs when processing the creation or the update of the appointmentCopyright © 2017 City of Paris. All rights reserved.