|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.DefaultSecurityManager
public class DefaultSecurityManager
The security manager acts as central managing class for all security related operations on a low-level non-protected level. It manages the
Field Summary | |
---|---|
protected String |
adminId
The user id of the administrator. |
protected String |
anonymousId
The user id of the anonymous user. |
Constructor Summary | |
---|---|
DefaultSecurityManager()
|
Method Summary | |
---|---|
protected void |
checkInitialized()
Throws IllegalStateException if this manager hasn't been
initialized. |
void |
close()
Disposes this security manager instance and cleans all internal caches. |
protected PrincipalProvider |
createDefaultPrincipalProvider()
Creates the default principal provider used to create the PrincipalProviderRegistry . |
protected WorkspaceAccessManager |
createDefaultWorkspaceAccessManager()
|
protected PrincipalManager |
createPrincipalManager(SessionImpl session)
|
protected UserManagerImpl |
createUserManager(SessionImpl session)
Creates a UserManagerImpl for the given session. |
void |
dispose(String workspaceName)
Disposes those parts of this security manager that are related to the workspace indicated by the given workspaceName . |
AccessManager |
getAccessManager(Session session,
AMContext amContext)
Retrieve the AccessManager for the given session . |
AuthContext |
getAuthContext(Credentials creds,
Subject subject,
String workspaceName)
Creates an AuthContext for the given Credentials and
Subject . |
protected AuthContextProvider |
getAuthContextProvider()
|
protected SecurityManagerConfig |
getConfig()
|
PrincipalManager |
getPrincipalManager(Session session)
Retrieve the principal manager for the given session . |
protected PrincipalProviderRegistry |
getPrincipalProviderRegistry()
|
protected Repository |
getRepository()
|
protected Session |
getSystemSession()
|
protected UserManager |
getSystemUserManager(String workspaceName)
|
String |
getUserID(Subject subject,
String workspaceName)
Retrieve the id to be displayed upon Session.getUserID() for
the specified subject. |
UserManager |
getUserManager(Session session)
Returns the user manager for the specified session . |
void |
init(Repository repository,
Session systemSession)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String adminId
SecurityConstants.ADMIN_ID
).
protected String anonymousId
SecurityConstants.ANONYMOUS_ID
).
Constructor Detail |
---|
public DefaultSecurityManager()
Method Detail |
---|
public void init(Repository repository, Session systemSession) throws RepositoryException
init
in interface JackrabbitSecurityManager
RepositoryException
JackrabbitSecurityManager.init(Repository, Session)
public void dispose(String workspaceName)
JackrabbitSecurityManager
workspaceName
.
dispose
in interface JackrabbitSecurityManager
workspaceName
- Name of the workspace that is being disposed.JackrabbitSecurityManager.dispose(String)
public void close()
JackrabbitSecurityManager
close
in interface JackrabbitSecurityManager
JackrabbitSecurityManager.close()
public AccessManager getAccessManager(Session session, AMContext amContext) throws RepositoryException
JackrabbitSecurityManager
AccessManager
for the given session
.
getAccessManager
in interface JackrabbitSecurityManager
AccessManager
for the specified session
.
RepositoryException
JackrabbitSecurityManager.getAccessManager(Session,AMContext)
public PrincipalManager getPrincipalManager(Session session) throws RepositoryException
JackrabbitSecurityManager
session
.
getPrincipalManager
in interface JackrabbitSecurityManager
session
.
UnsupportedRepositoryOperationException
- If principal management
is not supported.
RepositoryException
- if an error occursJackrabbitSecurityManager.getPrincipalManager(Session)
public UserManager getUserManager(Session session) throws RepositoryException
JackrabbitSecurityManager
session
.
getUserManager
in interface JackrabbitSecurityManager
session
.
UnsupportedRepositoryOperationException
- If user management is
not supported.
RepositoryException
JackrabbitSecurityManager.getUserManager(Session)
public String getUserID(Subject subject, String workspaceName) throws RepositoryException
JackrabbitSecurityManager
Session.getUserID()
for
the specified subject.
getUserID
in interface JackrabbitSecurityManager
Session.getUserID()
.
RepositoryException
JackrabbitSecurityManager.getUserID(javax.security.auth.Subject, String)
public AuthContext getAuthContext(Credentials creds, Subject subject, String workspaceName) throws RepositoryException
Credentials
and
Subject
. The workspace name is ignored and users are
stored and retrieved from a specific (separate) workspace.
getAuthContext
in interface JackrabbitSecurityManager
workspaceName
- The name of the workspace to login.
AuthContext
for the given Credentials, Subject
RepositoryException
- in other exceptional repository statesprotected SecurityManagerConfig getConfig()
SecurityManagerConfig
configured for the
repository this manager has been created for.protected UserManager getSystemUserManager(String workspaceName) throws RepositoryException
workspaceName
-
RepositoryException
protected UserManagerImpl createUserManager(SessionImpl session) throws RepositoryException
UserManagerImpl
for the given session. May be overridden
to return a custom implementation.
session
- session
RepositoryException
- if an error occursprotected PrincipalManager createPrincipalManager(SessionImpl session) throws RepositoryException
session
- The session used to create the principal manager.
RepositoryException
- If an error occurs.protected WorkspaceAccessManager createDefaultWorkspaceAccessManager()
protected PrincipalProvider createDefaultPrincipalProvider() throws RepositoryException
PrincipalProviderRegistry
.
DefaultPrincipalProvider
.
RepositoryException
- If an error occurs.protected PrincipalProviderRegistry getPrincipalProviderRegistry()
protected AuthContextProvider getAuthContextProvider()
protected void checkInitialized()
IllegalStateException
if this manager hasn't been
initialized.
protected Session getSystemSession()
protected Repository getRepository()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |