Class CampaignCodeUsabilityInfo
java.lang.Object
com.broadleafcommerce.promotion.campaign.client.web.context.CampaignCodeUsabilityInfo
- All Implemented Interfaces:
Serializable
Contains information on a code's usability. That is, whether the code can be used or not and
detailed information on the corresponding campaign.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
A shared code for which this code usability tracks usage info.Describes the usability of the code.Infos on the uses of the related code used to determine if a campaign code can still be used.int
hashCode()
boolean
Whether the related campaign code's has uses left.void
setCodeToUse
(String codeToUse) A shared code for which this code usability tracks usage info.void
setCodeUsabilityType
(String codeUsabilityType) Describes the usability of the code.void
setCodeUses
(List<CampaignCodeUsage> codeUses) Infos on the uses of the related code used to determine if a campaign code can still be used.toString()
-
Constructor Details
-
CampaignCodeUsabilityInfo
public CampaignCodeUsabilityInfo()
-
-
Method Details
-
isCodeUsable
public boolean isCodeUsable()Whether the related campaign code's has uses left.- Returns:
- Whether the related campaign code's has uses left.
-
getCodeToUse
A shared code for which this code usability tracks usage info.- Returns:
- A shared code for which this code usability tracks usage info.
-
getCodeUsabilityType
Describes the usability of the code. This is mainly used to differentiate the different reasons a code might not be usable: It matches no campaign codes, it's been used the maximum number times, etc.- Returns:
- The usability of the code
- See Also:
-
getCodeUses
Infos on the uses of the related code used to determine if a campaign code can still be used.- Returns:
- Infos on the uses of the related code used to determine if a campaign code can still be used.
-
setCodeToUse
A shared code for which this code usability tracks usage info.- Parameters:
codeToUse
- A shared code for which this code usability tracks usage info.
-
setCodeUsabilityType
Describes the usability of the code. This is mainly used to differentiate the different reasons a code might not be usable: It matches no campaign codes, it's been used the maximum number times, etc.- Parameters:
codeUsabilityType
- The usability of the code- See Also:
-
setCodeUses
Infos on the uses of the related code used to determine if a campaign code can still be used.- Parameters:
codeUses
- Infos on the uses of the related code used to determine if a campaign code can still be used.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-