Search in sources :

Example 16 with ActivityImpl

use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.

the class WorkflowProject method getSuppressedActivityImplementors.

public List<String> getSuppressedActivityImplementors() throws IOException {
    if (suppressedActivityImplementors == null) {
        suppressedActivityImplementors = new ArrayList<>();
        String compressed = getPersistentProperty(MDW_SUPPRESSED_ACTIVITY_IMPLEMENTORS);
        String suppressedImplsProp = compressed == null ? null : StringHelper.uncompress(compressed);
        if (suppressedImplsProp == null) {
            if (checkRequiredVersion(5, 5)) {
                // suppress the old baseline package impls by default
                WorkflowPackage baseline52 = getPackage("MDW Baseline");
                if (baseline52 != null) {
                    for (ActivityImpl impl : baseline52.getActivityImpls()) suppressedActivityImplementors.add(impl.getImplClassName());
                }
            }
        } else {
            for (String impl : suppressedImplsProp.split(",")) suppressedActivityImplementors.add(impl);
        }
    }
    return suppressedActivityImplementors;
}
Also used : WorkflowPackage(com.centurylink.mdw.plugin.designer.model.WorkflowPackage) ActivityImpl(com.centurylink.mdw.plugin.designer.model.ActivityImpl)

Example 17 with ActivityImpl

use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.

the class DesignerProxy method getGenericActivityImpl.

/**
 * Returns the default implementor as a generic representation.
 */
public ActivityImpl getGenericActivityImpl(String implClass) {
    ActivityImplementorVO implVO = dataAccess.getDesignerDataModel().getNodeMetaInfo().getDefaultActivity();
    if (implVO == null) {
        // even base impl cannot be loaded
        implVO = new ActivityImplementorVO();
        implVO.setLabel(implClass);
        implVO.setAttributeDescription("<PAGELET/>");
    }
    implVO.setImplementorClassName(implClass);
    ActivityImpl impl = new ActivityImpl(implVO, project.getDefaultPackage());
    impl.setProject(project);
    return impl;
}
Also used : ActivityImplementorVO(com.centurylink.mdw.model.value.activity.ActivityImplementorVO) ActivityImpl(com.centurylink.mdw.plugin.designer.model.ActivityImpl)

Example 18 with ActivityImpl

use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.

the class ToolboxFilterDialog method createSelectButtons.

private void createSelectButtons(Composite parent) {
    Composite buttonComposite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 0;
    layout.marginWidth = 0;
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    buttonComposite.setLayout(layout);
    buttonComposite.setLayoutData(new GridData(SWT.END, SWT.TOP, true, false));
    Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, "Select All", false);
    selectButton.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            suppressedImplementors = new ArrayList<>();
            treeViewer.refresh();
        }
    });
    Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, "Deselect All", false);
    deselectButton.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            suppressedImplementors = new ArrayList<>();
            for (WorkflowPackage pkg : workflowProject.getTopLevelUserVisiblePackages()) {
                for (ActivityImpl impl : pkg.getActivityImpls()) {
                    if (!suppressedImplementors.contains(impl.getImplClassName()))
                        suppressedImplementors.add(impl.getImplClassName());
                }
            }
            treeViewer.refresh();
        }
    });
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) WorkflowPackage(com.centurylink.mdw.plugin.designer.model.WorkflowPackage) Composite(org.eclipse.swt.widgets.Composite) ActivityImpl(com.centurylink.mdw.plugin.designer.model.ActivityImpl) Button(org.eclipse.swt.widgets.Button) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ArrayList(java.util.ArrayList)

Example 19 with ActivityImpl

use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.

the class ToolboxFilterDialog method createPackageTree.

private void createPackageTree(Composite parent) {
    treeViewer = new CheckboxTreeViewer(parent, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    treeViewer.setContentProvider(new ViewContentProvider());
    treeViewer.setLabelProvider(new ViewLabelProvider());
    treeViewer.setCheckStateProvider(new ViewCheckStateProvider());
    treeViewer.setInput(workflowProject.getTopLevelUserVisiblePackages());
    GridData data = new GridData(GridData.FILL_BOTH);
    data.heightHint = 400;
    treeViewer.getTree().setLayoutData(data);
    treeViewer.addCheckStateListener(new ICheckStateListener() {

        public void checkStateChanged(CheckStateChangedEvent event) {
            boolean checked = event.getChecked();
            if (event.getElement() instanceof WorkflowPackage) {
                WorkflowPackage pkg = (WorkflowPackage) event.getElement();
                for (ActivityImpl impl : pkg.getActivityImpls()) {
                    if (checked)
                        suppressedImplementors.remove(impl.getImplClassName());
                    else if (!suppressedImplementors.contains(impl.getImplClassName()))
                        suppressedImplementors.add(impl.getImplClassName());
                }
                treeViewer.refresh();
            } else if (event.getElement() instanceof ActivityImpl) {
                ActivityImpl impl = (ActivityImpl) event.getElement();
                if (checked)
                    suppressedImplementors.remove(impl.getImplClassName());
                else if (!suppressedImplementors.contains(impl.getImplClassName()))
                    suppressedImplementors.add(impl.getImplClassName());
                treeViewer.refresh();
            }
        }
    });
    ColumnViewerToolTipSupport.enableFor(treeViewer);
}
Also used : CheckboxTreeViewer(org.eclipse.jface.viewers.CheckboxTreeViewer) WorkflowPackage(com.centurylink.mdw.plugin.designer.model.WorkflowPackage) ActivityImpl(com.centurylink.mdw.plugin.designer.model.ActivityImpl) ICheckStateListener(org.eclipse.jface.viewers.ICheckStateListener) GridData(org.eclipse.swt.layout.GridData) CheckStateChangedEvent(org.eclipse.jface.viewers.CheckStateChangedEvent)

Aggregations

ActivityImpl (com.centurylink.mdw.plugin.designer.model.ActivityImpl)19 WorkflowPackage (com.centurylink.mdw.plugin.designer.model.WorkflowPackage)6 WorkflowProcess (com.centurylink.mdw.plugin.designer.model.WorkflowProcess)5 ArrayList (java.util.ArrayList)5 ActivityImplementorVO (com.centurylink.mdw.model.value.activity.ActivityImplementorVO)4 ExternalEvent (com.centurylink.mdw.plugin.designer.model.ExternalEvent)4 WorkflowAsset (com.centurylink.mdw.plugin.designer.model.WorkflowAsset)4 WorkflowProject (com.centurylink.mdw.plugin.project.model.WorkflowProject)4 Node (com.centurylink.mdw.designer.display.Node)2 Activity (com.centurylink.mdw.plugin.designer.model.Activity)2 AutomatedTestCase (com.centurylink.mdw.plugin.designer.model.AutomatedTestCase)2 TaskTemplate (com.centurylink.mdw.plugin.designer.model.TaskTemplate)2 WorkflowElement (com.centurylink.mdw.plugin.designer.model.WorkflowElement)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 GridData (org.eclipse.swt.layout.GridData)2 ActionCancelledException (com.centurylink.mdw.common.utilities.timer.ActionCancelledException)1 DataAccessOfflineException (com.centurylink.mdw.dataaccess.DataAccessOfflineException)1 ProcessExporter (com.centurylink.mdw.dataaccess.ProcessExporter)1 ProcessPersister (com.centurylink.mdw.dataaccess.ProcessPersister)1 DataUnavailableException (com.centurylink.mdw.designer.DataUnavailableException)1