Interface ChatDataStorage

All Known Implementing Classes:
ChatMongoDataStorage

public interface ChatDataStorage
  • Method Details

    • write

      void write(String message, String user, String room, String isSystem)
    • write

      void write(String message, String user, String room, String isSystem, String options)
    • save

      String save(String message, String user, String room, String isSystem, String options)
    • delete

      void delete(String room, String user, String messageId)
    • deleteTeamRoom

      void deleteTeamRoom(String roomId, String user)
      Delete a Team Room by its corresponding ID.
      Nothing happen if :
      • the roomId doesn't exists
      • the roomId doesn't correspond to a Team Room
      • the specified user is not the owner of the Team Room
      Parameters:
      roomId - the team room ID to delete
      user - the owner of the team room
    • edit

      void edit(String room, String user, String messageId, String message)
    • read

      String read(String room)
    • read

      String read(String room, boolean isTextOnly, Long fromTimestamp)
    • read

      String read(String room, boolean isTextOnly, Long fromTimestamp, Long toTimestamp, int limitToLoad)
      Read messages from room from a dedicated timestamp to another with limit.
      Parameters:
      room -
      isTextOnly -
      fromTimestamp -
      toTimestamp -
      limitToLoad -
      Returns:
    • getMessage

      org.exoplatform.chat.model.MessageBean getMessage(String roomId, String messageId)
    • getSpaceRoom

      String getSpaceRoom(String space)
    • getSpaceRoomByName

      String getSpaceRoomByName(String name)
    • getTeamRoom

      String getTeamRoom(String team, String user)
    • getExternalRoom

      String getExternalRoom(String identifier)
    • getTeamCreator

      String getTeamCreator(String room)
    • setRoomName

      void setRoomName(String room, String name)
    • isRoomEnabled

      boolean isRoomEnabled(String room)
    • setRoomEnabled

      void setRoomEnabled(String room, boolean enabled)
    • setRoomMeetingStatus

      void setRoomMeetingStatus(String room, boolean start, String startTime)
    • getTeamRoomById

      org.exoplatform.chat.model.RoomBean getTeamRoomById(String roomId)
      Retrieve a Room by its ID
      Parameters:
      roomId - the ID of the room
      Returns:
      the room or null if the room doesn't exists
    • getRoom

      String getRoom(List<String> users)
    • getTypeRoomChat

      String getTypeRoomChat(String roomId)
    • getExistingRooms

      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)
      Parameters:
      user -
      withPublic -
      isAdmin -
      notificationService -
      tokenService -
      Returns:
      All existing personal rooms of given user
    • getRooms

      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)
    • getNumberOfRooms

      int getNumberOfRooms()
    • getNumberOfMessages

      int getNumberOfMessages()
    • getTeamRoomByName

      List<org.exoplatform.chat.model.RoomBean> getTeamRoomByName(String teamName)
      Return rooms by name
      Parameters:
      teamName -
      Returns:
    • getUserRooms

      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)
      Get all the rooms of the with pagination
      Returns:
      RoomsBean the list of rooms in a single Object
    • getUserRooms

      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)
      Get all the rooms of the with pagination
      Returns:
      RoomsBean the list of rooms in a single Object