Package io.extact.rms.external.webapi
Class RentalReservationResource
java.lang.Object
io.extact.rms.external.webapi.RentalReservationResource
- All Implemented Interfaces:
WebApiSpec
@Path("/rms")
@ApplicationScoped
public class RentalReservationResource
extends Object
implements WebApiSpec
-
Field Summary
Fields inherited from interface io.extact.rms.external.webapi.WebApiSpec
ADMIN_ROLE, MEMBER_ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRentalItem
(AddRentalItemDto addDto) addReservation
(AddReservationDto addDto) addUserAccount
(AddUserAccountDto addDto) authenticate
(LoginDto loginDto) authenticate
(String loginId, String password) void
cancelReservation
(Integer reservationId) boolean
canRentedItemAtTerm
(Integer rentalItemId, LocalDateTime from, LocalDateTime to) void
deleteRentalItem
(Integer rentalItemId) void
deleteReservation
(Integer reservationId) void
deleteUserAccount
(Integer userAccountId) findReservationByRentalItemAndStartDate
(Integer rentalItemId, LocalDate date) findReservationByRentalItemId
(Integer rentalItemId) findReservationByReserverId
(Integer reserverId) updateRentalItem
(RentalItemResourceDto updateDto) updateReservation
(ReservationResourceDto updateDto) updateUserAccount
(UserAccountResourceDto updateDto) updateUserProfile
(UserAccountResourceDto updateDto)
-
Constructor Details
-
RentalReservationResource
-
-
Method Details
-
authenticate
- Specified by:
authenticate
in interfaceWebApiSpec
-
authenticate
- Specified by:
authenticate
in interfaceWebApiSpec
-
findReservationByRentalItemAndStartDate
@RolesAllowed("MEMBER") public List<ReservationResourceDto> findReservationByRentalItemAndStartDate(Integer rentalItemId, LocalDate date) - Specified by:
findReservationByRentalItemAndStartDate
in interfaceWebApiSpec
-
findReservationByReserverId
@RolesAllowed("MEMBER") public List<ReservationResourceDto> findReservationByReserverId(Integer reserverId) - Specified by:
findReservationByReserverId
in interfaceWebApiSpec
-
getOwnReservations
- Specified by:
getOwnReservations
in interfaceWebApiSpec
-
getAllRentalItems
- Specified by:
getAllRentalItems
in interfaceWebApiSpec
-
addReservation
- Specified by:
addReservation
in interfaceWebApiSpec
-
cancelReservation
- Specified by:
cancelReservation
in interfaceWebApiSpec
-
findReservationByRentalItemId
@RolesAllowed("MEMBER") public List<ReservationResourceDto> findReservationByRentalItemId(Integer rentalItemId) - Specified by:
findReservationByRentalItemId
in interfaceWebApiSpec
-
findCanRentedItemAtTerm
@RolesAllowed("MEMBER") public List<RentalItemResourceDto> findCanRentedItemAtTerm(LocalDateTime from, LocalDateTime to) - Specified by:
findCanRentedItemAtTerm
in interfaceWebApiSpec
-
canRentedItemAtTerm
@RolesAllowed("MEMBER") public boolean canRentedItemAtTerm(Integer rentalItemId, LocalDateTime from, LocalDateTime to) - Specified by:
canRentedItemAtTerm
in interfaceWebApiSpec
-
addRentalItem
- Specified by:
addRentalItem
in interfaceWebApiSpec
-
updateRentalItem
@RolesAllowed("ADMIN") public RentalItemResourceDto updateRentalItem(RentalItemResourceDto updateDto) - Specified by:
updateRentalItem
in interfaceWebApiSpec
-
deleteRentalItem
- Specified by:
deleteRentalItem
in interfaceWebApiSpec
-
getAllReservations
- Specified by:
getAllReservations
in interfaceWebApiSpec
-
updateReservation
@RolesAllowed("ADMIN") public ReservationResourceDto updateReservation(ReservationResourceDto updateDto) - Specified by:
updateReservation
in interfaceWebApiSpec
-
deleteReservation
- Specified by:
deleteReservation
in interfaceWebApiSpec
-
getAllUserAccounts
- Specified by:
getAllUserAccounts
in interfaceWebApiSpec
-
addUserAccount
- Specified by:
addUserAccount
in interfaceWebApiSpec
-
updateUserAccount
@RolesAllowed("ADMIN") public UserAccountResourceDto updateUserAccount(UserAccountResourceDto updateDto) - Specified by:
updateUserAccount
in interfaceWebApiSpec
-
deleteUserAccount
- Specified by:
deleteUserAccount
in interfaceWebApiSpec
-
getOwnUserProfile
- Specified by:
getOwnUserProfile
in interfaceWebApiSpec
-
updateUserProfile
@RolesAllowed({"MEMBER","ADMIN"}) public UserAccountResourceDto updateUserProfile(UserAccountResourceDto updateDto) - Specified by:
updateUserProfile
in interfaceWebApiSpec
-