public interface OfferCodeGenerationInfo extends Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<OfferCodeGenerationInfo>
| Modifier and Type | Method and Description |
|---|---|
Date |
getActiveStartDate()
Returns the Active Start Date for a code group that is used if an offer code does not have an Active Date
|
List<OfferCodeGenerationAdditionalOfferXref> |
getAdditionalOffers()
Returns the additional offers that are associated to this generator.
|
String |
getCodeFormat()
Returns the custom formatter for generating codes.
|
CodeGenerationMethodType |
getCodeGenerationMethod()
Returns the CodeGenerationType being used to generate offer codes.
|
String |
getCodeGenerationProgressMessage()
Returns a String with
getNumberOfCodesGenerated() / #getNumberOfCodesRequested()
If those values = just returns getNumberOfCodesGenerated()
Gives the admin an easy way to return progress. |
CodeGenerationStatusType |
getCodeGenerationStatus()
Returns the CodeGenerationType being used to generate offer codes.
|
Integer |
getCodeLength()
Returns the length of the code the generator should generated (not including the length of the prefix).
|
String |
getCodePrefix()
Returns the code prefix the generator should use to prepend to any generated offer code.
|
Date |
getCreateDate()
Return date this generator was created.
|
String |
getDescription()
Returns the description
|
String |
getEmailRegEx()
Returns the EmailRegEx used to validate an offerCode
|
Date |
getEndDate()
Returns the End Date for a code group that is used if an offer code does not have an End Date
|
Long |
getId()
Returns the unique id
|
boolean |
getIgnoreGuessabilityError()
If set, allows codes to be generated that might be easily guessed.
|
Integer |
getMaxUses()
Returns the maximum number of uses to set for each code generated.
|
int |
getNumberOfCodesGenerated()
Returns the number of codes actually generated by this code generator.
|
Integer |
getNumberOfCodesToGenerate()
Number of codes that should be generated.
|
org.broadleafcommerce.core.offer.domain.Offer |
getOffer()
Returns the associated offer for which codes are being generated.
|
List<org.broadleafcommerce.core.offer.domain.OfferCode> |
getOfferCodes()
Returns the offer codes that were created as part of this generator.
|
Date |
getUpdateDate()
Return date this generator was last updated.
|
void |
setActiveStartDate(Date activeStartDate)
Set the Active Start Date for a code group that is used if an offer code does not have an Active Date
|
void |
setAdditionalOffers(List<OfferCodeGenerationAdditionalOfferXref> additionalOffers)
Sets additional offers that are associated to this generator.
|
void |
setCodeFormat(String codeFormat)
Sets a custom formatter for generating codes.
|
void |
setCodeGenerationMethod(CodeGenerationMethodType codeGenerationMethod)
Sets the CodeGenerationType being used to generate offer codes.
|
void |
setCodeGenerationProgressMessage(String message) |
void |
setCodeGenerationStatus(CodeGenerationStatusType codeGenerationStatus)
Sets the CodeGenerationStatusType being used to generate offer codes.
|
void |
setCodeLength(Integer codeLength)
Sets the code length the generator should use when generating the codes.
|
void |
setCodePrefix(String codePrefix)
Sets the codePrefix
|
void |
setCreateDate(Date createDate)
Set the date this generator was created.
|
void |
setDescription(String description)
Sets the description
|
void |
setEmailRegEx(String emailRegEx)
Sets EmailRegEx that is used to validate offerCodes
|
void |
setEndDate(Date endDate)
Set the End Date for a code group that is used if an offer code does not have an End Date
|
void |
setId(Long id)
Sets the id
|
void |
setIgnoreGuessabilityError(boolean flag)
Sets the system to ignore guessability warning.
|
void |
setMaxUses(Integer maxUses)
Sets the maximum number of orders that the code can be used in.
|
void |
setNumberOfCodesGenerated(Integer numberOfCodesGenerated)
Sets the number of codes to generate.
|
void |
setNumberOfCodesToGenerate(Integer numberOfCodesToGenerate)
Sets the number of codes to generate.
|
void |
setOffer(org.broadleafcommerce.core.offer.domain.Offer offer)
Sets the associated offer for which codes are being generated.
|
void |
setOfferCodes(List<org.broadleafcommerce.core.offer.domain.OfferCode> offerCodes)
Sets the offer codes that can be used to retrieve this Offer.
|
void |
setUpdateDate(Date updatedDate)
Set the date this generator was last updated.
|
Long getId()
void setId(Long id)
id - String getDescription()
void setDescription(String description)
description - Integer getNumberOfCodesToGenerate()
void setNumberOfCodesToGenerate(Integer numberOfCodesToGenerate)
int getNumberOfCodesGenerated()
void setNumberOfCodesGenerated(Integer numberOfCodesGenerated)
org.broadleafcommerce.core.offer.domain.Offer getOffer()
void setOffer(org.broadleafcommerce.core.offer.domain.Offer offer)
offer - CodeGenerationStatusType getCodeGenerationStatus()
void setCodeGenerationStatus(CodeGenerationStatusType codeGenerationStatus)
codeGenerationStatus - CodeGenerationMethodType getCodeGenerationMethod()
void setCodeGenerationMethod(CodeGenerationMethodType codeGenerationMethod)
codeGenerationMethod - String getCodePrefix()
CodeGenerationMethodType.SPECIFY_FORMAT.void setCodePrefix(String codePrefix)
codePrefix - getCodePrefix()Integer getCodeLength()
CodeGenerationMethodType.SPECIFY_LENGTH.void setCodeLength(Integer codeLength)
codeLength - getCodeLength()Integer getMaxUses()
void setMaxUses(Integer maxUses)
Offer.getMaxUsesPerOrder() to limit the number of times the offer can be used within the
same order.maxUses - getMaxUses()String getCodeFormat()
CodeGenerationMethodType.SPECIFY_FORMAT.
For example, consider "CF-##-@@-**-1" which might generate the following code "CF-99-AB-Z3-1".
Each symbol is processed by the CodeGenerator.
The default implementation is as follows:
# is replaced by a random number (not including 0, 1, or 5)CodeGeneratorServiceImplvoid setCodeFormat(String codeFormat)
codeFormat - getCodeFormat()boolean getIgnoreGuessabilityError()
void setIgnoreGuessabilityError(boolean flag)
flag - Date getCreateDate()
void setCreateDate(Date createDate)
createDate - Date getUpdateDate()
void setUpdateDate(Date updatedDate)
updatedDate - String getCodeGenerationProgressMessage()
getNumberOfCodesGenerated() / #getNumberOfCodesRequested()
If those values = just returns getNumberOfCodesGenerated()
Gives the admin an easy way to return progress. This field is automatically updated when
setCodvoid setCodeGenerationProgressMessage(String message)
message - getCodeGenerationProgressMessage()List<org.broadleafcommerce.core.offer.domain.OfferCode> getOfferCodes()
void setOfferCodes(List<org.broadleafcommerce.core.offer.domain.OfferCode> offerCodes)
List<OfferCodeGenerationAdditionalOfferXref> getAdditionalOffers()
void setAdditionalOffers(List<OfferCodeGenerationAdditionalOfferXref> additionalOffers)
String getEmailRegEx()
void setEmailRegEx(String emailRegEx)
Date getActiveStartDate()
void setActiveStartDate(Date activeStartDate)
Date getEndDate()
void setEndDate(Date endDate)
Copyright © 2020. All rights reserved.