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 booleanbooleanA 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.inthashCode()booleanWhether the related shared code's parentOfferRefhas uses left.voidsetCodeToUse(String codeToUse) A shared code for which this code usability tracks usage info.voidsetCodeUsabilityType(String codeUsabilityType) Describes the usability of the code.voidsetCodeUses(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 parentOfferRefhas uses left.- Returns:
- Whether the related shared code's parent
OfferRefhas 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
-