|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.util.ManagedReferenceHolder
org.starhope.appius.sql.SQLPeerDatum
org.starhope.appius.user.Person
public abstract class Person
This is an abstract superclass for both Parents and Users.
Field Summary | |
---|---|
protected boolean |
canContact
If true, we can contact this user. |
protected String |
dialect
The national dialect of the language language which the
user speaks. |
protected String |
forgotPasswordAnswer
Given answer to forgotten password question. |
protected String |
forgotPasswordQuestion
The user's question to answer if they forget their password. |
protected String |
givenName
The user's given name. |
protected String |
language
The user's preferred human language for communications. |
protected String |
mail
The user's eMail address. |
protected Timestamp |
mailConfirmed
The timestamp of the confirmation of the user's (or parent's) eMail. |
protected String |
password
The user (or parent)'s unencrypted (plain text) password. |
Constructor Summary | |
---|---|
Person()
|
Method Summary | |
---|---|
boolean |
checkPassword(String passwordGuess)
Check a password provided versus the one stored in the database. |
abstract void |
flush()
|
boolean |
forgotPassword(String forgottenPasswordQ,
String forgottenPasswordA)
Send the user their forgotten password if they know the answer to their secret question. |
String |
getDialect()
|
abstract String |
getDisplayName()
This method's only use is for more closely aligning User and Parent classes. |
String |
getForgotPasswordAnswer()
Get the forgotten password question |
String |
getForgotPasswordQuestion()
Get the forgotten password question |
String |
getGivenName()
|
abstract HashMap<Timestamp,HashMap<String,String>> |
getHistory(Date after,
int limit)
Returns the historical contents of this user's record. |
String |
getLanguage()
|
String |
getMail()
|
Timestamp |
getMailConfirmed()
|
String |
getPassword()
|
abstract String |
getResponsibleMail()
Get the eMail address of a responsible person: either the player, or the parent. |
static Person |
getResponsiblePerson(Person p)
Get reference to User or Parent for purchasing a transaction. |
protected abstract void |
remindPassword()
WRITEME: document this method (brpocock, Aug 12, 2009) method to send e-mail to account owner (parent account or user account) with a reset password. |
abstract void |
rename(String newName)
Rename the user account, updating all necessary related records. |
void |
setCanContact(boolean canContact)
|
void |
setGivenName(String givenName)
|
void |
setMail(String mail)
|
void |
setMailConfirmed(Timestamp mailConfirmed)
|
void |
setPassword(String password)
Changes the personr's password |
void |
setPasswordRecovery(String forgottenPasswordQuestion,
String forgottenPasswordAnswer)
Set the password-recovery question and answer pair |
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
---|
changed, findInCache, get, getCacheUniqueID, prepare, prepare, saveInCache, set, set, toJSON |
Methods inherited from class org.starhope.appius.util.ManagedReferenceHolder |
---|
deref, setRef |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean canContact
protected String dialect
language
which the
user speaks.
protected String forgotPasswordAnswer
protected String forgotPasswordQuestion
protected String givenName
protected String language
protected String mail
protected Timestamp mailConfirmed
protected String password
Constructor Detail |
---|
public Person()
Method Detail |
---|
public static Person getResponsiblePerson(Person p)
p
-
public boolean checkPassword(String passwordGuess)
passwordGuess
- The password guess
public abstract void flush()
flush
in class SQLPeerDatum
SQLPeerDatum.flush()
public boolean forgotPassword(String forgottenPasswordQ, String forgottenPasswordA)
forgottenPasswordQ
- The question being answeredforgottenPasswordA
- The answer provided
public String getDialect()
public abstract String getDisplayName()
public String getForgotPasswordAnswer()
public String getForgotPasswordQuestion()
public String getGivenName()
public abstract HashMap<Timestamp,HashMap<String,String>> getHistory(Date after, int limit)
after
- If non-null, specifies the date after which we want
to view records. To see all records, back to the creation
of the user record, supply a null.limit
- If this is a positive number, it limits the results
to this number of records.
public String getLanguage()
public String getMail()
public Timestamp getMailConfirmed()
public String getPassword()
public abstract String getResponsibleMail()
protected abstract void remindPassword()
public abstract void rename(String newName)
Rename the user account, updating all necessary related records. Note, in particular, that Smartfox is wholly dependant upon user names, so all records related to Smartfox must be updated!
If the user is currently online, this will fuck up hilariously, I think.
newName
- The new user namepublic void setCanContact(boolean canContact)
canContact
- the canContact to setpublic void setGivenName(String givenName)
givenName
- the givenName to setpublic void setMail(String mail) throws GameLogicException
mail
- the mail to set
GameLogicException
public void setMailConfirmed(Timestamp mailConfirmed)
mailConfirmed
- the mailConfirmed to setpublic void setPassword(String password)
password
- the password to setpublic void setPasswordRecovery(String forgottenPasswordQuestion, String forgottenPasswordAnswer)
forgottenPasswordQuestion
- the questionforgottenPasswordAnswer
- the correct answer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |