Class DefaultPreConditionService
java.lang.Object
com.finconsgroup.itserr.marketplace.usercommunication.dm.service.impl.DefaultPreConditionService
- All Implemented Interfaces:
PreConditionService
Default implementation for
PreConditionService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckConversation(UUID conversationId) Checks if the conversation exists and is active.voidcheckUserAndConversation(UUID userId, Conversation conversation) checkUserAndConversation(UUID userId, UUID conversationId) Checks if the user is allowed to access the conversation.checkUserAndConversationAndMessage(UUID userId, UUID conversationId, MessageType messageType) Checks if the user is allowed to send the message of messageType to the conversation.
-
Constructor Details
-
DefaultPreConditionService
public DefaultPreConditionService()
-
-
Method Details
-
checkConversation
@Transactional(propagation=REQUIRED, readOnly=true, noRollbackFor=java.lang.Exception.class) public Conversation checkConversation(UUID conversationId) Description copied from interface:PreConditionServiceChecks if the conversation exists and is active. Returns the found conversation.- Specified by:
checkConversationin interfacePreConditionService- Parameters:
conversationId- the conversation id
-
checkUserAndConversation
@Transactional(propagation=REQUIRED, readOnly=true, noRollbackFor=java.lang.Exception.class) public Conversation checkUserAndConversation(UUID userId, UUID conversationId) Description copied from interface:PreConditionServiceChecks if the user is allowed to access the conversation. Returns the found conversation.- Specified by:
checkUserAndConversationin interfacePreConditionService- Parameters:
userId- the user idconversationId- the conversation id
-
checkUserAndConversationAndMessage
@Transactional(propagation=REQUIRED, readOnly=true, noRollbackFor=java.lang.Exception.class) public Conversation checkUserAndConversationAndMessage(UUID userId, UUID conversationId, MessageType messageType) Description copied from interface:PreConditionServiceChecks if the user is allowed to send the message of messageType to the conversation. Returns the found conversation.- Specified by:
checkUserAndConversationAndMessagein interfacePreConditionService- Parameters:
userId- the user idconversationId- the conversation idmessageType- the message type
-
checkUserAndConversation
-