Class LivePriceGridAction<ATTACHEDTO extends Help>

Object
Action
LivePriceGridAction<ATTACHEDTO>
All Implemented Interfaces:
Help

public class LivePriceGridAction<ATTACHEDTO extends Help> extends Action
This action starts calculation of selected LPG for all skus or restricted set of skus. It's a programmatic version of the same action available in UI. As such it allows user to schedule the action in calculation flow formula.
  • Constructor Details

    • LivePriceGridAction

      public LivePriceGridAction(ATTACHEDTO backLink, Invocations<MethodInvocationRecord> invocations, String livePriceGridLabel)
  • Method Details

    • setCalculate

      public LivePriceGridAction<ATTACHEDTO> setCalculate(Boolean calculate)
      Whether the action is valid and should be triggered or not.
      Parameters:
      calculate -
      • true - calculation of the LPG is started as background process
      • false - calculation of the LPG is NOT started at all
    • setPriority

      public LivePriceGridAction<ATTACHEDTO> setPriority(int priority)
      Sets the prority of this job.
      Parameters:
      priority - Default is 0 (lowest user-definable priority). Max value is 9.
      Returns:
    • setDistributedCalculationThreshold

      public LivePriceGridAction<ATTACHEDTO> setDistributedCalculationThreshold(int threshold)
      Sets a job-individual threshold to start a distributed calculation. Please note: Any values below 1000 may very well be counter-productive and make the job slower!
      Parameters:
      threshold - The number of items that need to be part of the job in order to execute it in distributed mode.
      Returns:
    • restrictToSkus

      public LivePriceGridAction<ATTACHEDTO> restrictToSkus(List<String> skus)
      Restricts LPG calculation to a list of specified SKUs. When an empty list or null is passed, all items are calculated.
      Parameters:
      skus - list of SKUs to process
    • withFormulaParameters

      public LivePriceGridAction<ATTACHEDTO> withFormulaParameters(HashMap<String,Object> formulaParameters)
      Allows you to add parameters entering to the calculation.
      Parameters:
      formulaParameters - Parameters as key and value pairs.
    • back

      public ATTACHEDTO back()
    • setNextJobs

      public LivePriceGridAction<ATTACHEDTO> setNextJobs(List<ChainedJobInfo> jobs)
      Defines subsequent follow-on jobs
      Parameters:
      jobs - List of ChainedJobInfo objects
      Returns:
    • ignoreTargetDate

      public LivePriceGridAction<ATTACHEDTO> ignoreTargetDate(Boolean ignore)
      Sets the ignoreTargetDate of this job.
      Parameters:
      ignore - Default is false (CF job will ignore LPG what is not yet valid).
      Returns:
    • getObjectName

      public String getObjectName()
    • getLivePriceGridLabel

      public String getLivePriceGridLabel()
    • getCalculate

      public Boolean getCalculate()
    • getRestrictToSkus

      public List<String> getRestrictToSkus()
    • getFormulaParameters

      public HashMap<String,Object> getFormulaParameters()
    • getPriority

      public int getPriority()
    • getDistributedCalculationThreshold

      public int getDistributedCalculationThreshold()
    • getNextJobs

      public List<ChainedJobInfo> getNextJobs()
    • getIgnoreTargetDate

      public Boolean getIgnoreTargetDate()
    • toString

      public String toString()
      Overrides:
      toString in class Object