Class ProductConfigWrapper

java.lang.Object
org.apache.ofbiz.product.config.ProductConfigWrapper
All Implemented Interfaces:
Serializable

public class ProductConfigWrapper extends Object implements Serializable
Product Config Wrapper: gets product config to display
See Also:
  • Constructor Details

  • Method Details

    • setConfigId

      public void setConfigId(String configId)
      Sets config id.
      Parameters:
      configId - the config id
    • loadConfig

      public void loadConfig(Delegator delegator, String configId) throws Exception
      Load config.
      Parameters:
      delegator - the delegator
      configId - the config id
      Throws:
      Exception - the exception
    • setSelected

      public void setSelected(String configItemId, Long sequenceNum, String configOptionId, String comments) throws Exception
      Sets selected.
      Parameters:
      configItemId - the config item id
      sequenceNum - the sequence num
      configOptionId - the config option id
      comments - the comments
      Throws:
      Exception - the exception
    • resetConfig

      public void resetConfig()
      Reset config.
    • setDefaultConfig

      public void setDefaultConfig()
      Sets default config.
    • getConfigId

      public String getConfigId()
      Gets config id.
      Returns:
      the config id
    • getDelegator

      public Delegator getDelegator()
      Gets delegator.
      Returns:
      the delegator
    • getDispatcher

      public LocalDispatcher getDispatcher()
      Gets dispatcher.
      Returns:
      the dispatcher
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getQuestions

      public List<ProductConfigWrapper.ConfigItem> getQuestions()
      Gets questions.
      Returns:
      the questions
    • getProduct

      public GenericValue getProduct()
      Gets product.
      Returns:
      the product
    • setSelected

      public void setSelected(int question, int option, String comments) throws Exception
      Sets selected.
      Parameters:
      question - the question
      option - the option
      comments - the comments
      Throws:
      Exception - the exception
    • setSelected

      public void setSelected(int question, int option, int component, String componentOption) throws Exception
      Sets selected.
      Parameters:
      question - the question
      option - the option
      component - the component
      componentOption - the component option
      Throws:
      Exception - the exception
    • getSelectedOptions

      public List<ProductConfigWrapper.ConfigOption> getSelectedOptions()
      Gets selected options.
      Returns:
      the selected options
    • getDefaultOptions

      public List<ProductConfigWrapper.ConfigOption> getDefaultOptions()
      Gets default options.
      Returns:
      the default options
    • getTotalListPrice

      public BigDecimal getTotalListPrice()
      Gets total list price.
      Returns:
      the total list price
    • getTotalPrice

      public BigDecimal getTotalPrice()
      Gets total price.
      Returns:
      the total price
    • getDefaultPrice

      public BigDecimal getDefaultPrice()
      Gets default price.
      Returns:
      the default price
    • isCompleted

      public boolean isCompleted()
      Is completed boolean.
      Returns:
      the boolean
    • getItemOtion

      public ProductConfigWrapper.ConfigOption getItemOtion(int itemIndex, int optionIndex)
      Gets item otion.
      Parameters:
      itemIndex - the item index
      optionIndex - the option index
      Returns:
      the item otion