Skip to content

Latest commit

 

History

History
182 lines (140 loc) · 3.98 KB

README.md

File metadata and controls

182 lines (140 loc) · 3.98 KB

RMI Bike Services

Description

This service based on the middleware Java RMI allows users to provide or reserve bicycles.
This service depends on another service which is RMI Customers.

All accessible methods are defined in the Documentation API section.

API Documentation

All services is binded on port 1099.

/BikeListService

BikeList

  • Get all bikes with their uuid. The return value will be a HashMap<UUID, BikeService>.
  getAll()
  • Get the customer with uuid. The return value will be a BikeService.
  getBikeByUUID(String uuid)
  • Adds a bike to the list with his label, description, ownerUUID, bikeState. The return value will be a Map<UUID, BikeService>`.
    add(String label, String description, UUID ownerUUID, BikeState bikeState)

Bike

  • Get bike label. The return value will be a String.
  getLabel()
  • Get bike description. The return value will be a String.
  getDescription()
  • Get bike image. The return value will be a Image.
  getImage()
  • Set bike image. The return value will be a void.
  setImage()
  • Get bike ownerUUID. The return value will be a UUID.
  getOwnerUUID()
  • Get bike bikeState. The return value will be a BikeState.
  getBikeState()
  • Get bike feedbackHistory. The return value will be a List<FeedbackService>.
  getFeedbackHistory()
  • Get bike rentQueue. The return value will be a List<RentService>.
  getRentQueue()
  • Get bike averageNote. The return value will be a float.
  getAverageNote()
  • Informs if the bike can be rent. The return value will be a boolean.
    canBeRent()
  • Informs if the bike can be sale. The return value will be a boolean.
    canBeSale()

/RentListService

RentList

  • Get all rents with their uuid. The return value will be a HashMap<UUID, RentService>.
  getAll()
  • Get the rent with uuid. The return value will be a RentService.
  getRentByUUID(String uuid)
  • Get the customer rent. The return value will be a Map<UUID, RentService>.
  getRentByCustomerUUID(String customerUUID)
  • Adds a rent to the list with his start, end, customerClientUUID, bikeUUID. The return value will be a Map<UUID, RentService>.
    add(Date start, Date end, UUID customerClientUUID, UUID bikeUUID)
  • Retrieves the rentals of a customer who has no feedback. The return value will be a Map<UUID, RentService>.
    getRentsWithNoFeedbackByCustomer(String uuid)

Rent

  • Get rent start. The return value will be a Date.
  getStart()
  • Get rent end. The return value will be a Date.
  getEnd()
  • Get rent customerClientUUID. The return value will be a UUID.
  getCustomerClientUUID()
  • Get rent bikeUUID. The return value will be a UUID.
  getBikeUUID()

/FeedbackListService

FeedbackList

  • Get all feedbacks with their uuid. The return value will be a HashMap<UUID, FeedbackService>.
  getAll()
  • Get the feedback with uuid. The return value will be a FeedbackService.
  getFeedbackByUUID(String uuid)
  • Adds a feedback to the list with date, note, comment, bikeState, rentUUID. The return value will be a FeedbackService.
    add(Date date, int note, String comment, BikeState bikeState, String rentUUID)

Feedback

  • Get feedback date. The return value will be a Date.
  getDate()
  • Get feedback note. The return value will be a int.
  getNote()
  • Get feedback comment. The return value will be a String.
  getComment()
  • Get feedback bikeState. The return value will be a BikeState.
  getBikeState()
  • Get feedback rentUUID. The return value will be a RentService.
  getRentUUID()