org.broadleafcommerce.core.offer.domain
Interface Offer

All Superinterfaces:
Serializable
All Known Implementing Classes:
OfferImpl

public interface Offer
extends Serializable


Method Summary
 String getAppliesToCustomerRules()
          Deprecated. 
 String getAppliesToOrderRules()
          Deprecated. 
 boolean getApplyDiscountToSalePrice()
           
 OfferDeliveryType getDeliveryType()
          Deprecated. Replaced by isAutomaticallyApplied property. In prior versions of Broadleaf deliveryType was used to differentiate "automatic" orders from those requiring a code. If the underlying property is null, this method will return a delivery type based on the isAutomatic property.
 String getDescription()
           
 OfferDiscountType getDiscountType()
           
 Date getEndDate()
           
 Long getId()
           
 String getMarketingMessage()
           
 int getMaxUses()
          Returns the maximum number of times that this offer can be used in the current order.
 Long getMaxUsesPerCustomer()
          Returns the maximum number of times that this offer can be used by the same customer.
 String getName()
           
 OfferItemRestrictionRuleType getOfferItemQualifierRuleType()
           
 OfferItemRestrictionRuleType getOfferItemTargetRuleType()
           
 Map<String,OfferRule> getOfferMatchRules()
           
 int getPriority()
           
 Set<OfferItemCriteria> getQualifyingItemCriteria()
           
 Money getQualifyingItemSubTotal()
          Indicates the amount of items that must be purchased for this offer to be considered for this order.
 Date getStartDate()
           
 Set<OfferItemCriteria> getTargetItemCriteria()
           
 String getTargetSystem()
           
 Boolean getTreatAsNewFormat()
           
 OfferType getType()
           
 int getUses()
          Deprecated. 
 BigDecimal getValue()
           
 boolean isApplyDiscountToMarkedItems()
          Deprecated. 
 boolean isAutomaticallyAdded()
          Returns true if the offer system should automatically add this offer for consideration (versus requiring a code or other delivery mechanism).
 boolean isCombinableWithOtherOffers()
          Returns false if this offer is not combinable with other offers of the same type.
 boolean isStackable()
          Deprecated. Use isCombinable instead.
 Boolean isTotalitarianOffer()
           
 void setAppliesToCustomerRules(String appliesToCustomerRules)
          Deprecated. 
 void setAppliesToOrderRules(String appliesToRules)
          Deprecated. 
 void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
          Deprecated. 
 void setApplyDiscountToSalePrice(boolean applyToSalePrice)
           
 void setAutomaticallyAdded(boolean automaticallyAdded)
          Sets whether or not this offer should be automatically considered for consideration (versus requiring a code or other delivery mechanism).
 void setCombinableWithOtherOffers(boolean combinableWithOtherOffers)
           
 void setDeliveryType(OfferDeliveryType deliveryType)
          Deprecated. Replaced by setAutomaticallyApplied(boolean val).
 void setDescription(String description)
           
 void setDiscountType(OfferDiscountType type)
           
 void setEndDate(Date endDate)
           
 void setId(Long id)
           
 void setMarketingMessage(String marketingMessage)
           
 void setMaxUses(int maxUses)
          Sets the maximum number of times that this offer can be used in the current order.
 void setMaxUsesPerCustomer(Long maxUses)
          Sets the maximum number of times that this offer can be used by the same customer.
 void setName(String name)
           
 void setOfferItemQualifierRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferItemTargetRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferMatchRules(Map<String,OfferRule> offerMatchRules)
           
 void setPriority(int priority)
           
 void setQualifyingItemCriteria(Set<OfferItemCriteria> qualifyingItemCriteria)
           
 void setQualifyingItemSubTotal(Money qualifyingItemSubtotal)
           
 void setStackable(boolean stackable)
          Deprecated. calls setCombinableWithOtherOffers(boolean)
 void setStartDate(Date startDate)
           
 void setTargetItemCriteria(Set<OfferItemCriteria> targetItemCriteria)
           
 void setTargetSystem(String targetSystem)
           
 void setTotalitarianOffer(Boolean totalitarianOffer)
           
 void setTreatAsNewFormat(Boolean treatAsNewFormat)
           
 void setType(OfferType offerType)
           
 void setUses(int uses)
          Deprecated. 
 void setValue(BigDecimal value)
           
 

Method Detail

setId

void setId(Long id)

getId

Long getId()

getName

String getName()

setName

void setName(String name)

getDescription

String getDescription()

setDescription

void setDescription(String description)

getType

OfferType getType()

setType

void setType(OfferType offerType)

getDiscountType

OfferDiscountType getDiscountType()

setDiscountType

void setDiscountType(OfferDiscountType type)

getValue

BigDecimal getValue()

setValue

void setValue(BigDecimal value)

getPriority

int getPriority()

setPriority

void setPriority(int priority)

getStartDate

Date getStartDate()

setStartDate

void setStartDate(Date startDate)

getEndDate

Date getEndDate()

setEndDate

void setEndDate(Date endDate)

isStackable

boolean isStackable()
Deprecated. Use isCombinable instead.

Returns:

setStackable

void setStackable(boolean stackable)
Deprecated. calls setCombinableWithOtherOffers(boolean)

Parameters:
stackable -

getTargetSystem

String getTargetSystem()

setTargetSystem

void setTargetSystem(String targetSystem)

getApplyDiscountToSalePrice

boolean getApplyDiscountToSalePrice()

