Class ClosingDayService
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.service.ClosingDayService
-
public final class ClosingDayService extends java.lang.ObjectService 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, java.time.LocalDate dateOfClosingDay)Find, if it exists, the closing day of a form for a given datestatic java.util.List<ClosingDay>findListClosingDay(int nIdForm)Returns a list of the closing days of a formstatic java.util.List<java.time.LocalDate>findListDateOfClosingDayByIdForm(int nIdForm)Find all the dates of the closing days of the formstatic java.util.List<java.time.LocalDate>findListDateOfClosingDayByIdFormAndDateRange(int nIdForm, java.time.LocalDate startingDate, java.time.LocalDate endingDate)Find all the closing dates of the form on a given periodstatic java.util.List<java.time.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, java.time.LocalDate closingDate)Save a closing day of a formstatic voidsaveClosingDay(ClosingDay closingDay)Save a closing day of a formstatic voidsaveListClosingDay(int nIdForm, java.util.List<java.time.LocalDate> listClosingDate)Save the closing days of a form
-
-
-
Method Detail
-
findListDateOfClosingDayByIdFormAndDateRange
public static java.util.List<java.time.LocalDate> findListDateOfClosingDayByIdFormAndDateRange(int nIdForm, java.time.LocalDate startingDate, java.time.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, java.time.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 java.util.List<java.time.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 java.util.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, java.util.List<java.time.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, java.time.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 java.util.List<java.time.LocalDate> getImportClosingDays(org.apache.commons.fileupload.FileItem item) throws java.io.IOExceptionImport the closing dates of a given file- Parameters:
item- the file in input- Returns:
- the list of the closing dates in the file
- Throws:
java.io.IOException- if error during reading file
-
-