Package com.day.cq.personalization
Interface TargetedContentManager
A service which provides access to campaigns, experiences and targeted content.
-
Method Summary
Modifier and TypeMethodDescriptionfindLocations(ResourceResolver resolver, String... locationName) Finds the actual content paths for a given list of location names.getCampaignLocations(ResourceResolver resolver, String campaignPath) Retrieves the list of locations for this campaign.getCampaigns(ResourceResolver resourceResolver) Returns a list of campaigns sorted by priority.getCampaigns(ResourceResolver resolver, String location) Returns a list of campaigns which hold offers with the specifiedlocationvalue.getTeaserInfo(ResourceResolver resolver, String campaignPath, String location) Deprecated.getTeaserInfo(SlingHttpServletRequest request, String campaignPath, String location) Deprecated.usegetTeasers(SlingHttpServletRequest, String)insteadgetTeasers(ResourceResolver resolver, String location, String pageUrl) Deprecated.usegetTeasers(SlingHttpServletRequest, String)insteadgetTeasers(SlingHttpServletRequest request, String location) Returns a list of teasers that are available for a location
-
Method Details
-
getCampaigns
Returns a list of campaigns sorted by priority.- Parameters:
resourceResolver- A resourceResolver from the request (for access control).- Returns:
- returns a list of campaigns sorted by priority.
- Throws:
RepositoryException- if an error occurs during repository operations.
-
getCampaigns
Returns a list of campaigns which hold offers with the specifiedlocationvalue.- Parameters:
resolver- ResourceResolver bound to the users sessionlocation- A named destination- Returns:
- A list of campaigns holding activities offers with the specified
location - Throws:
RepositoryException- if an error occurs during repository operations.
-
findLocations
Finds the actual content paths for a given list of location names.- Parameters:
resolver- aResourceResolverused to access the repositorylocationName- one or more location names for which to retrieve the path- Returns:
- a
ListofLocationobjects an empty list if no paths were found.
-
getCampaignLocations
Retrieves the list of locations for this campaign.- Parameters:
resolver- aResourceResolverused to access the repocampaignPath- the path to the campaign- Returns:
- a
ListofLocationobjects or an empty list if the campaign doesn't have any locations (i.e . offers)
getTeasers(ResourceResolver, String, String)instead