public class CookieProcessor extends Object
Modifier and Type | Method and Description |
---|---|
static Map<String,com.tridion.smarttarget.query.ExperimentCookie> |
getExperimentCookies(javax.servlet.ServletRequest request)
Gets a Map of cookies indicating which variant has been shown for what Experiment to a visitor.
|
static Map<String,com.tridion.smarttarget.query.ExperimentCookie> |
getExperimentCookiesFromAmbientDataFramework()
Creates Experiment Cookies from Cookies exposed through the ClaimStore (to support cookies in REL).
|
static String |
getFallbackForExperimentCookies(Map<String,com.tridion.smarttarget.query.ExperimentCookie> experimentCookies)
Builds JavaScript code to set the cookies in case the ServletResponse output was already committed.
|
static void |
saveExperimentCookies(javax.servlet.ServletResponse response,
JspWriter writer,
Map<String,com.tridion.smarttarget.query.ExperimentCookie> experimentCookies)
Adds Experiment cookies to the ServletResponse.
|
public static Map<String,com.tridion.smarttarget.query.ExperimentCookie> getExperimentCookies(javax.servlet.ServletRequest request)
request
- the ServletRequest to read the cookies.ExperimentCookie
holding information about what chosen variant was shown.public static Map<String,com.tridion.smarttarget.query.ExperimentCookie> getExperimentCookiesFromAmbientDataFramework()
public static void saveExperimentCookies(javax.servlet.ServletResponse response, JspWriter writer, Map<String,com.tridion.smarttarget.query.ExperimentCookie> experimentCookies)
response
- the ServletResponse to add the cookies to.writer
- the JspWriter used to write out JavaScript code to set the cookies in case
the response output was already committed.experimentCookies
- * @return a Map where the key refers the the Experiment Id and the value is a
ExperimentCookie
holding information about what chosen variant was shown.public static String getFallbackForExperimentCookies(Map<String,com.tridion.smarttarget.query.ExperimentCookie> experimentCookies)
experimentCookies
- the Map of cookies to set.Copyright © 2021 RWS Group for and on behalf of its affiliates and subsidiaries. All rights reserved.