Package net.pricefx.common.apibuilder.clicoll


package net.pricefx.common.apibuilder.clicoll
The builder and the helper that every document header logic shares.

Entry point: the binding variable of the document's header logic. Examples are quoteProcessor for a Quote and cProcessor for a Contract. Each of those objects is a CalculableLineItemCollectionBuilder. Call getHelper() on it to read the document.

  • CalculableLineItemCollectionBuilder declares what a header logic can change. It adds and updates inputs and outputs, updates header fields, adds, moves and deletes line items and folders, opens and closes folders, selects and deselects items, and sets render information. switchToAsync() aborts a synchronous calculation and retries it as an asynchronous background job.
  • LineItemHelper reads the document. It returns the root, finds a line item by line ID or by label, and flattens the inputs of a line item.

A header logic collects changes, it does not apply them in statement order. The builder runs the collected changes once per phase, in a fixed order. CalculableLineItemCollectionBuilder documents that order. Read it before you write a logic that both creates a line item and reads it back.

The document-specific subclasses live in the sibling quote, contract, rebateagreement, compensation and customform packages.

See Also:
  • Class
    Description
    This is the shared builder interface for Quotes, RebateAgreements, Contracts and Sales Compensation.
    Some important notes on the sequence in which changes to the document structure are processed:

    Any modifying action (adding lines, inputs etc. or a structure object etc.)
    Base helper interface for manipulating a Calculable Line Item Collection (quote / contract / rebate agreement / compensation) document map.
    Represents either a line item or a folder of a document (e.g. quote/contract/rebate).
    Review sub-step information.
    A closeable iterator over LineItemHelper.LineItem elements, backed either by a streaming DB cursor or by an already materialized list.
    Implemented by helpers of document types that support a review workflow (e.g. quotes, contracts).