|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGoTournaments.GoHttpRequest
private class GoTournaments.GoHttpRequest
A class to provide a simple interface for the HttpServletRequest. Provides methods to handle sessions and cookies and to automatically convert data received to various types.
Field Summary | |
---|---|
private javax.servlet.http.HttpServletRequest |
req
|
Constructor Summary | |
---|---|
GoTournaments.GoHttpRequest(javax.servlet.http.HttpServletRequest httpservletrequest)
Constructs a GoHttpRequest interface for an HttpServletRequest. |
Method Summary | |
---|---|
java.lang.String |
get(java.lang.String name)
As above, but an empty String is returned instead of null. |
boolean |
getBool(java.lang.String name)
As in get(), but with an automatic conversion to a boolean. |
boolean |
getCheckbox(java.lang.String name)
As in get(), but with an automatic conversion to a checkbox state (boolean). |
java.lang.String |
getCookie(java.lang.String name)
Returns the value of a cookie or an empty String if the cookie isn't set. |
ID |
getEID()
As above, but always gets the entry ID ("eid"). |
ID |
getID(java.lang.String name)
As in get(), but with an automatic conversion to a Go ID object. |
java.lang.String |
getParameter(java.lang.String name)
Returns the value of a field sent either with 'get' or 'post' method as a String. |
ID |
getTID()
As above, but always gets the tournament ID ("tid"). |
boolean |
isAdmin()
Returns true if the user is logged in to the system, otherwise false. |
boolean |
login(java.lang.String login_password)
Logs the user in to the system as an administrator if given password matches the administrator password. |
void |
logout()
Logs the user out of the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final transient javax.servlet.http.HttpServletRequest req
Constructor Detail |
---|
public GoTournaments.GoHttpRequest(javax.servlet.http.HttpServletRequest httpservletrequest)
Method Detail |
---|
public java.lang.String getParameter(java.lang.String name)
name
- the name of the fieldpublic java.lang.String get(java.lang.String name)
public boolean getBool(java.lang.String name)
public boolean getCheckbox(java.lang.String name)
public ID getID(java.lang.String name)
public ID getTID()
public ID getEID()
public boolean login(java.lang.String login_password)
login_password
- the password given by the user.public void logout()
public boolean isAdmin()
public java.lang.String getCookie(java.lang.String name)
name
- the name of the cookie.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |