public class AmbientDataHelper extends Object
Exposes Ambient Data Framework functionality used by SmartTarget.
This class can be used to extract values from the ClaimStore and in composing FH query string parameters.Modifier and Type | Field and Description |
---|---|
static URI |
AUDIENCE_MANAGER_KEYWORDS
AM Keywords Claim Uri.
|
static URI |
AUDIENCE_MANAGER_SEGMENTS
AM Segments Claim Uri.
|
protected static Logger |
LOG |
static URI |
ONLINEMARKETINGEXPLORER_DATA
Promotions Claim Uri.
|
static URI |
TRIGGERTYPES_URI
Defined Trigger Types Claim Uri.
|
Modifier and Type | Method and Description |
---|---|
static void |
addComponentPresentation(String secondid,
String compuri,
String tempuri,
String region,
String promoId,
String promoName,
String promoTitle,
String promoSlogan)
Call this whenever a componentpresentaion is known to be outputted to the page.
|
protected static String |
createTriggerName(URI uri)
Gets the trigger name from a ClaimStore value URI.
|
protected static Map |
getOmeData() |
static Map<String,List<String>> |
getTriggerMap(Map<URI,Object> claims)
This method returns additional triggers to use in a Fredhopper query string.
|
static String |
getTriggers(com.tridion.ambientdata.claimstore.ClaimStore claimStore)
This method returns the SmartTarget Triggers found on the specified ClaimStore.
|
static String |
getTriggers(Map<URI,Object> claims)
This method returns additional triggers to use in a Fredhopper query string.
|
static void |
initializeOmeData()
Call this method when starting to loop over promotions/items.
|
static void |
invalidateTriggerTypes(com.tridion.ambientdata.claimstore.ClaimStore claimStore)
Deprecated.
Trigger types are no longer stored in the claim store so there is no need to invalidate them.
|
static void |
writeOmeData()
Call this method when you are done looping over promotions/items.
|
public static final URI TRIGGERTYPES_URI
public static final URI ONLINEMARKETINGEXPLORER_DATA
public static final URI AUDIENCE_MANAGER_KEYWORDS
public static final URI AUDIENCE_MANAGER_SEGMENTS
protected static final Logger LOG
public static String getTriggers(Map<URI,Object> claims)
This method returns additional triggers to use in a Fredhopper query string.
The triggers get their values from the Ambient Data Framework ClaimStore, and are only added if a matching trigger has been configured in Fredhopper.claims
- map of all entries in the Claim Store. Can be retrieved by calling ClaimStore.fromSession().
getAll().public static Map<String,List<String>> getTriggerMap(Map<URI,Object> claims)
This method returns additional triggers to use in a Fredhopper query string.
The triggers get their values from the Ambient Data Framework ClaimStore, and are only added if a matching trigger has been configured in Fredhopper.claims
- map of all entries in the Claim Store. Can be retrieved by calling ClaimStore.fromSession().
getAll().public static String getTriggers(com.tridion.ambientdata.claimstore.ClaimStore claimStore)
claimStore
- actual ClaimStore object. ClaimStore can be retrieved by calling ClaimStore.fromSession()@Deprecated public static void invalidateTriggerTypes(com.tridion.ambientdata.claimstore.ClaimStore claimStore)
claimStore
- The ClaimStore to remove the TriggerTypes from.protected static String createTriggerName(URI uri)
Gets the trigger name from a ClaimStore value URI.
uri
- the URI of the key in the ClaimStore.protected static Map getOmeData()
public static void initializeOmeData()
public static void writeOmeData()
public static void addComponentPresentation(String secondid, String compuri, String tempuri, String region, String promoId, String promoName, String promoTitle, String promoSlogan)
secondid
- the secondid of the itemcompuri
- its component uritempuri
- its template uriregion
- the region in which the cp will be shownpromoId
- the Id of the Promotion in which the item will be shownpromoName
- the Name of the Promotion in which the item will be shownpromoTitle
- the title of the Promotion in which the item will be shownpromoSlogan
- the Slogan of the Promotion in which the item will be shownCopyright © 2021 RWS Group for and on behalf of its affiliates and subsidiaries. All rights reserved.