com.opensymphony.user.provider.ejb.entity
Class UserEJB

java.lang.Object
  extended bycom.opensymphony.ejb.AbstractEntityAdapter
      extended bycom.opensymphony.ejb.ExceptionlessEntityAdapter
          extended bycom.opensymphony.user.provider.ejb.entity.UserEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable

public abstract class UserEJB
extends com.opensymphony.ejb.ExceptionlessEntityAdapter
implements javax.ejb.EntityBean

Entity bean representing User. Stores name and hashed password.

Version:
$Revision: 1.5 $
Author:
Joe Walnes, Mike Cannon-Brookes, Patrick Lightbody
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.opensymphony.ejb.AbstractEntityAdapter
context, sequenceName
 
Constructor Summary
UserEJB()
           
 
Method Summary
 boolean authenticate(java.lang.String password)
          Verify that supplied password matches that of user.
 java.lang.Long ejbCreate(java.lang.String name)
          Create new User with given name.
 void ejbPostCreate(java.lang.String name)
           
 java.util.List getGroupNames()
           
abstract  java.util.Set getGroups()
          Set of roles for this user
abstract  java.lang.Long getId()
          Unique primary key of User.
abstract  java.lang.String getName()
          Get login name of User.
abstract  java.lang.String getPasswordHash()
           
 com.opensymphony.module.propertyset.PropertySet getPropertySet()
          User's PropertySet.
 boolean inGroup(java.lang.String groupName)
           
 boolean removeGroup(java.lang.String name)
           
 void setEntityContext(javax.ejb.EntityContext context)
          Required to implement EntityBean.
abstract  void setGroups(java.util.Set groups)
           
abstract  void setId(java.lang.Long id)
           
abstract  void setName(java.lang.String name)
           
 void setPassword(java.lang.String password)
           
abstract  void setPasswordHash(java.lang.String passwordHash)
           
 void unsetEntityContext()
          Required to implement EntityBean.
 
Methods inherited from class com.opensymphony.ejb.ExceptionlessEntityAdapter
ejbActivate, ejbLoad, ejbPassivate, ejbRemove, ejbStore, getEntityContext
 
Methods inherited from class com.opensymphony.ejb.AbstractEntityAdapter
generateGUID, locatePropertySet, nextId, nextInt, nextLong, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.EntityBean
ejbActivate, ejbLoad, ejbPassivate, ejbRemove, ejbStore
 

Constructor Detail

UserEJB

public UserEJB()
Method Detail

setEntityContext

public void setEntityContext(javax.ejb.EntityContext context)
Required to implement EntityBean. Sets the EntityContext. Also, attempts to detemine the sequenceName.

Specified by:
setEntityContext in interface javax.ejb.EntityBean

setId

public abstract void setId(java.lang.Long id)

getId

public abstract java.lang.Long getId()
Unique primary key of User.


setName

public abstract void setName(java.lang.String name)

getName

public abstract java.lang.String getName()
Get login name of User.


setPasswordHash

public abstract void setPasswordHash(java.lang.String passwordHash)

getPasswordHash

public abstract java.lang.String getPasswordHash()

getGroupNames

public java.util.List getGroupNames()

setGroups

public abstract void setGroups(java.util.Set groups)

getGroups

public abstract java.util.Set getGroups()
Set of roles for this user


setPassword

public void setPassword(java.lang.String password)

getPropertySet

public com.opensymphony.module.propertyset.PropertySet getPropertySet()
User's PropertySet.


authenticate

public boolean authenticate(java.lang.String password)
Verify that supplied password matches that of user.


ejbCreate

public java.lang.Long ejbCreate(java.lang.String name)
                         throws javax.ejb.CreateException
Create new User with given name.

Throws:
javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(java.lang.String name)

inGroup

public boolean inGroup(java.lang.String groupName)

removeGroup

public boolean removeGroup(java.lang.String name)

unsetEntityContext

public void unsetEntityContext()
Required to implement EntityBean. Sets the EntityContext to null.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

See www.opensymphony.com for more information.