public interface StructuredContentService
StructuredContent
items.Modifier and Type | Method and Description |
---|---|
void |
addStructuredContentListToCache(String key,
List<StructuredContentDTO> scDTOList) |
StructuredContentDTO |
buildStructuredContentDTO(StructuredContent sc,
boolean secure)
Converts a StructuredContent into a StructuredContentDTO.
|
List<StructuredContentDTO> |
buildStructuredContentDTOList(List<StructuredContent> structuredContentList,
boolean secure) |
String |
buildTypeKey(SandBox currentSandbox,
Long site,
Locale locale,
String contentType)
Deprecated.
|
String |
buildTypeKeyWithSecure(SandBox currentSandbox,
Long site,
Locale locale,
String contentType,
Boolean secure)
Builds the cache key for DTOLists based on the SC Type.
|
List<StructuredContentDTO> |
convertToDtos(List<StructuredContent> scs,
boolean isSecure)
Converts a list of StructuredContent objects into their corresponding
StructuredContentDTO s. |
Long |
countContentItems(org.hibernate.Criteria c)
Follows the same rules as
findContentItems . |
List<StructuredContentDTO> |
evaluateAndPriortizeContent(List<StructuredContentDTO> structuredContentList,
int count,
Map<String,Object> ruleDTOs) |
List<StructuredContent> |
findAllContentItems()
Finds all content items regardless of the
Sandbox they are a member of |
List<StructuredContent> |
findContentItems(org.hibernate.Criteria criteria)
This method is intended to be called solely from the CMS admin.
|
Locale |
findLanguageOnlyLocale(Locale locale) |
StructuredContent |
findStructuredContentById(Long contentId)
Returns the StructuredContent item associated with the passed in id.
|
StructuredContentType |
findStructuredContentTypeById(Long id)
Returns the
StructuredContentType associated with the passed in id. |
StructuredContentType |
findStructuredContentTypeByName(String name)
Returns the
StructuredContentType associated with the passed in
String value. |
javax.cache.Cache |
getStructuredContentCache() |
List<StructuredContentDTO> |
getStructuredContentItemsByContentName(String contentName,
Locale locale,
boolean isSecure)
First attempts to retrieve
StructuredContentDTO from cache before making calls to database |
List<StructuredContentDTO> |
getStructuredContentListFromCache(String key) |
List<StructuredContentDTO> |
lookupStructuredContentItemsByName(String contentName,
Locale locale,
Integer count,
Map<String,Object> ruleDTOs,
boolean secure)
This method returns content by name only.
|
List<StructuredContentDTO> |
lookupStructuredContentItemsByName(StructuredContentType contentType,
String contentName,
Locale locale,
Integer count,
Map<String,Object> ruleDTOs,
boolean secure)
This method returns content by name and type.
|
List<StructuredContentDTO> |
lookupStructuredContentItemsByType(StructuredContentType contentType,
Locale locale,
Integer count,
Map<String,Object> ruleDTOs,
boolean secure)
This method returns content
Returns active content items for the passed in sandbox that match the passed in type. |
void |
removeItemFromCache(String nameKey,
String typeKey)
Deprecated.
|
boolean |
removeItemFromCacheByKey(String key)
Call to evict both secure and non-secure SC items matching
the passed in key.
|
void |
removeStructuredContentFromCache(SandBox sandBox,
StructuredContent sc)
Call to evict an item from the cache.
|
List<StructuredContentType> |
retrieveAllStructuredContentTypes() |
StructuredContentType |
saveStructuredContentType(StructuredContentType type)
Saves the given type and returns the merged instance
|
StructuredContent findStructuredContentById(Long contentId)
contentId
- - The id of the content item.StructuredContentType findStructuredContentTypeById(Long id)
StructuredContentType
associated with the passed in id.id
- - The id of the content type.StructuredContentType
.StructuredContentType findStructuredContentTypeByName(String name)
StructuredContentType
associated with the passed in
String value.name
- - The name of the content type.StructuredContentType
.List<StructuredContentType> retrieveAllStructuredContentTypes()
StructuredContentType
sList<StructuredContent> findContentItems(org.hibernate.Criteria criteria)
SandBoxType
of
production is passed in, only those items in that SandBox are returned.
sandbox
- - the sandbox to find structured content items (null indicates items that are in production for
sites that are single tenant.criteria
- - the criteria used to search for contentList<StructuredContent> findAllContentItems()
Sandbox
they are a member ofLong countContentItems(org.hibernate.Criteria c)
findContentItems
.StructuredContentType saveStructuredContentType(StructuredContentType type)
List<StructuredContentDTO> lookupStructuredContentItemsByType(StructuredContentType contentType, Locale locale, Integer count, Map<String,Object> ruleDTOs, boolean secure)
SandBoxType
of
production is passed in, only those items in that SandBox are returned.
sandBox
- - the sandbox to find structured content items (null indicates items that are in production for
sites that are single tenant.contentType
- - the type of content to returncount
- - the max number of content items to returnruleDTOs
- - a Map of objects that will be used in MVEL processing.secure
- - set to true if the request is being served over httpsorg.broadleafcommerce.cms.web.structure.DisplayContentTag
List<StructuredContentDTO> lookupStructuredContentItemsByName(String contentName, Locale locale, Integer count, Map<String,Object> ruleDTOs, boolean secure)
SandBoxType
of
production is passed in, only those items in that SandBox are returned.
sandBox
- - the sandbox to find structured content items (null indicates items that are in production for
sites that are single tenant.contentName
- - the name of content to returncount
- - the max number of content items to returnruleDTOs
- - a Map of objects that will be used in MVEL processing.secure
- - set to true if the request is being served over httpsorg.broadleafcommerce.cms.web.structure.DisplayContentTag
List<StructuredContentDTO> lookupStructuredContentItemsByName(StructuredContentType contentType, String contentName, Locale locale, Integer count, Map<String,Object> ruleDTOs, boolean secure)
SandBoxType
of
production is passed in, only those items in that SandBox are returned.
sandBox
- - the sandbox to find structured content items (null indicates items that are in production for
sites that are single tenant.contentType
- - the type of content to returncontentName
- - the name of content to returncount
- - the max number of content items to returnruleDTOs
- - a Map of objects that will be used in MVEL processing.secure
- - set to true if the request is being served over httpsorg.broadleafcommerce.cms.web.structure.DisplayContentTag
List<StructuredContentDTO> buildStructuredContentDTOList(List<StructuredContent> structuredContentList, boolean secure)
List<StructuredContentDTO> evaluateAndPriortizeContent(List<StructuredContentDTO> structuredContentList, int count, Map<String,Object> ruleDTOs)
javax.cache.Cache getStructuredContentCache()
StructuredContentDTO buildStructuredContentDTO(StructuredContent sc, boolean secure)
EntityConfiguration
. To override the actual type that is returned,
include an override in an applicationContext like any other entity override.sc
- secure
- void addStructuredContentListToCache(String key, List<StructuredContentDTO> scDTOList)
@Deprecated String buildTypeKey(SandBox currentSandbox, Long site, Locale locale, String contentType)
buildTypeKeyWithSecure(SandBox, Long, Locale, String, Boolean)
currentSandbox
- site
- locale
- contentType
- String buildTypeKeyWithSecure(SandBox currentSandbox, Long site, Locale locale, String contentType, Boolean secure)
currentSandbox
- site
- locale
- contentType
- secure
- List<StructuredContentDTO> getStructuredContentListFromCache(String key)
void removeStructuredContentFromCache(SandBox sandBox, StructuredContent sc)
sandBox
- sc
- @Deprecated void removeItemFromCache(String nameKey, String typeKey)
removeItemFromCacheByKey(String)
nameKey
- typeKey
- boolean removeItemFromCacheByKey(String key)
key
- List<StructuredContentDTO> convertToDtos(List<StructuredContent> scs, boolean isSecure)
StructuredContentDTO
s. This method
will utilize a cache in production mode, and it will additionally hydrate the returned StructuredContentDTO
objects via the #hydrateForeignLookups(List)
method.scs
- StructuredContentDTO
sList<StructuredContentDTO> getStructuredContentItemsByContentName(String contentName, Locale locale, boolean isSecure)
StructuredContentDTO
from cache before making calls to databasecontentName
- (Name of ContentItemlocale
- isSecure
- Copyright © 2022. All rights reserved.