Class DirectConversationServiceImpl
java.lang.Object
com.finconsgroup.itserr.marketplace.usercommunication.dm.service.impl.DirectConversationServiceImpl
- All Implemented Interfaces:
DirectConversationService
@Service
public class DirectConversationServiceImpl
extends Object
implements DirectConversationService
Service implementation for
DirectConversationService.
Contains business rules for participants, permissions, read receipts, and stats.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrGetDirectConversation(UUID user1Id, UUID user2Id) Create a new direct conversation between two distinct users or return the existing one.getDirectConversation(UUID user1Id, UUID user2Id) Get the direct conversations between two users.
-
Constructor Details
-
DirectConversationServiceImpl
public DirectConversationServiceImpl()
-
-
Method Details
-
createOrGetDirectConversation
@Transactional(propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public OutputConversationDto createOrGetDirectConversation(@NonNull UUID user1Id, @NonNull UUID user2Id) Description copied from interface:DirectConversationServiceCreate a new direct conversation between two distinct users or return the existing one.- Specified by:
createOrGetDirectConversationin interfaceDirectConversationService- Parameters:
user1Id- first participant user IDuser2Id- second participant user ID- Returns:
- the created or existing Conversation entity
-
getDirectConversation
@Transactional(propagation=REQUIRED, readOnly=true, noRollbackFor=java.lang.Exception.class) public OutputConversationDto getDirectConversation(@NonNull UUID user1Id, @NonNull UUID user2Id) Description copied from interface:DirectConversationServiceGet the direct conversations between two users.- Specified by:
getDirectConversationin interfaceDirectConversationService- Parameters:
user1Id- first participant user IDuser2Id- second participant user ID- Returns:
- the found direct conversations
-