|
||||||||||
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
org.starhope.appius.user.Parent
public class Parent
This class represents the parent of a kid or teen account User.getParent()
Field Summary | |
---|---|
private Date |
mailConfirmSent
|
private int |
parentID
Database ID value |
Fields inherited from class org.starhope.appius.user.Person |
---|
canContact, dialect, forgotPasswordAnswer, forgotPasswordQuestion, givenName, language, mail, mailConfirmed, password |
Constructor Summary | |
---|---|
Parent(ResultSet rs)
|
|
Parent(String parentMail)
Create a new Parent record |
|
Parent(String mail,
String password)
Create a new parent record and set an initial password at the same time |
Method Summary | |
---|---|
boolean |
checkPassword(String passwordGuess)
This is an overriding method. |
void |
flush()
|
static Parent |
getByID(int id)
|
static Parent |
getByMail(String mail)
|
protected String |
getCacheUniqueID()
This is an overriding method. |
User[] |
getChildren()
|
String |
getDisplayName()
This method's only use is for more closely aligning User and Parent classes. |
HashMap<Timestamp,HashMap<String,String>> |
getHistory(Date after,
int limit)
This is an overriding method. |
int |
getID()
WRITEME: document this method (theys, Aug 10, 2009) |
String |
getName()
WRITEME: document this method (twheys, Aug 05, 2009) |
static Parent |
getOrCreateByMail(String parentMail)
|
String |
getResponsibleMail()
This is an overriding method. |
private void |
insert()
WRITEME: document this method (brpocock, Aug 26, 2009) |
boolean |
isRegistered()
|
void |
mailIsConfirmed()
|
protected 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. |
void |
rename(String newName)
This is an overriding method. |
void |
requestApproval(User user)
WRITEME: document this method (brpocock, Jul 8, 2009) |
void |
sentConfirmationMail()
|
protected void |
set(ResultSet rs)
|
org.json.JSONObject |
toJSON()
This is an overriding method. |
Methods inherited from class org.starhope.appius.user.Person |
---|
forgotPassword, getDialect, getForgotPasswordAnswer, getForgotPasswordQuestion, getGivenName, getLanguage, getMail, getMailConfirmed, getPassword, getResponsiblePerson, setCanContact, setGivenName, setMail, setMailConfirmed, setPassword, setPasswordRecovery |
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
---|
changed, findInCache, get, prepare, prepare, saveInCache, set |
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 |
---|
private Date mailConfirmSent
private int parentID
Constructor Detail |
---|
public Parent(ResultSet rs)
rs
- resultset describing a parentpublic Parent(String parentMail)
parentMail
- the address of the parentpublic Parent(String mail, String password) throws AlreadyUsedException, PrivilegeRequiredException
mail
- mail addresspassword
- password
AlreadyUsedException
- if the user has an existing account,
and they know the password
PrivilegeRequiredException
- if the mail exists, but the
password is wrongMethod Detail |
---|
public static Parent getByID(int id)
id
- database ID number
public static Parent getByMail(String mail)
mail
- The parent's eMail address
public static Parent getOrCreateByMail(String parentMail)
parentMail
- the mail address for the parent
public boolean checkPassword(String passwordGuess)
checkPassword
in class Person
passwordGuess
- The password guess
Person.checkPassword(java.lang.String)
public void flush()
flush
in class Person
SQLPeerDatum.flush()
protected String getCacheUniqueID()
getCacheUniqueID
in class SQLPeerDatum
SQLPeerDatum.getCacheUniqueID()
public User[] getChildren()
public String getDisplayName()
Person
getDisplayName
in class Person
Person.getDisplayName()
public HashMap<Timestamp,HashMap<String,String>> getHistory(Date after, int limit)
getHistory
in class Person
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.
Person.getHistory(java.sql.Date,
int)
public int getID()
public String getName()
public String getResponsibleMail()
getResponsibleMail
in class Person
Person.getResponsibleMail()
private void insert()
public boolean isRegistered()
public void mailIsConfirmed()
protected void remindPassword()
Person
remindPassword
in class Person
Person.remindPassword()
public void rename(String newName)
rename
in class Person
newName
- The new user namePerson.rename(java.lang.String)
public void requestApproval(User user)
user
- public void sentConfirmationMail()
protected void set(ResultSet rs) throws SQLException
set
in class SQLPeerDatum
SQLException
- if the database fails somehowSQLPeerDatum.set(java.sql.ResultSet)
public org.json.JSONObject toJSON()
toJSON
in class SQLPeerDatum
org.starhope.appius.sql.SQLPeerDatum#toAS()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |