Class ChatServiceImpl

java.lang.Object
org.exoplatform.chat.services.ChatServiceImpl
All Implemented Interfaces:
org.exoplatform.chat.services.ChatService

@Named("chatService") @ApplicationScoped @Singleton public class ChatServiceImpl extends Object implements org.exoplatform.chat.services.ChatService
  • Constructor Details

    • ChatServiceImpl

      public ChatServiceImpl()
  • Method Details

    • write

      public void write(String message, String user, String room, String isSystem)
      Specified by:
      write in interface org.exoplatform.chat.services.ChatService
    • write

      public void write(String clientId, String message, String sender, String room, String isSystem, String options)
      Specified by:
      write in interface org.exoplatform.chat.services.ChatService
    • save

      public String save(String message, String user, String room, String isSystem, String options)
      Specified by:
      save in interface org.exoplatform.chat.services.ChatService
    • delete

      public void delete(String room, String sender, String messageId)
      Specified by:
      delete in interface org.exoplatform.chat.services.ChatService
    • getTeamRoomById

      public org.exoplatform.chat.model.RoomBean getTeamRoomById(String roomId)
      Specified by:
      getTeamRoomById in interface org.exoplatform.chat.services.ChatService
    • getTeamRoomsByName

      public List<org.exoplatform.chat.model.RoomBean> getTeamRoomsByName(String teamName)
      Specified by:
      getTeamRoomsByName in interface org.exoplatform.chat.services.ChatService
    • deleteTeamRoom

      public void deleteTeamRoom(String room, String user)
      Specified by:
      deleteTeamRoom in interface org.exoplatform.chat.services.ChatService
    • edit

      public void edit(String room, String sender, String messageId, String message)
      Specified by:
      edit in interface org.exoplatform.chat.services.ChatService
    • read

      public String read(String user, String room)
      Specified by:
      read in interface org.exoplatform.chat.services.ChatService
    • read

      public String read(String user, String room, boolean isTextOnly, Long fromTimestamp)
      Specified by:
      read in interface org.exoplatform.chat.services.ChatService
    • read

      public String read(String user, String room, boolean isTextOnly, Long fromTimestamp, Long toTimestamp, int limit)
      Specified by:
      read in interface org.exoplatform.chat.services.ChatService
    • getMessage

      public org.exoplatform.chat.model.MessageBean getMessage(String roomId, String messageId)
      Specified by:
      getMessage in interface org.exoplatform.chat.services.ChatService
    • getSpaceRoom

      public String getSpaceRoom(String space)
      Specified by:
      getSpaceRoom in interface org.exoplatform.chat.services.ChatService
    • getSpaceRoomByName

      public String getSpaceRoomByName(String name)
      Specified by:
      getSpaceRoomByName in interface org.exoplatform.chat.services.ChatService
    • getTeamRoom

      public String getTeamRoom(String team, String user)
      Specified by:
      getTeamRoom in interface org.exoplatform.chat.services.ChatService
    • getExternalRoom

      public String getExternalRoom(String identifier)
      Specified by:
      getExternalRoom in interface org.exoplatform.chat.services.ChatService
    • getTeamCreator

      public String getTeamCreator(String room)
      Specified by:
      getTeamCreator in interface org.exoplatform.chat.services.ChatService
    • setRoomName

      public void setRoomName(String room, String name)
      Specified by:
      setRoomName in interface org.exoplatform.chat.services.ChatService
    • isRoomEnabled

      public boolean isRoomEnabled(String room)
      Specified by:
      isRoomEnabled in interface org.exoplatform.chat.services.ChatService
    • setRoomEnabled

      public void setRoomEnabled(String room, boolean enabled)
      Specified by:
      setRoomEnabled in interface org.exoplatform.chat.services.ChatService
    • setRoomMeetingStatus

      public void setRoomMeetingStatus(String room, boolean start, String startTime)
      Specified by:
      setRoomMeetingStatus in interface org.exoplatform.chat.services.ChatService
    • getRoom

      public String getRoom(List<String> users)
      Specified by:
      getRoom in interface org.exoplatform.chat.services.ChatService
    • getTypeRoomChat

      public String getTypeRoomChat(String roomId)
      Specified by:
      getTypeRoomChat in interface org.exoplatform.chat.services.ChatService
    • getExistingRooms

      public List<org.exoplatform.chat.model.RoomBean> getExistingRooms(String user, boolean withPublic, boolean isAdmin, org.exoplatform.chat.services.NotificationService notificationService, org.exoplatform.chat.services.TokenService tokenService)
      Specified by:
      getExistingRooms in interface org.exoplatform.chat.services.ChatService
    • getRooms

      public org.exoplatform.chat.model.RoomsBean getRooms(String user, String filter, boolean withUsers, boolean withSpaces, boolean withPublic, boolean withOffline, boolean isAdmin, org.exoplatform.chat.services.NotificationService notificationService, org.exoplatform.chat.services.TokenService tokenService)
      Specified by:
      getRooms in interface org.exoplatform.chat.services.ChatService
    • getRooms

      public org.exoplatform.chat.model.RoomsBean getRooms(String user, List<String> onlineUsers, String filter, boolean withUsers, boolean withSpaces, boolean withPublic, boolean withOffline, boolean isAdmin, int limit, org.exoplatform.chat.services.NotificationService notificationService, org.exoplatform.chat.services.TokenService tokenService)
      Specified by:
      getRooms in interface org.exoplatform.chat.services.ChatService
    • getUserRooms

      public org.exoplatform.chat.model.RoomsBean getUserRooms(String user, List<String> onlineUsers, String filter, int offset, int limit, org.exoplatform.chat.services.NotificationService notificationService, org.exoplatform.chat.services.TokenService tokenService)
      Specified by:
      getUserRooms in interface org.exoplatform.chat.services.ChatService
    • getUserRooms

      public org.exoplatform.chat.model.RoomsBean getUserRooms(String user, List<String> onlineUsers, String filter, int offset, int limit, org.exoplatform.chat.services.NotificationService notificationService, org.exoplatform.chat.services.TokenService tokenService, String roomType)
      Specified by:
      getUserRooms in interface org.exoplatform.chat.services.ChatService
    • getNumberOfRooms

      public int getNumberOfRooms()
      Specified by:
      getNumberOfRooms in interface org.exoplatform.chat.services.ChatService
    • getNumberOfMessages

      public int getNumberOfMessages()
      Specified by:
      getNumberOfMessages in interface org.exoplatform.chat.services.ChatService
    • isMemberOfRoom

      public boolean isMemberOfRoom(String username, String roomId)
      Check if an user is member of a room
      Specified by:
      isMemberOfRoom in interface org.exoplatform.chat.services.ChatService
      Parameters:
      username - Username of the user
      roomId - Id of the room
      Returns:
      true if the user is member of the room