Interface PromotionEngine

  • All Superinterfaces:, XMLizable
    All Known Implementing Classes:

    public interface PromotionEngine
    extends XMLizable
    This is the standard interface for promotion engine implementation. It handles the interaction between the order subsystem and the promotion component by calling invoke() method with a pass-in parameter of order id. The promotion engine will decide the applicable promotions to an order based on rules (or policies) defined.
    • Method Detail

      • getEngineName

        java.lang.String getEngineName()
        Returns the name of a named promotion engine
        the name of an engine.
      • isStateless

        boolean isStateless()
        Returns the default configuration for invocation mode
        true if by default all invocations to the engine is stateless, false otherwise
      • isSingleJVMConfiguration

        boolean isSingleJVMConfiguration()
        Is the engine running in a Single JVM environment or not
        true if the engine is running in a single JVM environment, false otherwise.
      • checkTargetingAtRuntime

        boolean checkTargetingAtRuntime()
        By default will targeting conditions be evaluated at runtime or not.
        true if targeting conditions will be evaluated at runtime by default, false otherwise
      • skipTargetingOnCodeEntered

        boolean skipTargetingOnCodeEntered()
        By default, if a correct promotion code is entered will the engine evaluate targeting condition or not.
        true if targeting condition should not be evaluated on a correct promotion code entered, false otherwise.
      • isAdjustmentBasedOnStandardOfferPrice

        boolean isAdjustmentBasedOnStandardOfferPrice()
        By default, if all the adjustments will be based on standard offer price or not.
        true if all adjustments will be based on standard offer price, false otherwise.
      • isInDebugMode

        boolean isInDebugMode()
        Whether or not promotion engine is running in debug mode
        true if the promotion engine is in debug mode, false otherwise.
      • setInDebugMode

        void setInDebugMode(boolean b)
        Sets engine debug mode.
        b - true if the engine is to be set in debug mode.
      • invoke

        PromotionArgument invoke(java.lang.String template,
                                 java.lang.Long orderId,
                                 boolean discardPreviousResult,
                                 boolean saveCurrentResult,
                                 java.util.Hashtable NVP)
                          throws PromotionRuntimeException
        Invokes the engine. When the promotion engine is called, it processes any promotions for the current order, and returns a PromotionArgument.
        template - This defines the name of the template used to invoke the engine. Templates are prescribed ways of calling the promotion engine.
        orderId - primary key of the order to which promotions will be applied
        discardPreviousResult - It instructs the promotion engine to eliminate any previous record about how promotions are applied to the current order, that is, the order whose primary key is specified in the call.
        saveCurrentResult - It tells the promotion engine whether the current results should be persisted in the database.
        NVP - name value pair style parameters, if any, null is acceptable.
        PromotionArgument which details the result of this invocation
        PromotionRuntimeException - when an error occurs in the invocation.
      • cleanup

        void cleanup()
        Cleans up after engine is shutdown
      • getPromotionCodeManager

        GenericPromotionCodeManager getPromotionCodeManager()
        Returns configured promotion code manager.
        the configured promotion code manager.
      • getCouponManager

        CouponManager getCouponManager()
        Returns configured coupon manager for this engine.
        the configured coupon manager.
      • getPromotionContextFactory

        PromotionContextFactory getPromotionContextFactory()
        Returns configured promotion context factory
        promotion context factory configured for this engine.
      • getAgendaBuilder

        PromotionExecutionAgendaBuilder getAgendaBuilder()
        Returns configured promotion execution agenda builder
        promotion execution agenda builder configured for this engine.
      • getSequenceBuilder

        PromotionExecutionSequenceBuilder getSequenceBuilder()
        Returns configured promotion execution sequence builder
        promotion execution sequence builder configured for this engine.
      • getExternalEntityRegistry getExternalEntityRegistry()
        Returns configured external entity factory registry for this promotion engine.
        ExternalEntityFactoryRegistry for this promotion engine
      • getPersistenceManagerRegistry

        PersistenceManagerRegistry getPersistenceManagerRegistry()
        Returns configured persistence manager registry for this promotion engine.
        PersistenceMannagerRegistry for this promotion engine.
      • getPromotionEventListenerRegistry getPromotionEventListenerRegistry()
        Returns configured promotion event listener registry for this promotion engine.
        ListenerRegistry configured for this promotion engine