|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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. |
private String |
couponCode
TODO: document this field (theys, Nov 5, 2009) couponCode (Person) |
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 Date |
mailConfirmed
The timestamp of the confirmation of the user's (or parent's) eMail. |
protected Date |
mailConfirmSent
TODO: document this field (brpocock, Nov 5, 2009) mailConfirmSent (Person) |
protected String |
password
The user (or parent)'s unencrypted (plain text) password. |
private static long |
serialVersionUID
TODO: document this field (theys, Sep 30, 2009) serialVersionUID (long) |
Constructor Summary | |
---|---|
Person()
|
Method Summary | |
---|---|
boolean |
checkPassword(String passwordGuess)
Returns true if the password is correct. |
abstract void |
flush()
|
boolean |
forgotPassword(String forgottenPasswordQ,
String forgottenPasswordA)
Send the user their forgotten password if they know the answer to their secret question. |
protected void |
generateNewPassword()
Generate a new, random password using only ASCII-7 printable characters ($20 to $7e). |
abstract String |
getApprovalCookie()
Get a cookie object for sending mail. |
abstract String |
getConfirmationTemplate()
WRITEME: document this method (theys, Sep 9, 2009) |
String |
getCouponCode()
TODO: document this method (theys, Nov 5, 2009) |
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()
|
Date |
getMailConfirmed()
|
String |
getPassword()
|
abstract String |
getPotentialUserName()
TODO: document this method (brpocock, Sep 10, 2009) |
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 membership subscription |
boolean |
isCanContact()
TODO: document this method (brpocock, Oct 13, 2009) |
protected void |
remindPassword()
Send a reminder eMail for a forgotten password. |
abstract void |
rename(String newName)
Rename the user account, updating all necessary related records. |
void |
sendConfirmationMail()
Sends confirmation mail to whomever should receive it |
void |
sendStaffPasswordReset()
Sends mail to user or parent when a staff member resets their password. |
void |
sentConfirmationMail()
TODO: document this method (brpocock, Sep 25, 2009) |
void |
setCanContact(boolean canContact1)
|
void |
setCouponCode(String newCouponCode)
TODO: document this method (theys, Nov 5, 2009) |
void |
setForgotPasswordAnswer(String answer)
TODO: document this method (brpocock, Sep 25, 2009) |
void |
setForgotPasswordQuestion(String question)
TODO: document this method (brpocock, Sep 25, 2009) |
void |
setGivenName(String givenName1)
|
void |
setMail(String mail1)
|
void |
setMailConfirmed(Date mailConfirmed1)
|
void |
setPassword(String password1)
Changes the person's password |
void |
setPasswordAndPasswordRecovery(String question,
String answer,
String newPassword)
|
void |
setPasswordRecovery(String forgottenPasswordQuestion,
String forgottenPasswordAnswer)
Set the password-recovery question and answer pair |
String |
setRandomPassword()
TODO: document this method (brpocock, Sep 25, 2009) |
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
---|
changed, findInCache, get, getCacheUniqueID, saveInCache, set, set, toJSON |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected boolean canContact
private transient String couponCode
protected String dialect
language
which the
user speaks.
protected String forgotPasswordAnswer
protected String forgotPasswordQuestion
protected String givenName
protected String language
protected String mail
protected Date mailConfirmed
protected Date mailConfirmSent
protected String password
Constructor Detail |
---|
public Person()
Method Detail |
---|
public static Person getResponsiblePerson(Person p)
Get reference to User or Parent for purchasing a membership subscription
Currently, kids under 17 return their parent.
p
- The person, for whom someone else may be responsible for
payments
public boolean checkPassword(String passwordGuess)
passwordGuess
- The password which is to be checked
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
protected void generateNewPassword()
public abstract String getApprovalCookie()
Parent
,
User
public abstract String getConfirmationTemplate()
public String getCouponCode()
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 Date getMailConfirmed()
public String getPassword()
public abstract String getPotentialUserName()
public abstract String getResponsibleMail()
public boolean isCanContact()
protected 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 sendConfirmationMail()
public void sendStaffPasswordReset()
public void sentConfirmationMail()
public void setCanContact(boolean canContact1)
canContact1
- the canContact to setpublic void setCouponCode(String newCouponCode)
newCouponCode
- WRITEMEpublic void setForgotPasswordAnswer(String answer)
answer
- WRITEMEpublic void setForgotPasswordQuestion(String question)
question
- WRITEMEpublic void setGivenName(String givenName1)
givenName1
- the givenName to setpublic void setMail(String mail1) throws GameLogicException
mail1
- the mail to set
GameLogicException
- WRITEMEpublic void setMailConfirmed(Date mailConfirmed1)
mailConfirmed1
- the mailConfirmed to setpublic void setPassword(String password1)
password1
- the password to setpublic void setPasswordAndPasswordRecovery(String question, String answer, String newPassword) throws GameLogicException
question
- WRITEMEanswer
- WRITEMEnewPassword
- WRITEME
GameLogicException
- WRITEMEpublic void setPasswordRecovery(String forgottenPasswordQuestion, String forgottenPasswordAnswer)
forgottenPasswordQuestion
- the questionforgottenPasswordAnswer
- the correct answerpublic String setRandomPassword()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |