public final class ProductDraftBuilder extends Base
Modifier and Type | Method and Description |
---|---|
ProductDraftDsl |
build()
Creates a new instance of
ProductDraftDsl with the values of this builder. |
ProductDraftBuilder |
categories(List<Reference<Category>> categories) |
T |
categories(Set<ResourceIdentifier<Category>> categories)
Sets the
categories property of this builder. |
ProductDraftBuilder |
categoriesAsObjectList(List<Category> categories)
Adds categories to this product draft.
|
T |
categoryOrderHints(CategoryOrderHints categoryOrderHints)
Sets the
categoryOrderHints property of this builder. |
T |
description(LocalizedString description)
Sets the
description property of this builder. |
Set<ResourceIdentifier<Category>> |
getCategories() |
CategoryOrderHints |
getCategoryOrderHints() |
LocalizedString |
getDescription() |
String |
getKey() |
ProductVariantDraft |
getMasterVariant() |
LocalizedString |
getMetaDescription() |
LocalizedString |
getMetaKeywords() |
LocalizedString |
getMetaTitle() |
LocalizedString |
getName() |
ResourceIdentifier<ProductType> |
getProductType() |
SearchKeywords |
getSearchKeywords() |
LocalizedString |
getSlug() |
ResourceIdentifier<State> |
getState() |
ResourceIdentifier<TaxCategory> |
getTaxCategory() |
List<ProductVariantDraft> |
getVariants() |
Boolean |
isPublish() |
T |
isPublish(Boolean publish)
Sets the
publish property of this builder. |
T |
key(String key)
Sets the
key property of this builder. |
T |
masterVariant(ProductVariantDraft masterVariant)
Sets the
masterVariant property of this builder. |
T |
metaDescription(LocalizedString metaDescription)
Sets the
metaDescription property of this builder. |
T |
metaKeywords(LocalizedString metaKeywords)
Sets the
metaKeywords property of this builder. |
T |
metaTitle(LocalizedString metaTitle)
Sets the
metaTitle property of this builder. |
T |
name(LocalizedString name)
Sets the
name property of this builder. |
static ProductDraftBuilder |
of(ProductDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static ProductDraftBuilder |
of(ResourceIdentifiable<ProductType> productType,
LocalizedString name,
LocalizedString slug,
List<ProductVariantDraft> allVariants) |
static ProductDraftBuilder |
of(ResourceIdentifiable<ProductType> productType,
LocalizedString name,
LocalizedString slug,
ProductVariantDraft masterVariant) |
static ProductDraftBuilder |
of(ResourceIdentifier<ProductType> productType,
LocalizedString name,
LocalizedString slug,
ProductVariantDraft masterVariant)
Creates a new object initialized with the given values.
|
T |
plusCategories(ResourceIdentifier<Category> categories)
Adds
categories parameter to the categories set property of this builder. |
T |
plusCategories(Set<ResourceIdentifier<Category>> categories)
Concatenate
categories parameter to the categories set property of this builder. |
ProductDraftBuilder |
plusVariants(List<ProductVariantDraft> variantsToAdd)
Concatenate
variants parameter to the variants list property of this builder. |
ProductDraftBuilder |
plusVariants(ProductVariantDraft variantToAdd)
Adds
variants parameter to the variants list property of this builder. |
T |
productType(ResourceIdentifier<ProductType> productType)
Sets the
productType property of this builder. |
T |
publish(Boolean publish)
Sets the
publish property of this builder. |
T |
searchKeywords(SearchKeywords searchKeywords)
Sets the
searchKeywords property of this builder. |
T |
slug(LocalizedString slug)
Sets the
slug property of this builder. |
ProductDraftBuilder |
state(Reference<State> state) |
ProductDraftBuilder |
state(Referenceable<State> state) |
T |
state(ResourceIdentifier<State> state)
Sets the
state property of this builder. |
ProductDraftBuilder |
taxCategory(Reference<TaxCategory> taxCategory) |
ProductDraftBuilder |
taxCategory(Referenceable<TaxCategory> taxCategory) |
T |
taxCategory(ResourceIdentifier<TaxCategory> taxCategory)
Sets the
taxCategory property of this builder. |
ProductDraftBuilder |
variants(List<ProductVariantDraft> variants)
Sets the
variants property of this builder. |
public static ProductDraftBuilder of(ResourceIdentifiable<ProductType> productType, LocalizedString name, LocalizedString slug, List<ProductVariantDraft> allVariants)
public static ProductDraftBuilder of(ResourceIdentifiable<ProductType> productType, LocalizedString name, LocalizedString slug, @Nullable ProductVariantDraft masterVariant)
public ProductDraftBuilder variants(List<ProductVariantDraft> variants)
variants
property of this builder.variants
- the value for ProductDraft.getVariants()
public ProductDraftBuilder plusVariants(ProductVariantDraft variantToAdd)
variants
parameter to the variants
list property of this builder.variantToAdd
- the value of the element to add to ProductDraft.getVariants()
public ProductDraftBuilder plusVariants(List<ProductVariantDraft> variantsToAdd)
variants
parameter to the variants
list property of this builder.variantsToAdd
- the value for ProductDraft.getVariants()
public ProductDraftBuilder categories(List<Reference<Category>> categories)
public ProductDraftBuilder categoriesAsObjectList(List<Category> categories)
categories(List)
which takes the category objects as parameter.categories
- categories which the product belongs topublic ProductDraftBuilder state(@Nullable Referenceable<State> state)
public ProductDraftBuilder state(@Nullable Reference<State> state)
public ProductDraftBuilder taxCategory(@Nullable Referenceable<TaxCategory> taxCategory)
public ProductDraftBuilder taxCategory(@Nullable Reference<TaxCategory> taxCategory)
public T categories(Set<ResourceIdentifier<Category>> categories)
categories
property of this builder.categories
- the value for ProductDraft.getCategories()
public T categoryOrderHints(@Nullable CategoryOrderHints categoryOrderHints)
categoryOrderHints
property of this builder.categoryOrderHints
- the value for ProductDraft.getCategoryOrderHints()
public T description(@Nullable LocalizedString description)
description
property of this builder.description
- the value for ProductDraft.getDescription()
public T key(@Nullable String key)
key
property of this builder.key
- the value for ProductDraft.getKey()
public T masterVariant(@Nullable ProductVariantDraft masterVariant)
masterVariant
property of this builder.masterVariant
- the value for ProductDraft.getMasterVariant()
public T metaDescription(@Nullable LocalizedString metaDescription)
metaDescription
property of this builder.metaDescription
- the value for ProductDraft.getMetaDescription()
public T metaKeywords(@Nullable LocalizedString metaKeywords)
metaKeywords
property of this builder.metaKeywords
- the value for ProductDraft.getMetaKeywords()
public T metaTitle(@Nullable LocalizedString metaTitle)
metaTitle
property of this builder.metaTitle
- the value for ProductDraft.getMetaTitle()
public T name(LocalizedString name)
name
property of this builder.name
- the value for ProductDraft.getName()
public T productType(ResourceIdentifier<ProductType> productType)
productType
property of this builder.productType
- the value for ProductDraft.getProductType()
public T publish(@Nullable Boolean publish)
publish
property of this builder.publish
- the value for ProductDraft.isPublish()
public T isPublish(@Nullable Boolean publish)
publish
property of this builder.publish
- the value for ProductDraft.isPublish()
public T searchKeywords(SearchKeywords searchKeywords)
searchKeywords
property of this builder.searchKeywords
- the value for ProductDraft.getSearchKeywords()
public T slug(LocalizedString slug)
slug
property of this builder.slug
- the value for ProductDraft.getSlug()
public T state(@Nullable ResourceIdentifier<State> state)
state
property of this builder.state
- the value for ProductDraft.getState()
public T taxCategory(@Nullable ResourceIdentifier<TaxCategory> taxCategory)
taxCategory
property of this builder.taxCategory
- the value for ProductDraft.getTaxCategory()
public Set<ResourceIdentifier<Category>> getCategories()
@Nullable public CategoryOrderHints getCategoryOrderHints()
@Nullable public LocalizedString getDescription()
@Nullable public ProductVariantDraft getMasterVariant()
@Nullable public LocalizedString getMetaDescription()
@Nullable public LocalizedString getMetaKeywords()
@Nullable public LocalizedString getMetaTitle()
public LocalizedString getName()
public ResourceIdentifier<ProductType> getProductType()
public SearchKeywords getSearchKeywords()
public LocalizedString getSlug()
@Nullable public ResourceIdentifier<State> getState()
@Nullable public ResourceIdentifier<TaxCategory> getTaxCategory()
public List<ProductVariantDraft> getVariants()
public T plusCategories(Set<ResourceIdentifier<Category>> categories)
categories
parameter to the categories
set property of this builder.categories
- the value for ProductDraft.getCategories()
public T plusCategories(ResourceIdentifier<Category> categories)
categories
parameter to the categories
set property of this builder.categories
- the value of the element to add to ProductDraft.getCategories()
public ProductDraftDsl build()
ProductDraftDsl
with the values of this builder.build
in interface Builder<ProductDraftDsl>
public static ProductDraftBuilder of(ResourceIdentifier<ProductType> productType, LocalizedString name, LocalizedString slug, @Nullable ProductVariantDraft masterVariant)
productType
- initial value for the ProductDraft.getProductType()
propertyname
- initial value for the ProductDraft.getName()
propertyslug
- initial value for the ProductDraft.getSlug()
propertymasterVariant
- initial value for the ProductDraft.getMasterVariant()
propertypublic static ProductDraftBuilder of(ProductDraft template)
template
- the template