Class OptionGenerationRequest

java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.dto.OptionGenerationRequest
All Implemented Interfaces:
Serializable

public class OptionGenerationRequest extends Object implements Serializable
DTO representing a request to generate a Product's options from a OptionTemplate or OptionTemplateGroup.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • OptionGenerationRequest

      public OptionGenerationRequest()
  • Method Details

    • getOptionTemplateId

      public String getOptionTemplateId()
      A direct getter for the ID of the OptionTemplate to be used for generating options for a product.
      Returns:
      The ID of the OptionTemplate
    • getOptionTemplateGroupId

      public String getOptionTemplateGroupId()
      A direct getter for the ID of the OptionTemplateGroup to be used for generating options for a product.
      Returns:
      The ID of the OptionTemplateGroup
    • getProductId

      public String getProductId()
      ID of the Product for which options should be generated.
      Returns:
      ID of the Product for which options should be generated.
    • getGenerationType

      public String getGenerationType()
      Returns:
      The type of the generation
    • isPreferAddTemplateByReference

      public boolean isPreferAddTemplateByReference()
      Determines whether the Product.getOptions() generated from this template will reference the template.
      Returns:
      true for the ProductOption to reflect changes made to the OptionTemplate, false for the generated ProductOption to hold its own copy of the template
    • getTemplate

      public OptionTemplateRef getTemplate()
      The OptionTemplateRef of the OptionTemplate to be used for generating options for a product if the generationType is OptionGenerationType.TEMPLATE, then this field is used.
      Returns:
      The OptionTemplateRef to be used for generating options for a product
    • getTemplateGroup

      public OptionTemplateGroupRef getTemplateGroup()
      The OptionTemplateGroupRef of the OptionTemplateGroup to be used for generating options for a product if the generationType is OptionGenerationType.TEMPLATE_GROUP, then this field is used.
      Returns:
      The OptionTemplateGroupRef to be used for generating options for a product
    • setProductId

      public void setProductId(String productId)
      ID of the Product for which options should be generated.
      Parameters:
      productId - ID of the Product for which options should be generated.
    • setGenerationType

      public void setGenerationType(String generationType)
      Parameters:
      generationType - The type of the generation
    • setPreferAddTemplateByReference

      public void setPreferAddTemplateByReference(boolean preferAddTemplateByReference)
      Determines whether the Product.getOptions() generated from this template will reference the template.
      Parameters:
      preferAddTemplateByReference - true for the ProductOption to reflect changes made to the OptionTemplate, false for the generated ProductOption to hold its own copy of the template
    • setTemplate

      public void setTemplate(OptionTemplateRef template)
      The OptionTemplateRef of the OptionTemplate to be used for generating options for a product if the generationType is OptionGenerationType.TEMPLATE, then this field is used.
      Parameters:
      optionTemplate - The OptionTemplateRef to be used for generating options for a product
    • setTemplateGroup

      public void setTemplateGroup(OptionTemplateGroupRef templateGroup)
      The OptionTemplateGroupRef of the OptionTemplateGroup to be used for generating options for a product if the generationType is OptionGenerationType.TEMPLATE_GROUP, then this field is used.
      Parameters:
      optionTemplate - The OptionTemplateGroupRef to be used for generating options for a product
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object