public class OfferHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PN_LOCATION
Mbox location property name
|
static java.lang.String |
PN_TESTANDTARGETCONFIG
Account-Reference property name
|
static java.lang.String |
PN_THIRDPARTYID
Third-Party property name
|
static java.lang.String |
RT_CAMPAIGN
Campaign resource type
|
static java.lang.String |
RT_EXPERIENCE
Experience resource type
|
static java.lang.String |
RT_TEASER
Offer resource type
|
| Constructor and Description |
|---|
OfferHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Page |
getCampaign(Page page)
Returns a page with resource type
'cq/personalization/components/campaignpage'.
|
static java.lang.String |
getCampaignName(java.lang.String path)
Returns a campaign name based on a repository path, following the same rules as
getOfferName(String) |
static java.lang.String |
getOfferLocation(Page offerPage,
WCMMode wcmMode)
Returns the offer location as it should be sent to Test&Target
|
static java.lang.String |
getOfferName(java.lang.String path)
Returns an Offer name constructed by concatenating the path and replacing
slashes (/) with dashes (-).
|
static java.lang.String |
getThirdPartyCampaignId(Node contentResourceNode)
Returns the third party id for a campaign page's resource node
|
static java.lang.String |
getThirdPartyID(Node node)
Returns the third party ID of a Node if property exists, otherwise one is
generated in Timestamp format.
|
static void |
setConfigurationPath(java.lang.String path,
Page page)
Saves the configuration reference to the campaign page
|
static void |
setThirdPartyID(Node node,
java.lang.String operation,
java.lang.String thirdpartyid)
Saves or deletes the third party ID property in the provided
Node
according to the executed operation. |
public static final java.lang.String PN_THIRDPARTYID
public static final java.lang.String RT_CAMPAIGN
public static final java.lang.String RT_EXPERIENCE
public static final java.lang.String RT_TEASER
public static final java.lang.String PN_TESTANDTARGETCONFIG
public static final java.lang.String PN_LOCATION
public static java.lang.String getOfferName(java.lang.String path)
currentPage - public static java.lang.String getCampaignName(java.lang.String path)
getOfferName(String)path - public static void setThirdPartyID(Node node,
java.lang.String operation,
java.lang.String thirdpartyid)
throws RepositoryException
Node
according to the executed operation.node - operation - thirdpartyid - RepositoryExceptionpublic static java.lang.String getThirdPartyID(Node node)
throws RepositoryException
node - Offer nodeRepositoryExceptionpublic static java.lang.String getThirdPartyCampaignId(Node contentResourceNode)
throws RepositoryException
contentResourceNode - RepositoryExceptionpublic static void setConfigurationPath(java.lang.String path,
Page page)
throws AnalyticsException,
RepositoryException
path - Configuration pathpage - Current offer pageRepositoryException - in case an error occurs when node property is setAnalyticsException - is never thrownpublic static Page getCampaign(Page page)
page - Page with resource type
'cq/personalization/components/campaignpage' or initially
provided page.public static java.lang.String getOfferLocation(Page offerPage, WCMMode wcmMode)
offerPage - The offer page from CQwcmMode - The mode for which the location is calculated . Used to create different locations for author and
publish environments