Class AuditVerificationFlags

java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.AuditVerificationFlags

public class AuditVerificationFlags extends Object
This object is used to control which audit validations are run in DefaultOfferAndOfferCodeUsabilityService.getOfferAndOfferCodeUsabilityInfo(List, List, List, CustomerContext, ContextInfo) Many flows within PromotionServices can call audit validations as part of the flow. In most implementations, calling all audit controls at each step is overkill and can impact performance. For example, it is generally sufficient to validate codes before adding them to the offer. Implementation vs. performance requirements can be weighted to determine the correct needs for a given application. To use, update the ContextInfo to add an attribute keyed by CONTENT_INFO_KEY with a structure populated
  • Field Details

  • Constructor Details

    • AuditVerificationFlags

      public AuditVerificationFlags()
  • Method Details

    • withSkipAllChecksExceptAutomaticPerUseCustomer

      public AuditVerificationFlags withSkipAllChecksExceptAutomaticPerUseCustomer()
    • withSkipAllChecksExceptAutomaticallyAppliedOffers

      public AuditVerificationFlags withSkipAllChecksExceptAutomaticallyAppliedOffers()
    • withSkipAllCodeChecks

      public AuditVerificationFlags withSkipAllCodeChecks()
    • withVerifyMaxUseOffers

      public AuditVerificationFlags withVerifyMaxUseOffers(boolean flag)
    • withVerifySingleUseCodes

      public AuditVerificationFlags withVerifySingleUseCodes(boolean flag)
    • withVerifyMultiUseCodes

      public AuditVerificationFlags withVerifyMultiUseCodes(boolean flag)
    • withVerifyPerCustomerUseCodes

      public AuditVerificationFlags withVerifyPerCustomerUseCodes(boolean flag)
    • withVerifyPerCustomerUseOffers

      public AuditVerificationFlags withVerifyPerCustomerUseOffers(boolean flag)
    • withVerifyAutomaticPerCustomerChecks

      public AuditVerificationFlags withVerifyAutomaticPerCustomerChecks(boolean flag)
    • withVerifyEmailRegexForOfferCodes

      public AuditVerificationFlags withVerifyEmailRegexForOfferCodes(boolean flag)
    • isVerifyMaxUseOffers

      public boolean isVerifyMaxUseOffers()
    • isVerifySingleUseCodes

      public boolean isVerifySingleUseCodes()
    • isVerifyMultiUseCodes

      public boolean isVerifyMultiUseCodes()
    • isVerifyPerCustomerUseCodes

      public boolean isVerifyPerCustomerUseCodes()
    • isVerifyPerCustomerUseOffers

      public boolean isVerifyPerCustomerUseOffers()
    • isVerifyAutomaticPerCustomerChecks

      public boolean isVerifyAutomaticPerCustomerChecks()
      This boolean controls a subset of the verifyPerCustomerUseOffers. Even if verifyPerCustomerUseOffers is false, the system will still try to verify any that are automatically applied unless this is set to false.
    • isVerifyEmailRegexForOfferCodes

      public boolean isVerifyEmailRegexForOfferCodes()
      Offer codes have an associated email validation regular expression: OfferCode.getEmailRegEx(). This flag determines whether that validation is performed.
    • isVerifyAutomaticMaxUseOfferChecks

      public boolean isVerifyAutomaticMaxUseOfferChecks()
      This boolean controls a subset of the verifyMaxUseOffers. Even if verifyMaxUseOffers is false, the system will still try to verify any that are automatically applied unless this is set to false.
    • setVerifyMaxUseOffers

      public void setVerifyMaxUseOffers(boolean verifyMaxUseOffers)
    • setVerifySingleUseCodes

      public void setVerifySingleUseCodes(boolean verifySingleUseCodes)
    • setVerifyMultiUseCodes

      public void setVerifyMultiUseCodes(boolean verifyMultiUseCodes)
    • setVerifyPerCustomerUseCodes

      public void setVerifyPerCustomerUseCodes(boolean verifyPerCustomerUseCodes)
    • setVerifyPerCustomerUseOffers

      public void setVerifyPerCustomerUseOffers(boolean verifyPerCustomerUseOffers)
    • setVerifyAutomaticPerCustomerChecks

      public void setVerifyAutomaticPerCustomerChecks(boolean verifyAutomaticPerCustomerChecks)
      This boolean controls a subset of the verifyPerCustomerUseOffers. Even if verifyPerCustomerUseOffers is false, the system will still try to verify any that are automatically applied unless this is set to false.
    • setVerifyEmailRegexForOfferCodes

      public void setVerifyEmailRegexForOfferCodes(boolean verifyEmailRegexForOfferCodes)
      Offer codes have an associated email validation regular expression: OfferCode.getEmailRegEx(). This flag determines whether that validation is performed.
    • setVerifyAutomaticMaxUseOfferChecks

      public void setVerifyAutomaticMaxUseOfferChecks(boolean verifyAutomaticMaxUseOfferChecks)
      This boolean controls a subset of the verifyMaxUseOffers. Even if verifyMaxUseOffers is false, the system will still try to verify any that are automatically applied unless this is set to false.