setApplyDiscountToSalePrice

void setApplyDiscountToSalePrice(boolean applyToSalePrice)

getAppliesToOrderRules

@Deprecated
String getAppliesToOrderRules()
Deprecated. 


setAppliesToOrderRules

@Deprecated
void setAppliesToOrderRules(String appliesToRules)
Deprecated. 


getAppliesToCustomerRules

@Deprecated
String getAppliesToCustomerRules()
Deprecated. 


setAppliesToCustomerRules

@Deprecated
void setAppliesToCustomerRules(String appliesToCustomerRules)
Deprecated. 


isApplyDiscountToMarkedItems

@Deprecated
boolean isApplyDiscountToMarkedItems()
Deprecated. 


setApplyDiscountToMarkedItems

@Deprecated
void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
Deprecated. 


getOfferItemQualifierRuleType

OfferItemRestrictionRuleType getOfferItemQualifierRuleType()

setOfferItemQualifierRuleType

void setOfferItemQualifierRuleType(OfferItemRestrictionRuleType restrictionRuleType)

getOfferItemTargetRuleType

OfferItemRestrictionRuleType getOfferItemTargetRuleType()

setOfferItemTargetRuleType

void setOfferItemTargetRuleType(OfferItemRestrictionRuleType restrictionRuleType)

isCombinableWithOtherOffers

boolean isCombinableWithOtherOffers()
Returns false if this offer is not combinable with other offers of the same type. For example, if this is an Item offer it could be combined with other Order or FG offers but it cannot be combined with other Item offers.

Returns:

setCombinableWithOtherOffers

void setCombinableWithOtherOffers(boolean combinableWithOtherOffers)

isAutomaticallyAdded

boolean isAutomaticallyAdded()
Returns true if the offer system should automatically add this offer for consideration (versus requiring a code or other delivery mechanism). This does not guarantee that the offer will qualify. All rules associated with this offer must still pass. A true value here just means that the offer will be considered. For backwards compatibility, if the underlying property is null, this method will check the getDeliveryType() method and return true if that value is set to AUTOMATIC. If still null, this value will return false.

Returns:

setAutomaticallyAdded

void setAutomaticallyAdded(boolean automaticallyAdded)
Sets whether or not this offer should be automatically considered for consideration (versus requiring a code or other delivery mechanism).

See Also:
isAutomaticallyAdded()

getDeliveryType

OfferDeliveryType getDeliveryType()
Deprecated. Replaced by isAutomaticallyApplied property. In prior versions of Broadleaf deliveryType was used to differentiate "automatic" orders from those requiring a code. If the underlying property is null, this method will return a delivery type based on the isAutomatic property.

Returns:

setDeliveryType

void setDeliveryType(OfferDeliveryType deliveryType)
Deprecated. Replaced by setAutomaticallyApplied(boolean val).

Parameters:
deliveryType -

getMaxUsesPerCustomer

Long getMaxUsesPerCustomer()
Returns the maximum number of times that this offer can be used by the same customer. This field tracks the number of times the offer can be used and not how many times it is applied. 0 or null indicates unlimited usage per customer.

Returns:

setMaxUsesPerCustomer

void setMaxUsesPerCustomer(Long maxUses)
Sets the maximum number of times that this offer can be used by the same customer. Intended as a transient field that gets derived from the other persisted max uses fields including maxUsesPerOrder and maxUsesPerCustomer. 0 or null indicates unlimited usage.

Parameters:
maxUses -

getMaxUses

int getMaxUses()
Returns the maximum number of times that this offer can be used in the current order. 0 indicates unlimited usage.

Returns:

setMaxUses

void setMaxUses(int maxUses)
Sets the maximum number of times that this offer can be used in the current order. 0 indicates unlimited usage.

Parameters:
maxUses -

getUses

@Deprecated
int getUses()
Deprecated. 


setUses

@Deprecated
void setUses(int uses)
Deprecated. 


getQualifyingItemCriteria

Set<OfferItemCriteria> getQualifyingItemCriteria()

setQualifyingItemCriteria

void setQualifyingItemCriteria(Set<OfferItemCriteria> qualifyingItemCriteria)

getTargetItemCriteria

Set<OfferItemCriteria> getTargetItemCriteria()

setTargetItemCriteria

void setTargetItemCriteria(Set<OfferItemCriteria> targetItemCriteria)

isTotalitarianOffer

Boolean isTotalitarianOffer()

setTotalitarianOffer

void setTotalitarianOffer(Boolean totalitarianOffer)

getOfferMatchRules

Map<String,OfferRule> getOfferMatchRules()

setOfferMatchRules

void setOfferMatchRules(Map<String,OfferRule> offerMatchRules)

getTreatAsNewFormat

Boolean getTreatAsNewFormat()

setTreatAsNewFormat

void setTreatAsNewFormat(Boolean treatAsNewFormat)

getQualifyingItemSubTotal

Money getQualifyingItemSubTotal()
Indicates the amount of items that must be purchased for this offer to be considered for this order. The system will find all qualifying items for the given offer and sum their prices before any discounts are applied to make the determination. If the sum of the qualifying items is not greater than this value the offer is not considered by the offer processing algorithm.

Returns:

setQualifyingItemSubTotal

void setQualifyingItemSubTotal(Money qualifyingItemSubtotal)

setMarketingMessage

void setMarketingMessage(String marketingMessage)

getMarketingMessage

String getMarketingMessage()


Copyright © 2013. All Rights Reserved.