|
||||||||||
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(List<Permission> permissions,
String repositoryName,
String workspaceName)
Create access manager for the given permission list. |
AccessManager |
createAccessManager(Subject subject,
String repositoryName)
Create access manager of jaas authorized subject. |
AccessManager |
createAccessManager(Subject subject,
String repositoryName,
String workspaceName)
Create access manager of jaas authorized subject. |
HierarchyManager |
createHierarchyManager(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,
String workspaceName)
Login to the specified repository/workspace using given credentials. |
javax.jcr.Session |
createRepositorySession(javax.jcr.SimpleCredentials credentials,
String repositoryName)
Login to the specified repository/default workspace using given credentials. |
javax.jcr.Session |
createRepositorySession(javax.jcr.SimpleCredentials credentials,
String repositoryName,
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, 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, String repositoryName, 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, String workspaceName) throws javax.jcr.RepositoryException
credentials
- repository
- workspaceName
-
javax.jcr.RepositoryException
- if login fails or workspace does not existpublic AccessManager createAccessManager(Subject subject, String repositoryName)
subject
- repositoryName
-
public AccessManager createAccessManager(Subject subject, String repositoryName, String workspaceName)
subject
- repositoryName
- workspaceName
-
public AccessManager createAccessManager(List<Permission> permissions, String repositoryName, String workspaceName)
permissions
- public QueryManager createQueryManager(javax.jcr.Session jcrSession, HierarchyManager hm) throws javax.jcr.RepositoryException
jcrSession
- accessManager
-
javax.jcr.RepositoryException
public HierarchyManager createHierarchyManager(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 |