Package de.uplanet.lucy.server.composer
Class CookiesCallable
java.lang.Object
de.uplanet.lucy.server.composer.CookiesCallable
@VelocityVariable("Cookies")
@VelocityCallable("instance")
public final class CookiesCallable
extends Object
-
Constructor Summary
ConstructorDescriptionCookiesCallable
(de.uplanet.lucy.server.IProcessingContext p_ctx, de.uplanet.lucy.server.configuration.IWebSecurityConfiguration p_webSecurityCfg) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if the client accepts cookies.Deprecated.This method will be removed.de.uplanet.lucy.server.connector.Cookie
createCookie
(String p_strName, String p_strValue) Create a cookie with the specified name and value, and the path set to/
.de.uplanet.lucy.server.connector.Cookie
createCookieWithPath
(String p_strName, String p_strValue, String p_strPath) Create a cookie with the specified name and value, and optional path.de.uplanet.lucy.server.connector.Cookie
createSessionCookie
(de.uplanet.lucy.server.session.ISession p_session) Create a session cookie.boolean
Check if the current processing context is a processing context that contains a request.boolean
isSessionMaintenanceInUrlAllowed
(de.uplanet.lucy.server.session.ISession p_session) Deprecated.
-
Constructor Details
-
CookiesCallable
public CookiesCallable(de.uplanet.lucy.server.IProcessingContext p_ctx, de.uplanet.lucy.server.configuration.IWebSecurityConfiguration p_webSecurityCfg)
-
-
Method Details
-
isSessionMaintenanceInUrlAllowed
@Deprecated public boolean isSessionMaintenanceInUrlAllowed(de.uplanet.lucy.server.session.ISession p_session) Deprecated.This method is obsolete since version 9.00.- Returns:
false
-
isRequestProcessingContext
public boolean isRequestProcessingContext()Check if the current processing context is a processing context that contains a request.- Returns:
true
if the current processing context is a processing context that contains a request, orfalse
otherwise.
-
clientAcceptsCookies
public boolean clientAcceptsCookies()Check if the client accepts cookies.Currently the return value
false
might not reflect the actual cookie support in the client in all cases.- Returns:
true
if the processing context does not contain a HTTP request, or if the client supports cookies, orfalse
otherwise.
-
clientAcceptsCookiesTriState
Deprecated.This method will be removed.Check if the client accepts cookies.Currently the return value
false
might not reflect the actual cookie support in the client in all cases.- Returns:
null
if the processing context does not contain a HTTP request, or if the request is does not contain the necessary information to decide if cookies are supported, ortrue
if the client supports cookies, orfalse
otherwise.
-
createCookie
Create a cookie with the specified name and value, and the path set to/
.- Parameters:
p_strName
- The name of the cookie.p_strValue
- The cookie's value.- Returns:
- The cookie.
- Throws:
IllegalArgumentException
- If the cookie's name or value isnull
.
-
createCookieWithPath
public de.uplanet.lucy.server.connector.Cookie createCookieWithPath(String p_strName, String p_strValue, String p_strPath) Create a cookie with the specified name and value, and optional path.- Parameters:
p_strName
- The name of the cookie.p_strValue
- The cookie's value.p_strPath
- The cookie path (may benull
in which case the path is set to/
).- Returns:
- The cookie.
- Throws:
IllegalArgumentException
- If the cookie's name or value or path isnull
.
-
createSessionCookie
public de.uplanet.lucy.server.connector.Cookie createSessionCookie(de.uplanet.lucy.server.session.ISession p_session) Create a session cookie.Calling this method is effectively equivalent with calling
createCookie(String, String)
withco_SId
as first, and the unique session ID as second parameter.- Parameters:
p_session
-- Returns:
- The cookie.
-