Interface CompensationBuilder
- All Superinterfaces:
CalculableLineItemCollectionBuilder<CompensationBuilder>
public interface CompensationBuilder
extends CalculableLineItemCollectionBuilder<CompensationBuilder>
Context for manipulating a Sales Compensation object in a compensation header calculation logic.
IMPORTANT: Please read super interface notes on the sequence of execution!
- See Also:
-
Field Summary
Fields inherited from interface CalculableLineItemCollectionBuilder
ROOT_LINE_ID -
Method Summary
Modifier and TypeMethodDescriptionaddCompensationStructure(CompensationStructure structure) Applies a compensation structure.voidCreates and adds a new folder under the ROOT folder.Gets the full compensation object as a nested map.Gets a helper that assists in manipulating the compensation object.Methods inherited from interface CalculableLineItemCollectionBuilder
addLineItem, addLineItem, addLineItem, addOrUpdateInput, addOrUpdateInput, addOrUpdateOutput, addOrUpdateOutput, clearRenderInfo, closeFolder, deleteFolder, deleteItem, deselectItem, isPostPhase, isPrePhase, markItemDirty, moveItem, openFolder, renameFolder, selectItem, setRenderInfo, switchToAsync, updateField, updateField
-
Method Details
-
getCompensationView
Object getCompensationView()Gets the full compensation object as a nested map. This map contains all header inputs/outputs, and all line items (with their inputs/outputs).- Returns:
- The compensation object
-
getHelper
CompensationHelper getHelper()Gets a helper that assists in manipulating the compensation object. You can use it instead of directly reading the CompensationView map.- Returns:
- The helper object
-
addCompensationStructure
Applies a compensation structure. That usually means adding a set of folders and/or items.Example:
if (coProcessor.isPrePhase()) { def structure = new CompensationStructure() productSubCategory.each { structure.addFolder(it.attribute2) } coProcessor.addCompensationStructure(structure) }- Parameters:
structure- the structure- Returns:
- itself (for flow pattern)
-
addFolder
Creates and adds a new folder under the ROOT folder.If you intend to add many folders and items, use the CompensationStructure approach instead.
- Parameters:
label- the folder label
-