public abstract class AbstractUserWorkspaceImpl extends Object implements UserWorkspaceService
UnrestrictedSessionRunner
while creating UserWorkspaces
and associated resourcesModifier and Type | Class and Description |
---|---|
protected class |
AbstractUserWorkspaceImpl.RootDomainFinder |
protected class |
AbstractUserWorkspaceImpl.UnrestrictedPermissionChecker |
protected class |
AbstractUserWorkspaceImpl.UnrestrictedRootCreator |
protected class |
AbstractUserWorkspaceImpl.UnrestrictedUserWorkspaceFinder |
protected class |
AbstractUserWorkspaceImpl.UnrestrictedUWSCreator |
Modifier and Type | Field and Description |
---|---|
protected int |
maxsize |
protected String |
targetDomainName |
Constructor and Description |
---|
AbstractUserWorkspaceImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
buildUserWorkspaceTitle(Principal principal,
String userName) |
protected String |
computePathUserWorkspaceRoot(CoreSession userCoreSession,
String usedUsername,
DocumentModel currentDocument) |
protected String |
digest(String username,
int maxsize) |
protected abstract DocumentModel |
doCreateUserWorkspace(CoreSession unrestrictedSession,
PathRef wsRef,
Principal principal,
String userName) |
protected abstract DocumentModel |
doCreateUserWorkspacesRoot(CoreSession unrestrictedSession,
PathRef rootRef) |
protected UserWorkspaceServiceImplComponent |
getComponent() |
DocumentModel |
getCurrentUserPersonalWorkspace(CoreSession userCoreSession,
DocumentModel context) |
protected DocumentModel |
getCurrentUserPersonalWorkspace(Principal principal,
String userName,
CoreSession userCoreSession,
DocumentModel context)
This method handles the UserWorkspace creation with a Principal or a username.
|
DocumentModel |
getCurrentUserPersonalWorkspace(String userName,
DocumentModel currentDocument)
Gets the current user personal workspace from a lower level.
|
protected String |
getDomainName(CoreSession userCoreSession,
DocumentModel currentDocument) |
protected PathRef |
getExistingUserWorkspace(CoreSession session,
PathRef rootref,
Principal principal,
String username) |
protected PathRef |
getExistingUserWorkspaceRoot(CoreSession session,
String username,
DocumentModel context) |
DocumentModel |
getUserPersonalWorkspace(NuxeoPrincipal principal,
DocumentModel context)
Gets a detached user workspace of a specified user depending of the passed principal.
|
DocumentModel |
getUserPersonalWorkspace(String userName,
DocumentModel context)
Gets a detached user workspace of a specified user.
|
protected String |
getUserWorkspaceNameForUser(String username) |
protected void |
notifyEvent(CoreSession coreSession,
DocumentModel document,
NuxeoPrincipal principal,
String eventId,
Map<String,Serializable> properties) |
protected PathRef |
resolveUserWorkspace(CoreSession session,
PathRef rootref,
String username,
String workspacename,
int maxsize) |
protected String targetDomainName
protected final int maxsize
public AbstractUserWorkspaceImpl()
protected String getDomainName(CoreSession userCoreSession, DocumentModel currentDocument)
protected String getUserWorkspaceNameForUser(String username)
protected String computePathUserWorkspaceRoot(CoreSession userCoreSession, String usedUsername, DocumentModel currentDocument)
public DocumentModel getCurrentUserPersonalWorkspace(String userName, DocumentModel currentDocument)
UserWorkspaceService
If this personal workspace does not exist then a new one will be created for the user who is represented by first argument.
getCurrentUserPersonalWorkspace
in interface UserWorkspaceService
userName
- the current usercurrentDocument
- the current document on which the user was onpublic DocumentModel getCurrentUserPersonalWorkspace(CoreSession userCoreSession, DocumentModel context)
getCurrentUserPersonalWorkspace
in interface UserWorkspaceService
protected DocumentModel getCurrentUserPersonalWorkspace(Principal principal, String userName, CoreSession userCoreSession, DocumentModel context)
protected PathRef getExistingUserWorkspaceRoot(CoreSession session, String username, DocumentModel context)
protected PathRef getExistingUserWorkspace(CoreSession session, PathRef rootref, Principal principal, String username)
protected PathRef resolveUserWorkspace(CoreSession session, PathRef rootref, String username, String workspacename, int maxsize)
public DocumentModel getUserPersonalWorkspace(NuxeoPrincipal principal, DocumentModel context)
UserWorkspaceService
getUserPersonalWorkspace
in interface UserWorkspaceService
principal
- of the wanted user's workspace ownercontext
- is a document to determine the domainpublic DocumentModel getUserPersonalWorkspace(String userName, DocumentModel context)
UserWorkspaceService
getUserPersonalWorkspace
in interface UserWorkspaceService
userName
- is the username of the wanted user's workspace ownercontext
- is a document to determine the domainprotected String buildUserWorkspaceTitle(Principal principal, String userName)
protected void notifyEvent(CoreSession coreSession, DocumentModel document, NuxeoPrincipal principal, String eventId, Map<String,Serializable> properties)
protected UserWorkspaceServiceImplComponent getComponent()
protected abstract DocumentModel doCreateUserWorkspacesRoot(CoreSession unrestrictedSession, PathRef rootRef)
protected abstract DocumentModel doCreateUserWorkspace(CoreSession unrestrictedSession, PathRef wsRef, Principal principal, String userName)
Copyright © 2016 Nuxeo SA. All rights reserved.