@Service(value="blContentTargeterService") public class ContentTargeterServiceImpl extends Object implements ContentTargeterService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AND |
protected ContentTargeterDao |
contentTargeterDao |
protected ContentTargeterResolverExtensionManager |
extensionManager |
protected org.broadleafcommerce.common.sandbox.SandBoxHelper |
sandBoxHelper |
| Constructor and Description |
|---|
ContentTargeterServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildQualifyingItemCriteriaExpression(ContentTargeter targeter) |
protected String |
buildRuleExpression(ContentTargeter targeter) |
protected ContentItem |
findContentItemForTargeter(ContentTargeter targeter,
ContentZone zone) |
ContentTargetingActionXref |
findContentTargetingActionXrefById(Long id)
Returns the ContentTargetingActionXref associated with the passed in id.
|
List<ContentTargetingAction> |
findFieldActionsForPage(org.broadleafcommerce.cms.page.domain.Page page)
Returns contentTargetingActions associated with the passedin page.
|
protected List<ContentTargetingAction> |
findPageActionsForTargeter(ContentTargeter targeter) |
protected EmailTemplate |
findReplacementEmailTemplateForTargeter(ContentTargeter targeter) |
protected org.broadleafcommerce.cms.page.domain.Page |
findReplacementPageForTargeter(ContentTargeter targeter) |
protected SMSTemplate |
findReplacementSmsTemplateForTargeter(ContentTargeter targeter) |
protected com.broadleafcommerce.theme.domain.ThemeConfiguration |
findReplacementThemeConfigurationForTargeter(ContentTargeter targeter) |
protected com.broadleafcommerce.theme.domain.ThemeFile |
findReplacementThemeFileForTargeter(ContentTargeter targeter) |
ContentItem |
findTargetedContentItemForZone(ContentZone zone)
Returns the contentItem if any found for the passed in zone.
|
EmailTemplate |
findTargetedReplacementEmailTemplate(EmailTemplate emailTemplate)
If a targeter has been setup for the passed in email template with an action type of
ContentTargetingActionType.CHANGE_EMAIL_TEMPLATE, then the new email template will be returned. |
com.broadleafcommerce.theme.domain.ThemeFile |
findTargetedReplacementForTemplatePath(String path)
If a targeter has been setup for the passed in page with an action type of
ContentTargetingActionType.CHANGE_TEMPLATE, then the new template will be returned. |
org.broadleafcommerce.cms.page.domain.Page |
findTargetedReplacementPage(org.broadleafcommerce.cms.page.domain.Page page)
If a targeter has been setup for the passed in page with an action type of
ContentTargetingActionType.CHANGE_PAGE, then the new page will be returned. |
SMSTemplate |
findTargetedReplacementSmsTemplate(SMSTemplate smsTemplate) |
com.broadleafcommerce.theme.domain.ThemeConfiguration |
findTargetedReplacementThemeConfiguration()
If a targeter has been setup for the passed in page with an action type of
ContentTargetingActionType.CHANGE_THEME, then the new ThemeConfiguration will
be returned. |
protected boolean |
hasChangeEmailTemplateAction(ContentTargetingAction targetingAction) |
protected boolean |
hasChangePageAction(ContentTargetingAction targetingAction) |
protected boolean |
hasChangeSmsTemplateAction(ContentTargetingAction targetingAction) |
protected boolean |
hasChangeThemeAction(ContentTargetingAction targetingAction) |
protected boolean |
hasChangeThemeFileAction(ContentTargetingAction targetingAction) |
protected boolean |
hasContentItem(ContentTargetingAction targetingAction,
ContentZone zone) |
protected boolean |
hasPageFieldAction(ContentTargetingAction targetingAction) |
protected boolean |
hasValidSegments(ContentTargeter targeter) |
protected boolean |
isActive(Object statusObject)
When using enterprise, ThemeConfig will implement status.
|
boolean |
targeterPassesRules(ContentTargeter targeter,
Map<String,Object> ruleDTOs)
Check if a ContentTargeter passes the given rules
|
protected ContentTargeterDao contentTargeterDao
protected ContentTargeterResolverExtensionManager extensionManager
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
protected static String AND
public ContentItem findTargetedContentItemForZone(ContentZone zone)
ContentTargeterServicefindTargetedContentItemForZone in interface ContentTargeterServiceprotected boolean hasValidSegments(ContentTargeter targeter)
public List<ContentTargetingAction> findFieldActionsForPage(org.broadleafcommerce.cms.page.domain.Page page)
ContentTargeterServicefindFieldActionsForPage in interface ContentTargeterServicepublic org.broadleafcommerce.cms.page.domain.Page findTargetedReplacementPage(org.broadleafcommerce.cms.page.domain.Page page)
ContentTargeterServiceContentTargetingActionType.CHANGE_PAGE, then the new page will be returned.
Otherwise, returns null.findTargetedReplacementPage in interface ContentTargeterServicepublic com.broadleafcommerce.theme.domain.ThemeFile findTargetedReplacementForTemplatePath(String path)
ContentTargeterServiceContentTargetingActionType.CHANGE_TEMPLATE, then the new template will be returned.
Otherwise, returns null.findTargetedReplacementForTemplatePath in interface ContentTargeterServicepublic com.broadleafcommerce.theme.domain.ThemeConfiguration findTargetedReplacementThemeConfiguration()
ContentTargeterServiceContentTargetingActionType.CHANGE_THEME, then the new ThemeConfiguration will
be returned.
Otherwise, returns null.findTargetedReplacementThemeConfiguration in interface ContentTargeterServicepublic EmailTemplate findTargetedReplacementEmailTemplate(EmailTemplate emailTemplate)
ContentTargeterServiceContentTargetingActionType.CHANGE_EMAIL_TEMPLATE, then the new email template will be returned.
Otherwise, returns null.findTargetedReplacementEmailTemplate in interface ContentTargeterServicepublic SMSTemplate findTargetedReplacementSmsTemplate(SMSTemplate smsTemplate)
findTargetedReplacementSmsTemplate in interface ContentTargeterServiceprotected boolean isActive(Object statusObject)
statusObject - public boolean targeterPassesRules(ContentTargeter targeter, Map<String,Object> ruleDTOs)
ContentTargeterServicetargeterPassesRules in interface ContentTargeterServicepublic ContentTargetingActionXref findContentTargetingActionXrefById(Long id)
ContentTargeterServicefindContentTargetingActionXrefById in interface ContentTargeterServiceid - - The id of the content targeting action xref.protected String buildQualifyingItemCriteriaExpression(ContentTargeter targeter)
protected String buildRuleExpression(ContentTargeter targeter)
protected ContentItem findContentItemForTargeter(ContentTargeter targeter, ContentZone zone)
protected boolean hasContentItem(ContentTargetingAction targetingAction, ContentZone zone)
protected List<ContentTargetingAction> findPageActionsForTargeter(ContentTargeter targeter)
protected boolean hasPageFieldAction(ContentTargetingAction targetingAction)
protected org.broadleafcommerce.cms.page.domain.Page findReplacementPageForTargeter(ContentTargeter targeter)
protected com.broadleafcommerce.theme.domain.ThemeConfiguration findReplacementThemeConfigurationForTargeter(ContentTargeter targeter)
protected com.broadleafcommerce.theme.domain.ThemeFile findReplacementThemeFileForTargeter(ContentTargeter targeter)
protected EmailTemplate findReplacementEmailTemplateForTargeter(ContentTargeter targeter)
protected SMSTemplate findReplacementSmsTemplateForTargeter(ContentTargeter targeter)
protected boolean hasChangePageAction(ContentTargetingAction targetingAction)
protected boolean hasChangeThemeAction(ContentTargetingAction targetingAction)
protected boolean hasChangeThemeFileAction(ContentTargetingAction targetingAction)
protected boolean hasChangeEmailTemplateAction(ContentTargetingAction targetingAction)
protected boolean hasChangeSmsTemplateAction(ContentTargetingAction targetingAction)
Copyright © 2020. All rights reserved.