cmu.survey.data.users
Class UserStub

java.lang.Object
  extended by cmu.survey.data.users.UserStub
All Implemented Interfaces:
User
Direct Known Subclasses:
UserStorageStub.DefaultUserStub

public abstract class UserStub
extends java.lang.Object
implements User


Field Summary
protected  StringDataBit emailAddress
           
protected  StringDataBit firstName
           
protected  boolean isEditable
           
protected  boolean isNew
           
protected  StringDataBit lastName
           
protected  StringDataBit password
           
protected  java.lang.Integer uniqueID
           
protected  UserAuthentication[] userAuthenticationTechniquesToTry
           
protected  StringDataBit userID
           
 
Constructor Summary
UserStub()
           
 
Method Summary
 boolean canSetPassword()
           
 boolean canSetUserID()
           
 java.util.Vector<DataBit> getDataBits()
           
 java.lang.String getEmailAddress()
           
 java.lang.String getFirstName()
           
 java.lang.String getLastName()
           
 java.util.List getOtherPropertiesKeySet()
          Returns a List with string names for any other properties, editable or not, that this thing has.
 java.lang.Object getOtherProperty(java.lang.String key)
          Will throw an IllegalArgumentException if there is no such key.
protected  UserAuthentication[] getUserAuthenticationTechniquesToTry()
          Subclasses may override this to force a set of UserAuthentications to be used.
 java.lang.String getUserID()
           
 boolean hasBeenModified()
           
 boolean isEditable()
           
 boolean isNew()
           
 boolean isOtherPropertyEditable(java.lang.String key)
          Will throw an IllegalArgumentException if there is no such key.
 boolean passwordMatches(java.lang.String passwordString)
           
 void setEmailAddress(java.lang.String emailAddress)
           
 void setFirstName(java.lang.String firstName)
           
 void setLastName(java.lang.String lastName)
           
 void setNew(boolean isNew)
           
 void setOtherProperty(java.lang.String key, java.lang.Object o)
          Will throw an IllegalArgumentException if there is no such key.
 void setPassword(java.lang.String password)
           
 void setUserID(java.lang.String userID)
          Right now, this should never be changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uniqueID

protected java.lang.Integer uniqueID

userID

protected StringDataBit userID

emailAddress

protected StringDataBit emailAddress

firstName

protected StringDataBit firstName

lastName

protected StringDataBit lastName

password

protected StringDataBit password

userAuthenticationTechniquesToTry

protected UserAuthentication[] userAuthenticationTechniquesToTry

isEditable

protected boolean isEditable

isNew

protected boolean isNew
Constructor Detail

UserStub

public UserStub()
Method Detail

canSetPassword

public boolean canSetPassword()
Specified by:
canSetPassword in interface User

canSetUserID

public boolean canSetUserID()
Specified by:
canSetUserID in interface User

isEditable

public boolean isEditable()
Specified by:
isEditable in interface User

isNew

public boolean isNew()
Returns:
Returns the isNew.

setNew

public void setNew(boolean isNew)
Parameters:
isNew - The isNew to set.

getEmailAddress

public java.lang.String getEmailAddress()
Specified by:
getEmailAddress in interface User
Returns:
Returns the emailAddress.

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Specified by:
setEmailAddress in interface User
Parameters:
emailAddress - The emailAddress to set.

getFirstName

public java.lang.String getFirstName()
Specified by:
getFirstName in interface User
Returns:
Returns the firstName.

setFirstName

public void setFirstName(java.lang.String firstName)
Specified by:
setFirstName in interface User
Parameters:
firstName - The firstName to set.

getLastName

public java.lang.String getLastName()
Specified by:
getLastName in interface User
Returns:
Returns the lastName.

setLastName

public void setLastName(java.lang.String lastName)
Specified by:
setLastName in interface User
Parameters:
lastName - The lastName to set.

setPassword

public void setPassword(java.lang.String password)
Specified by:
setPassword in interface User
Parameters:
password - The password to set.

getUserID

public java.lang.String getUserID()
Specified by:
getUserID in interface User
Returns:
Returns the userID.

setUserID

public void setUserID(java.lang.String userID)
Right now, this should never be changed. Though it's partially supported, UserStorageStub does not support changing it when saving. If you change it and then use UserStorageStub.saveUser(), it will probably through some wierd sql error or have no change in the database.

Specified by:
setUserID in interface User
Parameters:
userID - The userID to set.

passwordMatches

public boolean passwordMatches(java.lang.String passwordString)
Specified by:
passwordMatches in interface User

hasBeenModified

public boolean hasBeenModified()

getOtherPropertiesKeySet

public java.util.List getOtherPropertiesKeySet()
Description copied from interface: User
Returns a List with string names for any other properties, editable or not, that this thing has. This can be used for a graphical editor of these users. Return null if there are no other properties.

Specified by:
getOtherPropertiesKeySet in interface User
Returns:

getOtherProperty

public java.lang.Object getOtherProperty(java.lang.String key)
Description copied from interface: User
Will throw an IllegalArgumentException if there is no such key.

Specified by:
getOtherProperty in interface User
Returns:

setOtherProperty

public void setOtherProperty(java.lang.String key,
                             java.lang.Object o)
Description copied from interface: User
Will throw an IllegalArgumentException if there is no such key.

Specified by:
setOtherProperty in interface User

isOtherPropertyEditable

public boolean isOtherPropertyEditable(java.lang.String key)
Description copied from interface: User
Will throw an IllegalArgumentException if there is no such key.

Specified by:
isOtherPropertyEditable in interface User
Returns:

getUserAuthenticationTechniquesToTry

protected UserAuthentication[] getUserAuthenticationTechniquesToTry()
Subclasses may override this to force a set of UserAuthentications to be used.

Returns:

getDataBits

public java.util.Vector<DataBit> getDataBits()