Package com.microstrategy.web.platform
Class AbstractConfigurableContainerServices.CookieWrapper
- java.lang.Object
-
- com.microstrategy.web.platform.AbstractConfigurableContainerServices.CookieWrapper
-
- All Implemented Interfaces:
GenericCookie
- Enclosing class:
- AbstractConfigurableContainerServices
protected class AbstractConfigurableContainerServices.CookieWrapper extends java.lang.Object implements GenericCookie
A implementation of GenericCookies.- Since:
- MicroStrategy Web 8.0.2
-
-
Constructor Summary
Constructors Constructor Description CookieWrapper(java.lang.String name, java.lang.String wholeValue, ContainerServicesNamespace namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxAge()
Returns the maximum age of the current cookie.java.lang.String
getName()
Returns the name of the cookie.java.lang.String
getNativeName()
Returns the native cookie name.java.lang.String
getNativeValue()
Returns the native cookie value.java.lang.String
getPath()
Returns the path associated with the current cookie.java.lang.String
getValue()
Returns the value of the cookie.boolean
isHttpOnly()
Set the http only flagboolean
isSecure()
Indicates if the client is only to return the cookie in subsequent requests if those requests use Secure Hypertext Transfer Protocol (HTTPS); The default is false.void
setHttpOnly(boolean value)
get the http only flagvoid
setMaxAge(int maxAge)
Set the maximum age for a cookie.void
setPath(java.lang.String path)
This method modifies the path associated with the cookie.void
setSecure(boolean value)
Sets the security level of a cookievoid
setValue(java.lang.String value)
This method modifies the value of the cookie in current namespace.
-
-
-
Constructor Detail
-
CookieWrapper
public CookieWrapper(java.lang.String name, java.lang.String wholeValue, ContainerServicesNamespace namespace)
-
-
Method Detail
-
setMaxAge
public void setMaxAge(int maxAge)
Description copied from interface:GenericCookie
Set the maximum age for a cookie.- Specified by:
setMaxAge
in interfaceGenericCookie
- Parameters:
maxAge
- The age in terms of a number of seconds.
-
getName
public java.lang.String getName()
Description copied from interface:GenericCookie
Returns the name of the cookie.- Specified by:
getName
in interfaceGenericCookie
- Returns:
- A
String
which is the name of the cookie. In non-namespace mode, this name is the same as the native cookie name using in browser. In namespace mode, the name is the native name without MicroStrategy prefix. The namespace mode can be configured in ContainerServices.properties. - See Also:
ContainerServices
-
getValue
public java.lang.String getValue()
Description copied from interface:GenericCookie
Returns the value of the cookie.- Specified by:
getValue
in interfaceGenericCookie
- Returns:
- A
String
which is the value of the cookie. In non-namespace mode, this value is the same as the native cookie value stored in browser. In namespace mode, the value contains only the cookie value in current namespace. The namespace mode can be configured in ContainerServices.properties. - See Also:
ContainerServices
-
setValue
public void setValue(java.lang.String value)
Description copied from interface:GenericCookie
This method modifies the value of the cookie in current namespace.- Specified by:
setValue
in interfaceGenericCookie
- Parameters:
value
- TheString
value to assign to the cookie.
-
setPath
public void setPath(java.lang.String path)
Description copied from interface:GenericCookie
This method modifies the path associated with the cookie.- Specified by:
setPath
in interfaceGenericCookie
- Parameters:
path
- TheString
for the path.
-
getPath
public java.lang.String getPath()
Description copied from interface:GenericCookie
Returns the path associated with the current cookie.- Specified by:
getPath
in interfaceGenericCookie
- Returns:
- the path associated with the current cookie.
-
getMaxAge
public int getMaxAge()
Description copied from interface:GenericCookie
Returns the maximum age of the current cookie.- Specified by:
getMaxAge
in interfaceGenericCookie
- Returns:
- the maximum age of the current cookie.
-
getNativeName
public java.lang.String getNativeName()
Description copied from interface:GenericCookie
Returns the native cookie name.- Specified by:
getNativeName
in interfaceGenericCookie
- Returns:
- The native cookie name. The native name is the cookie name that is used in Application Server's environment. If the cookie contains namespace information, the cookie name has a special MicroStrategy's prefix.
-
getNativeValue
public java.lang.String getNativeValue()
Description copied from interface:GenericCookie
Returns the native cookie value.- Specified by:
getNativeValue
in interfaceGenericCookie
- Returns:
- The native cookie value. The native name is the cookie value that is used in Application Server's environment. If the cookie contains namespace information, the cookie value containers all the cookie value of all namespaces.
-
setSecure
public void setSecure(boolean value)
Description copied from interface:GenericCookie
Sets the security level of a cookie- Specified by:
setSecure
in interfaceGenericCookie
- Parameters:
value
- true if the client is to return the cookie only if the request is using HTTPS.- Since:
- MicroStrategy Web 9.0.0
-
isSecure
public boolean isSecure()
Description copied from interface:GenericCookie
Indicates if the client is only to return the cookie in subsequent requests if those requests use Secure Hypertext Transfer Protocol (HTTPS); The default is false.- Specified by:
isSecure
in interfaceGenericCookie
- Returns:
- true is the cookie is secure
- Since:
- MicroStrategy Web 9.0.0
-
setHttpOnly
public void setHttpOnly(boolean value)
Description copied from interface:GenericCookie
get the http only flag- Specified by:
setHttpOnly
in interfaceGenericCookie
- Since:
- Microstrategy Web Polaris
-
isHttpOnly
public boolean isHttpOnly()
Description copied from interface:GenericCookie
Set the http only flag- Specified by:
isHttpOnly
in interfaceGenericCookie
- Returns:
- true means this cookie is http only
-
-