Interface UserWorkspaceService
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractUserWorkspaceImpl,DefaultUserWorkspaceServiceImpl,MultiTenantUserWorkspaceService
public interface UserWorkspaceService extends Serializable
User workspace service class that is used to get the document model for the personal workspace of the current user.- Author:
- btatar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DocumentModelgetCurrentUserPersonalWorkspace(String userName, DocumentModel currentDocument)Gets the current user personal workspace from a lower level.DocumentModelgetCurrentUserPersonalWorkspace(CoreSession userCoreSession)Gets the current user personal workspace.DocumentModelgetCurrentUserPersonalWorkspace(CoreSession userCoreSession, DocumentModel context)Deprecated.since 9.3.DocumentModelgetUserPersonalWorkspace(String userName, DocumentModel context)Gets a detached user workspace of a specified user.DocumentModelgetUserPersonalWorkspace(NuxeoPrincipal principal, DocumentModel context)Gets a detached user workspace of a specified user depending of the passed principal.voidinvalidate()Invalidates the user workspace service and force re-computation of user workspace root location.booleanisUnderUserWorkspace(NuxeoPrincipal principal, String username, DocumentModel doc)Checks whether the passed document is under the user's workspace (or is the workspace itself).
-
-
-
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 usercurrentDocument- the current document on which the user was on- Returns:
- the DocumentModel for the personal workspace of the current user
-
getCurrentUserPersonalWorkspace
@Deprecated DocumentModel getCurrentUserPersonalWorkspace(CoreSession userCoreSession, DocumentModel context)
Deprecated.since 9.3. User personal workspaces have always been stored in default domain. The context is useless. Simply usegetCurrentUserPersonalWorkspace(CoreSession).
-
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 ownercontext- 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 ownercontext- 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 userusername- the username, if principal is not availabledoc- the document- Returns:
trueif 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
-
-