Class ConnectionServiceCallback

java.lang.Object
callofproject.dev.community.service.ConnectionServiceCallback

@Component @Lazy public class ConnectionServiceCallback extends Object
Author:
Nuri Can ÖZTÜRK The type Connection service callback. This class is responsible for handling connection requests, answers, removals, blocks, unblocks, and getting connections, connection requests, and blocked connections.
  • Constructor Details

    • ConnectionServiceCallback

      public ConnectionServiceCallback(callofproject.dev.data.community.dal.CommunityServiceHelper communityServiceHelper, IUserMapper userMapper)
      Instantiates a new Connection service callback.
      Parameters:
      communityServiceHelper - the community service helper
      userMapper - the user mapper
  • Method Details

    • sendConnectionRequest

      public callofproject.dev.data.common.clas.ResponseMessage<Object> sendConnectionRequest(UUID userId, UUID friendId)
      Send connection request response message.
      Parameters:
      userId - the user id
      friendId - the friend id
      Returns:
      the response message
    • answerConnectionRequest

      public callofproject.dev.data.common.clas.ResponseMessage<Object> answerConnectionRequest(UUID userId, UUID friendId, boolean answer)
      Answer connection request response message.
      Parameters:
      userId - the user id
      friendId - the friend id
      answer - the answer
      Returns:
      the response message
    • removeConnection

      public callofproject.dev.data.common.clas.ResponseMessage<Object> removeConnection(UUID userId, UUID friendId)
      Remove connection response message.
      Parameters:
      userId - the user id
      friendId - the friend id
      Returns:
      the response message
    • getConnectionsByUserId

      public callofproject.dev.data.common.clas.MultipleResponseMessagePageable<Object> getConnectionsByUserId(UUID userId)
      Get connections by user id.
      Parameters:
      userId - the user id
      Returns:
      the connections by user id
    • blockConnection

      public callofproject.dev.data.common.clas.ResponseMessage<Object> blockConnection(UUID userId, UUID friendId)
      Block connection response message.
      Parameters:
      userId - the user id
      friendId - the friend id
      Returns:
      the response message
    • unblockConnection

      public callofproject.dev.data.common.clas.ResponseMessage<Object> unblockConnection(UUID userId, UUID friendId)
      Unblock connection response message.
      Parameters:
      userId - the user id
      friendId - the friend id
      Returns:
      the response message
    • getConnectionRequestsByUserId

      public callofproject.dev.data.common.clas.MultipleResponseMessagePageable<Object> getConnectionRequestsByUserId(UUID userId)
      Get connection requests by user id.
      Parameters:
      userId - the user id
      Returns:
      the connection requests by user id
    • getBlockedConnectionsByUserId

      public callofproject.dev.data.common.clas.MultipleResponseMessagePageable<Object> getBlockedConnectionsByUserId(UUID userId)
      Get blocked connections by user id.
      Parameters:
      userId - the user id
      Returns:
      the blocked connections by user id
    • findUserByIdIfExist

      public callofproject.dev.data.community.entity.User findUserByIdIfExist(UUID userId)
      Find user by id if exist.
      Parameters:
      userId - the user id
      Returns:
      the user