Package com.dzidzi.api
Interface ServiceTicketApi
public interface ServiceTicketApi
ServiceTicketApi contains all the api operations handling
ServiceTicket in the DzidziApp.-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptTicket(UUID ticketId) It accepts a ticket by the given id.voidchangeTicketStatus(TicketStatus status, UUID ticketId) Changes the ticket status by the given ticket id.createTicket(String message) Adds/creates a new ticket.voiddeleteTicket(UUID ticketId) It deletes a ticket by the given id.findTickets(FindTicketRequest findTicketRequest) Finds the paginated tickets based on the request.getTicketById(UUID ticketId) Finds a ticket by the given id.
-
Method Details
-
getTicketById
Finds a ticket by the given id.- Parameters:
ticketId- the ticket id- Returns:
- the ticket found
- Throws:
com.dzidzi.exception.EntityNotFoundException- when the entity is not found
-
createTicket
Adds/creates a new ticket.- Parameters:
message- the reason- Returns:
- the created ticket
-
changeTicketStatus
Changes the ticket status by the given ticket id.- Parameters:
status- the status to change the ticket toticketId- the ticket id
-
acceptTicket
It accepts a ticket by the given id. This is a synchronized method, meaning it can be accepted by only one user and cannot be changed once the first user has been assigned.- Parameters:
ticketId- the ticket id
-
findTickets
Finds the paginated tickets based on the request.- Parameters:
findTicketRequest- the request containing the params to filter tickets on- Returns:
- the
DzidziPaginationDTO
-
deleteTicket
It deletes a ticket by the given id.- Parameters:
ticketId- the ticket id
-