public class ProductBuilder extends AbstractNodeBuilder<Product>
| Constructor and Description |
|---|
ProductBuilder()
Default constructor.
|
ProductBuilder(Integer amount)
Custom Constructor.
|
ProductBuilder(Integer amount,
String productType,
String productTypeDetails)
Custom Constructor.
|
ProductBuilder(Integer amount,
String productType,
String productTypeDetails,
String descriptiveName)
Custom Constructor.
|
ProductBuilder(Node productNode)
Custom constructor.
|
ProductBuilder(Product product)
Custom Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildProduct(Product childRef)
Append another product as child.
|
void |
addIntent(IntentType intent)
Append Intent node to Product Definition.
|
protected Product |
getProduct()
Getter for product attribute.
|
build, getNodepublic ProductBuilder()
public ProductBuilder(Node productNode) throws JAXBException
productNode - W2C Node object forJAXBExceptionpublic ProductBuilder(Integer amount)
amount - Value of Amount attributepublic ProductBuilder(Integer amount, String productType, String productTypeDetails)
amount - Value of Amount attributeproductType - Value of ProductType attributeproductTypeDetails - Value of ProductTypeDetails attributepublic ProductBuilder(Integer amount, String productType, String productTypeDetails, String descriptiveName)
amount - Value of Amount attributeproductType - Value of ProductType attributeproductTypeDetails - Value of ProductTypeDetails attributedescriptiveName - String value for DescriptiveName attribute.public ProductBuilder(Product product)
product - Product node for initializing.protected Product getProduct()
public void addIntent(IntentType intent)
intent - Intent object to append to.public final void addChildProduct(Product childRef) throws IllegalArgumentException
childRef - Reference to the child product to append.IllegalArgumentExceptionCopyright © 2016. All rights reserved.