|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.util.WorkspaceAccessUtil
public class WorkspaceAccessUtil
This class replaces SessionStore and provide generic methods to create Magnolia specific JCR-workspace access objects.
HierarchyManager
,
Session
,
AccessManager
,
QueryManager
Constructor Summary | |
---|---|
WorkspaceAccessUtil()
|
Method Summary | |
---|---|
AccessManager |
createAccessManager(java.util.List<Permission> permissions,
java.lang.String repositoryName,
java.lang.String workspaceName)
Create access manager for the given permission list. |
AccessManager |
createAccessManager(javax.security.auth.Subject subject,
java.lang.String repositoryName)
Create access manager of jaas authorized subject. |
AccessManager |
createAccessManager(javax.security.auth.Subject subject,
java.lang.String repositoryName,
java.lang.String workspaceName)
Create access manager of jaas authorized subject. |
HierarchyManager |
createHierarchyManager(java.lang.String userId,
javax.jcr.Session jcrSession,
AccessManager accessManager)
Create new instance of DefaultHierarchyManager for the given session. |
QueryManager |
createQueryManager(javax.jcr.Session jcrSession,
HierarchyManager hm)
Create new access controlled magnolia query manager. |
javax.jcr.Session |
createRepositorySession(javax.jcr.SimpleCredentials credentials,
javax.jcr.Repository repository,
java.lang.String workspaceName)
Login to the specified repository/workspace using given credentials. |
javax.jcr.Session |
createRepositorySession(javax.jcr.SimpleCredentials credentials,
java.lang.String repositoryName)
Login to the specified repository/default workspace using given credentials. |
javax.jcr.Session |
createRepositorySession(javax.jcr.SimpleCredentials credentials,
java.lang.String repositoryName,
java.lang.String workspaceName)
Login to the specified repository/workspace using given credentials. |
javax.jcr.SimpleCredentials |
getDefaultCredentials()
|
static WorkspaceAccessUtil |
getInstance()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkspaceAccessUtil()
Method Detail |
---|
public static WorkspaceAccessUtil getInstance()
public javax.jcr.SimpleCredentials getDefaultCredentials()
public javax.jcr.Session createRepositorySession(javax.jcr.SimpleCredentials credentials, java.lang.String repositoryName) throws javax.jcr.RepositoryException
credentials
- repositoryName
-
javax.jcr.RepositoryException
- if login fails or workspace does not existpublic javax.jcr.Session createRepositorySession(javax.jcr.SimpleCredentials credentials, java.lang.String repositoryName, java.lang.String workspaceName) throws javax.jcr.RepositoryException
credentials
- repositoryName
- workspaceName
-
javax.jcr.RepositoryException
- if login fails or workspace does not existpublic javax.jcr.Session createRepositorySession(javax.jcr.SimpleCredentials credentials, javax.jcr.Repository repository, java.lang.String workspaceName) throws javax.jcr.RepositoryException
credentials
- repository
- workspaceName
-
javax.jcr.RepositoryException
- if login fails or workspace does not existpublic AccessManager createAccessManager(javax.security.auth.Subject subject, java.lang.String repositoryName)
subject
- repositoryName
-
public AccessManager createAccessManager(javax.security.auth.Subject subject, java.lang.String repositoryName, java.lang.String workspaceName)
subject
- repositoryName
- workspaceName
-
public AccessManager createAccessManager(java.util.List<Permission> permissions, java.lang.String repositoryName, java.lang.String workspaceName)
permissions
- public QueryManager createQueryManager(javax.jcr.Session jcrSession, HierarchyManager hm) throws javax.jcr.RepositoryException
jcrSession
- accessManager
-
javax.jcr.RepositoryException
public HierarchyManager createHierarchyManager(java.lang.String userId, javax.jcr.Session jcrSession, AccessManager accessManager) throws javax.jcr.RepositoryException
userId
- this is used in MetaData of objects created via this HierarchyManager instancejcrSession
- accessManager
- queryManager
-
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |