Interface VendorCMSService

All Known Implementing Classes:
DefaultVendorCMSService

public interface VendorCMSService
Used to handle data in CMS site/page/template/component
  • Method Details

    • getPageTemplateByIdAndCatalogVersion

      Optional<PageTemplateModel> getPageTemplateByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion)
      get page template by given id in given catalog version
      Parameters:
      id - the given template id
      catalogVersion - the given catalog version
      Returns:
      Optional of the instance of the page template if found and empty optional otherwise
    • getPageByIdAndCatalogVersion

      Optional<AbstractPageModel> getPageByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion)
      get page by it and catalog version
      Parameters:
      id - the uid of the page
      catalogVersion - the catalog version
      Returns:
      Optional of the instance of the page if found and empty optional otherwise
    • getRestrictionByIdAndCatalogVersion

      Optional<AbstractRestrictionModel> getRestrictionByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion)
      get restriction by id and catalog version
      Parameters:
      id - the uid of the restriction
      catalogVersion - the catalog version
      Returns:
      Optional of the instance of the restriction if found and empty optional otherwise
    • getContentSlotRelationByIdAndPositionInPage

      Optional<ContentSlotForPageModel> getContentSlotRelationByIdAndPositionInPage(String id, AbstractPageModel page, String position)
      get ContentSlotForPage according to its position in a page
      Parameters:
      id - ContentSlotForPage's Id
      page - the instance of page
      position - the specific position
      Returns:
      tOptional of the instance of the content slot relation if found and empty optional otherwise
    • getContentSlotByIdAndCatalogVersion

      Optional<ContentSlotModel> getContentSlotByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion)
      get content slot by its uid and catalog version
      Parameters:
      id - the uid of the content slot
      catalogVersion - the catalog version
      Returns:
      Optional of the instance of the content slot if found and empty optional otherwise
    • getContentSlotByPageAndPosition

      Optional<ContentSlotModel> getContentSlotByPageAndPosition(String position, AbstractPageModel page, CatalogVersionModel catalogVersion)
      get content slot by its position, page and catalog version
      Parameters:
      position - position of the content slot
      page - page of the content slot
      catalogVersion - the catalog version
      Returns:
      the expected content slot otherwise empty option
    • getCMSComponentByIdAndCatalogVersion

      Optional<AbstractCMSComponentModel> getCMSComponentByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion)
      get component by its uid and catalog version
      Parameters:
      id - the uid of the component
      catalogVersion - the catalog version
      Returns:
      Optional of the instance of the component if found and empty optional otherwise
    • getCMSComponentsByContentSlotAndCatalogVersions

      List<AbstractCMSComponentModel> getCMSComponentsByContentSlotAndCatalogVersions(String contentSlotId, List<CatalogVersionModel> catalogVersions)
      get component by content slot and catalog version
      Parameters:
      contentSlotId - Id of content slot
      catalogVersions - list of catalog versions
      Returns:
      List of component in given content slot and catalog version
    • saveOrUpdateCMSVendorPage

      VendorPageModel saveOrUpdateCMSVendorPage(String pageUid, String pageName, CatalogVersionModel catalogVersion, PageTemplateModel pageTemplate, boolean isDefaultPage, CmsApprovalStatus approvalStatus)
      create an instance of CMS VendorPageModel
      Parameters:
      pageUid - the page's uid
      pageName - the page's name
      catalogVersion - the catalogversion of this page
      pageTemplate - the template of page used
      isDefaultPage - using this page as a default?
      approvalStatus - is approved or checked?
      Returns:
      The instance of the page
    • saveOrUpdateCMSVendorRestriction

      void saveOrUpdateCMSVendorRestriction(VendorModel vendor, CatalogVersionModel catalogVersion, String uid, String name, AbstractPageModel... pages)
      create an instance of page restriction for a vendor
      Parameters:
      vendor - the specific page
      catalogVersion - the catalog version
      uid - the restrication's ID
      name - the restrication's name
      pages - pages of restriction
    • saveOrUpdateCMSContentSlot

      ContentSlotModel saveOrUpdateCMSContentSlot(CatalogVersionModel catalogVersion, String uid, String name, boolean active)
      create content slot
      Parameters:
      catalogVersion - the catalogversion of this page using
      uid - content slot id
      name - content slot name
      active - is active?
      Returns:
      the content slot instance
    • saveOrUpdateCMSContentSlotForPage

      void saveOrUpdateCMSContentSlotForPage(CatalogVersionModel catalogVersion, String uid, String position, AbstractPageModel page, ContentSlotModel contentSlot)
      create the content slot for a CMS page
      Parameters:
      catalogVersion - the catalogversion of this page using
      uid - the id of this content slot
      position - where is the content slot
      page - the page of this content slot
      contentSlot - detailed content slot reference
    • saveOrUpdateJspIncludeComponent

      JspIncludeComponentModel saveOrUpdateJspIncludeComponent(CatalogVersionModel catalogVersion, String uid, String name, String page)
      create JSP include component
      Parameters:
      catalogVersion - the catalogversion of this page using
      uid - the id of this component
      name - name of the component
      page - detailed jsp location of this component
      Returns:
      the instance of this jspincludecomponent
    • saveOrUpdateProductCarouselComponent

      ProductCarouselComponentModel saveOrUpdateProductCarouselComponent(CatalogVersionModel catalogVersion, String uid, String name, CarouselScroll scroll, boolean popup)
      create product carousel component
      Parameters:
      catalogVersion - the catalog of this component
      uid - the id of this component
      name - the id of this component
      scroll - how to scroll the carousel
      popup - is pop-up?
      Returns:
      the instance of this component
    • getProductCarouselSynchronizationStatus

      SyncItemStatus getProductCarouselSynchronizationStatus(ProductCarouselComponentModel carousel)
      Gets the synchronization item status for a given ProductCarouselComponentModel
      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 of ProductCarouselComponentModel taking in consideration the source and target catalog versions.
      Parameters:
      carousel - the carousel model that we want to synchronize
      synchronous - run with synchronous or asynchronous