Class ProductBuilder


public class ProductBuilder extends AbstractNodeBuilder<Product>
Implementation of a Product builder class.
  • Constructor Details

    • ProductBuilder

      public ProductBuilder()
      Default constructor.
    • ProductBuilder

      public ProductBuilder(Node productNode) throws javax.xml.bind.JAXBException
      Custom constructor. Accepting a W3C Node object for initializing.
      Parameters:
      productNode - W2C Node object for
      Throws:
      javax.xml.bind.JAXBException
    • ProductBuilder

      public ProductBuilder(Integer amount)
      Custom Constructor. Creates a new instance of ProductBuilder which already contains attribute Amount.
      Parameters:
      amount - Value of Amount attribute
    • ProductBuilder

      public ProductBuilder(Integer amount, String productType, String productTypeDetails)
      Custom Constructor. Creates a new instance of ProductBuilder which already contains attributes Amount, ID, ProductType and ProductTypeDetails.
      Parameters:
      amount - Value of Amount attribute
      productType - Value of ProductType attribute
      productTypeDetails - Value of ProductTypeDetails attribute
    • ProductBuilder

      public ProductBuilder(Integer amount, String productType, String productTypeDetails, String descriptiveName)
      Custom Constructor. Creates a new instance of ProductBuilder which already contains attributes Amount, ID, ProductType and ProductTypeDetails.
      Parameters:
      amount - Value of Amount attribute
      productType - Value of ProductType attribute
      productTypeDetails - Value of ProductTypeDetails attribute
      descriptiveName - String value for DescriptiveName attribute.
    • ProductBuilder

      public ProductBuilder(Product product)
      Custom Constructor. Creates a new instance of ProductBuilder based on a existing Product Node.
      Parameters:
      product - Product node for initializing.
  • Method Details

    • getProduct

      protected Product getProduct()
      Getter for product attribute.
      Returns:
      the product
    • addIntent

      public void addIntent(ProductIntent intent)
      Append Intent node to Product Definition.
      Parameters:
      intent - Intent object to append to.