Interface LineItemHelper.LineItem

Enclosing interface:
LineItemHelper

public static interface LineItemHelper.LineItem
Represents a line item, a folder, or the document root of a CLIC document (a Quote, Contract, Rebate Agreement, Sales Compensation, or Custom Form), obtained from LineItemHelper.getRoot(), LineItemHelper.findByLineId(String), LineItemHelper.findAllWithLabel(String), or getChildren()/getParent()/getSiblings()/getSubLineItems() rather than instantiated directly.
  • Method Details

    • asMap

      Map<String,Object> asMap()
      Returns this line item's raw map representation.
      Returns:
      this line item's raw map. Never null.
    • isRoot

      boolean isRoot()
      Reports whether this is the document's root, as returned by LineItemHelper.getRoot(), rather than an actual line item or folder.
      Returns:
      true if this is the document root; false otherwise
    • isFolder

      boolean isFolder()
      Reports whether this is a folder rather than a line item. Always true for the document root.
      Returns:
      true if this is a folder; false otherwise
    • getLabel

      String getLabel()
      Returns this line item's or folder's display label, or, for the document root, the document's own label.
      Returns:
      this line item's label, or null if none is set
    • getLineId

      String getLineId()
      Returns this line item's line ID.
      Returns:
      this line item's line ID, or null for the document root
    • getSKU

      String getSKU()
      Returns this line item's SKU.
      Returns:
      this line item's SKU, or null if not applicable, for example for a folder or the document root
    • getRebateTypeUN

      String getRebateTypeUN()
      Returns the unique name of this line item's Rebate Type, for a Rebate Agreement line item.
      Returns:
      the Rebate Type's unique name, or null if not applicable
    • getContractTermTypeUN

      String getContractTermTypeUN()
      Returns the unique name of this line item's Contract Term Type, for a Contract line item.
      Returns:
      the Contract Term Type's unique name, or null if not applicable
    • getChildren

      Provides list of all children of this folder.
      Returns:
      List of LineItem objects, or empty list, if no children.
    • getSiblings

      Returns this line item's siblings: the other children of its parent, excluding itself.
      Returns:
      this line item's siblings. Never null; empty if it has none.
    • getInputs

      List<Map<String,Object>> getInputs()
      Returns this line item's own input parameters, not including any nested inputs.
      Returns:
      this line item's inputs, or null if none are set
      See Also:
    • getInputByName

      Map<String,Object> getInputByName(String inputName)
      Finds this line item's input parameter with the given name, searching its inputs and any nested inputs.
      Parameters:
      inputName - the technical name of the input to find
      Returns:
      the matching input, or null if inputName is null or matches no input
      See Also:
    • getOutputByName

      Map<String,Object> getOutputByName(String outputName)
      Finds this line item's output result with the given name.
      Parameters:
      outputName - the result name to find
      Returns:
      the matching output, or null if outputName is null, this line item has no outputs, or none match
      See Also:
    • getOutputs

      List<Map<String,Object>> getOutputs()
      Returns this line item's output results.
      Returns:
      this line item's outputs, or null if none are set
      See Also:
    • getParent

      Returns this line item's parent folder, or the document root (see LineItemHelper.getRoot()) if this line item is at the top level of the document.
      Returns:
      this line item's parent, or null for the document root (the Quote, Contract, Rebate Agreement, Sales Compensation, or Custom Form itself)
    • getSubLineItems

      List<LineItemHelper.LineItem> getSubLineItems()
      Returns all descendants of this folder: its children, their children, and so on, in breadth-first order.
      Returns:
      this folder's descendants. Never null; empty if it has none.
    • 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 (from ReviewContext)
      • A lineItemGroupId that the current user is a member of (from ReviewContext)
      • Is an active review (isInReview = true)

      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 null if no matching active review exists