Class ContractBuilder

Object
ObjectIdentity
AbstractBuilder

public class ContractBuilder extends CalculableLineItemCollectionBuilder<ContractBuilder>
Please read notes in CalculableLineItemCollectionBuilder on how to use this builder.
See Also:
  • Method Details

    • getContractView

      public 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. 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

      public ContractHelper 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 class AbstractBuilder
    • addContractStructure

      public ContractBuilder addContractStructure(ContractStructure structure)
      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

      public void addFolder(String label)
      Creates and adds a new folder under the ROOT folder.

      If you intend to add many folders and items, use the ContractStructure approach instead.