|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.deepamehta.core.osgi.PluginActivator
de.deepamehta.plugins.mail.MailPlugin
public class MailPlugin
| Field Summary | |
|---|---|
private AccessControlService |
acService
|
static String |
AGGREGATION
|
static String |
ATTACHMENTS
|
(package private) Autocomplete |
autocomplete
|
static String |
BODY
|
static String |
CHILD
|
static String |
CHILD_TYPE
|
(package private) ImageCidEmbedment |
cidEmbedment
|
static String |
COMPOSITION
|
(package private) MailConfigurationCache |
config
|
static String |
DATE
|
static String |
EMAIL_ADDRESS
|
static String |
FILE
|
private FilesService |
fileService
|
static String |
FROM
|
(package private) boolean |
isInitialized
|
private static Logger |
log
|
static String |
MAIL
|
static String |
MESSAGE_ID
|
static String |
PARENT
|
static String |
PARENT_TYPE
|
static String |
RECIPIENT
|
static String |
RECIPIENT_TYPE
|
static String |
SENDER
|
static String |
SIGNATURE
|
static String |
SUBJECT
|
static String |
TOPIC_TYPE
|
static String |
USER_ACCOUNT
|
| Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
bundle, dms |
| Constructor Summary | |
|---|---|
MailPlugin()
|
|
| Method Summary | |
|---|---|
private void |
associateDefaultSender(Topic mail,
ClientState clientState)
|
Association |
associateRecipient(long mailId,
long addressId,
ClientState cookie)
|
Association |
associateRecipient(long mailId,
long addressId,
RecipientType type,
ClientState clientState)
Update or create a mail recipient association. |
private Association |
associateRecipient(long topicId,
Topic recipient,
CompositeValueModel value,
ClientState clientState)
|
Association |
associateSender(long mailId,
long addressId,
ClientState clientState)
Update or create a mail sender association. |
private Association |
associateSender(long topicId,
Topic sender,
CompositeValueModel value,
ClientState clientState)
|
void |
associateValidatedRecipients(long mailId,
List<Topic> recipients,
ClientState cookie)
Associate all valid email addresses of each recipient. |
private void |
checkACLsOfMigration()
|
private void |
configureIfReady()
|
Topic |
copyMail(long mailId,
boolean includeRecipients,
ClientState cookie)
Creates a copy of the mail. |
private void |
createAttachmentDirectory()
|
private RelatedTopic |
getContactOfEmail(long addressId)
|
private RelatedTopic |
getContactSignature(Topic topic,
long addressId)
|
String |
getDefaultRecipientType()
|
private Association |
getRecipientAssociation(long topicId,
long addressId,
long recipientId)
|
ResultSet<RelatedTopic> |
getRecipientTypes()
|
Collection<Topic> |
getSearchParentTypes()
Returns parent of each search type. |
private RelatedTopic |
getSender(long topicId,
boolean fetchRelatingComposite)
|
private RelatedTopic |
getSender(Topic topic,
boolean fetchRelatingComposite)
|
private Association |
getSenderAssociation(long topicId,
long senderId)
|
void |
init()
Initialize. |
ResultSet<Topic> |
listSearchParentTypes()
|
Topic |
loadConfiguration()
Load the configuration. |
Association |
mailSender(long mailId,
long addressId,
ClientState cookie)
|
private void |
mapRecipients(org.apache.commons.mail.HtmlEmail email,
Map<RecipientType,List<javax.mail.internet.InternetAddress>> recipients)
|
void |
postCreateTopic(Topic topic,
ClientState clientState,
Directives directives)
Sets the default sender and signature of a mail topic after creation. |
private void |
reportException(StatusReport report,
Level level,
MailError error,
Exception e)
|
List<TopicModel> |
search(String term,
ClientState cookie)
Returns the parent of each search type substring match. |
StatusReport |
send(long mailId)
|
StatusReport |
send(Mail mail)
Sends a HTML mail. |
void |
serviceArrived(PluginService service)
Reference file service and create the attachment directory if not exists. |
void |
serviceGone(PluginService service)
|
Topic |
writeTo(long recipientId,
ClientState cookie)
Creates a new mail to all email addresses of the contact topic. |
| Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
getBundleContext, postInstall, publishDirectory, setCoreService, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static Logger log
public static final String AGGREGATION
public static final String COMPOSITION
public static final String CHILD
public static final String CHILD_TYPE
public static final String TOPIC_TYPE
public static final String PARENT
public static final String PARENT_TYPE
public static final String FILE
public static final String ATTACHMENTS
public static final String BODY
public static final String EMAIL_ADDRESS
public static final String DATE
public static final String FROM
public static final String MAIL
public static final String MESSAGE_ID
public static final String RECIPIENT
public static final String RECIPIENT_TYPE
public static final String SENDER
public static final String SIGNATURE
public static final String SUBJECT
public static final String USER_ACCOUNT
private AccessControlService acService
private FilesService fileService
MailConfigurationCache config
ImageCidEmbedment cidEmbedment
Autocomplete autocomplete
boolean isInitialized
| Constructor Detail |
|---|
public MailPlugin()
| Method Detail |
|---|
public Association associateRecipient(long mailId,
long addressId,
@HeaderParam(value="Cookie")
ClientState cookie)
associateRecipient(long, long, RecipientType, de.deepamehta.core.service.ClientState)
public Association associateRecipient(long mailId,
long addressId,
RecipientType type,
ClientState clientState)
MailService
associateRecipient in interface MailServicemailId - ID of a mail topic.addressId - Email address of recipient.type - Recipient type URI or null to choose the configured default.clientState - Optional cookie or null.
public void associateValidatedRecipients(long mailId,
List<Topic> recipients,
ClientState cookie)
MailService
associateValidatedRecipients in interface MailService
public Association mailSender(long mailId,
long addressId,
@HeaderParam(value="Cookie")
ClientState cookie)
associateSender(long, long, de.deepamehta.core.service.ClientState)
public Association associateSender(long mailId,
long addressId,
ClientState clientState)
MailService
associateSender in interface MailServicemailId - ID of a mail or configuration topic.addressId - Email address of sender.clientState - Optional cookie or null.
public List<TopicModel> search(String term,
@HeaderParam(value="Cookie")
ClientState cookie)
term - String to search.cookie - Actual cookie.
public Topic copyMail(long mailId,
boolean includeRecipients,
@HeaderParam(value="Cookie")
ClientState cookie)
mailId - ID of the mail topic to clone.includeRecipients - Copy recipients of the origin?cookie - Actual cookie.
public Topic writeTo(long recipientId,
@HeaderParam(value="Cookie")
ClientState cookie)
recipientId - ID of a recipient contact topic.cookie - Actual cookie.
public String getDefaultRecipientType()
public ResultSet<RelatedTopic> getRecipientTypes()
public ResultSet<Topic> listSearchParentTypes()
getSearchParentTypes()public Collection<Topic> getSearchParentTypes()
MailService
getSearchParentTypes in interface MailServicepublic Topic loadConfiguration()
public void postCreateTopic(Topic topic,
ClientState clientState,
Directives directives)
postCreateTopic in interface PostCreateTopicListenerpublic StatusReport send(long mailId)
send(Mail)public StatusReport send(Mail mail)
MailService
send in interface MailServicemail - Mail topic.
public void init()
init in interface PluginContextinit in class PluginActivatorpublic void serviceArrived(PluginService service)
serviceArrived in interface PluginContextserviceArrived in class PluginActivatorprivate void configureIfReady()
public void serviceGone(PluginService service)
serviceGone in interface PluginContextserviceGone in class PluginActivatorprivate void checkACLsOfMigration()
private void createAttachmentDirectory()
private void associateDefaultSender(Topic mail,
ClientState clientState)
mail - clientState - postCreateTopic(Topic, ClientState, Directives)
private Association associateRecipient(long topicId,
Topic recipient,
CompositeValueModel value,
ClientState clientState)
private Association associateSender(long topicId,
Topic sender,
CompositeValueModel value,
ClientState clientState)
private RelatedTopic getContactOfEmail(long addressId)
private RelatedTopic getContactSignature(Topic topic,
long addressId)
private Association getRecipientAssociation(long topicId,
long addressId,
long recipientId)
private RelatedTopic getSender(long topicId,
boolean fetchRelatingComposite)
private RelatedTopic getSender(Topic topic,
boolean fetchRelatingComposite)
private Association getSenderAssociation(long topicId,
long senderId)
private void mapRecipients(org.apache.commons.mail.HtmlEmail email,
Map<RecipientType,List<javax.mail.internet.InternetAddress>> recipients)
throws org.apache.commons.mail.EmailException
org.apache.commons.mail.EmailException
private void reportException(StatusReport report,
Level level,
MailError error,
Exception e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||