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 Details

    • OfferOptIn

      public OfferOptIn()
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • getId

      public String getId()
    • getOffer

      public Offer getOffer()
    • getActiveStartDate

      public Instant getActiveStartDate()
      Description copied from interface: ActiveDateEntity
      The time at which this entity becomes active for storefront consumption. Can be null, in which case the item is always active.
      Specified by:
      getActiveStartDate in interface ActiveDateEntity
      Returns:
      The time at which this entity becomes active for storefront consumption
    • getActiveEndDate

      public Instant getActiveEndDate()
      Description copied from interface: ActiveDateEntity
      The time at which this entity becomes inactive for storefront consumption. Can be null, in which case the item does not expire.
      Specified by:
      getActiveEndDate in interface ActiveDateEntity
      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:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • setId

      public void setId(String id)
    • setOffer

      public void setOffer(Offer offer)
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
    • 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:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object