org.apache.jackrabbit.core
Class DefaultSecurityManager

java.lang.Object
  extended by org.apache.jackrabbit.core.DefaultSecurityManager
All Implemented Interfaces:
JackrabbitSecurityManager

public class DefaultSecurityManager
extends Object
implements JackrabbitSecurityManager

The security manager acts as central managing class for all security related operations on a low-level non-protected level. It manages the


Constructor Summary
DefaultSecurityManager()
           
 
Method Summary
 void close()
          Disposes this security manager instance and cleans all internal caches.
 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)
          Creates an AuthContext for the given Credentials and Subject.
 PrincipalManager getPrincipalManager(Session session)
          Retrieve the principal manager for the given session.
 String getUserID(Subject subject)
          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
 

Constructor Detail

DefaultSecurityManager

public DefaultSecurityManager()
Method Detail

init

public void init(Repository repository,
                 Session systemSession)
          throws RepositoryException
Specified by:
init in interface JackrabbitSecurityManager
Throws:
RepositoryException
See Also:
JackrabbitSecurityManager.init(Repository, Session)

dispose

public void dispose(String workspaceName)
Description copied from interface: JackrabbitSecurityManager
Disposes those parts of this security manager that are related to the workspace indicated by the given workspaceName.

Specified by:
dispose in interface JackrabbitSecurityManager
Parameters:
workspaceName - Name of the workspace that is being disposed.
See Also:
JackrabbitSecurityManager.dispose(String)

close

public void close()
Description copied from interface: JackrabbitSecurityManager
Disposes this security manager instance and cleans all internal caches.

Specified by:
close in interface JackrabbitSecurityManager
See Also:
JackrabbitSecurityManager.close()

getAccessManager

public AccessManager getAccessManager(Session session,
                                      AMContext amContext)
                               throws RepositoryException
Description copied from interface: JackrabbitSecurityManager
Retrieve the AccessManager for the given session.

Specified by:
getAccessManager in interface JackrabbitSecurityManager
Returns:
AccessManager for the specified session.
Throws:
RepositoryException
See Also:
JackrabbitSecurityManager.getAccessManager(Session,AMContext)

getPrincipalManager

public PrincipalManager getPrincipalManager(Session session)
                                     throws RepositoryException
Description copied from interface: JackrabbitSecurityManager
Retrieve the principal manager for the given session.

Specified by:
getPrincipalManager in interface JackrabbitSecurityManager
Returns:
PrincipalManager for the given session.
Throws:
UnsupportedRepositoryOperationException - If principal management is not supported.
RepositoryException - if an error occurs
See Also:
JackrabbitSecurityManager.getPrincipalManager(Session)

getUserManager

public UserManager getUserManager(Session session)
                           throws RepositoryException
Description copied from interface: JackrabbitSecurityManager
Returns the user manager for the specified session.

Specified by:
getUserManager in interface JackrabbitSecurityManager
Returns:
UserManager for the given session.
Throws:
UnsupportedRepositoryOperationException - If user management is not supported.
RepositoryException
See Also:
JackrabbitSecurityManager.getUserManager(Session)

getUserID

public String getUserID(Subject subject)
                 throws RepositoryException
Description copied from interface: JackrabbitSecurityManager
Retrieve the id to be displayed upon Session.getUserID() for the specified subject.

Specified by:
getUserID in interface JackrabbitSecurityManager
Returns:
userID to be displayed upon Session.getUserID().
Throws:
RepositoryException
See Also:
JackrabbitSecurityManager.getUserID(Subject)

getAuthContext

public AuthContext getAuthContext(Credentials creds,
                                  Subject subject)
                           throws RepositoryException
Creates an AuthContext for the given Credentials and Subject.
This includes selection of application specific LoginModules and initialization with credentials and Session to System-Workspace

Specified by:
getAuthContext in interface JackrabbitSecurityManager
Returns:
an AuthContext for the given Credentials, Subject
Throws:
RepositoryException - in other exceptional repository states


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.