◆ afterSave()
void org.turro.newsletter.NewsletterComposer.afterSave |
( |
| ) |
|
◆ beforeSave()
boolean org.turro.newsletter.NewsletterComposer.beforeSave |
( |
| ) |
|
|
protected |
◆ doFinally()
void org.turro.newsletter.NewsletterComposer.doFinally |
( |
| ) |
throws Exception |
Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.
Definition at line 156 of file NewsletterComposer.java.
158 newsDate.setValue(
entity.getDate());
162 newsTitle.setValue(
entity.getUnescapedTitle());
163 accepted.setChecked(
entity.isAccepted());
164 staticContent.setChecked(
entity.isStaticContent());
165 sendingChoice.setObjectValue(
entity.getSendingChoice());
166 if(!Application.getApplication().isInRole(
"publication:accept")) {
167 accepted.setDisabled(
true);
170 actionWithEntity.
setRoot(
"contact");
171 actionWithEntity.
setEntity(Authentication.getIContact().getContact());
void setEntity(Object entity)
void setRoot(String entityRoot)
void setNewsletter(Newsletter newsletter)
void setCategory(NotificationCategory category)
◆ doOnDelete()
void org.turro.newsletter.NewsletterComposer.doOnDelete |
( |
| ) |
|
|
protected |
◆ getAttributeName()
String org.turro.newsletter.NewsletterComposer.getAttributeName |
( |
| ) |
|
|
protected |
◆ getEntityInstance()
Newsletter org.turro.newsletter.NewsletterComposer.getEntityInstance |
( |
Long |
id | ) |
|
|
protected |
Definition at line 134 of file NewsletterComposer.java.
136 entity =
new Newsletter();
137 entity.setCreation(
new Date());
139 entity.setSendingChoice(SendingChoice.USER_WANTS);
140 entity.setCategory(Notifications.getCategory(GenericElephantNotification.GENERIC_NOTIFICATION));
142 entity =
new PublicationPU().find(Newsletter.class,
id);
◆ getWrapperInstance()
DaoEntity org.turro.newsletter.NewsletterComposer.getWrapperInstance |
( |
Component |
comp | ) |
|
|
protected |
◆ inDeleteRole()
boolean org.turro.newsletter.NewsletterComposer.inDeleteRole |
( |
| ) |
|
|
protected |
◆ inSaveRole()
boolean org.turro.newsletter.NewsletterComposer.inSaveRole |
( |
| ) |
|
|
protected |
◆ onPreview()
void org.turro.newsletter.NewsletterComposer.onPreview |
( |
| ) |
|
Definition at line 97 of file NewsletterComposer.java.
98 IContact contact = Contacts.getContact(actionWithEntity.
getEntity());
99 if(contact !=
null && contact.isWebUser()) {
100 try (NewsletterTemplate nt =
new NewsletterTemplate(
entity)) {
101 MailMessageTemplate mmt = nt.getMailMessage(
null, contact);
103 div.setStyle(
"overflow:auto;");
104 Html html =
new Html(
new MailInline().
inline(mmt.getMessage()));
105 div.appendChild(html);
106 SelectionDialog.showComponent(getPage(), I_.get(
"Preview"), div,
"800px",
"80%",
null);
107 entity.resetGlobalContext();
108 }
catch (IOException ex) {
109 Logger.getLogger(NewsletterComposer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ onSendNow()
void org.turro.newsletter.NewsletterComposer.onSendNow |
( |
| ) |
|
Definition at line 115 of file NewsletterComposer.java.
117 new NewsletterSendToSubscribers(
entity).send();
118 Clients.showNotification(I_.get(
"Queued sender started"));
◆ onTitle()
void org.turro.newsletter.NewsletterComposer.onTitle |
( |
InputEvent |
event | ) |
|
◆ shouldBeSaved()
boolean org.turro.newsletter.NewsletterComposer.shouldBeSaved |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: