Interface IFormRecordMessageHandler

    • Method Detail

      • getByUser

        PagedResult<FormRecordMessage> getByUser​(UserContext uc,
                                                 IUser user,
                                                 int page,
                                                 int pageSize)
        Finds all form record messages the user given by the user context has access to.
        Parameters:
        uc - user context holding the requesting user.
        user - to get the form record messages for.
        page - to get.
        pageSize - size of the page to get.
        Returns:
        a list of form record messages the user has access to ordered by their creation instant (desc).
        See Also:
        getByUser(UserContext, IUser)
      • getMessagePage

        PagedResult<BaseFormRecordMessageDTO> getMessagePage​(UserContext uc,
                                                             PageQuery pageQuery,
                                                             FormRecordMessagesQuery messagesQuery,
                                                             boolean skipCount)
        Returns a page of form record messages for the given page query and messages query.
        Parameters:
        uc - user context for database transactions.
        pageQuery - page query to get the messages.
        messagesQuery - messagesQuery to apply to the messages.
        skipCount - whether to skip the count query.
        Returns:
        a list of form record messages in the order defined by the messages query.
        Since:
        8.4.0
      • getByUuid

        FormRecordMessage getByUuid​(UserContext uc,
                                    UUID uuid)
        Finds the message for the given UUID.
        Parameters:
        uc - user context for accessing the database
        uuid - the UUID of the message
        Returns:
        The message with the given UUID
      • getByUuidAndUser

        FormRecordMessage getByUuidAndUser​(UserContext uc,
                                           UUID uuid,
                                           IUser user)
        Finds the message for the given UUID, which the given user can access.
        Parameters:
        uc - user context holding the requesting user.
        uuid - the UUID of the message
        user - to get the form record message for.
        Returns:
        The message with the given UUID which the user can access and null otherwise.
      • getChatMessages

        List<FormRecordMessage> getChatMessages​(UserContext uc,
                                                UUID chatUuid)
        Returns all messages for the given chat UUID ordered by their sent instant (desc). This is intended for displaying the chat in the backoffice inbox.
        Parameters:
        uc - user context for accessing the database
        chatUuid - the UUID of the chat
        Returns:
        a list of all form record messages for the chat ordered by their sent instant (desc).
      • getDetailsByUuidAndUser

        DetailedFormRecordMessageDTO getDetailsByUuidAndUser​(UserContext uc,
                                                             UUID uuid,
                                                             IUser user,
                                                             Locale locale)
        Finds the detailed message for the given UUID, which the given user can access.
        Parameters:
        uc - user context holding the requesting user.
        uuid - the UUID of the message
        user - to get the form record message for.
        locale - the locale for which to return the message (metadata)
        Returns:
        The message with the given UUID which the user can access and null otherwise.
        Since:
        8.4.0
      • getUnreadByUser

        PagedResult<FormRecordMessage> getUnreadByUser​(UserContext uc,
                                                       IUser user,
                                                       int page,
                                                       int pageSize)
        Finds all unread form record messages the user given by the user context has access to. Unread messages can only be gotten for users with UserProfiles. For users without a profile all messages will be returned.
        Parameters:
        uc - user context holding the requesting user.
        user - to get the unread form record messages for.
        page - to get.
        pageSize - size of the page to get.
        Returns:
        a list of unread form record messages the user has access to ordered by their creation instant (desc).
        See Also:
        getByUser(UserContext, IUser)