java.lang.Object | |
↳ | com.atlassian.jira.web.util.CookieUtils |
This class handles utility methods for managing HTTP cookies.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | JSESSIONID | session id cookie name |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get path for newly created cookie.
| |||||||||||
Creat cookie with path reflecting the context path of currentRequest.
| |||||||||||
Get value of cookie with given cookieName from currentRequest, or
null ,
if the request does not have such cookie. | |||||||||||
Gets the session id as a string from the given array of Cookie objects if only one
JSESSIONID cookie is
found. | |||||||||||
Returns true if one or more cookies with name of
JSESSIONID is found. | |||||||||||
Parse the key/value pairs out of a conglomerate cookie.
| |||||||||||
Adds a new
JSESSIONID cookie to the HTTP response if the given sessionId is not null. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get path for newly created cookie.
httpServletRequest | current request |
---|
Creat cookie with path reflecting the context path of currentRequest.
name | new cookie's name |
---|---|
value | new cookie's value |
currentRequest | current request |
Get value of cookie with given cookieName from currentRequest, or null
,
if the request does not have such cookie.
cookieName | name of the cookie to retrieve |
---|---|
currentRequest | current request |
null
, if no cookie with such name exists
Gets the session id as a string from the given array of Cookie objects if only one JSESSIONID
cookie is
found. If none or more than one JSESSIONID
cookies are found, returns null.
cookies | the cookies. |
---|
Returns true if one or more cookies with name of JSESSIONID
is found.
cookies | an array of Cookie objects |
---|
Parse the key/value pairs out of a conglomerate cookie.
The returned map will not contain empty values (zero length strings: they are discarded).
cookieName | the name of the cookie |
---|---|
currentRequest | current request |
Adds a new JSESSIONID
cookie to the HTTP response if the given sessionId is not null. No cookie is set
if given sessionId is null.
request | HTTP request |
---|---|
response | HTTP response |
sessionId | session ID to set as a value of the cookie |