Interface IMessageRestService

All Known Implementing Classes:
MessageRestServiceController

@RequestMapping("/activeviam/sentinel/rest/v8/messages") public interface IMessageRestService
The message REST service.
Author:
ActiveViam
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The namespace of the service in the REST API.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    answer(long messageId, Map<String,Object> response)
    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
    Sends new messages from the currently logged user.
  • Field Details Link icon

  • Method Details Link icon

    • getMessages Link icon

      @GetMapping Collection<MessageDto> getMessages() throws ServiceException
      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 Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @PostMapping("/{id:\\d+}/answer") void answer(@PathVariable("id") long messageId, @RequestBody Map<String,Object> response) throws ServiceException
      Answers a message from the currently logged user.
      Parameters:
      messageId - the message id
      response - 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.