Class CampaignCodeUsageValidationResult
java.lang.Object
com.broadleafcommerce.promotion.campaign.client.web.context.CampaignCodeUsageValidationResult
- All Implemented Interfaces:
Serializable
DTO holding the resulting information about the validity of campaign codes. This is mainly used
for the purposes of holding and transferring information about the validity of campaign codes
upon checkout.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The list of campaign codes which are no longer usable.Mapping of campaign codes to failure messages.int
hashCode()
boolean
If this is set to false, one or more campaign codes is no longer valid and need to be removed from the list of previously applied campaigns.void
setInvalidCampaignCodes
(List<String> invalidCampaignCodes) The list of campaign codes which are no longer usable.void
setUsageValid
(boolean isUsageValid) If this is set to false, one or more campaign codes is no longer valid and need to be removed from the list of previously applied campaigns.void
setValidationFailureMessages
(Map<String, String> validationFailureMessages) Mapping of campaign codes to failure messages.toString()
-
Constructor Details
-
CampaignCodeUsageValidationResult
public CampaignCodeUsageValidationResult()
-
-
Method Details
-
isUsageValid
public boolean isUsageValid()If this is set to false, one or more campaign codes is no longer valid and need to be removed from the list of previously applied campaigns. Default is true.- Returns:
- Whether the campaign usages are valid.
-
getInvalidCampaignCodes
The list of campaign codes which are no longer usable.- Returns:
- The list of campaign codes which are no longer usable.
-
getValidationFailureMessages
Mapping of campaign codes to failure messages. Each campaign code usage that failed validation should have an entry in this map with a specific failure message.- Returns:
- The map of error messages and their tie to an invalid campaign.
-
setUsageValid
public void setUsageValid(boolean isUsageValid) If this is set to false, one or more campaign codes is no longer valid and need to be removed from the list of previously applied campaigns. Default is true.- Parameters:
isUsageValid
- Whether the campaign usages are valid.
-
setInvalidCampaignCodes
The list of campaign codes which are no longer usable.- Parameters:
invalidOfferCodes
- The list of campaign codes which are no longer usable.
-
setValidationFailureMessages
Mapping of campaign codes to failure messages. Each campaign code usage that failed validation should have an entry in this map with a specific failure message.- Parameters:
validationFailureMessages
- The map of error messages and their tie to an invalid campaign.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-