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 TypeMethodDescriptionvoidAnswers a message from the currently logged user.voiddelete(long messageId) Deletes a message for the currently logged user.Gets the messages for the currently logged user.voidmarkAsRead(long messageId) Marks a message as read for the currently logged user.voidsendMessages(Collection<MessageDto> messages) Sends new messages from the currently logged user.
-
Field Details
-
NAMESPACE
The namespace of the service in the REST API.- See Also:
-
-
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.
-