public class ContextSessionPersistence
extends java.lang.Object
Constructor and Description |
---|
ContextSessionPersistence() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
get(SlingHttpServletRequest request,
java.lang.String key)
Returns the value from the default session persistence cookie for the
specified
key . |
static java.lang.String |
get(SlingHttpServletRequest request,
java.lang.String key,
SlingSettingsService settingsService)
Deprecated.
since 5.6. Use
get(org.apache.sling.api.SlingHttpServletRequest, String)
instead. |
static java.lang.String |
get(SlingHttpServletRequest request,
java.lang.String key,
java.lang.String cookieName)
Returns the value from the specified
cookieName cookie for the
specified key . |
static java.lang.String |
getCookieName()
Return the name of the default session persistence cookie.
|
static java.lang.String |
getCookieName(SlingSettingsService settingsService)
Deprecated.
since 5.6. Use
getCookieName() instead. |
static java.lang.String |
getCookieName(java.lang.String cookiePrefix,
SlingSettingsService settingsService)
Deprecated.
since 5.6. Use
getCookieName() instead. |
static java.lang.String |
getMap(SlingHttpServletRequest request)
Returns a key/value map of the default session persistence cookie.
|
static java.lang.String |
getMap(SlingHttpServletRequest request,
SlingSettingsService settingsService)
Deprecated.
since 5.6. Use
getMap(org.apache.sling.api.SlingHttpServletRequest)
instead. |
static java.lang.String |
getMap(SlingHttpServletRequest request,
java.lang.String cookieName)
Returns a key/value map of named cookie.
|
static java.util.Map<java.lang.String,java.lang.String> |
getStore(SlingHttpServletRequest request,
java.lang.String key)
Return a single store (by its key) from the default session persistence
cookie.
|
static java.util.Map<java.lang.String,java.lang.String> |
getStore(SlingHttpServletRequest request,
java.lang.String key,
SlingSettingsService settingsService)
Deprecated.
since 5.6. Use
getStore(org.apache.sling.api.SlingHttpServletRequest, String)
instead. |
static java.util.Map<java.lang.String,java.lang.String> |
getStore(SlingHttpServletRequest request,
java.lang.String key,
java.lang.String cookieName)
Return a single store (by its key) from a named cookie.
|
static void |
put(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.lang.String key,
java.lang.String value)
Add a name/value pair to the default session persistence cookie.
|
static void |
put(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.lang.String key,
java.lang.String value,
SlingSettingsService settingsService)
Deprecated.
|
static void |
put(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.lang.String key,
java.lang.String value,
java.lang.String cookieName)
Add a name/value pair to a named cookie.
|
static void |
putStore(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> store)
Persists a single store under the given key.
|
static void |
putStore(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> store,
SlingSettingsService settingsService)
Deprecated.
|
static void |
putStores(SlingHttpServletRequest request,
SlingHttpServletResponse response,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> stores,
java.lang.String cookieName)
Put multiple stores at once without overwriting stores previously put to
response.
|
public static java.lang.String get(SlingHttpServletRequest request, java.lang.String key, SlingSettingsService settingsService)
get(org.apache.sling.api.SlingHttpServletRequest, String)
instead.key
.request
- The SlingHttpServletRequestkey
- KeysettingsService
- The SlingSettingsServicepublic static java.lang.String get(SlingHttpServletRequest request, java.lang.String key)
key
.request
- The SlingHttpServletRequestkey
- Keypublic static java.lang.String get(SlingHttpServletRequest request, java.lang.String key, java.lang.String cookieName)
cookieName cookie
for the
specified key
.request
- The SlingHttpServletRequestkey
- KeycookieName
- Cookie namepublic static java.lang.String getMap(SlingHttpServletRequest request, SlingSettingsService settingsService)
getMap(org.apache.sling.api.SlingHttpServletRequest)
instead.request
- The SlingHttpServletRequestsettingsService
- The SlingSettingsServicepublic static java.lang.String getMap(SlingHttpServletRequest request)
request
- The SlingHttpServletRequestpublic static java.lang.String getMap(SlingHttpServletRequest request, java.lang.String cookieName)
request
- The SlingHTTPServletRequestcookieName
- Cookie namepublic static void put(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String key, java.lang.String value, SlingSettingsService settingsService)
put(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse, String, String)
instead.request
- The SlingHTTPServletRequestresponse
- The SlingHTTPServletResponsekey
- Keyvalue
- ValuesettingsService
- The SlingSettingsServicepublic static void put(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String key, java.lang.String value)
request
- The SlingHTTPServletRequestresponse
- The SlingHTTPServletResponsekey
- Keyvalue
- Valuepublic static void put(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String key, java.lang.String value, java.lang.String cookieName)
request
- The SlingHTTPServletRequestresponse
- The SlingHTTPServletResponsekey
- Keyvalue
- ValuecookieName
- Cookie namepublic static java.util.Map<java.lang.String,java.lang.String> getStore(SlingHttpServletRequest request, java.lang.String key, SlingSettingsService settingsService)
getStore(org.apache.sling.api.SlingHttpServletRequest, String)
instead.request
- The SlingHTTPServletRequestkey
- Key referencing the storesettingsService
- The SlingSettingsServicepublic static java.util.Map<java.lang.String,java.lang.String> getStore(SlingHttpServletRequest request, java.lang.String key)
request
- The SlingHttpServletRequestkey
- Key referencing the storepublic static java.util.Map<java.lang.String,java.lang.String> getStore(SlingHttpServletRequest request, java.lang.String key, java.lang.String cookieName)
request
- The SlingHttpServletRequestkey
- Key referencing the storecookieName
- Cookie namepublic static void putStore(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> store, SlingSettingsService settingsService)
putStore(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse, String, java.util.Map)
instead.request
- The SlingHttpServletRequestresponse
- The SlingHttpServletResponsekey
- Keystore
- A map representing the storesettingsService
- The SlingSettingsServicepublic static void putStore(SlingHttpServletRequest request, SlingHttpServletResponse response, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> store)
Note: Don't use this method to persist multiple stores. Use
putStores(SlingHttpServletRequest, SlingHttpServletResponse, Map, String)
instead.
request
- The SlingHttpServletRequestresponse
- The SlingHttpServletResponsekey
- Keystore
- A map representing the storepublic static void putStores(SlingHttpServletRequest request, SlingHttpServletResponse response, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> stores, java.lang.String cookieName)
request
- The requestresponse
- The responsestores
- The map of storescookieName
- The cookie's namepublic static java.lang.String getCookieName()
public static java.lang.String getCookieName(SlingSettingsService settingsService)
getCookieName()
instead.settingsService
- The SlingSettingsServicepublic static java.lang.String getCookieName(java.lang.String cookiePrefix, SlingSettingsService settingsService)
getCookieName()
instead.cookiePrefix
- The cookie prefixsettingsService
- The SlingSettingsService"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"