FileDocCategorySizeDatePackage
UserBean.javaAPI DocExample3846Tue Dec 25 15:43:18 GMT 2001jabadot

UserBean

public abstract class UserBean extends Object implements EntityBean
Implementation of Entity EJB (2.0) that represents one valid user. JabaDot runs its own login service to allow it to have full control over such things, instead of delegating to the J2EE container.
version
$Id: UserBean.java,v 1.2 2001/12/25 20:43:19 ian Exp $

Fields Summary
private EntityContext
ctx
Constructors Summary
Methods Summary
public booleancheckPassword(java.lang.String userInput)
Validate a given password against the user's.


		// Nobody can login if a passwd hasn't been set yet.
		if (getPassword() == null)
			return false;

		// Otherwise just see if they match.
		// XXX TODO use encryption.
		return getPassword().equals(userInput);
	
public voidejbActivate()

	
public java.lang.StringejbCreate(java.lang.String name)
Construct a user with just the name, by delegating to the rest

		ejbCreate(name, null, null, null, null, null, null);
		return name;
	
public java.lang.StringejbCreate(java.lang.String nick, java.lang.String pw, java.lang.String nam, java.lang.String em, java.lang.String cy, java.lang.String pr, java.lang.String co)
Construct a user with all text fields. After this method completes, the container enters the fields we've set into the database.


		setName(nick);
		setPassword(pw);
		setFullName(nam);
		setEmail(em);
		setCity(cy);
		setProvince(pr);
		setCountry(co);
		setCreationDate(new Date());
		setLastLoginDate(null);
		return nick;
	
public java.lang.StringejbCreate(java.lang.String nick, java.lang.String pw, java.lang.String nam, java.lang.String em, java.lang.String cy, java.lang.String pr, java.lang.String co, boolean edit, boolean adm)
Construct a user with all text fields and privs as an int.


		ejbCreate(nick, pw, nam, em, cy, pr, co);
		setAdminPrivs(adm);
		setEditPrivs(edit);
		return nick;
	
public voidejbLoad()

public voidejbPassivate()

	
public voidejbPostCreate(java.lang.String n)

	
public voidejbPostCreate(java.lang.String nick, java.lang.String pw, java.lang.String nam, java.lang.String em, java.lang.String cy, java.lang.String pr, java.lang.String co)
Post-create for all-string version. Nothing to do.

		
public voidejbPostCreate(java.lang.String nick, java.lang.String pw, java.lang.String nam, java.lang.String em, java.lang.String cy, java.lang.String pr, java.lang.String co, boolean edit, boolean adm)

	
public voidejbPostCreate()

public voidejbRemove()

public voidejbStore()

public abstract booleangetAdminPrivs()

public abstract java.lang.StringgetCity()

public abstract java.lang.StringgetCountry()

public abstract java.util.DategetCreationDate()

public abstract booleangetEditPrivs()

public abstract java.lang.StringgetEmail()

public abstract java.lang.StringgetFullName()

public abstract java.util.DategetLastLoginDate()

public abstract java.lang.StringgetName()

public abstract java.lang.StringgetPassword()

public abstract java.lang.StringgetProvince()

public abstract voidsetAdminPrivs(boolean p)

public abstract voidsetCity(java.lang.String arg)

public abstract voidsetCountry(java.lang.String arg)

public abstract voidsetCreationDate(java.util.Date arg)

public abstract voidsetEditPrivs(boolean p)

public abstract voidsetEmail(java.lang.String arg)

public voidsetEntityContext(EntityContext x)

			ctx = x;
	
public abstract voidsetFullName(java.lang.String arg)

public abstract voidsetLastLoginDate(java.util.Date arg)

public abstract voidsetName(java.lang.String nick)

public abstract voidsetPassword(java.lang.String arg)

public abstract voidsetProvince(java.lang.String arg)

public java.lang.StringtoString()
Return a String representation.

		return new StringBuffer("UserBean[").append(getName()).append(',").append(getFullName()).append(']").toString();
	
public voidunsetEntityContext()

			ctx = null;