Class ClosingDayService
java.lang.Object
fr.paris.lutece.plugins.appointment.service.ClosingDayService
Service class for the closing day
- Author:
- Laurent Payen
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClosingDayfindClosingDayByIdFormAndDateOfClosingDay(int nIdForm, LocalDate dateOfClosingDay) Find, if it exists, the closing day of a form for a given datestatic List<ClosingDay>findListClosingDay(int nIdForm) Returns a list of the closing days of a formfindListDateOfClosingDayByIdForm(int nIdForm) Find all the dates of the closing days of the formfindListDateOfClosingDayByIdFormAndDateRange(int nIdForm, LocalDate startingDate, LocalDate endingDate) Find all the closing dates of the form on a given periodgetImportClosingDays(org.apache.commons.fileupload.FileItem item) Import the closing dates of a given filestatic voidremoveClosingDay(ClosingDay closingDay) Remove a closing daystatic voidsaveClosingDay(int nIdForm, LocalDate closingDate) Save a closing day of a formstatic voidsaveClosingDay(ClosingDay closingDay) Save a closing day of a formstatic voidsaveListClosingDay(int nIdForm, List<LocalDate> listClosingDate) Save the closing days of a form
-
Method Details
-
findListDateOfClosingDayByIdFormAndDateRange
public static List<LocalDate> findListDateOfClosingDayByIdFormAndDateRange(int nIdForm, LocalDate startingDate, LocalDate endingDate) Find all the closing dates of the form on a given period- Parameters:
nIdForm- the form IdstartingDate- the starting dateendingDate- the ending date- Returns:
- a list of closing dates
-
findClosingDayByIdFormAndDateOfClosingDay
public static ClosingDay findClosingDayByIdFormAndDateOfClosingDay(int nIdForm, LocalDate dateOfClosingDay) Find, if it exists, the closing day of a form for a given date- Parameters:
nIdForm- the form Iddate- the date- Returns:
- the closing day, if it exists
-
findListDateOfClosingDayByIdForm
Find all the dates of the closing days of the form- Parameters:
nIdForm- the form Id- Returns:
- the list of closing dates
-
findListClosingDay
Returns a list of the closing days of a form- Parameters:
nIdForm- the form id- Returns:
- a list of the closing days of the form
-
saveListClosingDay
Save the closing days of a form- Parameters:
nIdForm- the form idlistClosingDate- the closing dates to save
-
saveClosingDay
Save a closing day of a form- Parameters:
nIdForm- the form IdclosingDate- the closing date
-
saveClosingDay
Save a closing day of a form- Parameters:
closingDay- the closing day to save
-
removeClosingDay
Remove a closing day- Parameters:
closingDay- the closing day to remove
-
getImportClosingDays
public static List<LocalDate> getImportClosingDays(org.apache.commons.fileupload.FileItem item) throws IOException Import the closing dates of a given file- Parameters:
item- the file in input- Returns:
- the list of the closing dates in the file
- Throws:
IOException- if error during reading file
-