Class ReservationService
java.lang.Object
org.silverpeas.components.resourcesmanager.service.ReservationService
- Author:
- ehugonnet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeReservationStatus(Reservation reservation) voidcreateReservation(Reservation reservation, List<Long> resourceIds) voiddeleteReservation(long id) findAllReservations(String instanceId) findAllReservationsForCategoryInRange(String instanceId, Integer userId, Long categoryId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period and for which at least one resource of the given category is attached.findAllReservationsForResourceInRange(String instanceId, Integer userId, Long resourceId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period and for which the given resource is attached.findAllReservationsForUser(String instanceId, Integer userId) findAllReservationsForValidation(String instanceId, Long userId, String startPeriod, String endPeriod) findAllReservationsInRange(String instanceId, Integer userId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period.getReservation(long id) voidupdateReservation(Reservation reservation)
-
Constructor Details
-
ReservationService
public ReservationService()
-
-
Method Details
-
createReservation
-
computeReservationStatus
-
updateReservation
-
getReservation
-
deleteReservation
public void deleteReservation(long id) -
findAllReservations
-
findAllReservationsForUser
-
findAllReservationsForValidation
-
findAllReservationsInRange
public List<Reservation> findAllReservationsInRange(String instanceId, Integer userId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period. If user parameter (userId) is not defined, the reservations returned are not filtered by user.- Parameters:
instanceId- resource manager instance iduserId- unique identifier of the userstartPeriod- the start date of the periodendPeriod- the end date of the period- Returns:
- a list of reservations
-
findAllReservationsForCategoryInRange
public List<Reservation> findAllReservationsForCategoryInRange(String instanceId, Integer userId, Long categoryId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period and for which at least one resource of the given category is attached. If user parameter (userId) is not defined, the reservations returned are not filtered by user.- Parameters:
instanceId- the resource manager instance identifieruserId- the unique identifier of the usercategoryId- the unique identifier of the categorystartPeriod- the start date of the periodendPeriod- the end date of the period- Returns:
- a list of reservations.
-
findAllReservationsForResourceInRange
public List<Reservation> findAllReservationsForResourceInRange(String instanceId, Integer userId, Long resourceId, String startPeriod, String endPeriod) Finds all reservations related to the given user on the given period and for which the given resource is attached. If user parameter (userId) is not defined, the reservations returned are not filtered by user.- Parameters:
instanceId- the resource manager instance identifier.userId- the unique identifier of the userresourceId- the unique identifier of the resourcestartPeriod- the start date of the periodendPeriod- the end date of the period- Returns:
- a list of reservations.
-