public abstract class CalculableLineItemCollectionBuilder<T extends CalculableLineItemCollectionBuilder>
extends AbstractBuilder
Modifier and Type | Field and Description |
---|---|
static String |
METHOD_ADD_LINE_ITEM |
static String |
METHOD_ADD_OR_UPDATE_INPUT |
static String |
METHOD_ADD_OR_UPDATE_OUTPUT |
static String |
METHOD_UPDATE_FIELD |
protected HeaderPhase |
phase |
static String |
ROOT_LINE_ID |
Constructor and Description |
---|
CalculableLineItemCollectionBuilder(String instanceId,
String classId,
ObjectIdentity parentChartObjectIdentity,
IdGenerator idGenerator,
Invocations<MethodInvocation> invocations,
HeaderPhase phase) |
Modifier and Type | Method and Description |
---|---|
T |
addLineItem(String key)
This method adds a new line item in the root folder
|
T |
addLineItem(String parentLineId,
String key)
This method adds a new line item in the specified parent (folder id)
|
T |
addOrUpdateInput(Map<String,Object> contextParameter)
This method adds or updates an input value on the root level
|
T |
addOrUpdateInput(String lineId,
Map<String,Object> contextParameter)
This method adds or updates an input value on a line item
|
T |
addOrUpdateOutput(Map<String,Object> calculationResult)
This method adds or updates a result value (an output value) on the root level
|
T |
addOrUpdateOutput(String lineId,
Map<String,Object> calculationResult)
This method adds or updates a result value (an output value) on a line item
|
boolean |
isPostPhase()
Determines current calculation phase of logic execution
|
boolean |
isPrePhase()
Determines current calculation phase of logic execution
|
T |
updateField(String fieldName,
Object value)
Updates a header field
For quotes supported fields are:
additionalInfo1
additionalInfo2
additionalInfo3
additionalInfo4
externalRef
expiryDate
editabilityStatus
targetDate |
T |
updateField(String lineId,
String fieldName,
Object value)
Updates a field on the line.
|
protected final HeaderPhase phase
public static final String METHOD_ADD_OR_UPDATE_OUTPUT
public static final String METHOD_ADD_OR_UPDATE_INPUT
public static final String METHOD_UPDATE_FIELD
public static final String METHOD_ADD_LINE_ITEM
public static final String ROOT_LINE_ID
public boolean isPrePhase()
public boolean isPostPhase()
public T addOrUpdateOutput(Map<String,Object> calculationResult)
calculationResult
- A map describing a calculation resultpublic T addOrUpdateOutput(String lineId, Map<String,Object> calculationResult)
lineId
- The id of the linecalculationResult
- A map describing a calculation resultpublic T addOrUpdateInput(Map<String,Object> contextParameter)
calculationResult
- A map describing the context parameterpublic T addOrUpdateInput(String lineId, Map<String,Object> contextParameter)
lineId
- The id of the linecalculationResult
- A map describing the context parameterpublic T updateField(String lineId, String fieldName, Object value)
lineId
- The id of the linefieldName
- The field namevalue
- The new valuepublic T updateField(String fieldName, Object value)
additionalInfo1
additionalInfo2
additionalInfo3
additionalInfo4
externalRef
expiryDate
editabilityStatus
targetDate
fieldName
- The field namevalue
- The new valuepublic T addLineItem(String key)
key
- The key (usually the sku)Copyright © 2016. All rights reserved.