Interface RoomFactory
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface RoomFactory
Factory for
Room
objects.- Since:
- 23
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommonEditingContextAttribute
(String attributeName) Register anEditingSessionContext
attribute that is propagated from the firstAuthorDocumentModel
of aRoom
, to newAuthorDocumentModel
s that are created inside thatRoom
.createRoom
(AuthorDocumentModel model) Creates a room on this server starting from the given document model.createRoom
(AuthorDocumentModel model, SaveStrategy saveStrategy) Creates a room on this server starting from the given document model.Returns the room with the given ID.getRoomTryCreateProxy
(String roomId) Returns the room with the given ID.
-
Method Details
-
createRoom
Creates a room on this server starting from the given document model.- Parameters:
model
- The document model.- Returns:
- The room ID.
-
createRoom
Creates a room on this server starting from the given document model.- Parameters:
model
- The document model.saveStrategy
- Details required for save.- Returns:
- The room ID.
-
getRoom
Returns the room with the given ID.- Parameters:
roomId
- The ID of the room.- Returns:
- The room instance for a given ID, or null.
-
getRoomTryCreateProxy
Returns the room with the given ID. Tries to create a proxy room if the room doesn't exist on this server.- Parameters:
roomId
- The ID of the room.- Returns:
- The room instance for a given ID, or null.
- Throws:
RoomProxyCouldNotBeCreatedException
- If the instantiation of a proxy room fails.
-
addCommonEditingContextAttribute
Register anEditingSessionContext
attribute that is propagated from the firstAuthorDocumentModel
of aRoom
, to newAuthorDocumentModel
s that are created inside thatRoom
.- Parameters:
attributeName
- the common attribute name.
-