use of com.centurylink.mdw.plugin.designer.PluginDataAccess in project mdw-designer by CenturyLinkCloud.
the class MdwWorkbenchWindowAdvisor method getProcessInstance.
private WorkflowProcess getProcessInstance(Long processInstanceId) {
PluginDataAccess dataAccess = projectToImport.getDataAccess();
ProcessInstanceVO processInstanceInfo = dataAccess.getProcessInstance(processInstanceId);
ProcessVO processVO = new ProcessVO();
processVO.setProcessId(processInstanceInfo.getProcessId());
processVO.setProcessName(processInstanceInfo.getProcessName());
WorkflowProcess instanceVersion = new WorkflowProcess(projectToImport, processVO);
instanceVersion.setProcessInstance(processInstanceInfo);
return instanceVersion;
}
use of com.centurylink.mdw.plugin.designer.PluginDataAccess in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetCustomSection method drawWidgets.
public void drawWidgets(Composite composite, WorkflowElement selection) {
workflowAsset = (WorkflowAsset) selection;
// attr definition text area
customAttrsPropEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_TEXT);
customAttrsPropEditor.setLabel("Custom Attr Definition\n(Pagelet Syntax)");
customAttrsPropEditor.setMultiLine(true);
customAttrsPropEditor.setWidth(475);
customAttrsPropEditor.setHeight(80);
customAttrsPropEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
String def = newValue == null || ((String) newValue).length() == 0 ? null : (String) newValue;
if (customAttribute == null)
customAttribute = new CustomAttributeVO("RULE_SET", workflowAsset.getLanguage());
customAttribute.setDefinition(def);
}
});
customAttrsPropEditor.render(composite);
// roles picklist
rolesPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_PICKLIST);
rolesPropertyEditor.setValueConverter(new ListConverter());
rolesPropertyEditor.setLabel("Custom Attr Edit Roles:Unselected~Permitted");
PluginDataAccess dataAccess = workflowAsset.getProject().getDataAccess();
rolesPropertyEditor.setValueOptions(dataAccess.getRoleNames(false));
rolesPropertyEditor.addValueChangeListener(new ValueChangeListener() {
@SuppressWarnings("unchecked")
public void propertyValueChanged(Object newValue) {
if (customAttribute == null)
customAttribute = new CustomAttributeVO("RULE_SET", workflowAsset.getLanguage());
if (newValue == null)
customAttribute.setRoles(null);
else
customAttribute.setRoles((List<String>) newValue);
}
});
rolesPropertyEditor.render(composite);
rolesPropertyEditor.setValue("");
// save button
savePropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_BUTTON);
savePropertyEditor.setLabel("Save");
savePropertyEditor.setComment("Save Custom Attrs:");
savePropertyEditor.setWidth(65);
savePropertyEditor.addValueChangeListener(new ValueChangeListener() {
public void propertyValueChanged(Object newValue) {
saveCustomAttribute();
}
});
savePropertyEditor.render(composite);
// help link
helpLinkPropertyEditor = new PropertyEditor(workflowAsset, PropertyEditor.TYPE_LINK);
helpLinkPropertyEditor.setLabel("Custom Attributes Help");
helpLinkPropertyEditor.render(composite);
}
use of com.centurylink.mdw.plugin.designer.PluginDataAccess in project mdw-designer by CenturyLinkCloud.
the class CopyDialog method nameAlreadyExists.
private boolean nameAlreadyExists(String name) {
WorkflowProject workflowProject = workflowElement.getProject();
PluginDataAccess dataAccess = workflowProject.getDataAccess();
if (workflowElement instanceof WorkflowProcess)
return dataAccess.processNameExists(targetPackage.getPackageVO(), name);
else if (workflowElement instanceof ExternalEvent)
return workflowProject.externalEventNameExists(name);
else if (workflowElement instanceof WorkflowAsset)
return targetPackage == null ? workflowProject.workflowAssetNameExists(name) : targetPackage.workflowAssetNameExists(name);
else
return false;
}
use of com.centurylink.mdw.plugin.designer.PluginDataAccess in project mdw-designer by CenturyLinkCloud.
the class ProcessSaveAsDialog method nameAlreadyExists.
private boolean nameAlreadyExists(String name) {
WorkflowProject workflowProject = process.getProject();
PluginDataAccess dataAccess = workflowProject.getDataAccess();
if (process instanceof WorkflowProcess)
return dataAccess.processNameExists(newPackage.getPackageVO(), name);
else
return false;
}
use of com.centurylink.mdw.plugin.designer.PluginDataAccess in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetCustomSection method setSelection.
public void setSelection(WorkflowElement selection) {
workflowAsset = (WorkflowAsset) selection;
customAttrsPropEditor.setElement(workflowAsset);
rolesPropertyEditor.setElement(workflowAsset);
savePropertyEditor.setElement(workflowAsset);
PluginDataAccess dataAccess = workflowAsset.getProject().getDataAccess();
customAttribute = dataAccess.getAssetCustomAttribute(workflowAsset.getLanguage());
if (customAttribute != null) {
customAttrsPropEditor.setValue(customAttribute.getDefinition());
rolesPropertyEditor.setValue(customAttribute.getRoles());
}
helpLinkPropertyEditor.setElement(workflowAsset);
helpLinkPropertyEditor.setValue("/MDWHub/doc/customAttributes.html");
}
Aggregations