Class ContractStructure

Object
ContractStructure

public class ContractStructure extends Object
This is a helper object that is used to build up code-generated content of a Contract. A single ContractStructure object represents a specified level in the Contract folder tree, i.e. it does not represent the full contract if you have multiple subfolder levels.
The level is defined by parentId of the structure object.
  • Field Details

    • items

      The list of items to add in this level of the contract
    • parentId

      public String parentId
      The level of the contract. If parentId == null then the root level is used
  • Constructor Details

    • ContractStructure

      public ContractStructure()
  • Method Details

    • createFolder

      public ContractStructure.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 ContractStructure.Item addFolder(String label)
      Creates and adds a new folder
      Parameters:
      label - The folder label
      Returns:
      The new folder
    • addFolder

      public ContractStructure.Item addFolder(String label, List<Map<String,Object>> inputs)
      Creates and adds a new folder
      Parameters:
      label - The folder label
      inputs - New inputs of the folder
      Returns:
      The new folder
    • createItem

      public ContractStructure.Item createItem(String name)
      Creates a new "part" item but does not add it
      Parameters:
      name - The uniqueName of the new Contract Type
      Returns:
      The new item
    • addItem

      public ContractStructure.Item addItem(String name)
      Creates and adds a new item
      Parameters:
      name - The uniqueName of the new Contract Type
      Returns:
      The new item
    • addItem

      public ContractStructure.Item addItem(String name, List<Map<String,Object>> inputs)
      Creates and adds a new item
      Parameters:
      name - The uniqueName of the new Contract Type
      inputs - New inputs of the item
      Returns:
      The new item