@Service(value="blPageService") public class PageServiceImpl extends Object implements PageService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AND |
protected PageServiceExtensionManager |
extensionManager |
protected org.broadleafcommerce.common.locale.service.LocaleService |
localeService |
protected static org.apache.commons.logging.Log |
LOG |
protected org.broadleafcommerce.common.page.dto.PageDTO |
NULL_PAGE |
protected net.sf.ehcache.Cache |
pageCache |
protected PageDao |
pageDao |
protected net.sf.ehcache.Cache |
pageMapCache |
protected List<org.broadleafcommerce.common.rule.RuleProcessor<org.broadleafcommerce.common.page.dto.PageDTO>> |
pageRuleProcessors |
protected PageServiceUtility |
pageServiceUtility |
protected StaticAssetService |
staticAssetService |
protected org.broadleafcommerce.common.cache.StatisticsService |
statisticsService |
protected org.broadleafcommerce.common.template.TemplateOverrideExtensionManager |
templateOverrideManager |
protected net.sf.ehcache.Cache |
uriCachedDateCache |
| Constructor and Description |
|---|
PageServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCachedDate(String key) |
protected void |
addPageListToCache(List<org.broadleafcommerce.common.page.dto.PageDTO> pageList,
String identifier,
org.broadleafcommerce.common.locale.domain.Locale locale,
boolean secure) |
protected void |
addPageListToPageDTOList(List<Page> pageList,
boolean secure,
List<org.broadleafcommerce.common.page.dto.PageDTO> dtoList) |
protected void |
addPageMapCacheEntry(String identifier,
String key) |
protected String |
buildKey(String identifier,
org.broadleafcommerce.common.locale.domain.Locale locale,
Boolean secure) |
List<org.broadleafcommerce.common.page.dto.PageDTO> |
buildPageDTOList(List<Page> pageList,
boolean secure,
String identifier,
org.broadleafcommerce.common.locale.domain.Locale locale)
Builds a list of
PageDTO objects from the given list of Page objects and caches the list |
protected List<org.broadleafcommerce.common.page.dto.PageDTO> |
buildPageDTOListUsingCache(List<Page> pageList,
String identifier,
org.broadleafcommerce.common.locale.domain.Locale locale,
boolean secure) |
protected List<org.broadleafcommerce.common.page.dto.PageDTO> |
copyDTOList(List<org.broadleafcommerce.common.page.dto.PageDTO> dtoList) |
protected org.broadleafcommerce.common.page.dto.PageDTO |
evaluatePageRules(List<org.broadleafcommerce.common.page.dto.PageDTO> pageDTOList,
org.broadleafcommerce.common.locale.domain.Locale locale,
Map<String,Object> ruleDTOs) |
protected org.broadleafcommerce.common.locale.domain.Locale |
findLanguageOnlyLocale(org.broadleafcommerce.common.locale.domain.Locale locale) |
Page |
findPageById(Long pageId)
Returns the page with the passed in id.
|
org.broadleafcommerce.common.page.dto.PageDTO |
findPageByURI(org.broadleafcommerce.common.locale.domain.Locale locale,
String uri,
Map<String,Object> ruleDTOs,
boolean secure)
Looks up the page from the backend datastore.
|
Map<String,PageField> |
findPageFieldMapByPageId(Long pageId)
Returns the page-fields associated with a page.
|
PageTemplate |
findPageTemplateById(Long id)
Returns the page template with the passed in id.
|
protected Date |
getCachedDate(String key) |
protected List<org.broadleafcommerce.common.page.dto.PageDTO> |
getCachedPageDTOList(List<Page> pageList,
String identifier,
org.broadleafcommerce.common.locale.domain.Locale locale,
boolean secure) |
net.sf.ehcache.Cache |
getPageCache() |
protected List<org.broadleafcommerce.common.page.dto.PageDTO> |
getPageDTOListForURI(org.broadleafcommerce.common.locale.domain.Locale locale,
String uri,
boolean secure) |
protected List<org.broadleafcommerce.common.page.dto.PageDTO> |
getPageListFromCache(String key) |
net.sf.ehcache.Cache |
getPageMapCache() |
String |
getPageMapCacheKey(String uri,
Long site) |
net.sf.ehcache.Cache |
getUriCachedDateCache() |
protected boolean |
passesPageRules(org.broadleafcommerce.common.page.dto.PageDTO page,
Map<String,Object> ruleDTOs) |
List<Page> |
readAllPages()
Returns all pages, regardless of any sandbox they are apart of
|
List<PageTemplate> |
readAllPageTemplates()
Returns all page templates, regardless of any sandbox they are apart of
|
Boolean |
removePageFromCache(String mapKey)
Call to evict all known PageDTOs that are associated with the given page from cache
|
PageTemplate |
savePageTemplate(PageTemplate template)
Saves the given
PageTemplate |
protected static final org.apache.commons.logging.Log LOG
protected static String AND
protected PageDao pageDao
protected List<org.broadleafcommerce.common.rule.RuleProcessor<org.broadleafcommerce.common.page.dto.PageDTO>> pageRuleProcessors
protected org.broadleafcommerce.common.locale.service.LocaleService localeService
protected StaticAssetService staticAssetService
protected org.broadleafcommerce.common.cache.StatisticsService statisticsService
protected org.broadleafcommerce.common.template.TemplateOverrideExtensionManager templateOverrideManager
protected PageServiceUtility pageServiceUtility
protected PageServiceExtensionManager extensionManager
protected net.sf.ehcache.Cache pageCache
protected net.sf.ehcache.Cache pageMapCache
protected net.sf.ehcache.Cache uriCachedDateCache
protected final org.broadleafcommerce.common.page.dto.PageDTO NULL_PAGE
public Page findPageById(Long pageId)
PageServicefindPageById in interface PageServicepageId - - The id of the page.public Map<String,PageField> findPageFieldMapByPageId(Long pageId)
PageServicefindPageFieldMapByPageId in interface PageServicepublic PageTemplate findPageTemplateById(Long id)
PageServicefindPageTemplateById in interface PageServiceid - - the id of the page template@Transactional(value="blTransactionManager") public PageTemplate savePageTemplate(PageTemplate template)
PageServicePageTemplatesavePageTemplate in interface PageServicetemplate - the PageTemplate to savePageTemplatepublic org.broadleafcommerce.common.page.dto.PageDTO findPageByURI(org.broadleafcommerce.common.locale.domain.Locale locale,
String uri,
Map<String,Object> ruleDTOs,
boolean secure)
PageServicefindPageByURI in interface PageServicelocale - - current localeuri - - the URI to return a page forruleDTOs - - ruleDTOs that are used as the data to process page rulessecure - - set to true if current request is over HTTPSprotected List<org.broadleafcommerce.common.page.dto.PageDTO> getPageDTOListForURI(org.broadleafcommerce.common.locale.domain.Locale locale, String uri, boolean secure)
protected void addCachedDate(String key)
public List<org.broadleafcommerce.common.page.dto.PageDTO> buildPageDTOList(List<Page> pageList, boolean secure, String identifier, org.broadleafcommerce.common.locale.domain.Locale locale)
PageServicePageDTO objects from the given list of Page objects and caches the listbuildPageDTOList in interface PageServiceprotected List<org.broadleafcommerce.common.page.dto.PageDTO> buildPageDTOListUsingCache(List<Page> pageList, String identifier, org.broadleafcommerce.common.locale.domain.Locale locale, boolean secure)
protected List<org.broadleafcommerce.common.page.dto.PageDTO> getCachedPageDTOList(List<Page> pageList, String identifier, org.broadleafcommerce.common.locale.domain.Locale locale, boolean secure)
protected void addPageListToPageDTOList(List<Page> pageList, boolean secure, List<org.broadleafcommerce.common.page.dto.PageDTO> dtoList)
protected List<org.broadleafcommerce.common.page.dto.PageDTO> getPageListFromCache(String key)
protected void addPageListToCache(List<org.broadleafcommerce.common.page.dto.PageDTO> pageList, String identifier, org.broadleafcommerce.common.locale.domain.Locale locale, boolean secure)
public String getPageMapCacheKey(String uri, Long site)
getPageMapCacheKey in interface PageServiceprotected String buildKey(String identifier, org.broadleafcommerce.common.locale.domain.Locale locale, Boolean secure)
protected org.broadleafcommerce.common.locale.domain.Locale findLanguageOnlyLocale(org.broadleafcommerce.common.locale.domain.Locale locale)
public net.sf.ehcache.Cache getPageCache()
getPageCache in interface PageServicepublic net.sf.ehcache.Cache getPageMapCache()
getPageMapCache in interface PageServicepublic net.sf.ehcache.Cache getUriCachedDateCache()
getUriCachedDateCache in interface PageServiceprotected List<org.broadleafcommerce.common.page.dto.PageDTO> copyDTOList(List<org.broadleafcommerce.common.page.dto.PageDTO> dtoList)
protected org.broadleafcommerce.common.page.dto.PageDTO evaluatePageRules(List<org.broadleafcommerce.common.page.dto.PageDTO> pageDTOList, org.broadleafcommerce.common.locale.domain.Locale locale, Map<String,Object> ruleDTOs)
protected boolean passesPageRules(org.broadleafcommerce.common.page.dto.PageDTO page,
Map<String,Object> ruleDTOs)
public List<Page> readAllPages()
PageServicereadAllPages in interface PageServicePages configured in the systempublic List<PageTemplate> readAllPageTemplates()
PageServicereadAllPageTemplates in interface PageServicePageTemplates configured in the systempublic Boolean removePageFromCache(String mapKey)
PageServiceremovePageFromCache in interface PageServiceCopyright © 2017. All rights reserved.