Class OptionGenerationRequest
java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.dto.OptionGenerationRequest
- All Implemented Interfaces:
Serializable
DTO representing a request to generate a
Product's options
from a
OptionTemplate
or OptionTemplateGroup
.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The type of the generation: EitherOptionGenerationType.TEMPLATE
orOptionGenerationType.TEMPLATE_GROUP
.A direct getter for the ID of theOptionTemplateGroup
to be used for generating options for a product.A direct getter for the ID of theOptionTemplate
to be used for generating options for a product.ID of theProduct
for which options should be generated.The OptionTemplateRef of theOptionTemplate
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE
, then this field is used.The OptionTemplateGroupRef of theOptionTemplateGroup
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE_GROUP
, then this field is used.int
hashCode()
boolean
Determines whether theProduct.getOptions()
generated from this template will reference the template.void
setGenerationType
(String generationType) The type of the generation: EitherOptionGenerationType.TEMPLATE
orOptionGenerationType.TEMPLATE_GROUP
.void
setPreferAddTemplateByReference
(boolean preferAddTemplateByReference) Determines whether theProduct.getOptions()
generated from this template will reference the template.void
setProductId
(String productId) ID of theProduct
for which options should be generated.void
setTemplate
(OptionTemplateRef template) The OptionTemplateRef of theOptionTemplate
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE
, then this field is used.void
setTemplateGroup
(OptionTemplateGroupRef templateGroup) The OptionTemplateGroupRef of theOptionTemplateGroup
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE_GROUP
, then this field is used.toString()
-
Constructor Details
-
OptionGenerationRequest
public OptionGenerationRequest()
-
-
Method Details
-
getOptionTemplateId
A direct getter for the ID of theOptionTemplate
to be used for generating options for a product.- Returns:
- The ID of the
OptionTemplate
-
getOptionTemplateGroupId
A direct getter for the ID of theOptionTemplateGroup
to be used for generating options for a product.- Returns:
- The ID of the
OptionTemplateGroup
-
getProductId
ID of theProduct
for which options should be generated.- Returns:
- ID of the
Product
for which options should be generated.
-
getGenerationType
The type of the generation: EitherOptionGenerationType.TEMPLATE
orOptionGenerationType.TEMPLATE_GROUP
.- Returns:
- The type of the generation
-
isPreferAddTemplateByReference
public boolean isPreferAddTemplateByReference()Determines whether theProduct.getOptions()
generated from this template will reference the template.- Returns:
- true for the
ProductOption
to reflect changes made to theOptionTemplate
, false for the generatedProductOption
to hold its own copy of the template
-
getTemplate
The OptionTemplateRef of theOptionTemplate
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE
, then this field is used.- Returns:
- The OptionTemplateRef to be used for generating options for a product
-
getTemplateGroup
The OptionTemplateGroupRef of theOptionTemplateGroup
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE_GROUP
, then this field is used.- Returns:
- The OptionTemplateGroupRef to be used for generating options for a product
-
setProductId
ID of theProduct
for which options should be generated.- Parameters:
productId
- ID of theProduct
for which options should be generated.
-
setGenerationType
The type of the generation: EitherOptionGenerationType.TEMPLATE
orOptionGenerationType.TEMPLATE_GROUP
.- Parameters:
generationType
- The type of the generation
-
setPreferAddTemplateByReference
public void setPreferAddTemplateByReference(boolean preferAddTemplateByReference) Determines whether theProduct.getOptions()
generated from this template will reference the template.- Parameters:
preferAddTemplateByReference
- true for theProductOption
to reflect changes made to theOptionTemplate
, false for the generatedProductOption
to hold its own copy of the template
-
setTemplate
The OptionTemplateRef of theOptionTemplate
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE
, then this field is used.- Parameters:
optionTemplate
- The OptionTemplateRef to be used for generating options for a product
-
setTemplateGroup
The OptionTemplateGroupRef of theOptionTemplateGroup
to be used for generating options for a product if thegenerationType
isOptionGenerationType.TEMPLATE_GROUP
, then this field is used.- Parameters:
optionTemplate
- The OptionTemplateGroupRef to be used for generating options for a product
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-