Interface CouponCodeClearTextGenerationStrategy
-
- All Known Implementing Classes:
DefaultCouponCodeClearTextGenerationStrategy
public interface CouponCodeClearTextGenerationStrategy
Interface for generating the clear-text part of a coupon code.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
generateClearText(MultiCodeCouponModel coupon, int length)
returns the generated clear-text part of the coupon code with the given lengthlong
getCouponCodeNumberForClearText(MultiCodeCouponModel coupon, java.lang.String clearText)
returns the original coupon code number the given clearText was based on.
-
-
-
Method Detail
-
generateClearText
java.lang.String generateClearText(MultiCodeCouponModel coupon, int length)
returns the generated clear-text part of the coupon code with the given length- Throws:
CouponCodeGenerationException
- if the maximum number of possible codes has already been generated for the given coupon and length
-
getCouponCodeNumberForClearText
long getCouponCodeNumberForClearText(MultiCodeCouponModel coupon, java.lang.String clearText)
returns the original coupon code number the given clearText was based on. (This is the inverse function to thegenerateClearText(MultiCodeCouponModel, int)
method)- Throws:
SystemException
- if the coupon code number cannot be computed (e.g. if the clearText contains characters not in the coupon's alphabet)
-
-