|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dartra.standard.PersistentObject
org.dartra.standard.StandardUser
Standard implementation of the User interface.
| Constructor Summary | |
StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password)
Create a new user with given id, name and password (unencrypted). |
|
StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password,
boolean female,
boolean leftHanded)
Create a new user with given id, name and password (unencrypted). |
|
StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password,
boolean female,
boolean leftHanded,
boolean encryptedPassword)
Create a new user with given id, name and password. |
|
| Method Summary | |
void |
addDartsSet(DartsSet dartsSet)
Adds a DartsSet to the collection owned by the user. |
boolean |
checkPassword(java.lang.String pw)
Check the password for the user. |
protected java.lang.String |
encryptPassword(java.lang.String password)
Encrypt given password. |
DartsSet |
getDartsSet(int index)
Returns the DartsSet at the given index. |
java.util.Vector |
getDartsSets()
Returns the collection of darts sets owned by the user. |
java.lang.String |
getPassword()
Get the password of the user, probably in an incrypted form. |
java.lang.String |
getUserId()
Return the user id (which is unique) of this user. |
java.lang.String |
getUserName()
Returns the username of this user. |
boolean |
isFemale()
Returns true when this user is female, false otherwise (for males). |
boolean |
isLeftHanded()
Is this a left handed user? |
void |
setPassword(java.lang.String pw)
Set the password of the user. |
void |
setUserName(java.lang.String name)
Set the username of this user. |
java.lang.String |
toString()
|
| Methods inherited from class org.dartra.standard.PersistentObject |
getId, setId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
| Constructor Detail |
public StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password)
Create a new user with given id, name and password (unencrypted). This defaults to a male, right handed player.
public StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password,
boolean female,
boolean leftHanded)
Create a new user with given id, name and password (unencrypted). You should also specify the gender and the handed-ness of the player.
public StandardUser(java.lang.String userId,
java.lang.String name,
java.lang.String password,
boolean female,
boolean leftHanded,
boolean encryptedPassword)
Create a new user with given id, name and password. You should also specify the gender and the handed-ness of the player.
When encryptedPassword is true, the given password is taken to be already encrypted. When false, it will be incrypted. This constuctor is intended for use in the DAOs.
| Method Detail |
protected java.lang.String encryptPassword(java.lang.String password)
Encrypt given password.
Subclasses can redefine this method to do proper password encryption. This implementation does not encrypt the password.
public java.lang.String getUserId()
UserReturn the user id (which is unique) of this user.
getUserId in interface Userpublic void setUserName(java.lang.String name)
UserSet the username of this user.
setUserName in interface Userpublic java.lang.String getUserName()
UserReturns the username of this user.
getUserName in interface Userpublic void setPassword(java.lang.String pw)
UserSet the password of the user.
setPassword in interface Userpublic java.lang.String getPassword()
UserGet the password of the user, probably in an incrypted form.
getPassword in interface Userpublic boolean checkPassword(java.lang.String pw)
UserCheck the password for the user.
checkPassword in interface Userpublic java.lang.String toString()
public java.util.Vector getDartsSets()
UserReturns the collection of darts sets owned by the user. The resulting collection contains DartsSet objects.
getDartsSets in interface Userpublic DartsSet getDartsSet(int index)
UserReturns the DartsSet at the given index.
getDartsSet in interface Userpublic void addDartsSet(DartsSet dartsSet)
UserAdds a DartsSet to the collection owned by the user.
addDartsSet in interface Userpublic boolean isFemale()
UserReturns true when this user is female, false otherwise (for males).
isFemale in interface Userpublic boolean isLeftHanded()
UserIs this a left handed user?
isLeftHanded in interface User
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||