Class 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 is not representing the full contract if you have multiple subfolder levels
    The level is defined by parentId of the structure object
    • Field Detail

      • parentId

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

      • ContractStructure

        public ContractStructure()
    • Method Detail

      • 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
      • 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