public class OfferHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PN_LOCATION
Mbox location property name
|
static String |
PN_TESTANDTARGETCONFIG
Account-Reference property name
|
static String |
PN_THIRDPARTYID
Third-Party property name
|
static String |
RT_CAMPAIGN
Campaign resource type
|
static String |
RT_EXPERIENCE
Experience resource type
|
static String |
RT_OFFER_PROXY
Offer proxy resource type
|
static 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 String |
getCampaignName(String path)
Returns a campaign name based on a repository path, following the same rules as
getOfferName(String) |
static long |
getOfferId(Page offerPage)
Returns the offer id from Target
|
static String |
getOfferLocation(Page offerPage,
WCMMode wcmMode)
Returns the offer location as it should be sent to Adobe Target
|
static String |
getOfferName(Page offerPage,
WCMMode wcmMode)
Returns the offer name based on this offer's location.
|
static String |
getOfferName(String path)
Returns an Offer name constructed by concatenating the path and replacing
slashes (/) with dashes (-).
|
static String |
getThirdPartyCampaignId(Node contentResourceNode)
Returns the third party id for a campaign page's resource node
|
static 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(String path,
Page page)
Saves the configuration reference to the campaign page
|
static void |
setThirdPartyID(Node node,
String operation,
String thirdpartyid)
Saves or deletes the third party ID property in the provided
Node
according to the executed operation. |
public static final String PN_THIRDPARTYID
public static final String RT_CAMPAIGN
public static final String RT_EXPERIENCE
public static final String RT_TEASER
public static final String RT_OFFER_PROXY
public static final String PN_TESTANDTARGETCONFIG
public static final String PN_LOCATION
public static String getOfferName(String path)
path
- public static String getOfferName(Page offerPage, WCMMode wcmMode)
getOfferName(String)
offerPage
- the offer pagewcmMode
- the WCM mode. This is required to determine the offer locationpublic static String getCampaignName(String path)
getOfferName(String)
path
- public static void setThirdPartyID(Node node, String operation, String thirdpartyid) throws RepositoryException
Node
according to the executed operation.node
- operation
- thirdpartyid
- RepositoryException
public static String getThirdPartyID(Node node) throws RepositoryException
node
- Offer nodeRepositoryException
public static String getThirdPartyCampaignId(Node contentResourceNode) throws RepositoryException
contentResourceNode
- RepositoryException
public static void setConfigurationPath(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 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 environmentspublic static long getOfferId(Page offerPage)
offerPage
- the offer page from CQ"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"