@Service(value="blPageService") public class PageServiceImpl extends Object implements PageService
Modifier and Type | Field and Description |
---|---|
protected static String |
AND |
protected javax.cache.CacheManager |
cacheManager |
protected PageServiceExtensionManager |
extensionManager |
protected LocaleService |
localeService |
protected static org.apache.commons.logging.Log |
LOG |
protected PageDTO |
NULL_PAGE |
protected javax.cache.Cache |
pageCache |
protected PageDao |
pageDao |
protected javax.cache.Cache |
pageMapCache |
protected List<RuleProcessor<PageDTO>> |
pageRuleProcessors |
protected PageServiceUtility |
pageServiceUtility |
protected PageQueryExtensionManager |
queryExtensionManager |
protected StaticAssetService |
staticAssetService |
protected StatisticsService |
statisticsService |
protected TemplateOverrideExtensionManager |
templateOverrideManager |
protected javax.cache.Cache |
uriCachedDateCache |
Constructor and Description |
---|
PageServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCachedDate(String key) |
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 |
buildBaseKey(String identifier,
String localeCode,
Boolean secure) |
protected String |
buildKey(String identifier,
Locale locale,
Boolean secure) |
protected String |
buildKey(String identifier,
String localeCode,
Boolean secure,
ResultType resultType) |
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 Date |
getCachedDate(String key) |
protected List<PageDTO> |
getCachedPageDTOList(List<Page> pageList,
String identifier,
Locale locale,
boolean secure) |
javax.cache.Cache |
getPageCache() |
protected List<PageDTO> |
getPageDTOListForURI(Locale locale,
String uri,
boolean secure) |
protected List<PageDTO> |
getPageListFromCache(String key) |
javax.cache.Cache |
getPageMapCache() |
String |
getPageMapCacheKey(String uri,
Long site) |
javax.cache.Cache |
getUriCachedDateCache() |
protected boolean |
isNullPageCached(Locale locale,
String uri,
boolean secure) |
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
|
Boolean |
removeTranslationPageFromCache(String uri,
String localeCode,
boolean isSecure)
Call to evict translated 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 PageQueryExtensionManager queryExtensionManager
protected javax.cache.CacheManager cacheManager
protected javax.cache.Cache pageCache
protected javax.cache.Cache pageMapCache
protected javax.cache.Cache uriCachedDateCache
protected final PageDTO NULL_PAGE
public Page findPageById(Long pageId)
PageService
findPageById
in interface PageService
pageId
- - The id of the page.public Map<String,PageField> findPageFieldMapByPageId(Long pageId)
PageService
findPageFieldMapByPageId
in interface PageService
public PageTemplate findPageTemplateById(Long id)
PageService
findPageTemplateById
in interface PageService
id
- - the id of the page template@Transactional(value="blTransactionManager") public PageTemplate savePageTemplate(PageTemplate template)
PageService
PageTemplate
savePageTemplate
in interface PageService
template
- the PageTemplate
to savePageTemplate
public PageDTO findPageByURI(Locale locale, String uri, Map<String,Object> ruleDTOs, boolean secure)
PageService
findPageByURI
in interface PageService
locale
- - 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<PageDTO> getPageDTOListForURI(Locale locale, String uri, boolean secure)
protected void addCachedDate(String key)
public List<PageDTO> buildPageDTOList(List<Page> pageList, boolean secure, String identifier, Locale locale)
PageService
buildPageDTOList
in interface PageService
protected 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 PageService
protected String buildKey(String identifier, String localeCode, Boolean secure, ResultType resultType)
public javax.cache.Cache getPageCache()
getPageCache
in interface PageService
public javax.cache.Cache getPageMapCache()
getPageMapCache
in interface PageService
public javax.cache.Cache getUriCachedDateCache()
getUriCachedDateCache
in interface PageService
protected PageDTO evaluatePageRules(List<PageDTO> pageDTOList, Locale locale, Map<String,Object> ruleDTOs)
public List<Page> readAllPages()
PageService
readAllPages
in interface PageService
Page
s configured in the systempublic List<PageTemplate> readAllPageTemplates()
PageService
readAllPageTemplates
in interface PageService
PageTemplate
s configured in the systempublic Boolean removePageFromCache(String mapKey)
PageService
removePageFromCache
in interface PageService
public Boolean removeTranslationPageFromCache(String uri, String localeCode, boolean isSecure)
PageService
removeTranslationPageFromCache
in interface PageService
Copyright © 2022. All rights reserved.