public interface StructuredContentService
StructuredContent items.| Modifier and Type | Method and Description |
|---|---|
void |
addStructuredContentListToCache(String key,
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> scDTOList) |
org.broadleafcommerce.common.structure.dto.StructuredContentDTO |
buildStructuredContentDTO(StructuredContent sc,
boolean secure)
Converts a StructuredContent into a StructuredContentDTO.
|
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
buildStructuredContentDTOList(List<StructuredContent> structuredContentList,
boolean secure) |
String |
buildTypeKey(org.broadleafcommerce.common.sandbox.domain.SandBox currentSandbox,
Long site,
org.broadleafcommerce.common.locale.domain.Locale locale,
String contentType) |
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
convertToDtos(List<StructuredContent> scs,
boolean isSecure)
Converts a list of StructuredContent objects into their corresponding
StructuredContentDTOs. |
Long |
countContentItems(org.hibernate.Criteria c)
Follows the same rules as
findContentItems. |
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
evaluateAndPriortizeContent(List<org.broadleafcommerce.common.structure.dto.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.
|
org.broadleafcommerce.common.locale.domain.Locale |
findLanguageOnlyLocale(org.broadleafcommerce.common.locale.domain.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. |
net.sf.ehcache.Cache |
getStructuredContentCache() |
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
getStructuredContentListFromCache(String key) |
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
lookupStructuredContentItemsByName(String contentName,
org.broadleafcommerce.common.locale.domain.Locale locale,
Integer count,
Map<String,Object> ruleDTOs,
boolean secure)
This method returns content by name only.
|
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
lookupStructuredContentItemsByName(StructuredContentType contentType,
String contentName,
org.broadleafcommerce.common.locale.domain.Locale locale,
Integer count,
Map<String,Object> ruleDTOs,
boolean secure)
This method returns content by name and type.
|
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> |
lookupStructuredContentItemsByType(StructuredContentType contentType,
org.broadleafcommerce.common.locale.domain.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) |
void |
removeStructuredContentFromCache(org.broadleafcommerce.common.sandbox.domain.SandBox sandBox,
StructuredContent sc) |
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()
StructuredContentTypesList<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<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> lookupStructuredContentItemsByType(StructuredContentType contentType, org.broadleafcommerce.common.locale.domain.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 httpsDisplayContentTagList<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> lookupStructuredContentItemsByName(String contentName, org.broadleafcommerce.common.locale.domain.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 httpsDisplayContentTagList<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> lookupStructuredContentItemsByName(StructuredContentType contentType, String contentName, org.broadleafcommerce.common.locale.domain.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 httpsDisplayContentTagorg.broadleafcommerce.common.locale.domain.Locale findLanguageOnlyLocale(org.broadleafcommerce.common.locale.domain.Locale locale)
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> buildStructuredContentDTOList(List<StructuredContent> structuredContentList, boolean secure)
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> evaluateAndPriortizeContent(List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> structuredContentList, int count, Map<String,Object> ruleDTOs)
void removeStructuredContentFromCache(org.broadleafcommerce.common.sandbox.domain.SandBox sandBox,
StructuredContent sc)
net.sf.ehcache.Cache getStructuredContentCache()
org.broadleafcommerce.common.structure.dto.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<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> scDTOList)
String buildTypeKey(org.broadleafcommerce.common.sandbox.domain.SandBox currentSandbox, Long site, org.broadleafcommerce.common.locale.domain.Locale locale, String contentType)
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> getStructuredContentListFromCache(String key)
List<org.broadleafcommerce.common.structure.dto.StructuredContentDTO> convertToDtos(List<StructuredContent> scs, boolean isSecure)
StructuredContentDTOs. This method
will utilize a cache in production mode, and it will additionally hydrate the returned StructuredContentDTO
objects via the #hydrateForeignLookups(List) method.scs - StructuredContentDTOsCopyright © 2016. All rights reserved.