Class DefaultCMSContenSlotDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSContenSlotDao
- All Implemented Interfaces:
CMSContentSlotDao,Dao
Default implementation of
CMSContentSlotDao interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllContentSlotForTemplateByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion) Find the content slot for template relations for the given content slot and catalog version (used for multi-country)findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot) Find all content slot relations by content slot.findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion) Find all content slot relations by content slot and catalog version.Find all content slot relations by page.findAllContentSlotRelationsByPage(AbstractPageModel page, CatalogVersionModel catalogVersion) Find all content slot relations by page and catalog version.Find all content slot relations by page template.findAllContentSlotRelationsByPageTemplate(PageTemplateModel template, CatalogVersionModel catalogVersion) Find all content slot relations by page template and catalog version.findAllContentSlotRelationsByPageUid(String pageUid, CatalogVersionModel catalogVersion) Find all content slot relations for page uid and catalog version.findAllMultiCountryContentSlotsByOriginalSlots(List<ContentSlotModel> contentSlots, List<CatalogVersionModel> catalogVersions) Deprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.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, when cloning a slot, it will not record the original slot of cloned slot.findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, CatalogVersionModel catalogVersion) Find content slot relations by page, content slot and catalog version.findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page, content slot and catalog versions.findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, CatalogVersionModel catalogVersion) Find content slot relations by page, position and catalog versions.findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page, position and catalog versions.findContentSlotRelationsByPageTemplateAndCatalogVersions(PageTemplateModel template, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page template and catalog versions.findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlot, Collection<CatalogVersionModel> catalogVersions) Finds content slot relations by page template, catalog versions and content slot.findContentSlotRelationsByPageTemplateAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlotModel, CatalogVersionModel catalogVersion) Find content slot relations for given page template and content slot.findContentSlotRelationsByPageTemplateAndPosition(PageTemplateModel template, String position, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page template, position and catalog versions.Find content slots by id.findContentSlotsByIdAndCatalogVersions(String id, Collection<CatalogVersionModel> catalogVersions) Find content slots by id and catalog versions.findContentSlotsByIdAndCatalogVersions(List<String> slotIds, Collection<CatalogVersionModel> catalogVersions) Find content slots by ids and catalog versions.findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion) Find all content slots that belong to a given catalog version.Find only content slot relations not content slot template relations of given content slot.findPagesByContentSlot(ContentSlotModel contentSlot) Find pages related to content slot.getAllDeletedRelationsForPage(CatalogVersionModel targetCatalogVersion, AbstractPageModel sourcePage) Retrieves the list of relations (ContentSlotForPageModelandContentSlotForTemplateModel) that does not exist (was removed) in source catalog version (based on page) and exists in target catalog version.Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
Field Details
-
CATALOG_VERSIONS_QUERY_PARAM
- See Also:
-
CONTENT_SLOT_UIDS_QUERY_PARAM
- See Also:
-
QUERY_CONTENT_SLOT
- See Also:
-
-
Constructor Details
-
DefaultCMSContenSlotDao
public DefaultCMSContenSlotDao()
-
-
Method Details
-
findPagesByContentSlot
Find pages related to content slot.- Specified by:
findPagesByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- theContentSlotModelobject for which pages will be obtained.- Returns:
- the collection of
AbstractPageModelobjects related toContentSlotModelobject or empty list when not found.
-
findAllContentSlotRelationsByPageTemplate
public List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template, CatalogVersionModel catalogVersion) Find all content slot relations by page template and catalog version.- Specified by:
findAllContentSlotRelationsByPageTemplatein interfaceCMSContentSlotDao- Parameters:
template- the page templatecatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found.
-
findContentSlotRelationsByPageTemplateAndContentSlot
public List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlotModel, CatalogVersionModel catalogVersion) Find content slot relations for given page template and content slot.- Specified by:
findContentSlotRelationsByPageTemplateAndContentSlotin interfaceCMSContentSlotDao- Parameters:
template- the templatecontentSlotModel- the content slotcatalogVersion- the catalog version- Returns:
- the found
ContentSlotForTemplateModel
-
findAllContentSlotRelationsByPageTemplate
public 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.- Specified by:
findAllContentSlotRelationsByPageTemplatein interfaceCMSContentSlotDao- Parameters:
template- the page template- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found.
-
findContentSlotRelationsByPageTemplateAndPosition
public List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndPosition(PageTemplateModel template, String position, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page template, position and catalog versions.- Specified by:
findContentSlotRelationsByPageTemplateAndPositionin interfaceCMSContentSlotDao- Parameters:
template- the page templateposition- the positioncatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found
-
findContentSlotRelationsByPageTemplateAndCatalogVersions
public List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndCatalogVersions(PageTemplateModel template, Collection<CatalogVersionModel> catalogVersions) Description copied from interface:CMSContentSlotDaoFind 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.- Specified by:
findContentSlotRelationsByPageTemplateAndCatalogVersionsin interfaceCMSContentSlotDao- Parameters:
template- the page templatecatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found
-
findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlot
public List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlot, Collection<CatalogVersionModel> catalogVersions) Description copied from interface:CMSContentSlotDaoFinds 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.- Specified by:
findContentSlotRelationsByPageTemplateAndCatalogVersionsAndContentSlotin interfaceCMSContentSlotDao- Parameters:
template- the template associated with a content catalog through relationcontentSlot- the content slot associated with a template through relationcatalogVersions- the list of catalog versions to search in- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found
-
findAllContentSlotRelationsByPage
public List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page, CatalogVersionModel catalogVersion) Find all content slot relations by page and catalog version.- Specified by:
findAllContentSlotRelationsByPagein interfaceCMSContentSlotDao- Parameters:
page- the pagecatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByPageUid
public List<ContentSlotForPageModel> findAllContentSlotRelationsByPageUid(String pageUid, CatalogVersionModel catalogVersion) Find all content slot relations for page uid and catalog version.- Specified by:
findAllContentSlotRelationsByPageUidin interfaceCMSContentSlotDao- Parameters:
pageUid- the page uidcatalogVersion- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByPage
Find all content slot relations by page.- Specified by:
findAllContentSlotRelationsByPagein interfaceCMSContentSlotDao- Parameters:
page- the page- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByContentSlot
public List<ContentSlotForPageModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion) Find all content slot relations by content slot and catalog version.- Specified by:
findAllContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByContentSlot
public Collection<CMSRelationModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot) Find all content slot relations by content slot.- Specified by:
findAllContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slot- Returns:
- the collection of found
CMSRelationModelobjects or empty collection when not found
-
findOnlyContentSlotRelationsByContentSlot
public 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- Specified by:
findOnlyContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slot- Returns:
- the collection of found
CMSRelationModelobjects or empty collection when not found
-
findContentSlotsByIdAndCatalogVersions
public List<ContentSlotModel> findContentSlotsByIdAndCatalogVersions(String id, Collection<CatalogVersionModel> catalogVersions) Find content slots by id and catalog versions.- Specified by:
findContentSlotsByIdAndCatalogVersionsin interfaceCMSContentSlotDao- Parameters:
id- the id ofContentSlotModelobject to findcatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotModelobjects or empty list when not found
-
findContentSlotsByIdAndCatalogVersions
public List<ContentSlotModel> findContentSlotsByIdAndCatalogVersions(List<String> slotIds, Collection<CatalogVersionModel> catalogVersions) Description copied from interface:CMSContentSlotDaoFind content slots by ids and catalog versions.- Specified by:
findContentSlotsByIdAndCatalogVersionsin interfaceCMSContentSlotDao- Parameters:
slotIds- the list of IDs of theContentSlotModelobjects to findcatalogVersions- the catalog versions- Returns:
- the list of
ContentSlotModelobjects found
-
findContentSlotsById
Find content slots by id.- Specified by:
findContentSlotsByIdin interfaceCMSContentSlotDao- Parameters:
id- the id ofContentSlotModelobject to find- Returns:
- the list of found
ContentSlotModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndContentSlot
public 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.- Specified by:
findContentSlotRelationsByPageAndContentSlotin interfaceCMSContentSlotDao- Parameters:
page- the pagecontentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndContentSlot
public 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.- Specified by:
findContentSlotRelationsByPageAndContentSlotin interfaceCMSContentSlotDao- Parameters:
page- the pagecontentSlot- the content slotcatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndPosition
public List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, CatalogVersionModel catalogVersion) Find content slot relations by page, position and catalog versions.- Specified by:
findContentSlotRelationsByPageAndPositionin interfaceCMSContentSlotDao- Parameters:
page- the pageposition- the positioncatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndPosition
public List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, String position, Collection<CatalogVersionModel> catalogVersions) Find content slot relations by page, position and catalog versions.- Specified by:
findContentSlotRelationsByPageAndPositionin interfaceCMSContentSlotDao- Parameters:
page- the pageposition- the positioncatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotsForCatalogVersion
public Collection<ContentSlotModel> findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion) Description copied from interface:CMSContentSlotDaoFind all content slots that belong to a given catalog version.- Specified by:
findContentSlotsForCatalogVersionin interfaceCMSContentSlotDao- Parameters:
catalogVersion- - the catalog version- Returns:
- collection of content slots; never
null
-
findAllContentSlotForTemplateByContentSlot
public List<ContentSlotForTemplateModel> findAllContentSlotForTemplateByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion) Description copied from interface:CMSContentSlotDaoFind the content slot for template relations for the given content slot and catalog version (used for multi-country)- Specified by:
findAllContentSlotForTemplateByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of
ContentSlotForTemplateModelobjects or empty list when none found
-
findAllMultiCountryContentSlotsByOriginalSlots
@Deprecated(since="2105", forRemoval=true) public List<ContentSlotModel> findAllMultiCountryContentSlotsByOriginalSlots(List<ContentSlotModel> contentSlots, List<CatalogVersionModel> catalogVersions) Deprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.Description copied from interface:CMSContentSlotDaoFind the content slots and their catalog hierarchy for the given content slots and catalog versions (used for multi-country)- Specified by:
findAllMultiCountryContentSlotsByOriginalSlotsin interfaceCMSContentSlotDao- Parameters:
contentSlots- the content slotscatalogVersions- the catalog versions- Returns:
- the list of
ContentSlotModelobjects or empty list when none found
-
findAllMultiCountryContentSlotsByOriginalSlots
@Deprecated(since="2202", forRemoval=true) public 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, when cloning a slot, it will not record the original slot of cloned slot. Because the original slot will broken versioning when the original slot is removed, see ticket CMSX-10057Find 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"- Specified by:
findAllMultiCountryContentSlotsByOriginalSlotsin interfaceCMSContentSlotDao- Parameters:
contentSlots- the content slotscatalogVersions- the catalog versionspage- the page- Returns:
- the list of
ContentSlotModelobjects or empty list when none found
-
getAllDeletedRelationsForPage
public List<CMSRelationModel> getAllDeletedRelationsForPage(CatalogVersionModel targetCatalogVersion, AbstractPageModel sourcePage) Description copied from interface:CMSContentSlotDaoRetrieves the list of relations (ContentSlotForPageModelandContentSlotForTemplateModel) that does not exist (was removed) in source catalog version (based on page) and exists in target catalog version.- Specified by:
getAllDeletedRelationsForPagein interfaceCMSContentSlotDao- Parameters:
targetCatalogVersion- the target catalog versionsourcePage- the source page- Returns:
- the list of relations
-