Package lumis.util
Class CookieUtil
- java.lang.Object
-
- lumis.util.CookieUtil
-
@StableMinor(version="17.0", sinceVersion="4.0") public class CookieUtil extends java.lang.Object
Utility methods for cookies manipulation.- Since:
- 4.0.7
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description CookieUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addLumisAppCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static void
addLumisUserCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Adds lumis user information cookies.static void
addLumisUserCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response)
Adds lumis user information cookies.static void
deleteAutoAdministrationCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis auto-administration cookies.static void
deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name)
Deletes the cookie if it exists in the request.static void
deleteCookie(IServiceInterfaceRequest request, IServiceInterfaceResponse response, java.lang.String name)
Deletes the cookie if it exists in the request.static void
deleteLumisStandardCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis standard cookies.static void
deleteLumisStandardCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response)
Delete lumis standard cookies.static void
deleteLumisUserCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis user information cookies.static void
deleteLumisUserCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response)
Delete lumis user information cookies.static java.lang.String
getCookie(javax.servlet.http.HttpServletRequest request, java.lang.String name)
Given a cookie name, the cookie value if exists in the request object is returned.static java.lang.String
getCookie(IServiceInterfaceRequest request, java.lang.String name)
Given a cookie name, the cookie value if exists in the request object is returned.static void
setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)
Sets a cookie value.static void
setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value, java.util.Date expiration)
Sets a cookie value.static void
setCookie(IServiceInterfaceRequest request, IServiceInterfaceResponse response, java.lang.String name, java.lang.String value)
Sets a cookie value.
-
-
-
Method Detail
-
getCookie
public static java.lang.String getCookie(IServiceInterfaceRequest request, java.lang.String name)
Given a cookie name, the cookie value if exists in the request object is returned. If the cookie is not found, a null value is returned- Parameters:
request
- the request.response
- the response.name
- the cookie name.- Returns:
- cookie value
- Since:
- 4.0.7
-
getCookie
public static java.lang.String getCookie(javax.servlet.http.HttpServletRequest request, java.lang.String name)
Given a cookie name, the cookie value if exists in the request object is returned. If the cookie is not found, a null value is returned- Parameters:
request
- the request.response
- the response.name
- the cookie name.- Returns:
- cookie value
- Since:
- 4.0.7
-
setCookie
public static void setCookie(IServiceInterfaceRequest request, IServiceInterfaceResponse response, java.lang.String name, java.lang.String value)
Sets a cookie value.- Parameters:
request
- the request.response
- the response.name
- the cookie name.value
- the cookie value.- Since:
- 4.0.7
-
setCookie
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)
Sets a cookie value.- Parameters:
request
- the request.response
- the response.name
- the cookie name.value
- the cookie value.- Since:
- 4.0.7
-
setCookie
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value, java.util.Date expiration)
Sets a cookie value.- Parameters:
request
- the request.response
- the response.name
- the cookie name.value
- the cookie value.expiration
- the cookie expiration date.- Since:
- 10.1.0
-
deleteCookie
public static void deleteCookie(IServiceInterfaceRequest request, IServiceInterfaceResponse response, java.lang.String name)
Deletes the cookie if it exists in the request.- Parameters:
request
- the request.response
- the response.name
- the cookie name.- Since:
- 4.0.7
-
deleteCookie
public static void deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name)
Deletes the cookie if it exists in the request.- Parameters:
request
- the request.response
- the response.name
- the cookie name.- Since:
- 4.0.7
-
deleteLumisUserCookies
public static void deleteLumisUserCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response)
Delete lumis user information cookies.- Parameters:
request
- the request.response
- the response.- Since:
- 4.0.7
-
deleteLumisUserCookies
public static void deleteLumisUserCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis user information cookies.- Parameters:
request
- the request.response
- the response.- Since:
- 4.0.7
-
addLumisAppCookie
public static void addLumisAppCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
addLumisUserCookies
public static void addLumisUserCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response) throws PortalException
Adds lumis user information cookies.- Parameters:
request
- the request.response
- the response.- Throws:
PortalException
- if it was not possible to obtain the data necessary to set the cookies.- Since:
- 4.0.7
-
addLumisUserCookies
public static void addLumisUserCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PortalException
Adds lumis user information cookies.- Parameters:
request
- the request.response
- the response.- Throws:
PortalException
- if it was not possible to obtain the data necessary to set the cookies.- Since:
- 4.0.7
-
deleteLumisStandardCookies
public static void deleteLumisStandardCookies(IServiceInterfaceRequest request, IServiceInterfaceResponse response)
Delete lumis standard cookies. Also deletes the lumis user information cookies.- Parameters:
request
- the request.response
- the response.- Since:
- 4.0.7
-
deleteLumisStandardCookies
public static void deleteLumisStandardCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis standard cookies. Also deletes the lumis user information and auto-administration cookies.- Parameters:
request
- the request.response
- the response.- Since:
- 4.0.7
-
deleteAutoAdministrationCookies
public static void deleteAutoAdministrationCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Delete lumis auto-administration cookies.- Parameters:
request
- the request.response
- the response.- Since:
- 7.0.0
-
-