Interface VendorCMSService
-
- All Known Implementing Classes:
DefaultVendorCMSService
public interface VendorCMSServiceUsed to handle data in CMS site/page/template/component
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<AbstractCMSComponentModel>getCMSComponentByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)get component by its uid and catalog versionjava.util.List<AbstractCMSComponentModel>getCMSComponentsByContentSlotAndCatalogVersions(java.lang.String contentSlotId, java.util.List<CatalogVersionModel> catalogVersions)get component by content slot and catalog versionjava.util.Optional<ContentSlotModel>getContentSlotByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)get content slot by its uid and catalog versionjava.util.Optional<ContentSlotModel>getContentSlotByPageAndPosition(java.lang.String position, AbstractPageModel page, CatalogVersionModel catalogVersion)get content slot by its position, page and catalog versionjava.util.Optional<ContentSlotForPageModel>getContentSlotRelationByIdAndPositionInPage(java.lang.String id, AbstractPageModel page, java.lang.String position)get ContentSlotForPage according to its position in a pagejava.util.Optional<AbstractPageModel>getPageByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)get page by it and catalog versionjava.util.Optional<PageTemplateModel>getPageTemplateByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)get page template by given id in given catalog versionSyncItemStatusgetProductCarouselSynchronizationStatus(ProductCarouselComponentModel carousel)Gets the synchronization item status for a givenProductCarouselComponentModeljava.util.Optional<AbstractRestrictionModel>getRestrictionByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)get restriction by id and catalog versionvoidperformProductCarouselSynchronization(ProductCarouselComponentModel carousel, boolean synchronous)Performs the synchronization of a model ofProductCarouselComponentModeltaking in consideration the source and target catalog versions.ContentSlotModelsaveOrUpdateCMSContentSlot(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, boolean active)create content slotvoidsaveOrUpdateCMSContentSlotForPage(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String position, AbstractPageModel page, ContentSlotModel contentSlot)create the content slot for a CMS pageVendorPageModelsaveOrUpdateCMSVendorPage(java.lang.String pageUid, java.lang.String pageName, CatalogVersionModel catalogVersion, PageTemplateModel pageTemplate, boolean isDefaultPage, CmsApprovalStatus approvalStatus)create an instance of CMS VendorPageModelvoidsaveOrUpdateCMSVendorRestriction(VendorModel vendor, CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, AbstractPageModel... pages)create an instance of page restriction for a vendorJspIncludeComponentModelsaveOrUpdateJspIncludeComponent(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, java.lang.String page)create JSP include componentProductCarouselComponentModelsaveOrUpdateProductCarouselComponent(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, CarouselScroll scroll, boolean popup)create product carousel component
-
-
-
Method Detail
-
getPageTemplateByIdAndCatalogVersion
java.util.Optional<PageTemplateModel> getPageTemplateByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
get page template by given id in given catalog version- 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
java.util.Optional<AbstractPageModel> getPageByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
get page by it and catalog version- 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
java.util.Optional<AbstractRestrictionModel> getRestrictionByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
get restriction by id and catalog version- 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
java.util.Optional<ContentSlotForPageModel> getContentSlotRelationByIdAndPositionInPage(java.lang.String id, AbstractPageModel page, java.lang.String position)
get ContentSlotForPage according to its position in a page- 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
java.util.Optional<ContentSlotModel> getContentSlotByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
get content slot by its uid and catalog version- 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
java.util.Optional<ContentSlotModel> getContentSlotByPageAndPosition(java.lang.String position, AbstractPageModel page, CatalogVersionModel catalogVersion)
get content slot by its position, page and catalog version- Parameters:
position- position of the content slotpage- page of the content slotcatalogVersion- the catalog version- Returns:
- the expected content slot otherwise empty option
-
getCMSComponentByIdAndCatalogVersion
java.util.Optional<AbstractCMSComponentModel> getCMSComponentByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
get component by its uid and catalog version- 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
java.util.List<AbstractCMSComponentModel> getCMSComponentsByContentSlotAndCatalogVersions(java.lang.String contentSlotId, java.util.List<CatalogVersionModel> catalogVersions)
get component by content slot and catalog version- Parameters:
contentSlotId- Id of content slotcatalogVersions- list of catalog versions- Returns:
- List of component in given content slot and catalog version
-
saveOrUpdateCMSVendorPage
VendorPageModel saveOrUpdateCMSVendorPage(java.lang.String pageUid, java.lang.String pageName, CatalogVersionModel catalogVersion, PageTemplateModel pageTemplate, boolean isDefaultPage, CmsApprovalStatus approvalStatus)
create an instance of CMS VendorPageModel- 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
void saveOrUpdateCMSVendorRestriction(VendorModel vendor, CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, AbstractPageModel... pages)
create an instance of page restriction for a vendor- Parameters:
vendor- the specific pagecatalogVersion- the catalog versionuid- the restrication's IDname- the restrication's namepages- pages of restriction
-
saveOrUpdateCMSContentSlot
ContentSlotModel saveOrUpdateCMSContentSlot(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, boolean active)
create content slot- Parameters:
catalogVersion- the catalogversion of this page usinguid- content slot idname- content slot nameactive- is active?- Returns:
- the content slot instance
-
saveOrUpdateCMSContentSlotForPage
void saveOrUpdateCMSContentSlotForPage(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String position, AbstractPageModel page, ContentSlotModel contentSlot)
create the content slot for a CMS page- 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
JspIncludeComponentModel saveOrUpdateJspIncludeComponent(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, java.lang.String page)
create JSP include component- 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
ProductCarouselComponentModel saveOrUpdateProductCarouselComponent(CatalogVersionModel catalogVersion, java.lang.String uid, java.lang.String name, CarouselScroll scroll, boolean popup)
create product carousel component- 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
SyncItemStatus getProductCarouselSynchronizationStatus(ProductCarouselComponentModel carousel)
Gets the synchronization item status for a givenProductCarouselComponentModel- Parameters:
carousel- carousel model we are interested in getting the synchronization status- Returns:
- the given carousel
SyncItemStatus
-
performProductCarouselSynchronization
void performProductCarouselSynchronization(ProductCarouselComponentModel carousel, boolean synchronous)
Performs the synchronization of a model ofProductCarouselComponentModeltaking in consideration the source and target catalog versions.- Parameters:
carousel- the carousel model that we want to synchronizesynchronous- run with synchronous or asynchronous
-
-