@Repository(value="blContentZoneService") public class ContentZoneServiceImpl extends Object implements ContentZoneService
Modifier and Type | Field and Description |
---|---|
protected static String |
CAHCE_KEY_LOCALE |
protected ContentItemService |
contentItemService |
protected ContentTargeterService |
contentTargeterService |
protected ContentZoneDao |
contentZoneDao |
protected ContentZoneServiceExtensionManager |
extensionManager |
protected static String |
FOREIGN_LOOKUP |
protected org.broadleafcommerce.common.dao.GenericEntityDao |
genericDao |
protected OverrideContentService |
overrideContentService |
protected ContentZoneQueryExtensionHandler |
queryExtensionManager |
protected org.broadleafcommerce.common.cache.StatisticsService |
statisticsService |
protected static String |
STRUCTURED_CONTENT_MAP_CACHE_HIT_RATE |
protected net.sf.ehcache.Cache |
structuredContentMapCache |
protected org.broadleafcommerce.cms.structure.service.StructuredContentService |
structuredContentService |
Constructor and Description |
---|
ContentZoneServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMasterStructuredContentDTOsToCache(ContentItemDTO contentItemDto,
ContentItem item,
boolean secure) |
protected void |
addStructuredContentDTOsToCache(ContentItemDTO contentItemDto,
ContentItem item,
boolean secure) |
protected String |
buildCacheKey(ContentItem contentItem)
Build the cache key using sandbox original item id.
|
protected String |
buildCacheKey(ContentItemDTO contentItemDto,
ContentItem item)
Build the cache key using the current item's id.
|
protected void |
buildCiDtos(ContentItemDTO ciDto,
boolean secure,
ContentItem ci,
Object translationBase) |
protected void |
buildCiMasterDtos(ContentItemDTO ciDto,
boolean secure,
ContentItem ci,
Object translationBase) |
protected String |
buildMapKey(ContentItemDTO contentItemDto,
boolean secure,
org.broadleafcommerce.common.web.BroadleafRequestContext context) |
protected String |
buildMasterMapKey(ContentItemDTO contentItemDto,
boolean secure,
org.broadleafcommerce.common.web.BroadleafRequestContext context) |
protected ContentItemDTO |
createContentItemDto(ContentItem contentItem)
Creates the
ContentItemDTO given a contentItem. |
List<ContentZone> |
findAllContentZonesUsingDefinition(ContentZoneDefinition contentZoneDefinition) |
ContentItemDTO |
findContentItemDTOForZoneName(String name,
boolean secure)
Returns the
ContentItemDTO associated with the given zone name |
ContentItemDTO |
findContentItemDTOForZoneName(String name,
boolean secure,
Map<String,Object> args)
Returns the
ContentItemDTO associated with the given zone name and extra arguments. |
ContentZone |
findContentZoneById(Long id) |
ContentZone |
findContentZoneByName(String name)
Returns the
ContentZone associated with the given name |
ContentZoneDefinition |
findContentZoneDefinitionById(Long id) |
List<ContentZoneDefinition> |
findContentZoneDefinitionsAllowingWidget(Widget widget) |
protected String |
getCacheKey(String cacheKey,
org.broadleafcommerce.common.extension.ResultType resultType) |
protected org.broadleafcommerce.common.extension.ResultType |
getResultType(Object object) |
protected org.broadleafcommerce.common.structure.dto.StructuredContentDTO |
getStructuredContentDTO(boolean secure,
Object translationBase,
org.broadleafcommerce.cms.structure.domain.StructuredContent sc) |
protected net.sf.ehcache.Cache |
getStructuredContentMapCache() |
protected ContentItem |
lookupContentItemForZone(ContentZone cz) |
protected List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
lookupStructuredContentDTOsFromCache(ContentItemDTO contentItemDto,
ContentItem item,
boolean secure) |
boolean |
removeStructuredContentDTOsFromCache(ContentItem contentItem)
Deprecated.
|
ContentZone |
saveContentZone(ContentZone contentZone)
Saves the given
ContentZone and returns the saved version |
protected void |
sortDTOsByPriority(List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> dtos) |
protected static final String FOREIGN_LOOKUP
protected static final String STRUCTURED_CONTENT_MAP_CACHE_HIT_RATE
protected static final String CAHCE_KEY_LOCALE
protected ContentZoneDao contentZoneDao
protected OverrideContentService overrideContentService
protected ContentTargeterService contentTargeterService
protected ContentItemService contentItemService
protected ContentZoneServiceExtensionManager extensionManager
protected ContentZoneQueryExtensionHandler queryExtensionManager
protected org.broadleafcommerce.common.dao.GenericEntityDao genericDao
protected org.broadleafcommerce.cms.structure.service.StructuredContentService structuredContentService
protected org.broadleafcommerce.common.cache.StatisticsService statisticsService
protected net.sf.ehcache.Cache structuredContentMapCache
public ContentZone findContentZoneByName(String name)
ContentZoneService
ContentZone
associated with the given namefindContentZoneByName
in interface ContentZoneService
ContentZone
public ContentZone saveContentZone(ContentZone contentZone)
ContentZoneService
ContentZone
and returns the saved versionsaveContentZone
in interface ContentZoneService
ContentZone
public ContentItemDTO findContentItemDTOForZoneName(String name, boolean secure)
ContentZoneService
ContentItemDTO
associated with the given zone namefindContentItemDTOForZoneName
in interface ContentZoneService
secure
- Some ContentItems contain HTML with URLs that must be modified based on HTTP or HTTPSContentItemDTO
protected String buildCacheKey(ContentItemDTO contentItemDto, ContentItem item)
contentItemDto
- protected String buildCacheKey(ContentItem contentItem)
contentItem
- protected String getCacheKey(String cacheKey, org.broadleafcommerce.common.extension.ResultType resultType)
protected org.broadleafcommerce.common.extension.ResultType getResultType(Object object)
protected String buildMasterMapKey(ContentItemDTO contentItemDto, boolean secure, org.broadleafcommerce.common.web.BroadleafRequestContext context)
protected String buildMapKey(ContentItemDTO contentItemDto, boolean secure, org.broadleafcommerce.common.web.BroadleafRequestContext context)
protected List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> lookupStructuredContentDTOsFromCache(ContentItemDTO contentItemDto, ContentItem item, boolean secure)
protected void addStructuredContentDTOsToCache(ContentItemDTO contentItemDto, ContentItem item, boolean secure)
protected void addMasterStructuredContentDTOsToCache(ContentItemDTO contentItemDto, ContentItem item, boolean secure)
protected net.sf.ehcache.Cache getStructuredContentMapCache()
@Deprecated public boolean removeStructuredContentDTOsFromCache(ContentItem contentItem)
ContentZoneService
removeStructuredContentDTOsFromCache
in interface ContentZoneService
public ContentItemDTO findContentItemDTOForZoneName(String name, boolean secure, Map<String,Object> args)
ContentZoneService
ContentItemDTO
associated with the given zone name and extra arguments.findContentItemDTOForZoneName
in interface ContentZoneService
secure
- Some ContentItems contain HTML with URLs that must be modified based on HTTP or HTTPSargs
- - additional arguments that an implementation might want to use to more specifically find a ContentItemContentItemDTO
protected void buildCiDtos(ContentItemDTO ciDto, boolean secure, ContentItem ci, Object translationBase)
protected void buildCiMasterDtos(ContentItemDTO ciDto, boolean secure, ContentItem ci, Object translationBase)
protected org.broadleafcommerce.common.structure.dto.StructuredContentDTO getStructuredContentDTO(boolean secure, Object translationBase, org.broadleafcommerce.cms.structure.domain.StructuredContent sc)
protected void sortDTOsByPriority(List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> dtos)
protected ContentItem lookupContentItemForZone(ContentZone cz)
protected ContentItemDTO createContentItemDto(ContentItem contentItem)
ContentItemDTO
given a contentItem.public List<ContentZoneDefinition> findContentZoneDefinitionsAllowingWidget(Widget widget)
findContentZoneDefinitionsAllowingWidget
in interface ContentZoneService
ContentZoneDefinition
s that allow the given Widgetpublic List<ContentZone> findAllContentZonesUsingDefinition(ContentZoneDefinition contentZoneDefinition)
findAllContentZonesUsingDefinition
in interface ContentZoneService
ContentZone
s that are using the given ContentZoneDefinitionpublic ContentZoneDefinition findContentZoneDefinitionById(Long id)
findContentZoneDefinitionById
in interface ContentZoneService
ContentZoneDefinition
matching the given idpublic ContentZone findContentZoneById(Long id)
findContentZoneById
in interface ContentZoneService
ContentZone
matching the given idCopyright © 2020. All rights reserved.