public class MailPlugin extends de.deepamehta.core.osgi.PluginActivator implements MailService, de.deepamehta.core.service.event.PostCreateTopicListener
Modifier and Type | Field and Description |
---|---|
static String |
DM4_HOST_URL |
static String |
FILEREPO_ATTACHMENTS_SUBFOLDER |
static String |
FILEREPO_BASE_URI_NAME |
AGGREGATION, AGGREGATION_DEFINITION, ATTACHMENTS, BODY, CHILD, CHILD_TYPE, COMPOSITION, COMPOSITION_DEFINITION, DATE, EMAIL_ADDRESS, FILE, FROM, MAIL, MESSAGE_ID, PARENT, PARENT_TYPE, RECIPIENT, RECIPIENT_TYPE, SENDER, SIGNATURE, SUBJECT, TOPIC_TYPE, USER_ACCOUNT
Constructor and Description |
---|
MailPlugin() |
Modifier and Type | Method and Description |
---|---|
de.deepamehta.core.Association |
associateMailSender(long mailId,
long addressId) |
de.deepamehta.core.Association |
associateRecipient(long mailId,
long addressId) |
de.deepamehta.core.Association |
associateRecipient(long mailId,
long addressId,
RecipientType type)
Update or create a mail recipient association.
|
de.deepamehta.core.Association |
associateSender(long mailId,
long addressId)
Update or create a mail sender association.
|
void |
associateValidatedRecipients(long mailId,
List<de.deepamehta.core.Topic> recipients)
Associate all valid email addresses of each recipient.
|
de.deepamehta.core.Topic |
copyMail(long mailId,
boolean includeRecipients)
Creates a copy of the mail.
|
String |
getDefaultRecipientType() |
List<de.deepamehta.core.Topic> |
getRecipientTypes() |
Collection<de.deepamehta.core.RelatedTopic> |
getSearchParentTypes()
Returns parent of each search type.
|
void |
init()
Initialize.
|
List<de.deepamehta.core.RelatedTopic> |
listSearchParentTypes() |
de.deepamehta.core.Topic |
loadConfiguration()
Load the configuration.
|
void |
postCreateTopic(de.deepamehta.core.Topic topic)
#### Sets the default sender and signature of a mail topic after creation.
|
List<de.deepamehta.core.model.TopicModel> |
search(String term)
Returns the parent of each search type substring match.
|
StatusReport |
send(long mailId) |
StatusReport |
send(Mail mail)
Sends a HTML mail.
|
de.deepamehta.core.Topic |
upload(de.deepamehta.files.UploadedFile attachment) |
de.deepamehta.core.Topic |
writeTo(long recipientId)
Creates a new mail to all email addresses of the contact topic.
|
public static final String FILEREPO_BASE_URI_NAME
public static final String FILEREPO_ATTACHMENTS_SUBFOLDER
public static final String DM4_HOST_URL
public de.deepamehta.core.Association associateRecipient(long mailId, long addressId)
public de.deepamehta.core.Association associateRecipient(long mailId, long addressId, RecipientType type)
MailService
associateRecipient
in interface MailService
mailId
- ID of a mail topic.addressId
- Email address of recipient.type
- Recipient type URI or null to choose the configured default.public void associateValidatedRecipients(long mailId, List<de.deepamehta.core.Topic> recipients)
MailService
associateValidatedRecipients
in interface MailService
public de.deepamehta.core.Association associateMailSender(long mailId, long addressId)
associateSender(long, long)
public de.deepamehta.core.Association associateSender(long mailId, long addressId)
MailService
associateSender
in interface MailService
mailId
- ID of a mail or configuration topic.addressId
- Email address of sender.public List<de.deepamehta.core.model.TopicModel> search(String term)
term
- String to search.public de.deepamehta.core.Topic copyMail(long mailId, boolean includeRecipients)
mailId
- ID of the mail topic to clone.includeRecipients
- Copy recipients of the origin?public de.deepamehta.core.Topic writeTo(long recipientId)
recipientId
- ID of a recipient contact topic.public de.deepamehta.core.Topic upload(de.deepamehta.files.UploadedFile attachment)
public String getDefaultRecipientType()
public List<de.deepamehta.core.Topic> getRecipientTypes()
public List<de.deepamehta.core.RelatedTopic> listSearchParentTypes()
getSearchParentTypes()
public Collection<de.deepamehta.core.RelatedTopic> getSearchParentTypes()
MailService
getSearchParentTypes
in interface MailService
public de.deepamehta.core.Topic loadConfiguration()
public void postCreateTopic(de.deepamehta.core.Topic topic)
postCreateTopic
in interface de.deepamehta.core.service.event.PostCreateTopicListener
public StatusReport send(long mailId)
send(Mail)
public StatusReport send(Mail mail)
MailService
send
in interface MailService
mail
- Mail topic.public void init()
init
in interface de.deepamehta.core.osgi.PluginContext
init
in class de.deepamehta.core.osgi.PluginActivator
Copyright © 2017. All rights reserved.