org.broadleafcommerce.cms.page.service
Interface PageService

All Known Implementing Classes:
PageServiceImpl

public interface PageService

Created by bpolster.


Method Summary
 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.
 PageTemplate findPageTemplateById(Long id)
          Returns the page template with the passed in id.
 net.sf.ehcache.Cache getPageCache()
           
 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
 

Method Detail

findPageById

Page findPageById(Long pageId)
Returns the page with the passed in id.

Parameters:
pageId - - The id of the page.
Returns:
The associated page.

findPageTemplateById

PageTemplate findPageTemplateById(Long id)
Returns the page template with the passed in id.

Parameters:
id - - the id of the page template
Returns:
The associated page template.

savePageTemplate

PageTemplate savePageTemplate(PageTemplate template)
Saves the given PageTemplate

Parameters:
template - the PageTemplate to save
Returns:
the database-saved PageTemplate

findPageByURI

PageDTO findPageByURI(Locale locale,
                      String uri,
                      Map<String,Object> ruleDTOs,
                      boolean secure)
Looks up the page from the backend datastore. Processes the page's fields to fix the URL if the site has overridden the URL for images. If secure is true and images are being overridden, the system will use https.

Parameters:
currentSandbox - - current sandbox
locale - - current locale
uri - - the URI to return a page for
ruleDTOs - - ruleDTOs that are used as the data to process page rules
secure - - set to true if current request is over HTTPS
Returns:

readAllPages

List<Page> readAllPages()
Returns all pages, regardless of any sandbox they are apart of

Returns:
all Pages configured in the system

readAllPageTemplates

List<PageTemplate> readAllPageTemplates()
Returns all page templates, regardless of any sandbox they are apart of

Returns:
all PageTemplates configured in the system

removePageFromCache

void removePageFromCache(String baseKey)
Call to evict both secure and non-secure pages matching the passed in key.

Parameters:
baseKey -

removePageFromCache

void removePageFromCache(SandBox sandBox,
                         Page p)
Call to evict a page for a sandbox

Parameters:
sandBox - The sandbox in which the page resides
p - The page instance to evict from cache

getPageCache

net.sf.ehcache.Cache getPageCache()


Copyright © 2013. All Rights Reserved.