use of com.centurylink.mdw.plugin.designer.model.WorkflowPackage 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;
}
use of com.centurylink.mdw.plugin.designer.model.WorkflowPackage in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createTaskManagerAction.
private IAction createTaskManagerAction() {
IAction action = new Action() {
@Override
public void run() {
if (webLaunchApplies(getSelection())) {
if (getSelection().getFirstElement() instanceof WorkflowProject) {
WorkflowProject project = (WorkflowProject) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(project, WebApp.TaskManager).launch(project);
} else if (getSelection().getFirstElement() instanceof WorkflowPackage) {
WorkflowPackage packageVersion = (WorkflowPackage) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(packageVersion.getProject(), WebApp.TaskManager).launch(packageVersion);
}
}
}
};
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(null, WebApp.TaskManager);
action.setId(MdwMenuManager.MDW_MENU_PREFIX + "launch.task.manager");
action.setText(launchAction.getLabel());
action.setImageDescriptor(launchAction.getImageDescriptor());
return action;
}
use of com.centurylink.mdw.plugin.designer.model.WorkflowPackage in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method pasteApplies.
public boolean pasteApplies(IStructuredSelection selection) {
if (selection.size() == 1 && selection.getFirstElement() instanceof WorkflowElement) {
WorkflowElement element = (WorkflowElement) selection.getFirstElement();
WorkflowPackage pkg = element.getPackage();
if (pkg != null && !pkg.isArchived() && pkg.isUserAuthorized(UserRoleVO.ASSET_DESIGN))
return true;
}
return false;
}
use of com.centurylink.mdw.plugin.designer.model.WorkflowPackage in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createWebToolsAction.
private IAction createWebToolsAction() {
IAction action = new Action() {
@Override
public void run() {
if (webLaunchApplies(getSelection())) {
if (getSelection().getFirstElement() instanceof WorkflowProject) {
WorkflowProject project = (WorkflowProject) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(project, WebApp.WebTools).launch(project);
} else if (getSelection().getFirstElement() instanceof WorkflowPackage) {
WorkflowPackage pkg = (WorkflowPackage) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(pkg.getProject(), WebApp.WebTools).launch(pkg);
}
}
}
};
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(null, WebApp.WebTools);
action.setId(MdwMenuManager.MDW_MENU_PREFIX + "launch.web.tools");
action.setText(launchAction.getLabel());
action.setImageDescriptor(launchAction.getImageDescriptor());
return action;
}
use of com.centurylink.mdw.plugin.designer.model.WorkflowPackage in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method importTaskTemplateApplies.
public boolean importTaskTemplateApplies(IStructuredSelection selection) {
if (selection.size() != 1 || !(selection.getFirstElement() instanceof WorkflowElement))
return false;
WorkflowElement element = (WorkflowElement) selection.getFirstElement();
if (element.isArchived() || !element.getProject().isFilePersist())
return false;
if (!(element instanceof WorkflowPackage))
return false;
WorkflowPackage pkg = (WorkflowPackage) element;
return !pkg.isDefaultPackage() && pkg.isUserAuthorized(UserRoleVO.ASSET_DESIGN);
}
Aggregations