org.apache.jetspeed.services.security
Interface UserManagement

All Superinterfaces:
CredentialsManagement, org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
LDAPUserManagement, NoUserManagement, TurbineUserManagement

public interface UserManagement
extends org.apache.turbine.services.Service, CredentialsManagement

The UserManagement interface describes contract between the portal and security provider required for Jetspeed User Management. This interface enables an application to be independent of the underlying user management technology.

Version:
$Id: UserManagement.java,v 1.3 2004/02/23 03:58:11 jford Exp $
Author:
David Sean Taylor

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void addUser(JetspeedUser user)
          Adds a JetspeedUser into permanent storage.
 JetspeedUser getUser(java.security.Principal principal)
          Retrieves a JetspeedUser given the primary principle.
 java.util.Iterator getUsers()
          Retrieves a collection of all JetspeedUsers.
 java.util.Iterator getUsers(java.lang.String filter)
          Retrieves a collection of JetspeedUsers filtered by a security provider-specific query string.
 void removeUser(java.security.Principal principal)
          Removes a JetspeedUser from the permanent store.
 void saveUser(JetspeedUser user)
          Saves a JetspeedUser's attributes into permanent storage.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 
Methods inherited from interface org.apache.jetspeed.services.security.CredentialsManagement
changePassword, encryptPassword, forcePassword
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

getUser

public JetspeedUser getUser(java.security.Principal principal)
                     throws JetspeedSecurityException
Retrieves a JetspeedUser given the primary principle. The principal can be any valid Jetspeed Security Principal: org.apache.jetspeed.om.security.UserNamePrincipal org.apache.jetspeed.om.security.UserIdPrincipal The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Parameters:
principal - a principal identity to be retrieved.
Returns:
a JetspeedUser associated to the principal identity.
Throws:
UserException - when the security provider has a general failure retrieving a user.
UnknownUserException - when the security provider cannot match the principal identity to a user.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

getUsers

public java.util.Iterator getUsers()
                            throws JetspeedSecurityException
Retrieves a collection of all JetspeedUsers. The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Returns:
a collection of JetspeedUser entities.
Throws:
UserException - when the security provider has a general failure retrieving users.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

getUsers

public java.util.Iterator getUsers(java.lang.String filter)
                            throws JetspeedSecurityException
Retrieves a collection of JetspeedUsers filtered by a security provider-specific query string. For example SQL, OQL, JDOQL. The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Returns:
a collection of JetspeedUser entities.
Throws:
UserException - when the security provider has a general failure retrieving users.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

saveUser

public void saveUser(JetspeedUser user)
              throws JetspeedSecurityException
Saves a JetspeedUser's attributes into permanent storage. The user's account is required to exist in the storage. The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Throws:
UserException - when the security provider has a general failure retrieving users.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

addUser

public void addUser(JetspeedUser user)
             throws JetspeedSecurityException
Adds a JetspeedUser into permanent storage. The security service can throw a NotUniqueUserException when the public credentials fail to meet the security provider-specific unique constraints. The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Throws:
UserException - when the security provider has a general failure retrieving users.
NotUniqueUserException - when the public credentials fail to meet the security provider-specific unique constraints.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException

removeUser

public void removeUser(java.security.Principal principal)
                throws JetspeedSecurityException
Removes a JetspeedUser from the permanent store. The security service may optionally check the current user context to determine if the requestor has permission to perform this action.

Parameters:
principal - the principal identity to be retrieved.
Throws:
UserException - when the security provider has a general failure retrieving a user.
UnknownUserException - when the security provider cannot match the principal identity to a user.
InsufficientPrivilegeException - when the requestor is denied due to insufficient privilege
JetspeedSecurityException


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.