Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


com.evermind.security
Interface UserManager

All Superinterfaces:
com.evermind.util.Config

public interface UserManager
extends com.evermind.util.Config

A UserManager is used to organize (add/find/remove users from) a resource.

This interface is deprecated in 10.1.2 in favor of the standard J2SE JAAS mechanism based on LoginModule. See OC4J Security Guide for more information on implementing custom JAAS login module.


Method Summary
 void addDefaultGroup(java.lang.String name)
          Adds a group to the set of default groups which all users of this manager are members of.
 Group createGroup(java.lang.String name)
          Creates a new Group.
 User createUser(java.lang.String username, java.lang.String password)
          Creates a new User.
 User getAdminUser()
          Returns the "default" admin user or null if there is none.
 User getAnonymousUser()
          Returns the default anonymous user or null if none exists.
 java.util.Set getDefaultGroups()
          Gets the Set of default groups for this UserManager.
 Group getGroup(java.lang.String name)
          Returns the group with the specified name or null if none exists.
 int getGroupCount()
          Return the number of users contained in this manager.
 java.util.List getGroups(int start, int max)
          Returns a list of Groups (between the specified indexes) contained in this manager.
 UserManager getParent()
          Gets the parent manager of this UserManager if any.
 User getUser(java.lang.String username)
          Returns the user with the specified username or null if none exists.
 User getUser(java.lang.String issuerDN, java.math.BigInteger serial)
          Returns the user associated with this certificate or null if either certificates arent supported or there is no user associated with this certificate.
 User getUser(java.security.cert.X509Certificate certificate)
          Returns the user associated with this certificate or null if either certificates arent supported or there is no user associated with this certificate.
 int getUserCount()
          Return the number of users contained in this manager.
 java.util.List getUsers(int start, int max)
          Returns a list of Users (between the specified indexes) contained in this manager.
 void init(java.util.Properties properties)
          Instantiates this UserManager with the specified settings.
 boolean remove(Group group)
          Removes the specified group from this UserManager.
 boolean remove(User user)
          Removes the specified user from this UserManager.
 void setParent(UserManager parent)
          Sets the parent UserManager if any.

 

Methods inherited from interface com.evermind.util.Config
create, invalidate, isUpdated, store, update

 

Method Detail

init

public void init(java.util.Properties properties)
          throws java.lang.InstantiationException
Instantiates this UserManager with the specified settings.
Throws:
java.lang.InstantiationException - if the init() fails.

setParent

public void setParent(UserManager parent)
Sets the parent UserManager if any. This method is only called if this ia a nested UserManager.

getParent

public UserManager getParent()
Gets the parent manager of this UserManager if any.

getUser

public User getUser(java.lang.String username)
Returns the user with the specified username or null if none exists.

getAnonymousUser

public User getAnonymousUser()
Returns the default anonymous user or null if none exists.

getGroup

public Group getGroup(java.lang.String name)
Returns the group with the specified name or null if none exists.

createUser

public User createUser(java.lang.String username,
                       java.lang.String password)
                throws java.lang.InstantiationException,
                       com.evermind.security.UserAlreadyExistsException
Creates a new User. If the user already exists an IllegalArgumentException is thrown.
Throws:
java.lang.InstantiationException - if the user exists.
com.evermind.security.UserAlreadyExistsException

createGroup

public Group createGroup(java.lang.String name)
                  throws java.lang.InstantiationException
Creates a new Group. If the group already exists an IllegalArgumentException is thrown.
Throws:
java.lang.InstantiationException - if the group exists.

getUser

public User getUser(java.lang.String issuerDN,
                    java.math.BigInteger serial)
Returns the user associated with this certificate or null if either certificates arent supported or there is no user associated with this certificate.

getUser

public User getUser(java.security.cert.X509Certificate certificate)
Returns the user associated with this certificate or null if either certificates arent supported or there is no user associated with this certificate.

getAdminUser

public User getAdminUser()
Returns the "default" admin user or null if there is none.

remove

public boolean remove(User user)
Removes the specified user from this UserManager. Returns true if the operation is successfull.

remove

public boolean remove(Group group)
Removes the specified group from this UserManager. Returns true if the operation is successfull.

addDefaultGroup

public void addDefaultGroup(java.lang.String name)
Adds a group to the set of default groups which all users of this manager are members of.

getDefaultGroups

public java.util.Set getDefaultGroups()
Gets the Set of default groups for this UserManager.

getUserCount

public int getUserCount()
Return the number of users contained in this manager. Throws UnsupportedOperationException if not supported.

getGroupCount

public int getGroupCount()
Return the number of users contained in this manager. Throws UnsupportedOperationException if not supported.

getUsers

public java.util.List getUsers(int start,
                               int max)
Returns a list of Users (between the specified indexes) contained in this manager. Throws UnsupportedOperationException if not supported.

getGroups

public java.util.List getGroups(int start,
                                int max)
Returns a list of Groups (between the specified indexes) contained in this manager. Throws UnsupportedOperationException if not supported.

Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


Copyright © 2004, 2005, Oracle. All rights reserved.