Class AuditVerificationFlags
java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.AuditVerificationFlags
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This boolean controls a subset of theverifyMaxUseOffers
.boolean
This boolean controls a subset of theverifyPerCustomerUseOffers
.boolean
Offer codes have an associated email validation regular expression:OfferCode.getEmailRegEx()
.boolean
boolean
boolean
boolean
boolean
void
setVerifyAutomaticMaxUseOfferChecks
(boolean verifyAutomaticMaxUseOfferChecks) This boolean controls a subset of theverifyMaxUseOffers
.void
setVerifyAutomaticPerCustomerChecks
(boolean verifyAutomaticPerCustomerChecks) This boolean controls a subset of theverifyPerCustomerUseOffers
.void
setVerifyEmailRegexForOfferCodes
(boolean verifyEmailRegexForOfferCodes) Offer codes have an associated email validation regular expression:OfferCode.getEmailRegEx()
.void
setVerifyMaxUseOffers
(boolean verifyMaxUseOffers) void
setVerifyMultiUseCodes
(boolean verifyMultiUseCodes) void
setVerifyPerCustomerUseCodes
(boolean verifyPerCustomerUseCodes) void
setVerifyPerCustomerUseOffers
(boolean verifyPerCustomerUseOffers) void
setVerifySingleUseCodes
(boolean verifySingleUseCodes) withVerifyAutomaticPerCustomerChecks
(boolean flag) withVerifyEmailRegexForOfferCodes
(boolean flag) withVerifyMaxUseOffers
(boolean flag) withVerifyMultiUseCodes
(boolean flag) withVerifyPerCustomerUseCodes
(boolean flag) withVerifyPerCustomerUseOffers
(boolean flag) withVerifySingleUseCodes
(boolean flag)
-
Field Details
-
CONTENT_INFO_KEY
- See Also:
-
DEFAULT_INSTANCE
-
-
Constructor Details
-
AuditVerificationFlags
public AuditVerificationFlags()
-
-
Method Details
-
withSkipAllChecksExceptAutomaticPerUseCustomer
-
withSkipAllChecksExceptAutomaticallyAppliedOffers
-
withSkipAllCodeChecks
-
withVerifyMaxUseOffers
-
withVerifySingleUseCodes
-
withVerifyMultiUseCodes
-
withVerifyPerCustomerUseCodes
-
withVerifyPerCustomerUseOffers
-
withVerifyAutomaticPerCustomerChecks
-
withVerifyEmailRegexForOfferCodes
-
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 theverifyPerCustomerUseOffers
. Even ifverifyPerCustomerUseOffers
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 theverifyMaxUseOffers
. Even ifverifyMaxUseOffers
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 theverifyPerCustomerUseOffers
. Even ifverifyPerCustomerUseOffers
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 theverifyMaxUseOffers
. Even ifverifyMaxUseOffers
is false, the system will still try to verify any that are automatically applied unless this is set to false.
-