Class Campaign
java.lang.Object
com.broadleafcommerce.promotion.offer.domain.Campaign
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,ActiveDateEntity,Serializable
public class Campaign
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware, ActiveDateEntity
The main domain that the Broadleaf Campaign service is based around. Campaigns are the base to
which you can generate multiple codes against.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanDefines the ending time for which this campaign is active.Defines the beginning time for which this campaign is active.Defines a prefix to updateUses when generating campaign codes for this campaign.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.getId()The id of this campaign.getName()The user-readable name of this campaigninthashCode()voidsetActiveEndDate(Instant activeEndDate) Defines the ending time for which this campaign is active.voidsetActiveStartDate(Instant activeStartDate) Defines the beginning time for which this campaign is active.voidsetCodePrefix(String codePrefix) Defines a prefix to updateUses when generating campaign codes for this campaign.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetExternalId(String externalId) This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.voidThe id of this campaign.voidThe user-readable name of this campaigntoString()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
-
Campaign
public Campaign()
-
-
Method Details
-
getId
The id of this campaign. This is also used as an identifier to track this campaign. -
getExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Returns:
- an external ID
-
getName
The user-readable name of this campaign -
getCodePrefix
Defines a prefix to updateUses when generating campaign codes for this campaign. -
getActiveStartDate
Defines the beginning time for which this campaign is active.- Specified by:
getActiveStartDatein interfaceActiveDateEntity- Returns:
- The time at which this entity becomes active for storefront consumption
-
getActiveEndDate
Defines the ending time for which this campaign is active.- Specified by:
getActiveEndDatein interfaceActiveDateEntity- Returns:
- The time at which this entity becomes inactive for storefront consumption
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The id of this campaign. This is also used as an identifier to track this campaign. -
setExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Parameters:
externalId- an external ID, often a DB or business ID, from a system outside of Broadleaf
-
setName
The user-readable name of this campaign -
setCodePrefix
Defines a prefix to updateUses when generating campaign codes for this campaign. -
setActiveStartDate
Defines the beginning time for which this campaign is active. -
setActiveEndDate
Defines the ending time for which this campaign is active. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-