|
static String | getEmail (IContact contact) |
|
static void | sendToIPlayers (List< IContact > contacts, String link, String subject, String message, String comment, String exParam, String implementation) |
|
static void | poolToIPlayers (List< IContact > contacts, String link, String message, String comment, String exParam, MessagePool pool) |
|
static String | createLink (String text, String path, boolean live) |
|
static String | processLinkMacros (String text) |
|
◆ MailContact()
org.turro.plugin.contacts.MailContact.MailContact |
( |
IContact |
contact, |
|
|
String |
link, |
|
|
String |
message, |
|
|
String |
exParam |
|
) |
| |
◆ createLink()
static String org.turro.plugin.contacts.MailContact.createLink |
( |
String |
text, |
|
|
String |
path, |
|
|
boolean |
live |
|
) |
| |
|
static |
◆ equals()
boolean org.turro.plugin.contacts.MailContact.equals |
( |
Object |
obj | ) |
|
◆ getEmail() [1/2]
String org.turro.plugin.contacts.MailContact.getEmail |
( |
| ) |
|
◆ getEmail() [2/2]
static String org.turro.plugin.contacts.MailContact.getEmail |
( |
IContact |
contact | ) |
|
|
static |
◆ getMessage()
String org.turro.plugin.contacts.MailContact.getMessage |
( |
Date |
validUntil, |
|
|
String |
comment |
|
) |
| |
Definition at line 52 of file elephant-plugins/src/main/java/org/turro/plugin/contacts/MailContact.java.
53 if(contact ==
null)
return null;
55 if(message.indexOf(
"{linkTmpSes}") > -1) {
60 String server = ElephantContext.getServerUrl(
"http") +
"?" +
61 Actions.createAction(contact.
getConnector(IUser.CONNECTOR_EMAIL), exParam);
62 message = message.replaceAll(
"\\{linkTmpSes\\}",
"<a style=\"color:inherit\" href=\"" + server +
"\">" + link +
"</a>");
63 }
catch (Exception ex) {
64 Logger.getLogger(
MailContact.class.getName()).log(Level.SEVERE,
null, ex);
67 message = processWebLiveLinks(validUntil, message);
68 message = processWebLinks(message);
71 message = message.replaceAll(
"\\{login\\}", contact.
getLogin())
72 .replaceAll(
"\\{name\\}", contact.
getName())
73 .replaceAll(
"\\{comment\\}", comment);
75 String serverBase = ElephantContext.getServerBase(
"http");
76 return message.replaceAll(
"href=\\'(?![a-z]+:)(\\/?)\\/?([^\\']*)\\'",
"href=\\'" + serverBase +
"$1$2\\'")
77 .replaceAll(
"src=\\'(?![a-z]+:)(\\/?)\\/?([^\\']*)\\'",
"src=\\'" + serverBase +
"$1$2\\'")
78 .replaceAll(
"href=\\\"(?![a-z]+:)(\\/?)\\/?([^\\\"]*)\\\"",
"href=\\\"" + serverBase +
"$1$2\\\"")
79 .replaceAll(
"src=\\\"(?![a-z]+:)(\\/?)\\/?([^\\\"]*)\\\"",
"src=\\\"" + serverBase +
"$1$2\\\"");
◆ hashCode()
int org.turro.plugin.contacts.MailContact.hashCode |
( |
| ) |
|
◆ poolToIPlayers()
static void org.turro.plugin.contacts.MailContact.poolToIPlayers |
( |
List< IContact > |
contacts, |
|
|
String |
link, |
|
|
String |
message, |
|
|
String |
comment, |
|
|
String |
exParam, |
|
|
MessagePool |
pool |
|
) |
| |
|
static |
◆ processLinkMacros()
static String org.turro.plugin.contacts.MailContact.processLinkMacros |
( |
String |
text | ) |
|
|
static |
◆ sendToIPlayers()
static void org.turro.plugin.contacts.MailContact.sendToIPlayers |
( |
List< IContact > |
contacts, |
|
|
String |
link, |
|
|
String |
subject, |
|
|
String |
message, |
|
|
String |
comment, |
|
|
String |
exParam, |
|
|
String |
implementation |
|
) |
| |
|
static |
Definition at line 105 of file elephant-plugins/src/main/java/org/turro/plugin/contacts/MailContact.java.
107 MailPool mp = (MailPool) HeadlessApplication.getInstance().getImplementation(implementation);
109 mp.setEncoding(ElephantContext.getEncoding());
110 mp.addCssFile(ElephantContext.getRealPath(
"/_internal/css/mail.css"));
112 Set<MailContact> emails =
new HashSet<MailContact>();
113 for(IContact contact : contacts) {
114 emails.add(
new MailContact(contact, link, message, exParam));
117 mp.addToPool(
null, mc.getEmail(),
null, subject, mc.getMessage(
null, comment),
"text/html");
The documentation for this class was generated from the following file: