com.evermind.ejb
Class EJBUserManager

java.lang.Object
  extended by com.evermind.security.AbstractUserManager
      extended by com.evermind.ejb.EJBUserManager
All Implemented Interfaces:
UserManager, Config

public class EJBUserManager
extends AbstractUserManager

UserManager that retrieves the userdata from an EJBHome. The EJBHome must be a home for com.evermind.ejb.EJBUser objects. init-params are: home - location (JNDI) of the EJBHome defaultGroups - Comma-separated list of groups that these users are members of


Constructor Summary
EJBUserManager()
           
 
Method Summary
 User createUser(java.lang.String username, java.lang.String password)
          Creates a new User (entity).
 User getUser(java.lang.String username)
          Gets (finds) the EJBUser if it exists.
 User getUser(java.lang.String issuerDN, java.math.BigInteger serial)
          Returns the user associated with this certificate if any.
 User getUser(java.security.cert.X509Certificate certificate)
          Returns the user associated with this certificate if any.
 int getUserCount()
          Return the number of users contained in this manager.
 java.util.List getUsers(int start, int length)
          Returns a list of Users (between the specified indexes) contained in this manager.
 void init(java.util.Properties properties)
          Initializes the manager, does the EJBHome lookup etc.
 boolean remove(User user)
          Removes the EJBuser from the home.
 
Methods inherited from class com.evermind.security.AbstractUserManager
addDefaultGroup, containsDefaultGroup, create, createGroup, getAdminUser, getAnonymousUser, getDefaultGroups, getGroup, getGroupCount, getGroups, getParent, invalidate, isUpdated, remove, setParent, store, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBUserManager

public EJBUserManager()
Method Detail

init

public void init(java.util.Properties properties)
          throws java.lang.InstantiationException
Initializes the manager, does the EJBHome lookup etc.

Specified by:
init in interface UserManager
Overrides:
init in class AbstractUserManager
Throws:
java.lang.InstantiationException - if the init() fails.

createUser

public User createUser(java.lang.String username,
                       java.lang.String password)
Creates a new User (entity).

Specified by:
createUser in interface UserManager
Overrides:
createUser in class AbstractUserManager

getUser

public User getUser(java.lang.String username)
Gets (finds) the EJBUser if it exists.

Specified by:
getUser in interface UserManager
Overrides:
getUser in class AbstractUserManager

remove

public boolean remove(User user)
Removes the EJBuser from the home.

Specified by:
remove in interface UserManager
Overrides:
remove in class AbstractUserManager

getUser

public User getUser(java.lang.String issuerDN,
                    java.math.BigInteger serial)
Returns the user associated with this certificate if any.

Specified by:
getUser in interface UserManager
Overrides:
getUser in class AbstractUserManager

getUser

public User getUser(java.security.cert.X509Certificate certificate)
Returns the user associated with this certificate if any.

Specified by:
getUser in interface UserManager
Overrides:
getUser in class AbstractUserManager

getUserCount

public int getUserCount()
Description copied from interface: UserManager
Return the number of users contained in this manager. Throws UnsupportedOperationException if not supported.

Specified by:
getUserCount in interface UserManager
Overrides:
getUserCount in class AbstractUserManager

getUsers

public java.util.List getUsers(int start,
                               int length)
Description copied from interface: UserManager
Returns a list of Users (between the specified indexes) contained in this manager. Throws UnsupportedOperationException if not supported.

Specified by:
getUsers in interface UserManager
Overrides:
getUsers in class AbstractUserManager