|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
UserDataChange
The Class is used to change the userdatas
Field Summary | |
private java.lang.String[] |
error_matrix
|
Constructor Summary | |
UserDataChange()
|
Method Summary | |
private boolean |
changeDataInDB(HttpServletRequest request,
UserData user)
This method changes the userdata in the userdata-object as well as in the db. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
This method just calls doPost(). |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
This Method generates the HTML-Code depending on wether its the first call or not and also if input is ok or not. |
private void |
GetErrorFromMatrix(java.io.PrintWriter out)
This method gets errors from the Array. |
private java.lang.String |
getSQL(java.lang.String passwd,
UserData user,
java.lang.String birth)
This method generates the SQL-statement. |
private boolean |
inputOkay(HttpServletRequest request,
UserData user)
This method is the Input-parser. |
private java.lang.String |
output(HttpServletRequest request,
UserData user,
java.lang.String value,
boolean firstcall)
This method is used to fill the fields in the table with the right userdata-values (if first call take 'em from 'user', otherwise request.getParameter()). |
private java.lang.String |
parseDateOfBirth(UserData user)
This method transforms a String with the date-format YYYY-MM-DD to a String with date-format DD.MM.YYYY . |
private void |
printConfirm(UserData user,
java.io.PrintWriter out)
This method is called when userdata where sucsessfully changed in db. |
private void |
printForm(HttpServletRequest request,
UserData user,
java.io.PrintWriter out,
boolean firstcall)
This method generates the HTML-table for inserting the new userdata. |
private void |
SetErrorToMatrix(java.lang.String error_message)
This method puts errors into the Array. |
Field Detail |
private java.lang.String[] error_matrix
Constructor Detail |
public UserDataChange()
Method Detail |
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
request
- response
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
request
- response
- private boolean changeDataInDB(HttpServletRequest request, UserData user)
request
- the HttpServletRequestuser
- The userdata-object that 'belongs' to the actual sessionprivate java.lang.String getSQL(java.lang.String passwd, UserData user, java.lang.String birth)
passwd
- the password entered by the user.user
- The userdata-object that 'belongs' to the actual session.birth
- The date of birth entered by the user.private java.lang.String parseDateOfBirth(UserData user)
The
- userdata-object that 'belongs' to the actual session.private void printForm(HttpServletRequest request, UserData user, java.io.PrintWriter out, boolean firstcall)
request
- HttpServletRequestuser
- The userdata-object that 'belongs' to the actual session.out
- PrintWriterfirstcall
- true if first call, otherwise false.private void printConfirm(UserData user, java.io.PrintWriter out)
user
- The userdata-object that 'belongs' to the actual session.out
- PrintWriterprivate boolean inputOkay(HttpServletRequest request, UserData user)
request
- HttpServletRequestuser
- The userdata-object that 'belongs' to the actual session.out
- PrintWriterprivate java.lang.String output(HttpServletRequest request, UserData user, java.lang.String value, boolean firstcall)
request
- HttpServletRequestuser
- The userdata-object that 'belongs' to the actual session.value
- whatever...firstcall
- true if first call, else falseprivate void SetErrorToMatrix(java.lang.String error_message)
error_message
- This is an errormessage.private void GetErrorFromMatrix(java.io.PrintWriter out)
out
- PrintWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |