CampaignMessage

public abstract class CampaignMessage

A base representation of a message, sent during a campaign. It contains the fields and methods common to all types of a campaign message. Actual campaign message representations are created extending this base class.

See also: {@linkAbsoluteCampaignMessage}, {@linkCronBasedCampaignMessage}, {@linkDayOfWeekCampaignMessage}, {@linkOffsetCampaignMessage}, {@linkRepeatIntervalCampaignMessage}

Constructors

CampaignMessage

public CampaignMessage(CampaignMessageRecord messageRecord)

CampaignMessage

public CampaignMessage(String name, List<String> formats, List<String> languages, String messageKey, Time startTime)

Methods

getCampaign

public CampaignRecord getCampaign()

getFormats

public List<String> getFormats()

getLanguages

public List<String> getLanguages()

getMessageKey

public String getMessageKey()

getName

public String getName()

getStartTime

public Time getStartTime()

setCampaign

public void setCampaign(CampaignRecord campaign)

setFormats

public void setFormats(List<String> formats)

setLanguages

public void setLanguages(List<String> languages)

setMessageKey

public void setMessageKey(String messageKey)

setName

public void setName(String name)

setStartTime

public void setStartTime(Time startTime)

setStartTime

public void setStartTime(String startTime)

Sets the fire time for this campaign message. The time must be formatted as hh:mm and must be in the 24-hour format.

Parameters:
  • startTime – string representation of the time

validate

public abstract void validate()

Base validation method for the campaign message. Each concrete subclass must provide the implementation, that validates the presence of the required fields for this type of a campaign message.

Throws: