|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.appointment.service.AppointmentService
public class AppointmentService
Service to manage calendars
| Field Summary | |
|---|---|
static String |
BEAN_NAME
Name of the bean of the service |
| Constructor Summary | |
|---|---|
AppointmentService()
|
|
| Method Summary | |
|---|---|
void |
checkFormDays(AppointmentForm form)
Check that a form has every days created for its coming weeks |
List<AppointmentDay> |
computeDayList(AppointmentForm form)
Compute the list of days with the list of slots for a given form and a given week. |
List<AppointmentSlot> |
computeDaySlots(AppointmentDay day)
Get the list of appointment slots for a given day |
List<AppointmentSlot> |
computeDaySlots(AppointmentDay day,
int nDayOfWeek)
Get the list of appointment slots for a given day |
String |
computeRefAppointment(Appointment appointment)
Compute the unique reference of an appointment |
List<AppointmentDay> |
findAndComputeDayList(AppointmentForm form,
int nOffsetWeeks,
boolean bLoadSlotsFromDb)
Find a list of days with the list of slots for a given form and a given week, and compute missing data. |
AppointmentDay |
getAppointmentDayFromForm(AppointmentForm appointmentForm)
Get an appointment day from an appointment form. |
Date |
getDateLastMonday()
Get the date of the last Monday. |
Date |
getDateMonday(int nOffsetWeek)
Get the date of a Monday. |
List<AppointmentDay> |
getDayListForCalendar(AppointmentForm form,
int nOffsetWeeks,
boolean bIsForFront)
Get the list of days of a form to display them in a calendar. |
int |
getDayOfWeek(Date date)
Get the day of the week of a date. |
String |
getFormatedStringTime(int nHour,
int nMinute)
Get a string that describe a given time |
List<String> |
getListAppointmentTimes(int nAppointmentDuration,
int nOpeningHour,
int nOpeningMinutes,
int nClosingHour,
int nClosingMinutes)
Get a list of string that describes times of appointments available in for a day |
static String[] |
getListDaysOfWeek()
Get a string array containing a list of i118n keys of days of week |
int |
getListTimeBegin(List<AppointmentDay> listDays,
AppointmentForm form,
List<String> listTimeBegin)
Get the list of begin times for a given list of days |
int |
getRefSizeRandomPart()
Get the size of the random part of the reference of appointments |
static AppointmentService |
getService()
Get an instance of the service |
int |
parseInt(String strNumber)
Parse a string representing a positive or negative integer |
void |
resetFormDays(AppointmentForm form)
Reset days and slots of a form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BEAN_NAME
| Constructor Detail |
|---|
public AppointmentService()
| Method Detail |
|---|
public static AppointmentService getService()
public static String[] getListDaysOfWeek()
public List<AppointmentDay> computeDayList(AppointmentForm form)
form - The form to get days of. Opening and closing hour of the form
are updated by this method
public List<AppointmentDay> findAndComputeDayList(AppointmentForm form,
int nOffsetWeeks,
boolean bLoadSlotsFromDb)
form - The form to get days of. Opening and closing hour of the form
are updated by this methodnOffsetWeeks - The offset of the week to getbLoadSlotsFromDb - True if slots should be loaded from the database,
false if they should be computed
public List<AppointmentDay> getDayListForCalendar(AppointmentForm form,
int nOffsetWeeks,
boolean bIsForFront)
form - The form the get days of.nOffsetWeeks - The offset of weeks (0 for the current week, 1 for
the next, ...).bIsForFront - True if the calendar is for Front Office, false if it
is for Back Office. If the calendar is for Front Office, then
the n next days will be closed (n is set by the
AppointmentForm.getMinDaysBeforeAppointment()
attribute).
public List<AppointmentSlot> computeDaySlots(AppointmentDay day)
day - the day to initialize
public List<AppointmentSlot> computeDaySlots(AppointmentDay day,
int nDayOfWeek)
day - the day to initialize. The date of the day will NOT be usednDayOfWeek - The day of the week of the day
public List<String> getListAppointmentTimes(int nAppointmentDuration,
int nOpeningHour,
int nOpeningMinutes,
int nClosingHour,
int nClosingMinutes)
nAppointmentDuration - The appointment durationnOpeningHour - The opening hour of the daynOpeningMinutes - The opening minutes of the daynClosingHour - The closing hour of the daynClosingMinutes - The closing minutes of the day
public String getFormatedStringTime(int nHour,
int nMinute)
nHour - The hour of the time to describenMinute - The minute of the time to describe
public AppointmentDay getAppointmentDayFromForm(AppointmentForm appointmentForm)
appointmentForm - The form
public int getDayOfWeek(Date date)
date - The date to get the day of the week of
public void checkFormDays(AppointmentForm form)
form - The form to checkpublic Date getDateLastMonday()
public Date getDateMonday(int nOffsetWeek)
nOffsetWeek - The offset of the week (0 for the current week, 1 for
the next one, ...)
public void resetFormDays(AppointmentForm form)
form - The form to rest days of
public int getListTimeBegin(List<AppointmentDay> listDays,
AppointmentForm form,
List<String> listTimeBegin)
listDays - The list of days to considerform - The form associated with the given dayslistTimeBegin - The list to insert begin times in
public int getRefSizeRandomPart()
public String computeRefAppointment(Appointment appointment)
appointment - The appointment
public int parseInt(String strNumber)
strNumber - The string to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||