|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.cms.page.service.PageServiceImpl
@Service(value="blPageService") public class PageServiceImpl
Created by bpolster.
| Field Summary | |
|---|---|
protected static String |
AND
|
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 List<RuleProcessor<PageDTO>> |
pageRuleProcessors
|
protected StaticAssetPathService |
staticAssetPathService
|
protected StaticAssetService |
staticAssetService
|
protected StatisticsService |
statisticsService
|
| Constructor Summary | |
|---|---|
PageServiceImpl()
|
|
| Method Summary | |
|---|---|
protected void |
addPageListToCache(List<PageDTO> pageList,
String key)
|
protected List<ItemCriteriaDTO> |
buildItemCriteriaDTOList(Page page)
|
protected String |
buildKey(SandBox currentSandBox,
Locale locale,
String uri)
|
protected String |
buildKey(SandBox sandBox,
Page page)
|
protected PageDTO |
buildPageDTOInternal(Page page,
boolean secure)
|
protected List<PageDTO> |
buildPageDTOList(List<Page> pageList,
boolean secure)
Converts a list of pages to a list of pageDTOs. Internally calls buildPageDTO(...). |
protected String |
buildRuleExpression(Page page)
|
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)
Retrieve the page if one is available for the passed in uri. |
PageTemplate |
findPageTemplateById(Long id)
Returns the page template with the passed in id. |
net.sf.ehcache.Cache |
getPageCache()
|
protected List<PageDTO> |
getPageListFromCache(String key)
|
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 |
void |
removePageFromCache(SandBox sandBox,
Page p)
Call to evict a page for a sandbox |
void |
removePageFromCache(String baseKey)
Call to evict both secure and non-secure pages matching the passed in key. |
PageTemplate |
savePageTemplate(PageTemplate template)
Saves the given PageTemplate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 StaticAssetPathService staticAssetPathService
protected StatisticsService statisticsService
protected net.sf.ehcache.Cache pageCache
protected final PageDTO NULL_PAGE
| Constructor Detail |
|---|
public PageServiceImpl()
| Method Detail |
|---|
public Page findPageById(Long pageId)
findPageById in interface PageServicepageId - - The id of the page.
public PageTemplate findPageTemplateById(Long id)
PageService
findPageTemplateById in interface PageServiceid - - the id of the page template
@Transactional(value="blTransactionManager") public PageTemplate savePageTemplate(PageTemplate template)
PageServicePageTemplate
savePageTemplate in interface PageServicetemplate - the PageTemplate to save
PageTemplate
public PageDTO findPageByURI(Locale locale,
String uri,
Map<String,Object> ruleDTOs,
boolean secure)
findPageByURI 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 HTTPS
public List<Page> readAllPages()
PageService
readAllPages in interface PageServicePages configured in the systempublic List<PageTemplate> readAllPageTemplates()
PageService
readAllPageTemplates in interface PageServicePageTemplates configured in the system
public void removePageFromCache(SandBox sandBox,
Page p)
PageService
removePageFromCache in interface PageServicesandBox - The sandbox in which the page residesp - The page instance to evict from cachepublic void removePageFromCache(String baseKey)
PageService
removePageFromCache in interface PageService
protected List<PageDTO> buildPageDTOList(List<Page> pageList,
boolean secure)
pageList - secure -
protected PageDTO buildPageDTOInternal(Page page,
boolean secure)
protected String buildRuleExpression(Page page)
protected List<ItemCriteriaDTO> buildItemCriteriaDTOList(Page page)
protected PageDTO evaluatePageRules(List<PageDTO> pageDTOList,
Locale locale,
Map<String,Object> ruleDTOs)
protected boolean passesPageRules(PageDTO page,
Map<String,Object> ruleDTOs)
protected Locale findLanguageOnlyLocale(Locale locale)
protected String buildKey(SandBox currentSandBox,
Locale locale,
String uri)
public net.sf.ehcache.Cache getPageCache()
getPageCache in interface PageService
protected String buildKey(SandBox sandBox,
Page page)
protected void addPageListToCache(List<PageDTO> pageList,
String key)
protected List<PageDTO> getPageListFromCache(String key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||