@Service(value="blPageService") public class PageServiceImpl extends Object implements PageService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AND |
protected PageServiceExtensionManager |
extensionManager |
protected LocaleService |
localeService |
protected static org.apache.commons.logging.Log |
LOG |
protected PageDTO |
NULL_PAGE |
protected net.sf.ehcache.Cache |
pageCache |
protected PageDao |
pageDao |
protected net.sf.ehcache.Cache |
pageMapCache |
protected List<RuleProcessor<PageDTO>> |
pageRuleProcessors |
protected PageServiceUtility |
pageServiceUtility |
protected StaticAssetService |
staticAssetService |
protected StatisticsService |
statisticsService |
protected TemplateOverrideExtensionManager |
templateOverrideManager |
| Constructor and Description |
|---|
PageServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPageListToCache(List<PageDTO> pageList,
String identifier,
Locale locale,
boolean secure) |
protected void |
addPageListToPageDTOList(List<Page> pageList,
boolean secure,
List<PageDTO> dtoList) |
protected void |
addPageMapCacheEntry(String identifier,
String key) |
protected String |
buildKey(String identifier,
Locale locale,
Boolean secure) |
List<PageDTO> |
buildPageDTOList(List<Page> pageList,
boolean secure,
String identifier,
Locale locale)
|
protected List<PageDTO> |
buildPageDTOListUsingCache(List<Page> pageList,
String identifier,
Locale locale,
boolean secure) |
protected List<PageDTO> |
copyDTOList(List<PageDTO> dtoList) |
protected PageDTO |
evaluatePageRules(List<PageDTO> pageDTOList,
Locale locale,
Map<String,Object> ruleDTOs) |
protected Locale |
findLanguageOnlyLocale(Locale locale) |
Page |
findPageById(Long pageId)
Returns the page with the passed in id.
|
PageDTO |
findPageByURI(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 List<PageDTO> |
getCachedPageDTOList(List<Page> pageList,
String identifier,
Locale locale,
boolean secure) |
net.sf.ehcache.Cache |
getPageCache() |
protected List<PageDTO> |
getPageListFromCache(String key) |
net.sf.ehcache.Cache |
getPageMapCache() |
String |
getPageMapCacheKey(String uri,
Long site) |
protected boolean |
passesPageRules(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<RuleProcessor<PageDTO>> pageRuleProcessors
protected LocaleService localeService
protected StaticAssetService staticAssetService
protected StatisticsService statisticsService
protected TemplateOverrideExtensionManager templateOverrideManager
protected PageServiceUtility pageServiceUtility
protected PageServiceExtensionManager extensionManager
protected net.sf.ehcache.Cache pageCache
protected net.sf.ehcache.Cache pageMapCache
protected final 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 PageDTO findPageByURI(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 HTTPSpublic List<PageDTO> buildPageDTOList(List<Page> pageList, boolean secure, String identifier, Locale locale)
PageServicebuildPageDTOList in interface PageServiceprotected List<PageDTO> buildPageDTOListUsingCache(List<Page> pageList, String identifier, Locale locale, boolean secure)
protected List<PageDTO> getCachedPageDTOList(List<Page> pageList, String identifier, Locale locale, boolean secure)
protected void addPageListToPageDTOList(List<Page> pageList, boolean secure, List<PageDTO> dtoList)
protected void addPageListToCache(List<PageDTO> pageList, String identifier, Locale locale, boolean secure)
public String getPageMapCacheKey(String uri, Long site)
getPageMapCacheKey in interface PageServicepublic net.sf.ehcache.Cache getPageCache()
getPageCache in interface PageServicepublic net.sf.ehcache.Cache getPageMapCache()
getPageMapCache in interface PageServiceprotected PageDTO evaluatePageRules(List<PageDTO> pageDTOList, Locale locale, 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 © 2020. All rights reserved.