Class CodeUsabilityInfo
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.CodeUsabilityInfo
- 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 offers.
- Author:
- Chad Harchar (charchar), Nathan Moore (nathandmoore)
- 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 an offer's shared code can still be used.int
hashCode()
boolean
Whether the related shared code's parentOfferRef
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<CodeUsage> codeUses) Infos on the uses of the related code used to determine if an offer's shared code can still be used.toString()
-
Constructor Details
-
CodeUsabilityInfo
public CodeUsabilityInfo()
-
-
Method Details
-
isCodeUsable
public boolean isCodeUsable()Whether the related shared code's parentOfferRef
has uses left.- Returns:
- Whether the related shared code's parent
OfferRef
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 offers, 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 an offer's shared code can still be used.- Returns:
- Infos on the uses of the related code used to determine if an offer's shared 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 offers, 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 an offer's shared code can still be used.- Parameters:
codeUses
- Infos on the uses of the related code used to determine if an offer's shared code can still be used.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-