Class DefaultPDTProcessor<VALUE extends PDTValue,​INFO extends PDTInformation,​CRITERIA extends PDTCriteria>

  • All Implemented Interfaces:
    PDTProcessor

    public class DefaultPDTProcessor<VALUE extends PDTValue,​INFO extends PDTInformation,​CRITERIA extends PDTCriteria>
    extends java.lang.Object
    implements PDTProcessor
    Default implementation of PDT processor (PDTProcessor, that fill values/informations if current values/informations are empty or NO_RESULT. This processor always calls method doProcess from PDTProcessorChain
    • Field Detail

      • NO_RESULT

        public static final java.util.List NO_RESULT
    • Constructor Detail

      • DefaultPDTProcessor

        public DefaultPDTProcessor()
    • Method Detail

      • doProcess

        public void doProcess​(PDTContext context,
                              PDTProcessorChain chain)
                       throws CalculationException
        Description copied from interface: PDTProcessor
        The doProcess method of the PDTProcessor is called by the application if price/discount/tax information or values are needed to be resolved. The PDTProcessorChain passed in to this method allows the PDTProcessor to pass on the context to the next entity in the chain.

        A typical implementation of this method would follow the following pattern:
        1. Examine the PDTCriteriaTarget from the context (context.getPDTCriteriaTarget())
        2. Examine the CRITERIA from the context (context.getCriteria())
        2. Depending on the PDTCriteriaTarget and CRITERIA process to resolve values or information
        3. Set up values or information
        3. a) either invoke the next entity in the chain using the PDTProcessorChain object (chain.doProcess(PDTContext context)),
        3. b) or not pass on context to the next entity in the process chain to block the context processing

        Specified by:
        doProcess in interface PDTProcessor
        Parameters:
        context - contains criteria and values/information to process
        chain - provides access to the next processor in the chain for this processor to pass the context to for further processing
        Throws:
        CalculationException