@Entity public class OfferCodeGenerationInfoImpl extends Object implements OfferCodeGenerationInfo, org.broadleafcommerce.common.admin.domain.AdminMainEntity, OfferCodeGenerationInfoAdminPresentation
OfferCodeGenerationInfoAdminPresentation.GroupName, OfferCodeGenerationInfoAdminPresentation.GroupOrder, OfferCodeGenerationInfoAdminPresentation.TabName, OfferCodeGenerationInfoAdminPresentation.TabOrder| Modifier and Type | Field and Description |
|---|---|
protected Date |
activeStartDate |
protected List<OfferCodeGenerationAdditionalOfferXref> |
additionalOffers |
protected Date |
createDate |
protected String |
emailRegEx |
protected Date |
endDate |
protected List<org.broadleafcommerce.core.offer.domain.OfferCode> |
offerCodes |
protected Date |
updateDate |
| Constructor and Description |
|---|
OfferCodeGenerationInfoImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends OfferCodeGenerationInfo> |
createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) |
boolean |
equals(Object o) |
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
OfferCodeGenerationInfo.getNumberOfCodesGenerated() / #getNumberOfCodesRequested()
If those values = just returns OfferCodeGenerationInfo.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.
|
String |
getMainEntityName() |
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.
|
int |
hashCode() |
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 codeGenerationMessage) |
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 ignoreGuessabilityError)
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)
The maximum amount of OfferCodes that can be generated is set by the system property
offerCode.maxCodeGeneration.
|
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 updateDate)
Set the date this generator was last updated.
|
protected List<OfferCodeGenerationAdditionalOfferXref> additionalOffers
protected Date createDate
protected Date updateDate
protected List<org.broadleafcommerce.core.offer.domain.OfferCode> offerCodes
protected String emailRegEx
protected Date activeStartDate
protected Date endDate
public Long getId()
OfferCodeGenerationInfogetId in interface OfferCodeGenerationInfopublic void setId(Long id)
OfferCodeGenerationInfosetId in interface OfferCodeGenerationInfopublic String getDescription()
OfferCodeGenerationInfogetDescription in interface OfferCodeGenerationInfopublic void setDescription(String description)
OfferCodeGenerationInfosetDescription in interface OfferCodeGenerationInfopublic Integer getNumberOfCodesToGenerate()
OfferCodeGenerationInfogetNumberOfCodesToGenerate in interface OfferCodeGenerationInfopublic void setNumberOfCodesToGenerate(Integer numberOfCodesToGenerate)
setNumberOfCodesToGenerate in interface OfferCodeGenerationInfonumberOfCodesToGenerate - public int getNumberOfCodesGenerated()
OfferCodeGenerationInfogetNumberOfCodesGenerated in interface OfferCodeGenerationInfopublic void setNumberOfCodesGenerated(Integer numberOfCodesGenerated)
OfferCodeGenerationInfosetNumberOfCodesGenerated in interface OfferCodeGenerationInfopublic org.broadleafcommerce.core.offer.domain.Offer getOffer()
OfferCodeGenerationInfogetOffer in interface OfferCodeGenerationInfopublic void setOffer(org.broadleafcommerce.core.offer.domain.Offer offer)
OfferCodeGenerationInfosetOffer in interface OfferCodeGenerationInfopublic String getCodeFormat()
OfferCodeGenerationInfoCodeGenerationMethodType.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)getCodeFormat in interface OfferCodeGenerationInfoCodeGeneratorServiceImplpublic void setCodeFormat(String codeFormat)
OfferCodeGenerationInfosetCodeFormat in interface OfferCodeGenerationInfoOfferCodeGenerationInfo.getCodeFormat()public String getCodePrefix()
OfferCodeGenerationInfoCodeGenerationMethodType.SPECIFY_FORMAT.getCodePrefix in interface OfferCodeGenerationInfopublic void setCodePrefix(String codePrefix)
OfferCodeGenerationInfosetCodePrefix in interface OfferCodeGenerationInfoOfferCodeGenerationInfo.getCodePrefix()public Integer getCodeLength()
OfferCodeGenerationInfoCodeGenerationMethodType.SPECIFY_LENGTH.getCodeLength in interface OfferCodeGenerationInfopublic void setCodeLength(Integer codeLength)
OfferCodeGenerationInfosetCodeLength in interface OfferCodeGenerationInfoOfferCodeGenerationInfo.getCodeLength()public Integer getMaxUses()
OfferCodeGenerationInfogetMaxUses in interface OfferCodeGenerationInfopublic void setMaxUses(Integer maxUses)
OfferCodeGenerationInfoOffer.getMaxUsesPerOrder() to limit the number of times the offer can be used within the
same order.setMaxUses in interface OfferCodeGenerationInfoOfferCodeGenerationInfo.getMaxUses()public CodeGenerationStatusType getCodeGenerationStatus()
OfferCodeGenerationInfogetCodeGenerationStatus in interface OfferCodeGenerationInfopublic void setCodeGenerationStatus(CodeGenerationStatusType codeGenerationStatus)
OfferCodeGenerationInfosetCodeGenerationStatus in interface OfferCodeGenerationInfopublic CodeGenerationMethodType getCodeGenerationMethod()
OfferCodeGenerationInfogetCodeGenerationMethod in interface OfferCodeGenerationInfopublic void setCodeGenerationMethod(CodeGenerationMethodType codeGenerationMethod)
OfferCodeGenerationInfosetCodeGenerationMethod in interface OfferCodeGenerationInfopublic boolean getIgnoreGuessabilityError()
OfferCodeGenerationInfogetIgnoreGuessabilityError in interface OfferCodeGenerationInfopublic void setIgnoreGuessabilityError(boolean ignoreGuessabilityError)
OfferCodeGenerationInfosetIgnoreGuessabilityError in interface OfferCodeGenerationInfopublic Date getCreateDate()
OfferCodeGenerationInfogetCreateDate in interface OfferCodeGenerationInfopublic void setCreateDate(Date createDate)
OfferCodeGenerationInfosetCreateDate in interface OfferCodeGenerationInfopublic Date getUpdateDate()
OfferCodeGenerationInfogetUpdateDate in interface OfferCodeGenerationInfopublic void setUpdateDate(Date updateDate)
OfferCodeGenerationInfosetUpdateDate in interface OfferCodeGenerationInfopublic String getCodeGenerationProgressMessage()
OfferCodeGenerationInfoOfferCodeGenerationInfo.getNumberOfCodesGenerated() / #getNumberOfCodesRequested()
If those values = just returns OfferCodeGenerationInfo.getNumberOfCodesGenerated()
Gives the admin an easy way to return progress. This field is automatically updated when
setCodgetCodeGenerationProgressMessage in interface OfferCodeGenerationInfopublic void setCodeGenerationProgressMessage(String codeGenerationMessage)
setCodeGenerationProgressMessage in interface OfferCodeGenerationInfoOfferCodeGenerationInfo.getCodeGenerationProgressMessage()public List<org.broadleafcommerce.core.offer.domain.OfferCode> getOfferCodes()
OfferCodeGenerationInfogetOfferCodes in interface OfferCodeGenerationInfopublic void setOfferCodes(List<org.broadleafcommerce.core.offer.domain.OfferCode> offerCodes)
OfferCodeGenerationInfosetOfferCodes in interface OfferCodeGenerationInfopublic List<OfferCodeGenerationAdditionalOfferXref> getAdditionalOffers()
OfferCodeGenerationInfogetAdditionalOffers in interface OfferCodeGenerationInfopublic void setAdditionalOffers(List<OfferCodeGenerationAdditionalOfferXref> additionalOffers)
OfferCodeGenerationInfosetAdditionalOffers in interface OfferCodeGenerationInfopublic String getEmailRegEx()
OfferCodeGenerationInfogetEmailRegEx in interface OfferCodeGenerationInfopublic void setEmailRegEx(String emailRegEx)
OfferCodeGenerationInfosetEmailRegEx in interface OfferCodeGenerationInfopublic Date getActiveStartDate()
OfferCodeGenerationInfogetActiveStartDate in interface OfferCodeGenerationInfopublic void setActiveStartDate(Date activeStartDate)
OfferCodeGenerationInfosetActiveStartDate in interface OfferCodeGenerationInfopublic Date getEndDate()
OfferCodeGenerationInfogetEndDate in interface OfferCodeGenerationInfopublic void setEndDate(Date endDate)
OfferCodeGenerationInfosetEndDate in interface OfferCodeGenerationInfopublic <G extends OfferCodeGenerationInfo> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<OfferCodeGenerationInfo>CloneNotSupportedExceptionpublic String getMainEntityName()
getMainEntityName in interface org.broadleafcommerce.common.admin.domain.AdminMainEntityCopyright © 2020. All rights reserved.