Interface PageService
- All Known Implementing Classes:
PageServiceImpl
public interface PageService
Created by bpolster.
-
Method Summary
Modifier and TypeMethodDescriptionbuildPageDTOList
(List<Page> pageList, boolean secure, String identifier, Locale locale) findPageById
(Long pageId) Returns the page with the passed in id.Looks up the page from the backend datastore.findPageFieldMapByPageId
(Long pageId) Returns the page-fields associated with a page.Returns the page template with the passed in id.javax.cache.Cache
javax.cache.Cache
getPageMapCacheKey
(String uri, Long site) javax.cache.Cache
Returns all pages, regardless of any sandbox they are apart ofReturns all page templates, regardless of any sandbox they are apart ofCall to evict all known PageDTOs that are associated with the given page from cacheremoveTranslationPageFromCache
(String uri, String localeCode, boolean isSecure) Call to evict translated page from cachesavePageTemplate
(PageTemplate template) Saves the givenPageTemplate
-
Method Details
-
findPageById
Returns the page with the passed in id.- Parameters:
pageId
- - The id of the page.- Returns:
- The associated page.
-
findPageFieldMapByPageId
Returns the page-fields associated with a page.- Parameters:
pageId
-- Returns:
-
findPageTemplateById
Returns the page template with the passed in id.- Parameters:
id
- - the id of the page template- Returns:
- The associated page template.
-
savePageTemplate
Saves the givenPageTemplate
- Parameters:
template
- thePageTemplate
to save- Returns:
- the database-saved
PageTemplate
-
findPageByURI
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 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- Returns:
-
readAllPages
Returns all pages, regardless of any sandbox they are apart of- Returns:
- all
Page
s configured in the system
-
readAllPageTemplates
List<PageTemplate> readAllPageTemplates()Returns all page templates, regardless of any sandbox they are apart of- Returns:
- all
PageTemplate
s configured in the system
-
removePageFromCache
Call to evict all known PageDTOs that are associated with the given page from cache- Parameters:
key
-- Returns:
- whether successful
-
removeTranslationPageFromCache
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) - Parameters:
pageList
-secure
-identifier
-locale
-- Returns:
- copy of DTOList
-
getPageMapCacheKey
-