Interface CMSContentSlotDao

All Superinterfaces:
Dao
All Known Implementing Classes:
DefaultCMSContenSlotDao

public interface CMSContentSlotDao extends Dao
The Interface CMSContentSlotDao for finding ContentSlotForTemplateModel objects.
Spring Bean ID:
cmsContentSlotDao
  • Method Details

    • findAllContentSlotRelationsByPageTemplate

      List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template, CatalogVersionModel catalogVersion)
      Find all content slot relations by page template and catalog version.
      Parameters:
      template - the page template
      catalogVersion - the catalog version
      Returns:
      the list of found ContentSlotForTemplateModel objects or empty list when not found.
    • findContentSlotRelationsByPageTemplateAndContentSlot

      List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlotModel, CatalogVersionModel catalogVersion)
      Find content slot relations for given page template and content slot.
      Parameters:
      template - the template
      contentSlotModel - the content slot
      catalogVersion - the catalog version
      Returns:
      the found ContentSlotForTemplateModel
    • findAllContentSlotRelationsByPageTemplate

      List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template)
      Find all content slot relations by page template. Note: it will return all content slot relations from all catalog versions if the multicountry is used.
      Parameters:
      template - the page template
      Returns:
      the list of found ContentSlotForTemplateModel objects or empty list when not found.
    • findContentSlotRelationsByPageTemplateAndPosition

      List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndPosition(PageTemplateModel template, String position, Collection<CatalogVersionModel> catalogVersions)
      Find content slot relations by page template, position and catalog versions.
      Parameters:
      template - the page template
      position - the position
      catalogVersions - the catalog versions
      Returns:
      the list of found ContentSlotForTemplateModel objects or empty list when not found
    • findContentSlotRelationsByPageTemplateAndCatalogVersions

      default List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndCatalogVersions(PageTemplateModel template, Collection<CatalogVersionModel> catalogVersions)
      Find content slot relations by page template and catalog versions. This method supports multicountry because it's possible to provide a hierarchy of multicountry catalog versions.
      Parameters:
      template - the page template
      catalogVersions - the catalog versions
      Returns:
      the list of found ContentSlotForTemplateModel objects or empty list when not found
    • findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlot

      default List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlot, Collection<CatalogVersionModel> catalogVersions)
      Finds content slot relations by page template, catalog versions and content slot. This method supports multicountry because it's possible to provide a hierarchy of multicountry catalog versions.
      Parameters:
      template - the template associated with a content catalog through relation
      contentSlot - the content slot associated with a template through relation
      catalogVersions - the list of catalog versions to search in
      Returns:
      the list of found ContentSlotForTemplateModel objects or empty list when not found
    • findAllContentSlotRelationsByPage

      List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page, CatalogVersionModel catalogVersion)
      Find all content slot relations by page and catalog version.
      Parameters:
      page - the page
      catalogVersion - the catalog version
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findAllContentSlotRelationsByPageUid

      List<ContentSlotForPageModel> findAllContentSlotRelationsByPageUid(String pageUid, CatalogVersionModel catalogVersion)
      Find all content slot relations for page uid and catalog version.
      Parameters:
      pageUid - the page uid
      catalogVersion - the catalog versions
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findAllContentSlotRelationsByPage

      List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page)
      Find all content slot relations by page.
      Parameters:
      page - the page
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findAllContentSlotRelationsByContentSlot

      List<ContentSlotForPageModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
      Find all content slot relations by content slot and catalog version.
      Parameters:
      contentSlot - the content slot
      catalogVersion - the catalog version
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findAllContentSlotRelationsByContentSlot

      Collection<CMSRelationModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)
      Find all content slot relations by content slot.
      Parameters:
      contentSlot - the content slot
      Returns:
      the collection of found CMSRelationModel objects or empty collection when not found
    • findOnlyContentSlotRelationsByContentSlot

      Collection<CMSRelationModel> findOnlyContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)
      Find only content slot relations not content slot template relations of given content slot. The difference with findAllContentSlotRelationsByContentSlot: it does not search on the page's template for given contentSlot
      Parameters:
      contentSlot - the content slot
      Returns:
      the collection of found CMSRelationModel objects or empty collection when not found
    • findContentSlotsByIdAndCatalogVersions

      List<ContentSlotModel> findContentSlotsByIdAndCatalogVersions(String id, Collection<CatalogVersionModel> catalogVersions)
      Find content slots by id and catalog versions.
      Parameters:
      id - the id of ContentSlotModel object to find
      catalogVersions - the catalog versions
      Returns:
      the list of found ContentSlotModel objects or empty list when not found
    • findContentSlotsByIdAndCatalogVersions

      default List<ContentSlotModel> findContentSlotsByIdAndCatalogVersions(List<String> slotIds, Collection<CatalogVersionModel> catalogVersions)
      Find content slots by ids and catalog versions.
      Parameters:
      slotIds - the list of IDs of the ContentSlotModel objects to find
      catalogVersions - the catalog versions
      Returns:
      the list of ContentSlotModel objects found
    • findContentSlotsById

      List<ContentSlotModel> findContentSlotsById(String id)
      Find content slots by id.
      Parameters:
      id - the id of ContentSlotModel object to find
      Returns:
      the list of found ContentSlotModel objects or empty list when not found
    • findContentSlotRelationsByPageAndContentSlot

      List<ContentSlotForPageModel> findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
      Find content slot relations by page, content slot and catalog version. This method does not support multicountry.
      Parameters:
      page - the page
      contentSlot - the content slot
      catalogVersion - the catalog version
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findContentSlotRelationsByPageAndContentSlot

      List<ContentSlotForPageModel> findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, Collection<CatalogVersionModel> catalogVersions)
      Find content slot relations by page, content slot and catalog versions. This method supports multicountry cause it's possible to provide a hierarchy of multicountry catalog versions.
      Parameters:
      page - the page
      contentSlot - the content slot
      catalogVersions - the catalog versions
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findContentSlotRelationsByPageAndPosition

      List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, CatalogVersionModel catalogVersion)
      Find content slot relations by page, position and catalog versions.
      Parameters:
      page - the page
      position - the position
      catalogVersion - the catalog version
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findContentSlotRelationsByPageAndPosition

      List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, Collection<CatalogVersionModel> catalogVersions)
      Find content slot relations by page, position and catalog versions.
      Parameters:
      page - the page
      position - the position
      catalogVersions - the catalog versions
      Returns:
      the list of found ContentSlotForPageModel objects or empty list when not found
    • findPagesByContentSlot

      Collection<AbstractPageModel> findPagesByContentSlot(ContentSlotModel contentSlot)
      Find pages related to content slot.
      Parameters:
      contentSlot - the ContentSlotModel object for which pages will be obtained.
      Returns:
      the collection of AbstractPageModel objects related to ContentSlotModel object or empty list when not found.
    • findContentSlotsForCatalogVersion

      Collection<ContentSlotModel> findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
      Find all content slots that belong to a given catalog version.
      Parameters:
      catalogVersion - - the catalog version
      Returns:
      collection of content slots; never null
    • findAllContentSlotForTemplateByContentSlot

      List<ContentSlotForTemplateModel> findAllContentSlotForTemplateByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
      Find the content slot for template relations for the given content slot and catalog version (used for multi-country)
      Parameters:
      contentSlot - the content slot
      catalogVersion - the catalog version
      Returns:
      the list of ContentSlotForTemplateModel objects or empty list when none found
    • findAllMultiCountryContentSlotsByOriginalSlots

      @Deprecated(since="2105", forRemoval=true) List<ContentSlotModel> findAllMultiCountryContentSlotsByOriginalSlots(List<ContentSlotModel> contentSlots, List<CatalogVersionModel> catalogVersions)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Find the content slots and their catalog hierarchy for the given content slots and catalog versions (used for multi-country)
      Parameters:
      contentSlots - the content slots
      catalogVersions - the catalog versions
      Returns:
      the list of ContentSlotModel objects or empty list when none found
    • findAllMultiCountryContentSlotsByOriginalSlots

      @Deprecated(since="2202", forRemoval=true) default List<ContentSlotModel> findAllMultiCountryContentSlotsByOriginalSlots(List<ContentSlotModel> contentSlots, List<CatalogVersionModel> catalogVersions, AbstractPageModel page)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2202, no longer needed.
      Find the content slots and their catalog hierarchy for the given content slots, catalog versions and the page. The page is used so the result list contains only those content slots that belong to a page or it's template. For example consider the following: 0. Before homepageUk contains: # pageId: "homepage-uk" # position: "TopHeaderSlot" # slotId: "TopHeaderSlot" # slotShared: true # slotStatus: "TEMPLATE" 1. Clone the homepageUk page 2. Unshare the slot on homepageUk. Make it custom (only for this page) # pageId: "homepage-uk" # position: "TopHeaderSlot" # slotId: "TopHeaderSlotUK" # slotShared: false # slotStatus: "OVERRIDE" 3. On cloned page slot must not exists, but it exists. Should be as in step 0. To fix such situation the page attribute is used in the method. # pageId: "homepage-uk-clone" # position: "TopHeaderSlot" # slotId: "TopHeaderSlotUK" <-- wrong slot name # slotShared: true # slotStatus: "TEMPLATE"
      Parameters:
      contentSlots - the content slots
      catalogVersions - the catalog versions
      page - the page
      Returns:
      the list of ContentSlotModel objects or empty list when none found
    • getAllDeletedRelationsForPage

      default List<CMSRelationModel> getAllDeletedRelationsForPage(CatalogVersionModel targetCatalogVersion, AbstractPageModel sourcePage)
      Retrieves the list of relations (ContentSlotForPageModel and ContentSlotForTemplateModel) that does not exist (was removed) in source catalog version (based on page) and exists in target catalog version.
      Parameters:
      targetCatalogVersion - the target catalog version
      sourcePage - the source page
      Returns:
      the list of relations