Campaign¶
-
public abstract class
Campaign
<T extends CampaignMessage>¶ A base representation of a message campaign, that contains fields and methods common to all campaigns. Actual campaign representations are created extending this abstract class.
Parameters: - <T> – the type of messages sent during campaign; must extend base class
CampaignMessage
See also:
{@linkAbsoluteCampaign}
,{@linkCronBasedCampaign}
,{@linkDayOfWeekCampaign}
,{@linkOffsetCampaign}
,{@linkRepeatIntervalCampaign}
- <T> – the type of messages sent during campaign; must extend base class
Constructors¶
Methods¶
getCampaignMessage¶
-
public abstract T
getCampaignMessage
(CampaignMessageRecord messageRecord)¶ Converts domain representation of a campaign message to the message representation of this campaign.
Parameters: - messageRecord – domain representation of the campaign message
Returns: message converted to the type supported by this campaign
setMessageRecords¶
-
public void
setMessageRecords
(List<CampaignMessageRecord> messageRecords)¶ Sets message records for this campaign, from the domain representation.
Parameters: - messageRecords – a list of
CampaignMessageRecord
- messageRecords – a list of
validate¶
-
public void
validate
()¶ A general validator for the created campaigns. It also triggers validation of all the messages in this campaign.
Throws: - CampaignValidationException – if the name of the campaign is null or there are no messages assigned to this campaign.