Class OfferOptIn
java.lang.Object
com.broadleafcommerce.promotion.offer.domain.OfferOptIn
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,ActiveDateEntity,Serializable
public class OfferOptIn
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware, ActiveDateEntity
Represents an acceptance and activation (or rejection and deactivation) of an optional global
offer by an application. Global offers are offers created outside an application context with no
direct application assignment, making them universally accessible. By creating the structure for
an offer, it is easy for an application to adopt the pre-defined offer and set active dates for
it. It is also possible for an application to reject an offer. Accepted and Rejected have meaning
in combination with
OptInStatus.REQUIRE_OPT_IN, and OptInStatus.ALLOW_OPT_OUT,
respectively.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe time at which this entity becomes inactive for storefront consumption.The time at which this entity becomes active for storefront consumption.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetId()getOffer()inthashCode()booleanbooleanbooleanvoidsetAccepted(boolean accepted) voidsetActiveEndDate(Instant activeEndDate) voidsetActiveStartDate(Instant activeStartDate) voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) voidsetEnabled(boolean enabled) voidvoidvoidsetRejected(boolean rejected) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.promotion.offer.domain.ActiveDateEntity
checkActiveDates, checkActiveDates
-
Constructor Details
-
OfferOptIn
public OfferOptIn()
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
getId
-
getOffer
-
getActiveStartDate
Description copied from interface:ActiveDateEntityThe time at which this entity becomes active for storefront consumption. Can be null, in which case the item is always active.- Specified by:
getActiveStartDatein interfaceActiveDateEntity- Returns:
- The time at which this entity becomes active for storefront consumption
-
getActiveEndDate
Description copied from interface:ActiveDateEntityThe time at which this entity becomes inactive for storefront consumption. Can be null, in which case the item does not expire.- Specified by:
getActiveEndDatein interfaceActiveDateEntity- Returns:
- The time at which this entity becomes inactive for storefront consumption
-
isAccepted
public boolean isAccepted() -
isRejected
public boolean isRejected() -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setId
-
setOffer
-
setActiveStartDate
-
setActiveEndDate
-
setAccepted
public void setAccepted(boolean accepted) -
setRejected
public void setRejected(boolean rejected) -
setEnabled
public void setEnabled(boolean enabled) -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) - Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-