Package org.exoplatform.chat.services
Interface ChatDataStorage
-
- All Known Implementing Classes:
ChatMongoDataStorage
public interface ChatDataStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String room, String user, String messageId)voiddeleteTeamRoom(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 Roomvoidedit(String room, String user, String messageId, String message)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)StringgetExternalRoom(String identifier)org.exoplatform.chat.model.MessageBeangetMessage(String roomId, String messageId)intgetNumberOfMessages()intgetNumberOfRooms()StringgetRoom(List<String> users)org.exoplatform.chat.model.RoomsBeangetRooms(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)StringgetSpaceRoom(String space)StringgetSpaceRoomByName(String name)StringgetTeamCreator(String room)StringgetTeamRoom(String team, String user)org.exoplatform.chat.model.RoomBeangetTeamRoomById(String roomId)Retrieve a Room by its IDList<org.exoplatform.chat.model.RoomBean>getTeamRoomByName(String teamName)Return rooms by nameStringgetTypeRoomChat(String roomId)org.exoplatform.chat.model.RoomsBeangetUserRooms(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 paginationorg.exoplatform.chat.model.RoomsBeangetUserRooms(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 paginationbooleanisRoomEnabled(String room)Stringread(String room)Stringread(String room, boolean isTextOnly, Long fromTimestamp)Stringread(String room, boolean isTextOnly, Long fromTimestamp, Long toTimestamp, int limitToLoad)Read messages from room from a dedicated timestamp to another with limit.Stringsave(String message, String user, String room, String isSystem, String options)voidsetRoomEnabled(String room, boolean enabled)voidsetRoomMeetingStatus(String room, boolean start, String startTime)voidsetRoomName(String room, String name)voidwrite(String message, String user, String room, String isSystem)voidwrite(String message, String user, String room, String isSystem, String options)
-
-
-
Method Detail
-
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 deleteuser- the owner of the team room
-
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:
-
isRoomEnabled
boolean isRoomEnabled(String room)
-
setRoomEnabled
void setRoomEnabled(String room, boolean enabled)
-
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
-
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
-
-