All Known Implementing Classes:
DefaultPreConditionService

public interface PreConditionService
Service contract for managing pre-conditions for accessing conversations (direct and group). Each method is documented to improve generated JavaDoc and maintainability.
  • Method Details

    • checkConversation

      Conversation checkConversation(UUID conversationId)
      Checks if the conversation exists and is active. Returns the found conversation.
      Parameters:
      conversationId - the conversation id
      Throws:
      com.finconsgroup.itserr.marketplace.core.web.exception.WP2ResourceNotFoundException - if conversation id does not exist
    • checkUserAndConversation

      Conversation checkUserAndConversation(UUID userId, UUID conversationId)
      Checks if the user is allowed to access the conversation. Returns the found conversation.
      Parameters:
      userId - the user id
      conversationId - the conversation id
      Throws:
      com.finconsgroup.itserr.marketplace.core.web.exception.WP2ResourceNotFoundException - if conversation id does not exist
      com.finconsgroup.itserr.marketplace.core.web.exception.WP2AuthorizationException - if not allowed
    • checkUserAndConversationAndMessage

      Conversation checkUserAndConversationAndMessage(UUID userId, UUID conversationId, MessageType messageType)
      Checks if the user is allowed to send the message of messageType to the conversation. Returns the found conversation.
      Parameters:
      userId - the user id
      conversationId - the conversation id
      messageType - the message type
      Throws:
      com.finconsgroup.itserr.marketplace.core.web.exception.WP2ResourceNotFoundException - if conversation id does not exist
      com.finconsgroup.itserr.marketplace.core.web.exception.WP2AuthorizationException - if not allowed