public class MaileonMailingsService extends AbstractMaileonService
MaileonMailingsService
client sends operational requests to the MailingsResource
.Modifier and Type | Class and Description |
---|---|
static class |
MaileonMailingsService.MailingType |
AbstractMaileonService.QueryParameters
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE |
MAILEON_XML_TYPE
Constructor and Description |
---|
MaileonMailingsService(MaileonConfiguration config)
Constructs a
MaileonMailingsService . |
Modifier and Type | Method and Description | ||
---|---|---|---|
void |
addAttachment(long mailingId,
java.io.InputStream in,
java.lang.String mimeType,
java.lang.String filename)
Adds an attachment to the mailing with the provided id.
|
||
void |
addMailingProperties(long mailingId,
Properties properties) |
||
void |
copyAttachments(long srcMailingId,
long destMailingId)
Copies the attachments of a source mailing into a target mailing
java.lang.Long createMailing(java.lang.String name,
java.lang.String subject)
Creates Creates a regular mailing and returns its id.
| ||
java.lang.Long |
createMailing(java.lang.String name,
java.lang.String subject,
MaileonMailingsService.MailingType type)
Creates Creates a regular mailing and returns its id.
|
||
void |
deactivateTriggerMailing(long mailingId)
Deactivates a trigger mailing by ID.
|
||
void |
deleteAttachment(long mailingId,
long attachmentId)
Deletes an attachment according to a provided id from the mailing.
|
||
void |
deleteAttachments(long mailingId)
Deletes all the attachments that belong to the mailing with the provided id.
|
||
void |
deleteMailing(long mailingId)
Removes mailing according to its id.
|
||
void |
deleteMailingProperty(long mailingId,
java.lang.String name) |
||
boolean |
existsMailing(java.lang.String mailingName)
Checks if the mailing with the provided name exists.
|
||
java.lang.Integer |
getArchivalDuration(long mailingId)
Returns the archival duration of the mailing with the provided id in months.
|
||
java.lang.String |
getArchiveUrl(long mailingId)
Returns the url of the archive version of a sent mailing..
|
||
byte[] |
getAttachment(long mailingId,
long attachmentId)
Returns the attachment with the provided id as a file (array of bytes).
|
||
java.util.List<Attachment> |
getAttachments(long mailingId)
Returns a list of the registered attachments for the mailing with the provided id.
|
||
java.lang.String |
getAuthor(long mailingId)
Returns the author of the mailing with the provided id.
|
||
int |
getContactsLimit(long mailingId)
Gets the maximum of emails for the given mailing.
|
||
int |
getCountAttachments(long mailingId)
Returns the count of available attachments in the mailing with the provided id.
|
||
java.lang.Integer |
getCountDOIConfirmationLinks(long mailingId,
Format format)
Gets the count of DOI-Confirmation links of the mailing with the provided id.
|
||
java.lang.Integer |
getCountExternalImages(long mailingId)
Returns the number of the external images within a particular mailing.
|
||
java.lang.Integer |
getCountExternalLinks(long mailingId,
Format format)
Returns the number of external links within a particular mailing.
|
||
java.lang.Integer |
getCountHostedImages(long mailingId)
Returns the number of the hosted images within a particular mailing.
|
||
java.lang.Integer |
getCountOnlineVersionLinks(long mailingId,
Format format)
Gets the count of online version links of the mailing with the provided id.
|
||
java.lang.Integer |
getCountTrackableLinks(long mailingId,
Format format)
Returns the number of trackable links within a particular mailing.
|
||
java.lang.Integer |
getCountUnsubscribeLinks(long mailingId,
Format format)
Gets the count of unsubscribe links of the mailing with the provided id.
|
||
java.lang.String |
getDoiMailingKey(long mailingId)
Fetches the DOI mailing key of the mailing identified by the given ID.
|
||
java.util.List<Image> |
getExternalImages(long mailingId)
Returns the external images within a particular mailing.
|
||
java.util.List<Link> |
getExternalLinks(long mailingId,
Format format)
Gets the exteranl links within a particular mailing.
|
||
java.util.List<Image> |
getHostedImages(long mailingId)
Returns the hosted images within a particular mailing.
|
||
java.lang.String |
getHtmlContent(long mailingId)
Returns the html template of the mailing with the provided id.
|
||
java.lang.Long |
getHtmlContentSize(long mailingId)
Retuns the size of the html content of the mailing.
|
||
java.util.List<Personalization> |
getHtmlPersonalizations(long mailingId)
Returns the used html presonalizations within a particular mailing.
|
||
java.util.List<Image> |
getImages(long mailingId)
Returns the used images within a particular mailing.
|
||
byte[] |
getJPGThumbnail(long mailingId)
Returns the JPG thumbnail within a particular mailing.
|
||
java.lang.String |
getLocale(long mailingId)
Returns the locale of the mailing with the provided id.
|
||
long |
getMailingId(java.lang.String mailingName)
Returns the ID of the mailing with the provided name.
|
||
Properties |
getMailingProperties(long mailingId) |
||
Page<Mailing> |
getMailingsByCreatorName(java.lang.String creatorName,
java.lang.String creatorNameOp,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match a given creator (one or a list).
|
||
Page<Mailing> |
getMailingsByKeywords(java.util.List<java.lang.String> keywords,
java.lang.String keywordsOp,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match given keywords (one or a list).
|
||
Page<Mailing> |
getMailingsBySchedulingTime(java.lang.String scheduleTime,
boolean beforeSchedulingTime,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match the provided scheduling time (one or a list).
|
||
Page<Mailing> |
getMailingsByStates(java.util.List<java.lang.String> states,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match the given states (one or a list).
|
||
Page<Mailing> |
getMailingsBySubject(java.lang.String subject,
java.lang.String subjectOp,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match a given subject (one or a list).
|
||
Page<Mailing> |
getMailingsByTypes(java.util.List<java.lang.String> types,
java.util.List<java.lang.String> fields,
int pageIndex,
int pageSize)
Returns a page of mailings in the account that match the given types (one or a list).
|
||
java.lang.Integer |
getMaxAttachmentSize(long mailingId)
Returns the maximum allowed attachment size for the mailing with the provided id in KB.
|
||
java.lang.Integer |
getMaxContentSize(long mailingId)
Returns the maximal allowed content size for the mailing with the provided id in KB.
|
||
java.lang.String |
getName(long mailingId)
Returns the name of the mailing with the provided id.
|
||
java.util.List<Personalization> |
getPersonalizations(long mailingId)
Returns the used presonalizations within a particular mailing.
|
||
java.lang.String |
getRecipientAlias(long mailingId)
Returns the recipient alias of the mailing with the provided id.
|
||
java.util.List<Personalization> |
getRecipientAliasPersonalizations(long mailingId)
Returns the used recipient-alias presonalizations within a particular mailing.
|
||
ReplyAddress |
getReplyAddress(long mailingId)
Method does the same as
getReplyToAddress(long) but returnes result as
a ReplyAddress object. |
||
Element |
getReplyToAddress(long mailingId)
Returns the settings for the reply-to address for this mailing.
|
||
java.lang.String |
getSenderAddress(long mailingId)
Returns the sender address of the mailing with the provided id.
|
||
java.lang.String |
getSenderAlias(long mailingId)
Returns the sender alias of the sender address of the mailing with the provided id.
|
||
java.util.List<Personalization> |
getSenderAliasPersonalizations(long mailingId)
Returns the used sender-alias presonalizations within a particular mailing.
|
||
java.lang.String |
getSpeedLevel(long mailingId)
Returns the speed level of the mailing with the provided id.
|
||
java.lang.String |
getState(long mailingId)
Returns the state of the mailing with the provided id.
|
||
java.lang.String |
getSubject(long mailingId)
Returns the subject of the mailing with the provided id.
|
||
java.util.List<Personalization> |
getSubjectPersonalizations(long mailingId)
Returns the used subject presonalizations within a particular mailing.
|
||
java.lang.Long |
getTargetGroupId(long mailingId)
Returns the target group id of the mailing with the provided id.
|
||
boolean |
getTargetGroupUpdating(long mailingId)
Gets if target group will be updated before the sendout.
|
||
java.lang.String |
getTextContent(long mailingId)
Returns the text template of the mailing with the provided id.
|
||
java.lang.Long |
getTextContentSize(long mailingId)
Returns the size of the text content of the mailing.
|
||
java.util.List<Personalization> |
getTextPersonalizations(long mailingId)
Returns the used text presonalizations within a particular mailing.
|
||
java.awt.image.BufferedImage |
getThumbnail(long mailingId)
Returns the JPG thumbnail within a particular mailing.
|
||
java.util.List<Link> |
getTrackableLinks(long mailingId,
Format format)
Gets the trackable links within a particular mailing.
|
||
java.lang.Integer |
getTrackingDuration(long mailingId)
Returns the tracking duration of the mailing with the provided id in months.
|
||
java.lang.String |
getTrackingStrategy(long mailingId)
Returns the tracking strategy of the mailing with the provided id.
|
||
DispatchOptions |
getTriggerDispatchSchedule(long mailingId)
Get the dispatch data for a trigger mailing by the mailing ID.
|
||
java.lang.String |
getTriggerDispatchScheduleRaw(long mailingId)
Deprecated.
|
||
java.lang.String |
getType(long mailingId)
Returns the type of the mailing with the given id.
|
||
java.lang.Boolean |
isSealed(long mailingId)
Tells whether the mailing with the provided id is sealed.
|
||
ResponseWrapper |
sendMailingNow(long mailingId)
Sends the mailing with the provided id immediately.
|
||
ResponseWrapper |
sendTestEmail(long mailingId,
java.lang.String email)
Sends a testmailing for the mailing with the provided id to a given email address.
|
||
void |
setContactsLimit(long mailingId,
int limit)
Sets the maximum of emails for the given mailing.
|
||
void |
setDoiMailingKey(long mailingId,
java.lang.String doiKey)
Sets the key of the DOI mailing identified by the given ID.
|
||
void |
setHtmlContent(long mailingId,
java.lang.String html)
Sets the html content of the mailing with the provided id.
|
||
void |
setHtmlContent(long mailingId,
java.lang.String html,
boolean doImageGrabbing,
boolean doLinkTracking)
Sets the html content of the mailing with the provided id.
|
||
void |
setLocale(long mailingId,
java.lang.String locale)
Sets the locale of the mailing with the provided id.
|
||
void |
setName(long mailingId,
java.lang.String name)
Updates the name of the mailing with the provided id.
|
||
void |
setRecipientAlias(long mailingId,
java.lang.String alias)
Updates the recipient-alias of the mailing with the provided id.
|
||
void |
setReplyToAddress(long mailingId,
boolean active,
boolean auto,
java.lang.String customEmail)
Update the settings for the reply-to address for this mailing.
|
||
void |
setSenderAddress(long mailingId,
java.lang.String sender)
Updates the sender address of the mailing with the provided id.
|
||
void |
setSenderAlias(long mailingId,
java.lang.String alias)
Updates the sender-alias of the mailing with the provided id.
|
||
void |
setSpeedLevel(long mailingId,
java.lang.String speedLevel)
Sets the speed level of the mailing with the provided id.
|
||
void |
setSubject(long mailingId,
java.lang.String subject)
Updates the subject of the mailing with the provided id.
|
||
void |
setTargetGroupId(long mailingId,
long targetgroupid)
Sets the target group id of the mailing with the provided id.
|
||
void |
setTargetGroupUpdating(long mailingId,
boolean update)
Sets if target group should be updated before the sendout.
|
||
void |
setTextContent(long mailingId,
java.lang.String text)
Sets the text content of the mailing with the provided id.
|
||
void |
setTrackingStrategy(long mailingId,
java.lang.String alias)
Sets the tracking strategy of the mailing with the provided id.
|
||
void |
setTriggerActive(long mailingId)
Used to activate DOI Mailings
|
||
void |
setTriggerDispatchOptions(long mailingId,
DispatchOptions options)
Sets the dispatch optiosn
|
||
void |
setTriggerDispatchOptions(long mailingId,
java.lang.String options)
Sets the dispatch options
|
||
void |
updateAttachmentFilename(long mailingId,
long attachmentId,
java.lang.String filename)
Updates the correspoding filename of an attachment.
|
||
void |
updateMailingProperty(long mailingId,
java.lang.String name,
java.lang.String value) |
delete, delete, delete, encodePath, get, get, get, isCompressionEnabled, isDebug, isRequestCompressionEnabled, post, post, post, put, put, put, setCompressionEnabled, setDebug, setRequestCompressionEnabled
public static final java.lang.String SERVICE
public MaileonMailingsService(MaileonConfiguration config)
MaileonMailingsService
.config
- Maileon API-Configuration.public java.lang.Long createMailing(java.lang.String name, java.lang.String subject) throws MaileonException
name
- name of mailingsubject
- subject of mailingMaileonException
public java.lang.Long createMailing(java.lang.String name, java.lang.String subject, MaileonMailingsService.MailingType type) throws MaileonException
name
- name of mailingsubject
- subject of mailingtype
- type of mailingMaileonException
public void deleteMailing(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public ResponseWrapper sendMailingNow(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getArchiveUrl(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getType(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getState(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public long getMailingId(java.lang.String mailingName) throws MaileonException
mailingName
- the name of the mailing.MaileonException
- e.g. if not foundpublic boolean existsMailing(java.lang.String mailingName) throws MaileonException
mailingName
- the name of the mailing.true
if the mailing exists, false
if not.MaileonException
public java.lang.Boolean isSealed(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.true
if sealed, true
otherwise.MaileonException
public java.lang.String getName(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getAuthor(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Long getTargetGroupId(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Integer getArchivalDuration(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Integer getTrackingDuration(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Integer getMaxAttachmentSize(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Integer getMaxContentSize(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getSpeedLevel(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setSpeedLevel(long mailingId, java.lang.String speedLevel) throws MaileonException
mailingId
- the id of the required mailing.speedLevel
- the required level: "low", "medium", "high", and "supersonic".MaileonException
public void setLocale(long mailingId, java.lang.String locale) throws MaileonException
mailingId
- the id of the required mailing.locale
- the locale as "xx" or "xx_XX", e.g. "de" or "de_DE" .MaileonException
public java.lang.String getLocale(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getTrackingStrategy(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setTrackingStrategy(long mailingId, java.lang.String alias) throws MaileonException
mailingId
- the id of the required mailing.alias
- the required tracking strategy.MaileonException
public java.lang.Integer getCountDOIConfirmationLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- the mailing format: text, html.MaileonException
public java.lang.Integer getCountOnlineVersionLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- the mailing format: text, html.MaileonException
public java.lang.Integer getCountUnsubscribeLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- the mailing format: text, html.MaileonException
public java.lang.String getSubject(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getSenderAlias(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getSenderAddress(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getRecipientAlias(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.Long getHtmlContentSize(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getHtmlContent(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setHtmlContent(long mailingId, java.lang.String html) throws MaileonException
mailingId
- the id of the required mailing.html
- content to set.MaileonException
public void setHtmlContent(long mailingId, java.lang.String html, boolean doImageGrabbing, boolean doLinkTracking) throws MaileonException
mailingId
- the id of the required mailing.html
- content to set.doImageGrabbing
- if true
, referenced images in the html content will be persistent in Maileon so that they no longer need to be available under the original URL.doLinkTracking
- if true
, links will be changed to make them trackable, if false
, links will not be changed.MaileonException
public Element getReplyToAddress(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public ReplyAddress getReplyAddress(long mailingId) throws MaileonException
getReplyToAddress(long)
but returnes result as
a ReplyAddress
object.mailingId
- the id of the required mailing.ReplyAddress
object that contain information about reply-to addressMaileonException
public void setReplyToAddress(long mailingId, boolean active, boolean auto, java.lang.String customEmail) throws MaileonException
mailingId
- the id of the required mailing.active
- the state of the reply.auto
- if true
, Maileon will handle all mails and provide the replies in its webmail interface. If false
, mails will be sent to a customers email address.customEmail
- the email of the customer. All replies should be forwarded when automatic processing is deactivated.MaileonException
public java.lang.Long getTextContentSize(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.lang.String getTextContent(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setTextContent(long mailingId, java.lang.String text) throws MaileonException
mailingId
- the id of the required mailing.text
- content to set.MaileonException
public void setTargetGroupId(long mailingId, long targetgroupid) throws MaileonException
mailingId
- the id of the required mailing.targetgroupid
- the id of the target group to setMaileonException
public void setContactsLimit(long mailingId, int limit) throws MaileonException
mailingId
- the id of the required mailing.limit
- the maximal number of emails to be sent with the given mailingMaileonException
public int getContactsLimit(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setTargetGroupUpdating(long mailingId, boolean update) throws MaileonException
mailingId
- the id of the required mailing.update
- false, if updating of target group should be disabledMaileonException
public boolean getTargetGroupUpdating(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void setName(long mailingId, java.lang.String name) throws MaileonException
mailingId
- the id of the required mailing.name
- the name to set.MaileonException
public void setSenderAddress(long mailingId, java.lang.String sender) throws MaileonException
mailingId
- the id of the required mailing.sender
- the sender address to set.MaileonException
public void setSubject(long mailingId, java.lang.String subject) throws MaileonException
mailingId
- the id of the required mailing.subject
- the subject to set.MaileonException
public void setSenderAlias(long mailingId, java.lang.String alias) throws MaileonException
mailingId
- the id of the required mailing.alias
- the sender-alias to setMaileonException
public void setRecipientAlias(long mailingId, java.lang.String alias) throws MaileonException
mailingId
- the id of the required mailing.alias
- the recipient-alias to setMaileonException
public java.util.List<Link> getTrackableLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- mailing format: text, html.Link
.MaileonException
public java.lang.Integer getCountTrackableLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- mailing format: text, html.MaileonException
public java.util.List<Link> getExternalLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- mailing format: text, html.Link
.MaileonException
public java.lang.Integer getCountExternalLinks(long mailingId, Format format) throws MaileonException
mailingId
- the id of the required mailing.format
- mailing format: text, html.MaileonException
public java.util.List<Personalization> getPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Personalization> getSubjectPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Personalization> getRecipientAliasPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Personalization> getSenderAliasPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Personalization> getHtmlPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Personalization> getTextPersonalizations(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Personalization
.MaileonException
public java.util.List<Image> getImages(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Image
.MaileonException
public java.lang.Integer getCountHostedImages(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.util.List<Image> getHostedImages(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Image
.MaileonException
public java.lang.Integer getCountExternalImages(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.util.List<Image> getExternalImages(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Image
.MaileonException
public byte[] getJPGThumbnail(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public java.awt.image.BufferedImage getThumbnail(long mailingId) throws MaileonException, java.io.IOException
mailingId
- the id of the required mailing.BufferedImage
.MaileonException
java.io.IOException
public java.util.List<Attachment> getAttachments(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.Attachment
.MaileonException
public void deleteAttachments(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public void deleteAttachment(long mailingId, long attachmentId) throws MaileonException
mailingId
- the id of the required mailing.attachmentId
- the id of the attachment to delete.MaileonException
public void addAttachment(long mailingId, java.io.InputStream in, java.lang.String mimeType, java.lang.String filename) throws MaileonException
mailingId
- the id of the required mailing.in
- InputStream
to read in the attachment.mimeType
- the mime type of the attachment is allowedfilename
- filename of the attachment to be displayed in sent emailsMaileonException
public void updateAttachmentFilename(long mailingId, long attachmentId, java.lang.String filename) throws MaileonException
mailingId
- the id of the required mailing.attachmentId
- the id of the required attachment.filename
- filename of the attachment.MaileonException
public void copyAttachments(long srcMailingId, long destMailingId) throws MaileonException
srcMailingId
- the source mailing id.destMailingId
- the destination mailing id.MaileonException
public int getCountAttachments(long mailingId) throws MaileonException
mailingId
- the id of the required mailing.MaileonException
public byte[] getAttachment(long mailingId, long attachmentId) throws MaileonException
mailingId
- the id of the required mailingattachmentId
- the id of the reuired attachment.MaileonException
public Page<Mailing> getMailingsBySchedulingTime(java.lang.String scheduleTime, boolean beforeSchedulingTime, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
scheduleTime
- date and time string that defines the filter for the mailings. Date format is : "yyyy-MM-dd HH:mm:ss"beforeSchedulingTime
- if true
, the mailings before the given time will be returned, if false
, the mailings at or after the given time will be returned.fields
- the fields that shall be returned with the result (state, name, type, ..) see MailingFields
pageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public Page<Mailing> getMailingsByTypes(java.util.List<java.lang.String> types, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
Types can be selected from 'doi','trigger', 'trigger_template' or 'regular'
types
- the required types to match against.fields
- the fields that shall be returned with the result (state, name, type, ..) @see MailingFieldspageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public Page<Mailing> getMailingsByStates(java.util.List<java.lang.String> states, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
Returns a page of mailings in the account that match the given states (one or a list). Valid states are 'draft','failed','queued','checks','blacklist','preparing','sending','paused','done','canceled','archiving','archived','released'
states
- the required states to match against.fields
- the fields that shall be returned with the result (state, name, type, ..) @see MailingFieldspageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public Page<Mailing> getMailingsByKeywords(java.util.List<java.lang.String> keywords, java.lang.String keywordsOp, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
keywords
- the required keywords to match against.keywordsOp
- this is the operation that has to be applied. Valid are: and
, or
fields
- the fields that shall be returned with the result (state, name, type, ..) @see MailingFieldspageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public Page<Mailing> getMailingsByCreatorName(java.lang.String creatorName, java.lang.String creatorNameOp, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
creatorName
- the required creator name to match against.creatorNameOp
- this is the string operator for the creator name. Valid are: contains
, equals
, starts_with
, ends_with
.fields
- the fields that shall be returned with the result (state, name, type, ..) @see MailingFieldspageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public Page<Mailing> getMailingsBySubject(java.lang.String subject, java.lang.String subjectOp, java.util.List<java.lang.String> fields, int pageIndex, int pageSize) throws MaileonException
subject
- the required subject name to match against.subjectOp
- this is the string operator for the subject. Valid are: contains
, equals
, starts_with
, ends_with
.fields
- the fields that shall be returned with the result (state, name, type, ..) @see MailingFieldspageIndex
- the page index starting from 1.pageSize
- the required number of mailings in a page.Mailing
objects.MaileonException
public java.lang.String getDoiMailingKey(long mailingId) throws MaileonException
mailingId
- the id of the mailing.MaileonException
- if there was a connection problem or a server error occurredpublic void setDoiMailingKey(long mailingId, java.lang.String doiKey) throws MaileonException
mailingId
- the id of the mailing.doiKey
- the key of the DOI mailingMaileonException
- if there was a connection problem or a server error occurredpublic void deactivateTriggerMailing(long mailingId) throws MaileonException
mailingId
- the id of the mailing.MaileonException
- if there was a connection problem or a server error occurredpublic DispatchOptions getTriggerDispatchSchedule(long mailingId) throws MaileonException
mailingId
- the id of the mailing.MaileonException
- if there was a connection problem or a server error occurred@Deprecated public java.lang.String getTriggerDispatchScheduleRaw(long mailingId) throws MaileonException
FOR TESTING PURPOSES
Get the dispatch data for a trigger mailing by the mailing ID.mailingId
- the id of the mailing.MaileonException
- if there was a connection problem or a server error occurredpublic void setTriggerDispatchOptions(long mailingId, java.lang.String options) throws MaileonException
mailingId
- the id of the mailing.options
- the dispatch logic key of the DOI mailingMaileonException
- if there was a connection problem or a server error occurredpublic void setTriggerDispatchOptions(long mailingId, DispatchOptions options) throws MaileonException
mailingId
- the id of the mailing.options
- the dispatch logic key of the DOI mailingMaileonException
- if there was a connection problem or a server error occurredpublic void setTriggerActive(long mailingId) throws MaileonException
mailingId
- the id of the mailing.MaileonException
- if there was a connection problem or a server error occurredpublic ResponseWrapper sendTestEmail(long mailingId, java.lang.String email) throws MaileonException
mailingId
- id of existing mailingemail
- email addressMaileonException
public Properties getMailingProperties(long mailingId) throws java.lang.Exception
java.lang.Exception
public void addMailingProperties(long mailingId, Properties properties) throws java.lang.Exception
java.lang.Exception
public void updateMailingProperty(long mailingId, java.lang.String name, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public void deleteMailingProperty(long mailingId, java.lang.String name) throws java.lang.Exception
java.lang.Exception
Copyright © 2017. All Rights Reserved.