org.silverpeas.resourcemanager.services
Class ReservationService

java.lang.Object
  extended by org.silverpeas.resourcemanager.services.ReservationService

@Service
@Transactional
public class ReservationService
extends Object

Author:
ehugonnet

Constructor Summary
ReservationService()
           
 
Method Summary
 String computeReservationStatus(Reservation reservation)
           
 void createReservation(Reservation reservation, List<Long> resourceIds)
           
 void deleteReservation(long id)
           
 List<Reservation> findAllReservations(String instanceId)
           
 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.
 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.
 List<Reservation> findAllReservationsForUser(String instanceId, Integer userId)
           
 List<Reservation> findAllReservationsForValidation(String instanceId, Long userId, String startPeriod, String endPeriod)
           
 List<Reservation> findAllReservationsInRange(String instanceId, Integer userId, String startPeriod, String endPeriod)
          Finds all reservations related to the given user on the given period.
 Reservation getReservation(long id)
           
 void updateReservation(Reservation reservation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReservationService

public ReservationService()
Method Detail

createReservation

public void createReservation(Reservation reservation,
                              List<Long> resourceIds)

computeReservationStatus

public String computeReservationStatus(Reservation reservation)

updateReservation

public void updateReservation(Reservation reservation)

getReservation

public Reservation getReservation(long id)

deleteReservation

public void deleteReservation(long id)

findAllReservations

public List<Reservation> findAllReservations(String instanceId)

findAllReservationsForUser

public List<Reservation> findAllReservationsForUser(String instanceId,
                                                    Integer userId)

findAllReservationsForValidation

public List<Reservation> findAllReservationsForValidation(String instanceId,
                                                          Long userId,
                                                          String startPeriod,
                                                          String endPeriod)

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 -
userId -
startPeriod -
endPeriod -
Returns:

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 -
userId -
categoryId -
startPeriod -
endPeriod -
Returns:

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 -
userId -
resourceId -
startPeriod -
endPeriod -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.