Package com.logicaldoc.gui.common.client
Class CookiesManager
- java.lang.Object
-
- com.logicaldoc.gui.common.client.CookiesManager
-
public class CookiesManager extends Object
Here we handle the storage of informations in the broeserk- Since:
- 7.7.2
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOOKIE_DENSITYstatic StringCOOKIE_DOCSLIST_MODEstatic StringCOOKIE_DOCSLIST_PREV_Wstatic StringCOOKIE_DOCSMENU_Wstatic StringCOOKIE_FAILUREstatic StringCOOKIE_HITSLIST_MODEstatic StringCOOKIE_HITSLIST_PREV_Wstatic StringCOOKIE_JSESSIONIDstatic StringCOOKIE_PASSWORDstatic StringCOOKIE_SAVELOGINstatic StringCOOKIE_SIDstatic StringCOOKIE_USERstatic StringCOOKIE_VERSION
-
Constructor Summary
Constructors Constructor Description CookiesManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringget(String cookieName)Gets a cookiestatic StringgetFailure()Retrieve the failure of the last loginstatic String[]getSavedCredentials()Retrieves the credentialsstatic booleanisSaveLogin()static voidremoveAllCookies()Removes all the informations stored in the browserstatic voidremoveLogin()Removes the cookies used to handle the loginstatic voidremoveSid()Removes the cookies that store the session IDstatic voidsave(String cookieName, int value)static voidsave(String cookieName, String value)Saves the cookiestatic voidsaveLogin(boolean saveLoginEnabled, boolean rememberMe, String username, String password)Saves the login informationsstatic voidsaveRelease(GUIInfo info)Stores the release information in the browser
-
-
-
Field Detail
-
COOKIE_HITSLIST_MODE
public static final String COOKIE_HITSLIST_MODE
- See Also:
- Constant Field Values
-
COOKIE_HITSLIST_PREV_W
public static final String COOKIE_HITSLIST_PREV_W
- See Also:
- Constant Field Values
-
COOKIE_DOCSLIST_MODE
public static final String COOKIE_DOCSLIST_MODE
- See Also:
- Constant Field Values
-
COOKIE_DOCSLIST_PREV_W
public static final String COOKIE_DOCSLIST_PREV_W
- See Also:
- Constant Field Values
-
COOKIE_DOCSMENU_W
public static final String COOKIE_DOCSMENU_W
- See Also:
- Constant Field Values
-
COOKIE_SAVELOGIN
public static final String COOKIE_SAVELOGIN
- See Also:
- Constant Field Values
-
COOKIE_DENSITY
public static final String COOKIE_DENSITY
- See Also:
- Constant Field Values
-
COOKIE_USER
public static final String COOKIE_USER
- See Also:
- Constant Field Values
-
COOKIE_PASSWORD
public static final String COOKIE_PASSWORD
- See Also:
- Constant Field Values
-
COOKIE_VERSION
public static final String COOKIE_VERSION
- See Also:
- Constant Field Values
-
COOKIE_SID
public static final String COOKIE_SID
- See Also:
- Constant Field Values
-
COOKIE_FAILURE
public static final String COOKIE_FAILURE
- See Also:
- Constant Field Values
-
COOKIE_JSESSIONID
public static final String COOKIE_JSESSIONID
- See Also:
- Constant Field Values
-
-
Method Detail
-
removeSid
public static void removeSid()
Removes the cookies that store the session ID
-
removeLogin
public static void removeLogin()
Removes the cookies used to handle the login
-
removeAllCookies
public static void removeAllCookies()
Removes all the informations stored in the browser
-
get
public static String get(String cookieName)
Gets a cookie- Parameters:
cookieName- name of the cookie- Returns:
- value of the cookie
-
save
public static void save(String cookieName, String value)
Saves the cookie- Parameters:
cookieName- name of the cookievalue- value of the cookie
-
save
public static void save(String cookieName, int value)
-
saveRelease
public static void saveRelease(GUIInfo info)
Stores the release information in the browser- Parameters:
info- the User Interface informations
-
isSaveLogin
public static boolean isSaveLogin()
-
getSavedCredentials
public static String[] getSavedCredentials()
Retrieves the credentials- Returns:
- username and password
-
getFailure
public static String getFailure()
Retrieve the failure of the last login- Returns:
- the failure reason
-
saveLogin
public static void saveLogin(boolean saveLoginEnabled, boolean rememberMe, String username, String password)Saves the login informations- Parameters:
saveLoginEnabled- if the 'save login' checkbox must be enabledrememberMe- if the 'remember me' option must be enabledusername- the usernamepassword- the password
-
-