use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ActivityPage method createAttrXmlControls.
private void createAttrXmlControls(Composite parent, int ncol) {
Label label = new Label(parent, SWT.NONE);
label.setText("Pagelet:");
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
label.setLayoutData(gd);
attributeXmlTextField = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.WRAP);
gd = new GridData(GridData.BEGINNING);
gd.widthHint = 400;
gd.heightHint = 100;
gd.horizontalSpan = ncol - 1;
attributeXmlTextField.setLayoutData(gd);
if (getWizard() instanceof StartActivityWizard) {
WorkflowProject workflowProject = getProject();
String baseStartClass = "com.centurylink.mdw.workflow.activity.process.ProcessStartActivity";
if (workflowProject != null && !workflowProject.checkRequiredVersion(5, 5))
baseStartClass = "com.qwest.mdw.workflow.activity.impl.process.ProcessStartControlledActivity";
ActivityImpl startImpl = workflowProject == null ? null : workflowProject.getActivityImpl(baseStartClass);
if (startImpl != null && startImpl.getAttrDescriptionXml() != null) {
attributeXmlTextField.setText(startImpl.getAttrDescriptionXml());
getActivity().setAttrXml(startImpl.getAttrDescriptionXml());
}
}
attributeXmlTextField.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
getActivity().setAttrXml(attributeXmlTextField.getText().trim());
handleFieldChanged();
}
});
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject 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.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createLogWatcherAction.
private IAction createLogWatcherAction() {
IAction action = new Action("Log Watcher", Action.AS_CHECK_BOX) {
@Override
public void run() {
WorkflowProject project = (WorkflowProject) getSelection().getFirstElement();
actionHandler.serverAction(project, WorkflowElementActionHandler.LOG_WATCHER);
}
};
ImageDescriptor imageDesc = MdwPlugin.getImageDescriptor("icons/logwatch.gif");
action.setImageDescriptor(imageDesc);
return action;
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createImportTaskTemplateAction.
private IAction createImportTaskTemplateAction() {
IAction action = new Action() {
@Override
public void run() {
if (!importTaskTemplateApplies(getSelection()))
return;
WorkflowElement selection = (WorkflowElement) getSelection().getFirstElement();
WorkflowProject workflowProject = selection.getProject();
if (!workflowProject.isUserAuthorizedInAnyGroup(UserRoleVO.PROCESS_DESIGN)) {
MessageDialog.openError(getViewSite().getShell(), "Task Template Import", NOT_AUTHORIZED + workflowProject.getName());
return;
}
actionHandler.imporT(TaskTemplate.class, selection);
}
};
ImageDescriptor imageDesc = MdwPlugin.getImageDescriptor("icons/task.gif");
action.setImageDescriptor(imageDesc);
action.setId(MdwMenuManager.MDW_MENU_PREFIX + "import.tasks");
action.setText("Task Templates...");
return action;
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method exportPackageApplies.
public boolean exportPackageApplies(IStructuredSelection selection) {
Object element = selection.getFirstElement();
if (!(element instanceof WorkflowElement))
return false;
WorkflowProject project = ((WorkflowElement) element).getProject();
if (selection.size() > 1 && !project.getProject().checkRequiredVersion(5, 5))
return false;
for (Object item : selection.toList()) {
if (!(item instanceof WorkflowPackage))
return false;
WorkflowPackage pkg = (WorkflowPackage) item;
if (pkg.isDefaultPackage() || !pkg.getProject().equals(project))
return false;
}
return true;
}
Aggregations