@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 PageQueryExtensionManager |
queryExtensionManager |
protected StaticAssetService |
staticAssetService |
protected StatisticsService |
statisticsService |
protected 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<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) |
net.sf.ehcache.Cache |
getPageCache() |
protected List<PageDTO> |
getPageDTOListForURI(Locale locale,
String uri,
boolean secure) |
protected List<PageDTO> |
getPageListFromCache(String key) |
net.sf.ehcache.Cache |
getPageMapCache() |
String |
getPageMapCacheKey(String uri,
Long site) |
net.sf.ehcache.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 net.sf.ehcache.Cache pageCache
protected net.sf.ehcache.Cache pageMapCache
protected net.sf.ehcache.Cache uriCachedDateCache
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 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)
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 PageServiceprotected String buildKey(String identifier, String localeCode, Boolean secure, ResultType resultType)
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 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 PageServicepublic Boolean removeTranslationPageFromCache(String uri, String localeCode, boolean isSecure)
PageServiceremoveTranslationPageFromCache in interface PageServiceCopyright © 2019. All rights reserved.