Interface ProductCatalogData

All Superinterfaces:
ProductCatalogDataMixin

public interface ProductCatalogData extends ProductCatalogDataMixin

Contains the current and staged ProductData.


Example to create an instance using the builder pattern

     ProductCatalogData productCatalogData = ProductCatalogData.builder()
             .published(true)
             .current(currentBuilder -> currentBuilder)
             .staged(stagedBuilder -> stagedBuilder)
             .hasStagedChanges(true)
             .build()
 
  • Method Details

    • getPublished

      @NotNull @NotNull Boolean getPublished()

      true if the Product is published.

      Returns:
      published
    • getCurrent

      @NotNull @Valid @NotNull @Valid ProductData getCurrent()

      Current (published) data of the Product.

      Specified by:
      getCurrent in interface ProductCatalogDataMixin
      Returns:
      current
    • getStaged

      @NotNull @Valid @NotNull @Valid ProductData getStaged()

      Staged (unpublished) data of the Product.

      Specified by:
      getStaged in interface ProductCatalogDataMixin
      Returns:
      staged
    • getHasStagedChanges

      @NotNull @NotNull Boolean getHasStagedChanges()

      true if the staged data is different from the current data.

      Returns:
      hasStagedChanges
    • setPublished

      void setPublished(Boolean published)

      true if the Product is published.

      Parameters:
      published - value to be set
    • setCurrent

      void setCurrent(ProductData current)

      Current (published) data of the Product.

      Parameters:
      current - value to be set
    • setStaged

      void setStaged(ProductData staged)

      Staged (unpublished) data of the Product.

      Parameters:
      staged - value to be set
    • setHasStagedChanges

      void setHasStagedChanges(Boolean hasStagedChanges)

      true if the staged data is different from the current data.

      Parameters:
      hasStagedChanges - value to be set
    • of

      static ProductCatalogData of()
      factory method
      Returns:
      instance of ProductCatalogData
    • of

      static ProductCatalogData of(ProductCatalogData template)
      factory method to create a shallow copy ProductCatalogData
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductCatalogData
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ProductCatalogDataBuilder builder()
      builder factory method for ProductCatalogData
      Returns:
      builder
    • builder

      static ProductCatalogDataBuilder builder(ProductCatalogData template)
      create builder for ProductCatalogData instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductCatalogData

      default <T> T withProductCatalogData(Function<ProductCatalogData,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductCatalogData> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference