org.starhope.appius.user
Class Person

java.lang.Object
  extended by org.starhope.appius.user.Person

public class Person
extends Object

This was an abstract superclass for both Parents and Users. Now, it's being refactored as a static container class for common methods related to all AbstractPerson instances.

Author:
brpocock@star-hope.org, twheys@gmail.com

Field Summary
private static long serialVersionUID
          Java serialization unique ID
 
Constructor Summary
Person()
           
 
Method Summary
static boolean forgotPassword(AbstractPerson who, String forgottenPasswordQ, String forgottenPasswordA)
           
protected static String generateNewPassword()
           
static AbstractPerson getResponsiblePerson(AbstractPerson p)
           Get reference to User or Parent for making a purchase.
static void remindPassword(AbstractPerson who)
          Send a reminder eMail for a forgotten password.
static void sendConfirmationMail(AbstractPerson who)
           
static void sendStaffPasswordReset(AbstractPerson who)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Java serialization unique ID

See Also:
Constant Field Values
Constructor Detail

Person

public Person()
Method Detail

forgotPassword

public static boolean forgotPassword(AbstractPerson who,
                                     String forgottenPasswordQ,
                                     String forgottenPasswordA)
Parameters:
who - WRITEME
forgottenPasswordQ - WRITEME
forgottenPasswordA - WRITEME
Returns:
WRITEME
See Also:
AbstractPerson.forgotPassword(java.lang.String, java.lang.String)

generateNewPassword

protected static String generateNewPassword()
Returns:
a new, random password using only ASCII-7 printable characters ($20 to $7e). Password's length will range from 10-20 characters in total.

getResponsiblePerson

public static AbstractPerson getResponsiblePerson(AbstractPerson p)

Get reference to User or Parent for making a purchase.

Currently, kids under 17 return their parent.

Parameters:
p - The person, for whom someone else may be responsible for payments
Returns:
the Person object that able to use a credit card.

remindPassword

public static void remindPassword(AbstractPerson who)
                           throws NotReadyException
Send a reminder eMail for a forgotten password. This presumes that the eMail address on file has been validated, and that the person has already authenticated in some way.

Parameters:
who - WRITEME
Throws:
NotReadyException - if the user does not have an eMail address, or it has not been confirmed

sendConfirmationMail

public static void sendConfirmationMail(AbstractPerson who)
Parameters:
who - WRITEME
See Also:
AbstractPerson.sendConfirmationMail()

sendStaffPasswordReset

public static void sendStaffPasswordReset(AbstractPerson who)
Parameters:
who - WRITEME
See Also:
Mail.sendStaffPaswordResetMail(AbstractPerson)