Class QuoteStructure
- Object
-
- QuoteStructure
-
public class QuoteStructure extends Object
This is a helper object that is used to build up code generated content of a quote. A single QuoteStructure object represents a specified level in the quote folder tree, i.e. it is not representing the full quote if you have multiple subfolder levels
The level is defined byparentId
of the structure object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
QuoteStructure.Item
A DTO that holds information about the new item (part or folder) to be created.
-
Field Summary
Fields Modifier and Type Field Description List<QuoteStructure.Item>
items
The list of items to add in this level of the quoteString
parentId
The level of the quote.
-
Constructor Summary
Constructors Constructor Description QuoteStructure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QuoteStructure.Item
addFolder(String label)
Creates and adds a new folderQuoteStructure.Item
addFolder(String label, List<Map<String,Object>> inputs)
Creates and adds a new folderQuoteStructure.Item
addPart(String sku)
Creates and adds a new partQuoteStructure.Item
addPart(String sku, List<Map<String,Object>> inputs)
Creates and adds a new partQuoteStructure.Item
createFolder(String label)
Creates a new folder item, but does not add it to the listQuoteStructure.Item
createPart(String sku)
Creates a new "part" item but does not add it
-
-
-
Field Detail
-
items
public List<QuoteStructure.Item> items
The list of items to add in this level of the quote
-
parentId
public String parentId
The level of the quote. If parentId == null then the root level is used
-
-
Method Detail
-
createFolder
public QuoteStructure.Item createFolder(String label)
Creates a new folder item, but does not add it to the list- Parameters:
label
- The folder label- Returns:
- The new folder
-
addFolder
public QuoteStructure.Item addFolder(String label)
Creates and adds a new folder- Parameters:
label
- The folder labelinputs
- New inputs of the folder- Returns:
- The new folder
-
addFolder
public QuoteStructure.Item addFolder(String label, List<Map<String,Object>> inputs)
Creates and adds a new folder- Parameters:
label
- The folder label- Returns:
- The new folder
-
createPart
public QuoteStructure.Item createPart(String sku)
Creates a new "part" item but does not add it- Parameters:
sku
- The SKU of the new part- Returns:
- The new item
-
addPart
public QuoteStructure.Item addPart(String sku)
Creates and adds a new part- Parameters:
label
- The SKU of the new part- Returns:
- The new item
-
-