Interface StructuredContentDao
- All Known Implementing Classes:
StructuredContentDaoImpl
public interface StructuredContentDao
Responsible for querying and updating
StructuredContent
items- Author:
- bpolster
-
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateContentItem
(StructuredContent content) Persists the changes or saves a new content item.void
delete
(StructuredContent content) Removes the passed in item from the underlying storage.void
Detaches the item from the JPA session.findActiveStructuredContentByName
(String name, Locale locale) Pass through function for backwards compatibility to get a list of structured content.findActiveStructuredContentByName
(String name, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.findActiveStructuredContentByNameAndType
(StructuredContentType type, String name, Locale locale) Pass through function for backwards compatibility to get a list of structured content.findActiveStructuredContentByNameAndType
(StructuredContentType type, String name, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.findActiveStructuredContentByType
(StructuredContentType type, Locale locale) Pass through function for backwards compatibility to get a list of structured content.findActiveStructuredContentByType
(StructuredContentType type, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, fullLocale and/or languageOnlyLocale.Finds all content regardless of theSandBox
they are a member offindStructuredContentById
(Long contentId) Returns theStructuredContent
item that matches the passed in Id.findStructuredContentTypeById
(Long contentTypeId) Returns theStructuredContentType
that matches the passed in contentTypeId.Used to lookup the StructuredContentType by name.Returns the list of allStructuredContentType
s.Saves the given type and returns the merged instance
-
Method Details
-
findStructuredContentById
Returns theStructuredContent
item that matches the passed in Id.- Parameters:
contentId
-- Returns:
- the found item or null if it does not exist
-
findStructuredContentTypeById
Returns theStructuredContentType
that matches the passed in contentTypeId.- Parameters:
contentTypeId
-- Returns:
- the found item or null if it does not exist
-
retrieveAllStructuredContentTypes
List<StructuredContentType> retrieveAllStructuredContentTypes()Returns the list of allStructuredContentType
s.- Returns:
- the list of found items
-
findAllContentItems
List<StructuredContent> findAllContentItems()Finds all content regardless of theSandBox
they are a member of- Returns:
- the list of
StructuredContent
, an empty list of none are found
-
addOrUpdateContentItem
Persists the changes or saves a new content item.- Parameters:
content
-- Returns:
- the newly saved or persisted item
-
delete
Removes the passed in item from the underlying storage.- Parameters:
content
-
-
saveStructuredContentType
Saves the given type and returns the merged instance -
findActiveStructuredContentByType
List<StructuredContent> findActiveStructuredContentByType(StructuredContentType type, Locale locale) Pass through function for backwards compatibility to get a list of structured content.- Parameters:
type
- of content to search forlocale
- to restrict the search to- Returns:
- a list of all matching content
- See Also:
-
org.broadleafcommerce.cms.web.structure.DisplayContentTag
-
findActiveStructuredContentByType
List<StructuredContent> findActiveStructuredContentByType(StructuredContentType type, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, fullLocale and/or languageOnlyLocale.- Parameters:
type
- of content to search forfullLocale
- to restrict the search tolanguageOnlyLocale
- locale based only on a language specified- Returns:
- a list of all matching content
- See Also:
-
org.broadleafcommerce.cms.web.structure.DisplayContentTag
-
findActiveStructuredContentByNameAndType
List<StructuredContent> findActiveStructuredContentByNameAndType(StructuredContentType type, String name, Locale locale) Pass through function for backwards compatibility to get a list of structured content.- Parameters:
type
-name
-locale
-- Returns:
-
findActiveStructuredContentByNameAndType
List<StructuredContent> findActiveStructuredContentByNameAndType(StructuredContentType type, String name, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.- Parameters:
type
-name
-fullLocale
-languageOnlyLocale
-- Returns:
-
findActiveStructuredContentByName
Pass through function for backwards compatibility to get a list of structured content.- Parameters:
name
-locale
-- Returns:
-
findActiveStructuredContentByName
List<StructuredContent> findActiveStructuredContentByName(String name, Locale fullLocale, Locale languageOnlyLocale) Called by theDisplayContentTag
to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.- Parameters:
name
-fullLocale
-languageOnlyLocale
-- Returns:
-
findStructuredContentTypeByName
Used to lookup the StructuredContentType by name.- Parameters:
name
-- Returns:
-
detach
Detaches the item from the JPA session. This is intended for internal use by the CMS system. It supports the need to clone an item as part of the editing process.- Parameters:
sc
- - the item to detach
-