Interface IRequestRemovalFromConcreteShiftController
- All Known Implementing Classes:
RequestRemovalFromConcreteShiftController
public interface IRequestRemovalFromConcreteShiftController
-
Method Summary
Modifier and TypeMethodDescriptioncreateRequest(RequestRemovalFromConcreteShiftDTO requestRemovalFromConcreteShiftDTO) Create a new request of removal from concrete shift, given a DTO.Get all the requests from the database.Get all pending requests (i.e. not reviewed).getRequest(Long requestId) Get a specific request, given an ID.getRequestsByRequestingDoctorId(Long requestingDoctorId) Get all the requests, filtered by requesting doctor ID.reviewRequest(RequestRemovalFromConcreteShiftDTO requestRemovalFromConcreteShiftDTO) Review a request (done by a Planner - the outcome is embedded into the DTO parameter).uploadFile(@NotNull Long requestId, @NotNull org.springframework.web.multipart.MultipartFile file) Upload a file (not mandatory) to be attached to a request, given the request ID.
-
Method Details
-
createRequest
RequestRemovalFromConcreteShiftDTO createRequest(RequestRemovalFromConcreteShiftDTO requestRemovalFromConcreteShiftDTO) throws DatabaseException, ConcreteShiftException Create a new request of removal from concrete shift, given a DTO.- Parameters:
requestRemovalFromConcreteShiftDTO- DTO related to the request- Returns:
- DTO object related to the request
- Throws:
DatabaseException- in case an error during database lookup occursConcreteShiftException- in case an error during database lookup occurs
-
getRequest
Get a specific request, given an ID.- Parameters:
requestId- request id- Returns:
- object related to the request, if any
- Throws:
DatabaseException- in case an error during database lookup occurs
-
getAllRequests
Set<RequestRemovalFromConcreteShiftDTO> getAllRequests()Get all the requests from the database.- Returns:
Setof all the requests from the database
-
getPendingRequests
Set<RequestRemovalFromConcreteShiftDTO> getPendingRequests()Get all pending requests (i.e. not reviewed).- Returns:
Setof all the pending requests from the database
-
getRequestsByRequestingDoctorId
Get all the requests, filtered by requesting doctor ID.- Parameters:
requestingDoctorId- requesting doctor ID, for filtering- Returns:
Setof all the requests related to the specific doctor whose ID is provided
-
reviewRequest
RequestRemovalFromConcreteShiftDTO reviewRequest(RequestRemovalFromConcreteShiftDTO requestRemovalFromConcreteShiftDTO) throws DatabaseException, ConcreteShiftException Review a request (done by a Planner - the outcome is embedded into the DTO parameter).- Parameters:
requestRemovalFromConcreteShiftDTO- DTO related to the request- Returns:
- DTO related to the request, updated with the outcome of the review
- Throws:
DatabaseException- in case an error during database lookup occursConcreteShiftException
-
uploadFile
RequestRemovalFromConcreteShiftDTO uploadFile(@NotNull @NotNull Long requestId, @NotNull @NotNull org.springframework.web.multipart.MultipartFile file) throws IOException, DatabaseException Upload a file (not mandatory) to be attached to a request, given the request ID.- Parameters:
requestId- request idfile- file to be attached- Returns:
- DTO related to the request, updated with the file
- Throws:
IOException- in case of I/O errorsDatabaseException- in case an error during database lookup occurs
-