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 is not representing the full contract if you have multiple subfolder levels
The level is defined byparentId
of the structure object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ContractStructure.Item
A DTO that holds information about the new item (contract type or folder) to be created.
-
Field Summary
Fields Modifier and Type Field Description List<ContractStructure.Item>
items
The list of items to add in this level of the contractString
parentId
The level of the contract.
-
Constructor Summary
Constructors Constructor Description ContractStructure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContractStructure.Item
addFolder(String label)
Creates and adds a new folderContractStructure.Item
addFolder(String label, List<Map<String,Object>> inputs)
Creates and adds a new folderContractStructure.Item
addItem(String name)
Creates and adds a new itemContractStructure.Item
addItem(String name, List<Map<String,Object>> inputs)
Creates and adds a new itemContractStructure.Item
createFolder(String label)
Creates a new folder item, but does not add it to the listContractStructure.Item
createItem(String name)
Creates a new "part" item but does not add it
-
-
-
Field Detail
-
items
public List<ContractStructure.Item> 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
-
-
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
-
addFolder
public ContractStructure.Item addFolder(String label, List<Map<String,Object>> inputs)
Creates and adds a new folder- Parameters:
label
- The folder labelinputs
- 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
-
-