Class SimpleResourcesManager
java.lang.Object
org.silverpeas.components.resourcesmanager.service.SimpleResourcesManager
- All Implemented Interfaces:
Serializable,ResourcesManager
@Service
public class SimpleResourcesManager
extends Object
implements ResourcesManager, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateCategory(Category category) Creating a new resource category.voidcreateResource(Resource resource) voiddeleteCategory(Long id, String componentId) voiddeleteReservation(Long id, String componentId) voiddeleteResource(Long id, String componentId) getBookableResources(String componentId) getCategories(String instanceId) getCategory(Long id) getManagers(long resourceId) getReservation(String instanceId, Long reservationId) getReservationForValidation(String instanceId, String userId, org.silverpeas.core.date.period.Period period) getReservationOfUser(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period) getReservations(String instanceId) getReservationWithResource(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period, Long resourceId) getReservationWithResourcesOfCategory(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period, Long categoryId) Get from the given aimed resources those that are unavailable on the given period.getReservedResources(String instanceId, List<Long> aimedResourceIds, Date startDate, Date endDate, Long reservationIdToSkip) Get from the given aimed resources those that are unavailable on the given period.getResource(Long id) getResourceOfReservationStatus(Long resourceId, Long reservationId) getResourcesByCategory(Long categoryId) getResourcesOfReservation(String instanceId, Long reservationId) getResourcesReservable(String instanceId, Date startDate, Date endDate) getUserReservations(String instanceId, String userId) voidindexResourceManager(String instanceId) booleanisManager(long userId, long resourceId) voidsaveReservation(Reservation reservation, List<Long> resourceIds) voidupdateCategory(Category category) voidupdateReservation(Reservation reservation, List<Long> resourceIds, boolean updateDate) voidupdateReservedResourceStatus(long reservationId, long resourceId, String status) voidupdateResource(Resource updatedResource, List<Long> managerIds)
-
Constructor Details
-
SimpleResourcesManager
public SimpleResourcesManager()
-
-
Method Details
-
createCategory
Creating a new resource category.- Specified by:
createCategoryin interfaceResourcesManager- Parameters:
category- the category to create
-
getCategories
- Specified by:
getCategoriesin interfaceResourcesManager
-
getCategory
- Specified by:
getCategoryin interfaceResourcesManager
-
updateCategory
- Specified by:
updateCategoryin interfaceResourcesManager
-
deleteCategory
- Specified by:
deleteCategoryin interfaceResourcesManager
-
createResource
- Specified by:
createResourcein interfaceResourcesManager
-
getResource
- Specified by:
getResourcein interfaceResourcesManager
-
getResourcesByCategory
- Specified by:
getResourcesByCategoryin interfaceResourcesManager
-
getBookableResources
- Specified by:
getBookableResourcesin interfaceResourcesManager
-
deleteResource
- Specified by:
deleteResourcein interfaceResourcesManager
-
getResourcesReservable
- Specified by:
getResourcesReservablein interfaceResourcesManager
-
getResourcesOfReservation
- Specified by:
getResourcesOfReservationin interfaceResourcesManager
-
updateReservation
- Specified by:
updateReservationin interfaceResourcesManager
-
getReservedResources
public List<Resource> getReservedResources(String instanceId, List<Long> resources, Date startDate, Date endDate) Get from the given aimed resources those that are unavailable on the given period.- Specified by:
getReservedResourcesin interfaceResourcesManager- Parameters:
instanceId- the current component instance identifierresources- the list of resource identifiersstartDate- the start dateendDate- the end date- Returns:
- a list of reserved resources
-
getReservedResources
public List<Resource> getReservedResources(String instanceId, List<Long> aimedResourceIds, Date startDate, Date endDate, Long reservationIdToSkip) Get from the given aimed resources those that are unavailable on the given period. Resources attached to reservationIdToSkip are excluded (but can still be returned if they are attached to another reservation on the given period).- Specified by:
getReservedResourcesin interfaceResourcesManager- Parameters:
instanceId- the current component instance identifieraimedResourceIds- the identifiers of the resources to get.startDate- the start dateendDate- the end datereservationIdToSkip- the unique identifier of the reservation to skip.- Returns:
- a list of reserved resources.
-
getReservations
- Specified by:
getReservationsin interfaceResourcesManager
-
getUserReservations
- Specified by:
getUserReservationsin interfaceResourcesManager
-
getReservation
- Specified by:
getReservationin interfaceResourcesManager
-
deleteReservation
- Specified by:
deleteReservationin interfaceResourcesManager
-
getReservationForValidation
public List<Reservation> getReservationForValidation(String instanceId, String userId, org.silverpeas.core.date.period.Period period) - Specified by:
getReservationForValidationin interfaceResourcesManager
-
getReservationOfUser
public List<Reservation> getReservationOfUser(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period) - Specified by:
getReservationOfUserin interfaceResourcesManager
-
getReservationWithResourcesOfCategory
public List<Reservation> getReservationWithResourcesOfCategory(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period, Long categoryId) - Specified by:
getReservationWithResourcesOfCategoryin interfaceResourcesManager
-
getReservationWithResource
public List<Reservation> getReservationWithResource(String instanceId, Integer userId, org.silverpeas.core.date.period.Period period, Long resourceId) - Specified by:
getReservationWithResourcein interfaceResourcesManager
-
getResourceOfReservationStatus
- Specified by:
getResourceOfReservationStatusin interfaceResourcesManager
-
indexResourceManager
- Specified by:
indexResourceManagerin interfaceResourcesManager
-
getManagers
- Specified by:
getManagersin interfaceResourcesManager
-
saveReservation
- Specified by:
saveReservationin interfaceResourcesManager
-
updateReservedResourceStatus
- Specified by:
updateReservedResourceStatusin interfaceResourcesManager
-
isManager
public boolean isManager(long userId, long resourceId) - Specified by:
isManagerin interfaceResourcesManager
-
updateResource
- Specified by:
updateResourcein interfaceResourcesManager
-