Interface ContractBuilder
- All Superinterfaces:
CalculableLineItemCollectionBuilder<ContractBuilder>
Please read notes in
CalculableLineItemCollectionBuilder on how to use this builder.- See Also:
-
Field Summary
Fields inherited from interface CalculableLineItemCollectionBuilder
ROOT_LINE_ID -
Method Summary
Modifier and TypeMethodDescriptionaddContractStructure(ContractStructure structure) Builds a Contract structure.voidCreates and adds a new folder under the ROOT folder.Gets the full Contract object as a nested map.Gets a helper that assists in manipulating the Contract object.Methods inherited from interface CalculableLineItemCollectionBuilder
addLineItem, addLineItem, addLineItem, addOrUpdateInput, addOrUpdateInput, addOrUpdateOutput, addOrUpdateOutput, clearRenderInfo, closeFolder, deleteFolder, deleteItem, deselectItem, isPostPhase, isPrePhase, markItemDirty, moveItem, openFolder, renameFolder, selectItem, setRenderInfo, switchToAsync, updateField, updateField
-
Method Details
-
getContractView
Object getContractView()Gets the full Contract object as a nested map. This map contains all header inputs/outputs, and all line items (with their inputs/outputs).Caution: when using the Classic or Unity non-React user interface, then during a pre-phase cProcessor.contractView will NOT contain values of Outputs. The only exception are "overridable" outputs.
- Returns:
- The Contract object
-
getHelper
ContractHelper getHelper()Gets a helper that assists in manipulating the Contract object. You can use it instead of directly reading the getContractView map.- Returns:
- The helper object
-
addContractStructure
Builds a Contract structure. That usually means adding a set of folders and/or items.
Example:def cts = new ContractStructure() cts.addFolder("folderOne") cProcessor.addContractStructure(cts)- Parameters:
structure- the structure- Returns:
- itself (for flow pattern)
-
addFolder
Creates and adds a new folder under the ROOT folder.If you intend to add many folders and items, use the ContractStructure approach instead.
- Parameters:
label- the folder label
-