com.ibm.commerce.marketing.promotion.code

Interface GenericPromotionCodeResolver

  • All Superinterfaces:
    java.io.Serializable, XMLizable
    All Known Implementing Classes:
    MultipleCodesPromotionCodeResolver


    public interface GenericPromotionCodeResolver
    extends XMLizable
    Based on the predefined promotion code generation rule, resolve all the information this promotion code carries.
    • Method Detail

      • resolveCode

        PromotionKey[] resolveCode(java.lang.String code,
                                   PromotionContext context)
                            throws PromotionApplicationException
        Resolves a promotion code to a promotion.
        Parameters:
        code - The promotion code
        context - the context within which the resolution is performed.
        Returns:
        the key to the promotions which is identified by this promotion code
        Throws:
        PromotionApplicationException - when an error is encountered during code resolution.
      • resolveCode

        PromotionKey[] resolveCode(java.lang.String code,
                                   java.util.Hashtable NVP)
                            throws PromotionApplicationException
        Resolves a promotion code to a promotion. A name value pair style parameters can be passed in. The implementor is responsible for checking whether the needed parameters are passed in as required. This is for customization purposes. This method is often used when promotion codes are evaluated. The reason why the other resolve method is not used, is because it needs a PromotionContext object. Promotion Context object may not be available at the time codes are validated.
        Parameters:
        code - the promotion code
        NVP - custom properties passed to the resolver for promotion code resolution.
        Returns:
        the key to the promotion which is identified by this promotion code
        Throws:
        PromotionApplicationException - when an error is encountered during code resolution.