|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.user.service.UserCookieUtil
public final class UserCookieUtil
Utility class for user cookie handling.
| Field Summary | |
|---|---|
static DateFormat |
TIMESTAMP_FORMATTER
|
static String |
USER_COOKIE_PATH
|
static String |
USER_LOGIN_COOKIE_KEY
|
static String |
USER_UPDATE_COOKIE_KEY
|
| Method Summary | |
|---|---|
static String |
getCookieValue(HttpServletRequest request,
String cookieName)
|
static String |
getLoginKeyDefaultValue()
Return the default value for login key, meaning that the user is not logged in. |
static String |
getUserLoginCookie(HttpServletRequest request)
Look for and return the user login cookie value. |
static Date |
getUserUpdateCookie(HttpServletRequest request)
Look for and return the user update cookie timestamp. |
static void |
setUserLoginCookie(HttpServletResponse response,
String content)
Set the user login cookie value. |
static void |
setUserLoginCookieDefault(HttpServletResponse response)
Set the default user login cookie, signals no login. |
static void |
setUserUpdateCookie(HttpServletResponse response,
Date timestamp)
Set the user update cookie value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String USER_COOKIE_PATH
public static final String USER_LOGIN_COOKIE_KEY
public static final String USER_UPDATE_COOKIE_KEY
public static final DateFormat TIMESTAMP_FORMATTER
| Method Detail |
|---|
public static String getUserLoginCookie(HttpServletRequest request)
request - the http servlet request
public static void setUserLoginCookie(HttpServletResponse response,
String content)
response - the http servlet responsecontent - the content of the user cookiepublic static void setUserLoginCookieDefault(HttpServletResponse response)
response - the http servlet responsepublic static Date getUserUpdateCookie(HttpServletRequest request)
request - the http servlet request
public static void setUserUpdateCookie(HttpServletResponse response,
Date timestamp)
response - the http servlet responsetimestamp - the update timestamppublic static String getLoginKeyDefaultValue()
public static String getCookieValue(HttpServletRequest request,
String cookieName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||