use of com.centurylink.mdw.plugin.preferences.model.MdwSettings in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createSwingActionGroup.
private ActionGroup createSwingActionGroup() {
swingMenu = new MenuManager("Swing Tools", null, MdwMenuManager.MDW_MENU_PREFIX + "menu.swing.tools");
return new ActionGroup() {
@Override
public void fillContextMenu(IMenuManager menu) {
swingMenu.removeAll();
IStructuredSelection selection = getSelection();
if (swingLaunchApplies(selection)) {
WorkflowProject project = (WorkflowProject) selection.getFirstElement();
MdwSettings settings = MdwPlugin.getSettings();
if (settings.isSwingLaunchEventManager() && project.isUserAuthorizedForSystemAdmin())
swingMenu.add(eventManagerAction);
if (settings.isSwingLaunchThreadPoolManager() && project.isUserAuthorizedForSystemAdmin())
swingMenu.add(threadPoolManagerAction);
}
}
};
}
use of com.centurylink.mdw.plugin.preferences.model.MdwSettings in project mdw-designer by CenturyLinkCloud.
the class ProcessCanvasWrapper method populate.
@Override
public void populate() {
MdwSettings settings = MdwPlugin.getSettings();
RGB rgb = settings.getReadOnlyBackground();
readOnlyBackgroundColor = new Color(rgb.red, rgb.green, rgb.blue);
if (isInstance())
processInstancePage = getDesignerProxy().newProcessInstancePage();
super.populate();
designerCanvasSelection = getProcess();
designerCanvasSelection.addDirtyStateListener(this);
}
use of com.centurylink.mdw.plugin.preferences.model.MdwSettings in project mdw-designer by CenturyLinkCloud.
the class CustomTaskManager method addTo.
@Override
public boolean addTo(WorkflowProject project, IProgressMonitor monitor) throws ExtensionModuleException {
monitor.worked(5);
try {
updateApplicationXml(project, project.getWebProjectName() + ".war", project.getWebProjectName(), new SubProgressMonitor(monitor, 5));
MdwSettings mdwSettings = MdwPlugin.getSettings();
ProjectInflator inflator = new ProjectInflator(project, mdwSettings);
inflator.generateWebArtifacts(new SubProgressMonitor(monitor, 5));
ProjectUpdater updater = new ProjectUpdater(project, mdwSettings);
ProjectConfigurator configurator = new ProjectConfigurator(project, mdwSettings);
updater.updateWebProjectJars(new SubProgressMonitor(monitor, 30));
configurator.createWebProjectSourceCodeAssociations(null, monitor);
monitor.worked(5);
} catch (Exception ex) {
throw new ExtensionModuleException(ex.getMessage(), ex);
}
return true;
}
use of com.centurylink.mdw.plugin.preferences.model.MdwSettings in project mdw-designer by CenturyLinkCloud.
the class PluginUtil method sendEmail.
public static void sendEmail(String subject, String content) throws MessagingException, AddressException {
MdwSettings settings = MdwPlugin.getSettings();
Properties props = new Properties();
props.put("mail.transport.protocol", MAIL_PROTOCOL);
props.put("mail.host", settings.getSmtpHost());
props.put("mail.smtp.port", settings.getSmtpPort());
Session session = Session.getInstance(props);
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(MAIL_FROM_ADDRESS));
message.setSubject(subject);
message.setRecipients(Message.RecipientType.TO, new Address[] { new InternetAddress(MDW_DEV_EMAIL_GROUP) });
Multipart multiPart = new MimeMultipart();
BodyPart bodyPart = new MimeBodyPart();
bodyPart.setContent(content, "text/plain");
multiPart.addBodyPart(bodyPart);
message.setContent(multiPart);
message.setSentDate(new Date());
Transport.send(message);
}
Aggregations