Interface WorkerMutationService
- All Known Implementing Classes:
WorkerMutationServiceImpl
public interface WorkerMutationService
Service for worker mutation operations.
-
Method Summary
Modifier and TypeMethodDescriptioncreateRequest
(JWT token, RequestInput requestInput) Creates a request.void
deleteRequest
(JWT token, String requestID) Deletes a request.modifyRequest
(JWT token, String requestID, RequestInput requestInput) Modifies a request.
-
Method Details
-
createRequest
Request createRequest(JWT token, RequestInput requestInput) throws WorkerNotFoundException, InvalidRequestTypeException, OfficeOverloadedException Creates a request.- Parameters:
token
- JWT access token of the workerrequestInput
- request input- Returns:
- the created request
- Throws:
WorkerNotFoundException
- if the worker is not foundInvalidRequestTypeException
- if the request type is invalidOfficeOverloadedException
- if the office hasn't enough workers
-
modifyRequest
Request modifyRequest(JWT token, String requestID, RequestInput requestInput) throws WorkerNotFoundException, RequestNotFoundException, OfficeOverloadedException Modifies a request.- Parameters:
token
- JWT access token of the workerrequestID
- ID of the request to modifyrequestInput
- request input- Returns:
- the modified request
- Throws:
WorkerNotFoundException
- if the worker is not foundRequestNotFoundException
- if the request is not foundOfficeOverloadedException
- if the office hasn't enough workers
-
deleteRequest
void deleteRequest(JWT token, String requestID) throws WorkerNotFoundException, RequestNotFoundException Deletes a request.- Parameters:
token
- JWT access token of the workerrequestID
- ID of the request to delete- Throws:
WorkerNotFoundException
- if the worker is not foundRequestNotFoundException
- if the request is not found
-