Package com.qfs.snl.rs
Interface IMessageRestService
- All Known Implementing Classes:
MessageRestServiceController
@RequestMapping("/activeviam/sentinel/rest/v8/messages")
public interface IMessageRestService
The message REST service.
- Author:
- ActiveViam
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Answers a message from the currently logged user.void
delete
(long messageId) Deletes a message for the currently logged user.Gets the messages for the currently logged user.void
markAsRead
(long messageId) Marks a message as read for the currently logged user.void
sendMessages
(Collection<MessageDto> messages) Sends new messages from the currently logged user.
-
Field Details
-
Method Details
-
getMessages
Gets the messages for the currently logged user.- Returns:
- all messages as an array.
- Throws:
ServiceException
- when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
-
sendMessages
@PostMapping("/send") void sendMessages(@RequestBody Collection<MessageDto> messages) throws ServiceException Sends new messages from the currently logged user.- Parameters:
messages
- the messages- Throws:
ServiceException
- when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
-
markAsRead
@GetMapping("/{id:\\d+}/mark-as-read") void markAsRead(@PathVariable("id") long messageId) throws ServiceException Marks a message as read for the currently logged user.- Parameters:
messageId
- the message id- Throws:
ServiceException
- when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
-
delete
@DeleteMapping("/{id:\\d+}") void delete(@PathVariable("id") long messageId) throws ServiceException Deletes a message for the currently logged user.- Parameters:
messageId
- the message id- Throws:
ServiceException
- when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
-
answer
@PostMapping("/{id:\\d+}/answer") void answer(@PathVariable("id") long messageId, @RequestBody Map<String, Object> response) throws ServiceExceptionAnswers a message from the currently logged user.- Parameters:
messageId
- the message idresponse
- the message answer as JSON stringified value- Throws:
ServiceException
- when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
-