@Named(value="chatStorage") @ApplicationScoped @Singleton public class ChatMongoDataStorage extends Object implements ChatDataStorage
| Modifier and Type | Field and Description |
|---|---|
static String |
M_ROOM_PREFIX |
static String |
M_ROOMS_COLLECTION |
| Constructor and Description |
|---|
ChatMongoDataStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String room,
String user,
String messageId,
String dbName) |
void |
deleteTeamRoom(String roomId,
String user,
String dbName)
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 |
void |
edit(String room,
String user,
String messageId,
String message,
String dbName) |
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,
String dbName) |
String |
getExternalRoom(String identifier,
String dbName) |
org.exoplatform.chat.model.MessageBean |
getMessage(String roomId,
String messageId,
String dbName) |
int |
getNumberOfMessages(String dbName) |
int |
getNumberOfRooms(String dbName) |
String |
getRoom(List<String> users,
String dbName) |
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,
String dbName) |
String |
getSpaceRoom(String space,
String dbName) |
String |
getSpaceRoomByName(String name,
String dbName) |
String |
getTeamCreator(String room,
String dbName) |
String |
getTeamRoom(String team,
String user,
String dbName) |
org.exoplatform.chat.model.RoomBean |
getTeamRoomById(String roomId,
String dbName)
Retrieve a Room by its ID
|
List<org.exoplatform.chat.model.RoomBean> |
getTeamRoomByName(String teamName,
String dbName)
Return rooms by name
|
String |
getTypeRoomChat(String roomId,
String dbName) |
String |
read(String room,
boolean isTextOnly,
Long fromTimestamp,
Long toTimestamp,
String dbName,
int limitToLoad)
Read messages from room from a dedicated timestamp to another usin dbName with limit.
|
String |
read(String room,
boolean isTextOnly,
Long fromTimestamp,
String dbName) |
String |
read(String room,
String dbName) |
String |
save(String message,
String user,
String room,
String isSystem,
String options,
String dbName) |
void |
setRoomName(String room,
String name,
String dbName) |
void |
write(String message,
String user,
String room,
String isSystem,
String dbName) |
void |
write(String message,
String user,
String room,
String isSystem,
String options,
String dbName) |
public static final String M_ROOM_PREFIX
public static final String M_ROOMS_COLLECTION
public void write(String message, String user, String room, String isSystem, String dbName)
write in interface ChatDataStoragepublic void write(String message, String user, String room, String isSystem, String options, String dbName)
write in interface ChatDataStoragepublic String save(String message, String user, String room, String isSystem, String options, String dbName)
save in interface ChatDataStoragepublic void delete(String room, String user, String messageId, String dbName)
delete in interface ChatDataStoragepublic List<org.exoplatform.chat.model.RoomBean> getTeamRoomByName(String teamName, String dbName)
ChatDataStoragegetTeamRoomByName in interface ChatDataStoragepublic org.exoplatform.chat.model.RoomBean getTeamRoomById(String roomId, String dbName)
ChatDataStoragegetTeamRoomById in interface ChatDataStorageroomId - the ID of the roomdbName - the database to use for the querypublic void deleteTeamRoom(String roomId, String user, String dbName)
ChatDataStoragedeleteTeamRoom in interface ChatDataStorageroomId - the team room ID to deleteuser - the owner of the team roomdbName - the database to use for the querypublic void edit(String room, String user, String messageId, String message, String dbName)
edit in interface ChatDataStoragepublic String read(String room, String dbName)
read in interface ChatDataStoragepublic String read(String room, boolean isTextOnly, Long fromTimestamp, String dbName)
read in interface ChatDataStoragepublic String read(String room, boolean isTextOnly, Long fromTimestamp, Long toTimestamp, String dbName, int limitToLoad)
ChatDataStorageread in interface ChatDataStoragepublic org.exoplatform.chat.model.MessageBean getMessage(String roomId, String messageId, String dbName)
getMessage in interface ChatDataStoragepublic String getSpaceRoom(String space, String dbName)
getSpaceRoom in interface ChatDataStoragepublic String getSpaceRoomByName(String name, String dbName)
getSpaceRoomByName in interface ChatDataStoragepublic String getTeamRoom(String team, String user, String dbName)
getTeamRoom in interface ChatDataStoragepublic String getExternalRoom(String identifier, String dbName)
getExternalRoom in interface ChatDataStoragepublic String getTeamCreator(String room, String dbName)
getTeamCreator in interface ChatDataStoragepublic void setRoomName(String room, String name, String dbName)
setRoomName in interface ChatDataStoragepublic String getRoom(List<String> users, String dbName)
getRoom in interface ChatDataStoragepublic String getTypeRoomChat(String roomId, String dbName)
getTypeRoomChat in interface ChatDataStoragepublic 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, String dbName)
getExistingRooms in interface ChatDataStorageuserpublic 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, String dbName)
getRooms in interface ChatDataStoragepublic int getNumberOfRooms(String dbName)
getNumberOfRooms in interface ChatDataStoragepublic int getNumberOfMessages(String dbName)
getNumberOfMessages in interface ChatDataStorageCopyright © 2003–2019 eXo Platform SAS. All rights reserved.