Class CompensationBuilder
Object
ObjectIdentity
AbstractBuilder
CalculableLineItemCollectionBuilder<CompensationBuilder>
BasicCompensationBuilder<CompensationBuilder>
CompensationBuilder
- All Implemented Interfaces:
CompensationAgreementBuilder
public class CompensationBuilder
extends BasicCompensationBuilder<CompensationBuilder>
implements CompensationAgreementBuilder
IMPORTANT: Please read super class notes on sequence of execution!
-
Field Summary
Fields inherited from class CalculableLineItemCollectionBuilder
METHOD_ADD_LINE_ITEM, METHOD_ADD_OR_UPDATE_INPUT, METHOD_ADD_OR_UPDATE_OUTPUT, METHOD_UPDATE_FIELD, phase, ROOT_LINE_ID
Fields inherited from class AbstractBuilder
METHOD_BUILD
Fields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity
-
Constructor Summary
ConstructorDescriptionCompensationBuilder
(String instanceId, String classId, IdGenerator idGenerator, Invocations<MethodInvocation> invocations, Object compensationView, HeaderPhase phase) -
Method Summary
Modifier and TypeMethodDescriptionaddCompensationStructure
(CompensationStructure structure) Applies a compensation structure.void
Creates and adds a new folder under the ROOT folder.Gets the full compensation object as a nested map.CompensationHelper
Gets a helper class that assists in manipulating the compensation object.Methods inherited from class BasicCompensationBuilder
build
Methods inherited from class CalculableLineItemCollectionBuilder
addLineItem, addLineItem, addLineItem, addOrUpdateInput, addOrUpdateInput, addOrUpdateOutput, addOrUpdateOutput, clearRenderInfo, deleteItem, isPostPhase, isPrePhase, moveItem, renameFolder, setRenderInfo, updateField, updateField
Methods inherited from class ObjectIdentity
addInvocation, addInvocation
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface CompensationAgreementBuilder
build
-
Constructor Details
-
CompensationBuilder
-
-
Method Details
-
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
public CompensationHelper getHelper()Gets a helper class 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
-- Returns:
-
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.
-