|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.scentral.UserRecordImpl
Stores the information about a registered user.
| Field Summary | |
protected static boolean |
address1_required
|
protected static boolean |
address2_required
|
protected static boolean |
affiliation_required
|
protected static boolean |
city_required
|
protected static boolean |
company_required
|
protected static boolean |
country_required
|
protected static boolean |
department_required
|
protected static boolean |
email_required
|
protected static boolean |
faxNumber_required
|
protected static boolean |
firstName_required
|
protected static boolean |
lastName_required
|
protected static boolean |
middleName_required
|
static java.lang.String |
NO_PROBLEM_REPORT
|
protected static boolean |
password_required
|
protected static boolean |
phoneNumber_required
|
protected static boolean |
state_required
|
protected static boolean |
title_required
|
protected static boolean |
userID_required
|
protected static boolean |
zip_required
|
| Fields inherited from interface edu.mssm.crover.scentral.UserRecord |
ADDRESS_LINE1_PARAM, ADDRESS_LINE2_PARAM, CITY_PARAM, COMPANY_NAME_PARAM, COUNTRY_PARAM, DEPARTMENT_PARAM, EMAIL_PARAM, FAX_PARAM, FIRST_NAME_PARAM, KIND_PARAM, LAST_NAME_PARAM, MIDDLE_NAME_PARAM, PASSWORD_CHECK_PARAM, PASSWORD_PARAM, PHONE_PARAM, STATE_PARAM, USERID_PARAM, ZIP_PARAM |
| Constructor Summary | |
|
UserRecordImpl(java.sql.Connection conn,
java.lang.String recordID)
Constructor for UserRecord that takes a connection and constructs the UserRecord by querying the database tables. |
|
UserRecordImpl(java.sql.Connection conn,
java.lang.String userID,
java.lang.String password)
Constructor for UserRecord that takes a connection and constructs the UserRecord by querying the database tables. |
|
UserRecordImpl(javax.servlet.http.HttpServletRequest request)
Deprecated. Use parseParameters(javax.servlet.http.HttpServletRequest) instead. |
protected |
UserRecordImpl(java.lang.String userID)
|
| Method Summary | |
void |
generatePassword()
Generates a password for this account and send it to the user by email. |
java.lang.String |
getAddress1()
Gets the first line of the mail address for the person represented by this record. |
java.lang.String |
getAddress2()
Gets the second line of the mail address for the person represented by this record. |
java.lang.String |
getAffiliation()
Gets the affiliation of the person represented by this record. |
java.lang.String |
getCity()
Gets the city of the mail address for the person represented by this record. |
java.lang.String |
getCompany()
Gets the company for which the person represented by this record works. |
java.lang.String |
getCountry()
Gets the country of the mail address for the person represented by this record. |
java.lang.String |
getDepartment()
Gets the department in which the person represented by this record works. |
java.lang.String |
getDiagnostic()
Returns the reason(s) why the record was found invalid. |
java.lang.String |
getEmail()
Returns the email declared by this user. |
java.lang.String |
getFaxNumber()
Gets the fax number for the person represented by this record. |
java.lang.String |
getFirstName()
Gets the first name of the person represented by this record. |
static UserRecord |
getGuestRecord()
Returns a dummy record for the guest account. |
java.util.Date |
getLastLogin()
Get the last login time. |
java.lang.String |
getLastName()
Gets the last name of the person represented by this record. |
java.lang.String |
getMiddleName()
Gets the middle name of the person represented by this record. |
java.lang.String |
getPhoneNumber()
Gets the phone number for the person represented by this record. |
java.lang.String |
getRecordID()
Returns this recordID. |
java.lang.String |
getState()
Gets the state of the mail address for the person represented by this record. |
java.lang.String |
getTitle()
Gets the title of the person represented by this record. |
java.lang.String |
getUserID()
Gets the user id for this record. |
java.lang.String |
getZip()
Gets the zip or postal code of the mail address for the person represented by this record. |
boolean |
hasBeenUsed()
Has this registered user entered the service once ? |
boolean |
isEmailTrusted()
Can this email be trusted ? An email is declared trusted after A user registered successfully the user received the (login, passwd) via email the user logged in successfully at least once with (login, passwd). |
boolean |
isValid(boolean needsPassword)
Returns wether this user record is valid. |
void |
parseParameters(javax.servlet.http.HttpServletRequest request)
Updates the record with the information stored in the request parameters. |
void |
putToDatabase(java.sql.Connection con)
Saves itself to database using JDBC. |
void |
sendPassword(SimpleMailer mailer)
Sends an email to the user that show his/her password in the body of the message. |
void |
setAddress1(java.lang.String x)
Stores the of the first line of the mail address for the person represented by this record. |
void |
setAddress2(java.lang.String x)
Stores the of the second line of the mail address for the person represented by this record. |
void |
setAffiliation(java.lang.String affiliation)
Stores the affiliation of the person represented by this record. |
void |
setCity(java.lang.String x)
Stores the city of the mail address for the person represented by this record. |
void |
setCompany(java.lang.String x)
Stores the company for which the person represented by this record works. |
void |
setCountry(java.lang.String x)
Stores the country of the mail address for the person represented by this record. |
void |
setDepartment(java.lang.String x)
Stores the department in which the person represented by this record works. |
void |
setDirectory(UserDirectory dir)
Keep in touch with the UserDirectory to request that it save our state when important changes occured. |
void |
setEmail(java.lang.String email)
Sets the email field for this user. |
void |
setFaxNumber(java.lang.String x)
Stores the fax number for the person represented by this record. |
void |
setFirstName(java.lang.String name)
Stores the first name of the person represented by this record. |
void |
setLastName(java.lang.String name)
Stores the last name of the person represented by this record. |
void |
setMiddleName(java.lang.String name)
Stores the middle name of the person represented by this record. |
void |
setPassword(java.lang.String passwd)
Sets the password for this user record. |
void |
setPhoneNumber(java.lang.String x)
Stores the for the person represented by this record. |
void |
setState(java.lang.String x)
Stores the zip or postal code of the mail address for the person represented by this record. |
void |
setTitle(java.lang.String title)
Stores the title of the person represented by this record. |
void |
setUserID(java.lang.String uid)
Sets the user id for this record. |
void |
setZip(java.lang.String x)
Stores the zip or postal code of the mail address for the person represented by this record. |
java.lang.String |
toString()
|
boolean |
tryPassword(java.lang.String password)
Try wether this password is correct for this user. |
void |
userLogsIn()
Keeps track of the logins for this user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static boolean userID_required
protected static boolean firstName_required
protected static boolean middleName_required
protected static boolean lastName_required
protected static boolean title_required
protected static boolean email_required
protected static boolean password_required
protected static boolean affiliation_required
protected static boolean company_required
protected static boolean department_required
protected static boolean address1_required
protected static boolean address2_required
protected static boolean zip_required
protected static boolean country_required
protected static boolean state_required
protected static boolean phoneNumber_required
protected static boolean faxNumber_required
protected static boolean city_required
public static java.lang.String NO_PROBLEM_REPORT
| Constructor Detail |
public UserRecordImpl(java.sql.Connection conn,
java.lang.String userID,
java.lang.String password)
throws java.sql.SQLException
public UserRecordImpl(java.sql.Connection conn,
java.lang.String recordID)
throws java.sql.SQLException
public UserRecordImpl(javax.servlet.http.HttpServletRequest request)
parseParameters(javax.servlet.http.HttpServletRequest) instead.
protected UserRecordImpl(java.lang.String userID)
| Method Detail |
public void putToDatabase(java.sql.Connection con)
throws java.sql.SQLException
putToDatabase in interface UserRecordjava.sql.SQLExceptionpublic java.lang.String getRecordID()
getRecordID in interface UserRecordUserDirectorypublic final boolean isValid(boolean needsPassword)
isValid in interface UserRecordneedsPassword - True requires the password to be valid,
False ignores the password.public boolean isEmailTrusted()
isEmailTrusted in interface UserRecordpublic boolean hasBeenUsed()
hasBeenUsed in interface UserRecordpublic void userLogsIn()
userLogsIn in interface UserRecordpublic java.util.Date getLastLogin()
getLastLogin in interface UserRecord
public void parseParameters(javax.servlet.http.HttpServletRequest request)
throws PasswordDoesNotMatch
parseParameters in interface UserRecordPasswordDoesNotMatchFor the first supported parameter (the list follows).public java.lang.String getDiagnostic()
UserRecord
getDiagnostic in interface UserRecordpublic static UserRecord getGuestRecord()
public boolean tryPassword(java.lang.String password)
tryPassword in interface UserRecordpublic void generatePassword()
generatePassword in interface UserRecordpublic void sendPassword(SimpleMailer mailer)
sendPassword in interface UserRecordpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setEmail(java.lang.String email)
setEmail in interface UserRecordemail - the new email or null, in which case nothing is done.public java.lang.String getEmail()
getEmail in interface UserRecordisEmailTrusted.public java.lang.String getUserID()
getUserID in interface UserRecordpublic void setUserID(java.lang.String uid)
setUserID in interface UserRecordpublic java.lang.String getFirstName()
getFirstName in interface UserRecordpublic void setFirstName(java.lang.String name)
setFirstName in interface UserRecordpublic java.lang.String getMiddleName()
getMiddleName in interface UserRecordpublic void setMiddleName(java.lang.String name)
setMiddleName in interface UserRecordpublic java.lang.String getLastName()
getLastName in interface UserRecordpublic void setLastName(java.lang.String name)
setLastName in interface UserRecordpublic java.lang.String getTitle()
getTitle in interface UserRecordpublic void setTitle(java.lang.String title)
setTitle in interface UserRecordpublic java.lang.String getAffiliation()
getAffiliation in interface UserRecordpublic void setAffiliation(java.lang.String affiliation)
setAffiliation in interface UserRecordpublic void setPassword(java.lang.String passwd)
UserRecord
setPassword in interface UserRecordpublic java.lang.String getCompany()
UserRecord
getCompany in interface UserRecordpublic void setCompany(java.lang.String x)
UserRecord
setCompany in interface UserRecordpublic java.lang.String getDepartment()
UserRecord
getDepartment in interface UserRecordpublic void setDepartment(java.lang.String x)
UserRecord
setDepartment in interface UserRecordpublic java.lang.String getAddress1()
UserRecord
getAddress1 in interface UserRecordpublic void setAddress1(java.lang.String x)
UserRecord
setAddress1 in interface UserRecordpublic java.lang.String getAddress2()
UserRecord
getAddress2 in interface UserRecordpublic void setAddress2(java.lang.String x)
UserRecord
setAddress2 in interface UserRecordpublic java.lang.String getZip()
UserRecord
getZip in interface UserRecordpublic void setZip(java.lang.String x)
UserRecord
setZip in interface UserRecordpublic java.lang.String getCity()
UserRecord
getCity in interface UserRecordpublic void setCity(java.lang.String x)
UserRecord
setCity in interface UserRecordpublic java.lang.String getCountry()
UserRecord
getCountry in interface UserRecordpublic void setCountry(java.lang.String x)
UserRecord
setCountry in interface UserRecordpublic java.lang.String getState()
UserRecord
getState in interface UserRecordpublic void setState(java.lang.String x)
UserRecord
setState in interface UserRecordpublic java.lang.String getPhoneNumber()
UserRecord
getPhoneNumber in interface UserRecordpublic void setPhoneNumber(java.lang.String x)
UserRecord
setPhoneNumber in interface UserRecordpublic java.lang.String getFaxNumber()
UserRecord
getFaxNumber in interface UserRecordpublic void setFaxNumber(java.lang.String x)
UserRecord
setFaxNumber in interface UserRecordpublic void setDirectory(UserDirectory dir)
setDirectory in interface UserRecord
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||