@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)
ContentTargeterService
findTargetedContentItemForZone
in interface ContentTargeterService
protected boolean hasValidSegments(ContentTargeter targeter)
public List<ContentTargetingAction> findFieldActionsForPage(org.broadleafcommerce.cms.page.domain.Page page)
ContentTargeterService
findFieldActionsForPage
in interface ContentTargeterService
public org.broadleafcommerce.cms.page.domain.Page findTargetedReplacementPage(org.broadleafcommerce.cms.page.domain.Page page)
ContentTargeterService
ContentTargetingActionType.CHANGE_PAGE
, then the new page will be returned.
Otherwise, returns null.findTargetedReplacementPage
in interface ContentTargeterService
public com.broadleafcommerce.theme.domain.ThemeFile findTargetedReplacementForTemplatePath(String path)
ContentTargeterService
ContentTargetingActionType.CHANGE_TEMPLATE
, then the new template will be returned.
Otherwise, returns null.findTargetedReplacementForTemplatePath
in interface ContentTargeterService
public com.broadleafcommerce.theme.domain.ThemeConfiguration findTargetedReplacementThemeConfiguration()
ContentTargeterService
ContentTargetingActionType.CHANGE_THEME
, then the new ThemeConfiguration
will
be returned.
Otherwise, returns null.findTargetedReplacementThemeConfiguration
in interface ContentTargeterService
public EmailTemplate findTargetedReplacementEmailTemplate(EmailTemplate emailTemplate)
ContentTargeterService
ContentTargetingActionType.CHANGE_EMAIL_TEMPLATE
, then the new email template will be returned.
Otherwise, returns null.findTargetedReplacementEmailTemplate
in interface ContentTargeterService
public SMSTemplate findTargetedReplacementSmsTemplate(SMSTemplate smsTemplate)
findTargetedReplacementSmsTemplate
in interface ContentTargeterService
protected boolean isActive(Object statusObject)
statusObject
- public boolean targeterPassesRules(ContentTargeter targeter, Map<String,Object> ruleDTOs)
ContentTargeterService
targeterPassesRules
in interface ContentTargeterService
public ContentTargetingActionXref findContentTargetingActionXrefById(Long id)
ContentTargeterService
findContentTargetingActionXrefById
in interface ContentTargeterService
id
- - 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.