Interface RebateAgreementHelper

All Superinterfaces:
LineItemHelper

public interface RebateAgreementHelper extends LineItemHelper
A helper interface that assists in reading and navigating the Rebate Agreement object: finding line items and folders by line ID, label or Rebate Type, and walking the folder tree. It does not change the Rebate Agreement; use the RebateAgreementBuilder methods for that. An instance can be obtained via call raProcessor.getHelper() from a Rebate Agreement header logic.

The helper reads the same data as RebateAgreementBuilder.getRebateAgreementView(), as it was when the logic started. Line items and folders that the logic adds or removes in the same run are not visible to the helper.

Note: When the Classic or Unity non-React user interface is used, the data does not contain the values of outputs during the pre-phase (except "overridable" outputs).

Example:


 def helper = raProcessor.getHelper()
 def root = helper.getRoot()
 def bonusLines = helper.findAllWithRebateTypeUN("BonusOnSales")
 
Since:
3.0 - Sea Breeze
See Also:
  • Method Details

    • findAllWithRebateTypeUN

      List<LineItemHelper.LineItem> findAllWithRebateTypeUN(String rebateTypeUN)
      Finds all rebate agreement line items with the specified rebate type.

      The search covers all line items of the Rebate Agreement at any level, including the line items inside folders. The root is never included. The Rebate Type unique name must match exactly (case-sensitive). The order of the returned line items is not guaranteed and can differ from their order in the Rebate Agreement.

      This method only reads data and does not change the Rebate Agreement. It works the same in every logic phase, but see the type description for which data is available in the pre-phase.

      Example:

      
       def bonusLines = raProcessor.getHelper().findAllWithRebateTypeUN("BonusOnSales")
       for (line in bonusLines) {
         def lineId = line.getLineId()
         def label = line.getLabel()
       }
       
      Parameters:
      rebateTypeUN - the unique name of the Rebate Type to match; must not be null
      Returns:
      the list of line items with the given Rebate Type. Never null; empty if none match.
      Throws:
      NullPointerException - if rebateTypeUN is null
      See Also: