Interface LineItemHelper

All Known Subinterfaces:
CompensationHelper, ContractHelper, QuoteHelper, QuotePersistedHelper, RebateAgreementHelper

public interface LineItemHelper
A helper interface that assists in navigating and reading a Calculable Line Item Collection (CLIC) document's line items: a Quote, Contract, Rebate Agreement, Sales Compensation, or Custom Form. Obtained from the document's builder via getHelper() in header or line logic, for example quoteProcessor.getHelper(), rather than instantiated directly.
See Also:
  • Method Details

    • getFlattedInputs

      static List<Map<String,Object>> getFlattedInputs(List<Map<String,Object>> inputs)
      Flattens a list of input maps, including nested inputs, into a single flat list. Each input's own nested inputs (under its "inputs" key) are recursively included, depth-first, alongside the input itself.
      Parameters:
      inputs - the top-level inputs to flatten, or null
      Returns:
      the flattened list of inputs, including all nested inputs. Never null; empty if inputs is null
    • lineItemFromMap

      LineItemHelper.LineItem lineItemFromMap(Map<String,Object> lineItemMap)
      Creates the line item object from the given map. The structure of the map can be found, for example, in the result of quoteProcessor.getQuoteView().
      Parameters:
      lineItemMap - the raw map representation of a single line item
      Returns:
      a LineItemHelper.LineItem wrapping the given map. Never null.
    • findByLineId

      LineItemHelper.LineItem findByLineId(String lineItemId)
      Finds the line item or folder with the given line ID.
      Parameters:
      lineItemId - the line ID to look up, or "ROOT" for the document's root
      Returns:
      the matching LineItemHelper.LineItem, or null if lineItemId is null or matches no line item
    • getRoot

      Returns the document's root, a synthetic LineItemHelper.LineItem representing the document itself rather than any actual line item.
      Returns:
      the root LineItemHelper.LineItem. Never null.
    • findAllWithLabel

      List<LineItemHelper.LineItem> findAllWithLabel(String label)
      Finds all line items, folders, and the root whose label matches the given label.
      Parameters:
      label - the label to match; must not be null
      Returns:
      the matching LineItemHelper.LineItems. Never null; empty if none match.