Interface UserWorkspaceService

    • Method Detail

      • getCurrentUserPersonalWorkspace

        DocumentModel getCurrentUserPersonalWorkspace​(CoreSession userCoreSession)
        Gets the current user personal workspace.

        If this personal workspace does not exist then a new one will be created for the user owning the core session.

        Parameters:
        userCoreSession - the user core session
        Returns:
        the user personal workspace
        Since:
        9.3
      • getCurrentUserPersonalWorkspace

        DocumentModel getCurrentUserPersonalWorkspace​(String userName,
                                                      DocumentModel currentDocument)
        Gets the current user personal workspace from a lower level.

        If this personal workspace does not exist then a new one will be created for the user who is represented by first argument.

        Parameters:
        userName - the current user
        currentDocument - the current document on which the user was on
        Returns:
        the DocumentModel for the personal workspace of the current user
      • getUserPersonalWorkspace

        DocumentModel getUserPersonalWorkspace​(String userName,
                                               DocumentModel context)
        Gets a detached user workspace of a specified user.
        Parameters:
        userName - is the username of the wanted user's workspace owner
        context - is a document to determine the domain
        Returns:
        the DocumentModel for the personal workspace
        Since:
        5.5
      • getUserPersonalWorkspace

        DocumentModel getUserPersonalWorkspace​(NuxeoPrincipal principal,
                                               DocumentModel context)
        Gets a detached user workspace of a specified user depending of the passed principal.
        Parameters:
        principal - of the wanted user's workspace owner
        context - is a document to determine the domain
        Returns:
        the DocumentModel for the personal workspace
        Since:
        5.7
      • isUnderUserWorkspace

        boolean isUnderUserWorkspace​(NuxeoPrincipal principal,
                                     String username,
                                     DocumentModel doc)
        Checks whether the passed document is under the user's workspace (or is the workspace itself).
        Parameters:
        principal - the user
        username - the username, if principal is not available
        doc - the document
        Returns:
        true if the document is under the user's workspace
        Since:
        9.2
      • invalidate

        void invalidate()
        Invalidates the user workspace service and force re-computation of user workspace root location.
        Since:
        9.3