Interface LineItemHelper.LineItem
- Enclosing interface:
LineItemHelper
public static interface LineItemHelper.LineItem
Represents either a line item or a folder of a document (e.g. quote/contract/rebate).
Instances are obtained from a helper, e.g. quoteProcessor.getHelper().getRoot() or
quoteProcessor.getHelper().findByLineId(lineId).
-
Method Summary
Modifier and TypeMethodDescriptionasMap()Provides list of all children of this folder.getInputByName(String inputName) getLabel()getOutputByName(String outputName) Gets the review status for this line item based on the current user's review context.getSKU()booleanisFolder()booleanisRoot()
-
Method Details
-
asMap
- Returns:
- the underlying map of this line item / folder
-
isRoot
boolean isRoot()- Returns:
- true if this is the ROOT folder (the header level)
-
isFolder
boolean isFolder()- Returns:
- true if this is a folder (not a leaf line item)
-
getLabel
String getLabel()- Returns:
- the tree label of this line item / folder
-
getLineId
String getLineId()- Returns:
- the line id, or null for the ROOT folder
-
getSKU
String getSKU()- Returns:
- the SKU, or null for folders / the ROOT
-
getRebateTypeUN
String getRebateTypeUN()- Returns:
- the rebate type unique name (for rebate agreement line items)
-
getContractTermTypeUN
String getContractTermTypeUN()- Returns:
- the contract term type unique name (for contract line items)
-
getChildren
List<LineItemHelper.LineItem> getChildren()Provides list of all children of this folder.- Returns:
- List of line items, or empty list if no children.
-
getSiblings
List<LineItemHelper.LineItem> getSiblings()- Returns:
- the siblings of this line item (children of the same parent, excluding itself)
-
getInputs
- Returns:
- the inputs of this line item / folder
-
getInputByName
- Parameters:
inputName- the name of the input to find- Returns:
- the input with the given name (searching nested inputs), or null
-
getOutputByName
- Parameters:
outputName- the resultName of the output to find- Returns:
- the output with the given resultName, or null
-
getOutputs
- Returns:
- the outputs of this line item / folder
-
getParent
LineItemHelper.LineItem getParent()- Returns:
- the parent folder, or the ROOT folder if this item has no explicit parent
-
getSubLineItems
List<LineItemHelper.LineItem> getSubLineItems()- Returns:
- all descendant line items (children, grandchildren, ...) of this folder
-
getReviewStatus
String getReviewStatus()Gets the review status for this line item based on the current user's review context.The review status is determined by finding a review entry that matches:
- The current user's review user group
- A lineItemGroupId that the current user is a member of
- Is an active review
The status can be one of:
- UNREVIEWED - The line item has not been reviewed yet
- ACCEPTED - The line item has been accepted
- REJECTED - The line item has been rejected
- SKIPPED - The line item review was skipped
- Returns:
- The review status string, or
nullif no matching active review exists
-