Class ContractBuilder
Object
ObjectIdentity
AbstractBuilder
Please read notes in
CalculableLineItemCollectionBuilder
on how to use this builder.- See Also:
-
Field Summary
Fields inherited from class CalculableLineItemCollectionBuilder
METHOD_ADD_LINE_ITEM, METHOD_ADD_OR_UPDATE_INPUT, METHOD_ADD_OR_UPDATE_OUTPUT, METHOD_UPDATE_FIELD, phase, ROOT_LINE_ID
Fields inherited from class AbstractBuilder
METHOD_BUILD
Fields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity
-
Method Summary
Modifier and TypeMethodDescriptionaddContractStructure
(ContractStructure structure) Builds a Contract structure.void
Creates and adds a new folder under the ROOT folder.ContractBuilderResult
build()
Gets the full Contract object as a nested map.Gets a helper class that assists in manipulating the Contract object.Methods inherited from class CalculableLineItemCollectionBuilder
addLineItem, addLineItem, addLineItem, addOrUpdateInput, addOrUpdateInput, addOrUpdateOutput, addOrUpdateOutput, clearRenderInfo, deleteItem, isPostPhase, isPrePhase, moveItem, renameFolder, setRenderInfo, updateField, updateField
Methods inherited from class ObjectIdentity
addInvocation, addInvocation
-
Method Details
-
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. This limitation is because of performance optimization of amount of the data being sent between the user interface and backend.
- Returns:
- The Contract object
-
getHelper
Gets a helper class that assists in manipulating the Contract object. You can use it instead of directly reading the getContractView map.- Returns:
-
build
public ContractBuilderResult build()- Specified by:
build
in classAbstractBuilder
-
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
-- Returns:
- the Contract object
-
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.
-