Class CandidateOffers
java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.CandidateOffers
- All Implemented Interfaces:
Serializable
DTO containing the candidate offers broken out into groups based on an
offer's
Discount.getTargetType()
}.- Author:
- Nathan Moore (nathanmoore).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
void
In the admin, a user can specify an exclusion from either side of the offer.boolean
A set of all the relevant candidate offers for given offer engine executionSet of ids for all offers that are applicable to a given offer engine execution.List of candidate offers targetingfulfillment groups
.List of candidate offers targetingfulfillment items
.List of candidate offers targetingorder items
.List of candidate offers targetingorders
.For combinability algorithms, it is helpful to know the ids of all other offer types.int
hashCode()
void
Adds the offer to the relevant collections used by the offer engine.boolean
isEmpty()
void
void
setAllCandidateOffers
(List<BaseCandidateOffer> allCandidateOffers) A set of all the relevant candidate offers for given offer engine executionvoid
setAllOfferIds
(Set<String> allOfferIds) Set of ids for all offers that are applicable to a given offer engine execution.void
setCandidateFulfillmentGroupOffers
(List<CandidateFulfillmentGroupOffer> candidateFulfillmentGroupOffers) List of candidate offers targetingfulfillment groups
.void
setCandidateFulfillmentItemOffers
(List<CandidateItemOffer> candidateFulfillmentItemOffers) List of candidate offers targetingfulfillment items
.void
setCandidateOrderItemOffers
(List<CandidateItemOffer> candidateOrderItemOffers) List of candidate offers targetingorder items
.void
setCandidateOrderOffers
(List<CandidateOrderOffer> candidateOrderOffers) List of candidate offers targetingorders
.void
setOtherTypeOfferIdsList
(Map<String, Set<String>> otherTypeOfferIdsList) For combinability algorithms, it is helpful to know the ids of all other offer types.toString()
-
Constructor Details
-
CandidateOffers
public CandidateOffers()
-
-
Method Details
-
initializeCandidateOfferForProcessing
Adds the offer to the relevant collections used by the offer engine.- Parameters:
offer
-
-
populateCombinabilityStructures
public void populateCombinabilityStructures() -
distributeExclusions
public void distributeExclusions()In the admin, a user can specify an exclusion from either side of the offer. The offer engine needs to process the exclusions from either side. This method makes sure that if Offer A excludes B that Offer B also excludes A. -
isEmpty
public boolean isEmpty() -
getOtherTypeOfferIdsList
For combinability algorithms, it is helpful to know the ids of all other offer types. For example, an order offer needs to know the ids of all item and fulfillment offers to see which ones it can be combined with. -
getAllOfferIds
Set of ids for all offers that are applicable to a given offer engine execution. -
getAllCandidateOffers
A set of all the relevant candidate offers for given offer engine execution -
getCandidateOrderItemOffers
List of candidate offers targetingorder items
.- Returns:
- List of candidate offers targeting
order items
. - See Also:
-
getCandidateOrderOffers
List of candidate offers targetingorders
.- Returns:
- List of candidate offers targeting
orders
. - See Also:
-
getCandidateFulfillmentGroupOffers
List of candidate offers targetingfulfillment groups
.- Returns:
- List of candidate offers targeting
fulfillment groups
. - See Also:
-
getCandidateFulfillmentItemOffers
List of candidate offers targetingfulfillment items
.- Returns:
- List of candidate offers targeting
fulfillment items
. - See Also:
-
setOtherTypeOfferIdsList
For combinability algorithms, it is helpful to know the ids of all other offer types. For example, an order offer needs to know the ids of all item and fulfillment offers to see which ones it can be combined with. -
setAllOfferIds
Set of ids for all offers that are applicable to a given offer engine execution. -
setAllCandidateOffers
A set of all the relevant candidate offers for given offer engine execution -
setCandidateOrderItemOffers
List of candidate offers targetingorder items
.- Parameters:
candidateOrderItemOffers
- List of candidate offers targetingorder items
.- See Also:
-
setCandidateOrderOffers
List of candidate offers targetingorders
.- Parameters:
candidateOrderOffers
- List of candidate offers targetingorders
.- See Also:
-
setCandidateFulfillmentGroupOffers
public void setCandidateFulfillmentGroupOffers(List<CandidateFulfillmentGroupOffer> candidateFulfillmentGroupOffers) List of candidate offers targetingfulfillment groups
.- Parameters:
candidateFulfillmentGroupOffers
- List of candidate offers targetingfulfillment groups
.- See Also:
-
setCandidateFulfillmentItemOffers
public void setCandidateFulfillmentItemOffers(List<CandidateItemOffer> candidateFulfillmentItemOffers) List of candidate offers targetingfulfillment items
.- Parameters:
candidateFulfillmentItemOffers
- List of candidate offers targetingfulfillment items
.- See Also:
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-