Class DefaultVendorCMSService
java.lang.Object
de.hybris.platform.marketplaceservices.vendor.impl.DefaultVendorCMSService
- All Implemented Interfaces:
VendorCMSService
Provide CMS related services
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CatalogSynchronizationServiceprotected CatalogTypeServiceprotected CatalogVersionServicegetCMSComponentByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) get component by its uid and catalog versionprotected MarketplaceCMSComponentDaogetCMSComponentsByContentSlotAndCatalogVersions(String contentSlotId, List<CatalogVersionModel> catalogVersions) get component by content slot and catalog versionprotected CMSContentSlotDaoprotected CMSPageDaoprotected CMSPageTemplateDaoprotected CMSRestrictionDaogetContentSlotByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) get content slot by its uid and catalog versiongetContentSlotByPageAndPosition(String position, AbstractPageModel page, CatalogVersionModel catalogVersion) get content slot by its position, page and catalog versiongetContentSlotRelationByIdAndPositionInPage(String id, AbstractPageModel page, String position) get ContentSlotForPage according to its position in a pagegetItemList(ItemModel item) protected ModelServicegetPageByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) get page by it and catalog versiongetPageTemplateByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) get page template by given id in given catalog versionprotected SynchronizationStatusServiceGets the synchronization item status for a givenProductCarouselComponentModelprotected SyncItemJobModelgetRelevantSyncItemJob(SyncRequestData syncRequestData, ItemModel item) getRestrictionByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) get restriction by id and catalog versionprotected SearchRestrictionServiceprotected SessionServiceprotected SyncConfigprotected SyncRequestDataprotected booleanisExecutableInLocalView(SyncRequestData syncRequestData, ItemModel item) protected booleanisOutboundSynchronization(SyncRequestData syncRequestData, ItemModel item) voidperformProductCarouselSynchronization(ProductCarouselComponentModel carousel, boolean synchronous) Performs the synchronization of a model ofProductCarouselComponentModeltaking in consideration the source and target catalog versions.saveOrUpdateCMSContentSlot(CatalogVersionModel catalogVersion, String uid, String name, boolean active) create content slotvoidsaveOrUpdateCMSContentSlotForPage(CatalogVersionModel catalogVersion, String uid, String position, AbstractPageModel page, ContentSlotModel contentSlot) create the content slot for a CMS pagesaveOrUpdateCMSVendorPage(String pageUid, String pageName, CatalogVersionModel catalogVersion, PageTemplateModel pageTemplate, boolean isDefaultPage, CmsApprovalStatus approvalStatus) create an instance of CMS VendorPageModelvoidsaveOrUpdateCMSVendorRestriction(VendorModel vendor, CatalogVersionModel catalogVersion, String uid, String name, AbstractPageModel... pages) create an instance of page restriction for a vendorsaveOrUpdateJspIncludeComponent(CatalogVersionModel catalogVersion, String uid, String name, String page) create JSP include componentsaveOrUpdateProductCarouselComponent(CatalogVersionModel catalogVersion, String uid, String name, CarouselScroll scroll, boolean popup) create product carousel componentvoidsetCatalogSynchronizationService(CatalogSynchronizationService catalogSynchronizationService) voidsetCatalogTypeService(CatalogTypeService catalogTypeService) voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetCmsComponentDao(MarketplaceCMSComponentDao cmsComponentDao) voidsetCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao) voidsetCmsPageDao(CMSPageDao cmsPageDao) voidsetCmsPageTemplateDao(CMSPageTemplateDao cmsPageTemplateDao) voidsetCmsRestrictionDao(CMSRestrictionDao cmsRestrictionDao) voidsetModelService(ModelService modelService) voidsetPlatformSynchronizationStatusService(SynchronizationStatusService platformSynchronizationStatusService) voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService) voidsetSessionService(SessionService sessionService) voidsetSyncConfig(SyncConfig syncConfig)
-
Constructor Details
-
DefaultVendorCMSService
public DefaultVendorCMSService()
-
-
Method Details
-
getPageTemplateByIdAndCatalogVersion
public Optional<PageTemplateModel> getPageTemplateByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget page template by given id in given catalog version- Specified by:
getPageTemplateByIdAndCatalogVersionin interfaceVendorCMSService- Parameters:
id- the given template idcatalogVersion- the given catalog version- Returns:
- Optional of the instance of the page template if found and empty optional otherwise
-
getPageByIdAndCatalogVersion
public Optional<AbstractPageModel> getPageByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget page by it and catalog version- Specified by:
getPageByIdAndCatalogVersionin interfaceVendorCMSService- Parameters:
id- the uid of the pagecatalogVersion- the catalog version- Returns:
- Optional of the instance of the page if found and empty optional otherwise
-
getRestrictionByIdAndCatalogVersion
public Optional<AbstractRestrictionModel> getRestrictionByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget restriction by id and catalog version- Specified by:
getRestrictionByIdAndCatalogVersionin interfaceVendorCMSService- Parameters:
id- the uid of the restrictioncatalogVersion- the catalog version- Returns:
- Optional of the instance of the restriction if found and empty optional otherwise
-
getContentSlotRelationByIdAndPositionInPage
public Optional<ContentSlotForPageModel> getContentSlotRelationByIdAndPositionInPage(String id, AbstractPageModel page, String position) Description copied from interface:VendorCMSServiceget ContentSlotForPage according to its position in a page- Specified by:
getContentSlotRelationByIdAndPositionInPagein interfaceVendorCMSService- Parameters:
id- ContentSlotForPage's Idpage- the instance of pageposition- the specific position- Returns:
- tOptional of the instance of the content slot relation if found and empty optional otherwise
-
getContentSlotByIdAndCatalogVersion
public Optional<ContentSlotModel> getContentSlotByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget content slot by its uid and catalog version- Specified by:
getContentSlotByIdAndCatalogVersionin interfaceVendorCMSService- Parameters:
id- the uid of the content slotcatalogVersion- the catalog version- Returns:
- Optional of the instance of the content slot if found and empty optional otherwise
-
getContentSlotByPageAndPosition
public Optional<ContentSlotModel> getContentSlotByPageAndPosition(String position, AbstractPageModel page, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget content slot by its position, page and catalog version- Specified by:
getContentSlotByPageAndPositionin interfaceVendorCMSService- Parameters:
position- position of the content slotpage- page of the content slotcatalogVersion- the catalog version- Returns:
- the expected content slot otherwise empty option
-
getCMSComponentByIdAndCatalogVersion
public Optional<AbstractCMSComponentModel> getCMSComponentByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Description copied from interface:VendorCMSServiceget component by its uid and catalog version- Specified by:
getCMSComponentByIdAndCatalogVersionin interfaceVendorCMSService- Parameters:
id- the uid of the componentcatalogVersion- the catalog version- Returns:
- Optional of the instance of the component if found and empty optional otherwise
-
getCMSComponentsByContentSlotAndCatalogVersions
public List<AbstractCMSComponentModel> getCMSComponentsByContentSlotAndCatalogVersions(String contentSlotId, List<CatalogVersionModel> catalogVersions) Description copied from interface:VendorCMSServiceget component by content slot and catalog version- Specified by:
getCMSComponentsByContentSlotAndCatalogVersionsin interfaceVendorCMSService- Parameters:
contentSlotId- Id of content slotcatalogVersions- list of catalog versions- Returns:
- List of component in given content slot and catalog version
-
saveOrUpdateCMSVendorPage
public VendorPageModel saveOrUpdateCMSVendorPage(String pageUid, String pageName, CatalogVersionModel catalogVersion, PageTemplateModel pageTemplate, boolean isDefaultPage, CmsApprovalStatus approvalStatus) Description copied from interface:VendorCMSServicecreate an instance of CMS VendorPageModel- Specified by:
saveOrUpdateCMSVendorPagein interfaceVendorCMSService- Parameters:
pageUid- the page's uidpageName- the page's namecatalogVersion- the catalogversion of this pagepageTemplate- the template of page usedisDefaultPage- using this page as a default?approvalStatus- is approved or checked?- Returns:
- The instance of the page
-
saveOrUpdateCMSVendorRestriction
public void saveOrUpdateCMSVendorRestriction(VendorModel vendor, CatalogVersionModel catalogVersion, String uid, String name, AbstractPageModel... pages) Description copied from interface:VendorCMSServicecreate an instance of page restriction for a vendor- Specified by:
saveOrUpdateCMSVendorRestrictionin interfaceVendorCMSService- Parameters:
vendor- the specific pagecatalogVersion- the catalog versionuid- the restrication's IDname- the restrication's namepages- pages of restriction
-
saveOrUpdateCMSContentSlot
public ContentSlotModel saveOrUpdateCMSContentSlot(CatalogVersionModel catalogVersion, String uid, String name, boolean active) Description copied from interface:VendorCMSServicecreate content slot- Specified by:
saveOrUpdateCMSContentSlotin interfaceVendorCMSService- Parameters:
catalogVersion- the catalogversion of this page usinguid- content slot idname- content slot nameactive- is active?- Returns:
- the content slot instance
-
saveOrUpdateCMSContentSlotForPage
public void saveOrUpdateCMSContentSlotForPage(CatalogVersionModel catalogVersion, String uid, String position, AbstractPageModel page, ContentSlotModel contentSlot) Description copied from interface:VendorCMSServicecreate the content slot for a CMS page- Specified by:
saveOrUpdateCMSContentSlotForPagein interfaceVendorCMSService- Parameters:
catalogVersion- the catalogversion of this page usinguid- the id of this content slotposition- where is the content slotpage- the page of this content slotcontentSlot- detailed content slot reference
-
saveOrUpdateJspIncludeComponent
public JspIncludeComponentModel saveOrUpdateJspIncludeComponent(CatalogVersionModel catalogVersion, String uid, String name, String page) Description copied from interface:VendorCMSServicecreate JSP include component- Specified by:
saveOrUpdateJspIncludeComponentin interfaceVendorCMSService- Parameters:
catalogVersion- the catalogversion of this page usinguid- the id of this componentname- name of the componentpage- detailed jsp location of this component- Returns:
- the instance of this jspincludecomponent
-
saveOrUpdateProductCarouselComponent
public ProductCarouselComponentModel saveOrUpdateProductCarouselComponent(CatalogVersionModel catalogVersion, String uid, String name, CarouselScroll scroll, boolean popup) Description copied from interface:VendorCMSServicecreate product carousel component- Specified by:
saveOrUpdateProductCarouselComponentin interfaceVendorCMSService- Parameters:
catalogVersion- the catalog of this componentuid- the id of this componentname- the id of this componentscroll- how to scroll the carouselpopup- is pop-up?- Returns:
- the instance of this component
-
getProductCarouselSynchronizationStatus
public SyncItemStatus getProductCarouselSynchronizationStatus(ProductCarouselComponentModel carousel) Description copied from interface:VendorCMSServiceGets the synchronization item status for a givenProductCarouselComponentModel- Specified by:
getProductCarouselSynchronizationStatusin interfaceVendorCMSService- Parameters:
carousel- carousel model we are interested in getting the synchronization status- Returns:
- the given carousel
SyncItemStatus
-
performProductCarouselSynchronization
public void performProductCarouselSynchronization(ProductCarouselComponentModel carousel, boolean synchronous) Description copied from interface:VendorCMSServicePerforms the synchronization of a model ofProductCarouselComponentModeltaking in consideration the source and target catalog versions.- Specified by:
performProductCarouselSynchronizationin interfaceVendorCMSService- Parameters:
carousel- the carousel model that we want to synchronizesynchronous- run with synchronous or asynchronous
-
getItemList
-
getSyncRequestData
-
getRelevantSyncItemJob
-
isOutboundSynchronization
-
isExecutableInLocalView
-
getCmsPageTemplateDao
-
setCmsPageTemplateDao
-
getCmsPageDao
-
setCmsPageDao
-
getCmsRestrictionDao
-
setCmsRestrictionDao
-
getCmsContentSlotDao
-
setCmsContentSlotDao
-
getCmsComponentDao
-
setCmsComponentDao
-
getModelService
-
setModelService
-
getSyncConfig
-
setSyncConfig
-
getSearchRestrictionService
-
setSearchRestrictionService
-
getSessionService
-
setSessionService
-
getCatalogTypeService
-
setCatalogTypeService
-
getCatalogVersionService
-
setCatalogVersionService
-
getPlatformSynchronizationStatusService
-
setPlatformSynchronizationStatusService
public void setPlatformSynchronizationStatusService(SynchronizationStatusService platformSynchronizationStatusService) -
getCatalogSynchronizationService
-
setCatalogSynchronizationService
public void setCatalogSynchronizationService(CatalogSynchronizationService catalogSynchronizationService)
-