Interface PageService

All Known Implementing Classes:
PageServiceImpl

public interface PageService
Created by bpolster.
  • Method Details

    • findPageById

      Page findPageById(Long pageId)
      Returns the page with the passed in id.
      Parameters:
      pageId - - The id of the page.
      Returns:
      The associated page.
    • findPageFieldMapByPageId

      Map<String,PageField> findPageFieldMapByPageId(Long pageId)
      Returns the page-fields associated with a page.
      Parameters:
      pageId -
      Returns:
    • 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:
      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

      Boolean removePageFromCache(String key)
      Call to evict all known PageDTOs that are associated with the given page from cache
      Parameters:
      key -
      Returns:
      whether successful
    • removeTranslationPageFromCache

      Boolean removeTranslationPageFromCache(String uri, String localeCode, boolean isSecure)
      Call to evict translated page from cache
      Parameters:
      uri -
      localeCode -
      isSecure -
      Returns:
      whether successful
    • getPageCache

      javax.cache.Cache getPageCache()
    • getPageMapCache

      javax.cache.Cache getPageMapCache()
    • getUriCachedDateCache

      javax.cache.Cache getUriCachedDateCache()
    • buildPageDTOList

      List<PageDTO> buildPageDTOList(List<Page> pageList, boolean secure, String identifier, Locale locale)
      Builds a list of PageDTO objects from the given list of Page objects and caches the list
      Parameters:
      pageList -
      secure -
      identifier -
      locale -
      Returns:
      copy of DTOList
    • getPageMapCacheKey

      String getPageMapCacheKey(String uri, Long site)