Interface StructuredContentDao

All Known Implementing Classes:
StructuredContentDaoImpl

public interface StructuredContentDao
Responsible for querying and updating StructuredContent items
Author:
bpolster
  • Method Details

    • findStructuredContentById

      StructuredContent findStructuredContentById(Long contentId)
      Returns the StructuredContent item that matches the passed in Id.
      Parameters:
      contentId -
      Returns:
      the found item or null if it does not exist
    • findStructuredContentTypeById

      StructuredContentType findStructuredContentTypeById(Long contentTypeId)
      Returns the StructuredContentType 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 all StructuredContentTypes.
      Returns:
      the list of found items
    • findAllContentItems

      List<StructuredContent> findAllContentItems()
      Finds all content regardless of the SandBox they are a member of
      Returns:
      the list of StructuredContent, an empty list of none are found
    • addOrUpdateContentItem

      StructuredContent addOrUpdateContentItem(StructuredContent content)
      Persists the changes or saves a new content item.
      Parameters:
      content -
      Returns:
      the newly saved or persisted item
    • delete

      void delete(StructuredContent content)
      Removes the passed in item from the underlying storage.
      Parameters:
      content -
    • saveStructuredContentType

      StructuredContentType saveStructuredContentType(StructuredContentType type)
      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 for
      locale - 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 the DisplayContentTag to locate content based on the current SandBox, StructuredContentType, fullLocale and/or languageOnlyLocale.
      Parameters:
      type - of content to search for
      fullLocale - to restrict the search to
      languageOnlyLocale - 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 the DisplayContentTag to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.
      Parameters:
      type -
      name -
      fullLocale -
      languageOnlyLocale -
      Returns:
    • findActiveStructuredContentByName

      List<StructuredContent> findActiveStructuredContentByName(String name, Locale locale)
      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 the DisplayContentTag to locate content based on the current SandBox, StructuredContentType, Name, fullLocale and/or languageOnlyLocale.
      Parameters:
      name -
      fullLocale -
      languageOnlyLocale -
      Returns:
    • findStructuredContentTypeByName

      StructuredContentType findStructuredContentTypeByName(String name)
      Used to lookup the StructuredContentType by name.
      Parameters:
      name -
      Returns:
    • detach

      void detach(StructuredContent sc)
      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