com.evermind.ejb
Class EJBUserManager


java.lang.Object

  |

  +--com.evermind.security.AbstractUserManager

        |

        +--com.evermind.ejb.EJBUserManager

All Implemented Interfaces:
Config, UserManager

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.
Overrides:
init in class AbstractUserManager
Following copied from interface: com.evermind.security.UserManager
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).
Overrides:
createUser in class AbstractUserManager
Following copied from interface: com.evermind.security.UserManager
Throws:
java.lang.InstantiationException - if the user exists.

getUser


public User getUser(java.lang.String username)
Gets (finds) the EJBUser if it exists.
Overrides:
getUser in class AbstractUserManager

remove


public boolean remove(User user)
Removes the EJBuser from the home.
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.
Overrides:
getUser in class AbstractUserManager

getUser


public User getUser(java.security.cert.X509Certificate certificate)
Returns the user associated with this certificate if any.
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.
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.
Overrides:
getUsers in class AbstractUserManager