Class ClosingDayService
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.service.ClosingDayService
-
public final class ClosingDayService extends Object
Service class for the closing day- Author:
- Laurent Payen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 formstatic List<LocalDate>findListDateOfClosingDayByIdForm(int nIdForm)Find all the dates of the closing days of the formstatic List<LocalDate>findListDateOfClosingDayByIdFormAndDateRange(int nIdForm, LocalDate startingDate, LocalDate endingDate)Find all the closing dates of the form on a given periodstatic List<LocalDate>getImportClosingDays(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 Detail
-
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
public static List<LocalDate> findListDateOfClosingDayByIdForm(int nIdForm)
Find all the dates of the closing days of the form- Parameters:
nIdForm- the form Id- Returns:
- the list of closing dates
-
findListClosingDay
public static List<ClosingDay> findListClosingDay(int nIdForm)
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
public static void saveListClosingDay(int nIdForm, List<LocalDate> listClosingDate)Save the closing days of a form- Parameters:
nIdForm- the form idlistClosingDate- the closing dates to save
-
saveClosingDay
public static void saveClosingDay(int nIdForm, LocalDate closingDate)Save a closing day of a form- Parameters:
nIdForm- the form IdclosingDate- the closing date
-
saveClosingDay
public static void saveClosingDay(ClosingDay closingDay)
Save a closing day of a form- Parameters:
closingDay- the closing day to save
-
removeClosingDay
public static void removeClosingDay(ClosingDay closingDay)
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
-
-