Interface RoomFactory


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface RoomFactory
    Factory for Room objects.
    Since:
    23
    • Method Detail

      • createRoom

        java.lang.String createRoom​(AuthorDocumentModel model)
        Creates a room on this server starting from the given document model.
        Parameters:
        model - The document model.
        Returns:
        The room ID.
      • createRoom

        java.lang.String createRoom​(AuthorDocumentModel model,
                                    SaveStrategy saveStrategy)
        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

        Room getRoom​(java.lang.String roomId)
        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

        Room getRoomTryCreateProxy​(java.lang.String roomId)
                            throws RoomProxyCouldNotBeCreatedException
        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

        void addCommonEditingContextAttribute​(java.lang.String attributeName)
        Register an EditingSessionContext attribute that is propagated from the first AuthorDocumentModel of a Room, to new AuthorDocumentModels that are created inside that Room.
        Parameters:
        attributeName - the common attribute name.