DwWorkflow-开源

  • u7_193722
    了解作者
  • 1.8MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 10:12
    上传日期
数据仓库流程工作流服务器和数据仓库映射生成器。 它允许定义表或文件与进程之间的依赖关系,并根据这些元数据并行运行进程。
wfclient_1.0.1.zip
内容介绍
/* * Copyright (c) 2006, David Vanek * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * . Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * . Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * . Neither the name of the "DwWorkflow" nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package wfclient.views; import java.util.Vector; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.TableItem; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import wfclient.WfclientPlugin; public class PreparedOutput extends Output { public static String ID = "wfclient.views.PreparedOutput"; private Action[] cmdActions; private CmdAction currentAction; private Action showNewPreparedOutput; private Action refreshOutput; private Action showPreferences; private Preferences preferences = new Preferences(); private Refresher refresher; private PreparedOutput thisInstance; static private int counter = 0; public PreparedOutput(){ super(); thisInstance = this; } private class Refresher extends Thread{ public int refreshRate; boolean stop = false; public Refresher(int lRefreshRate){ refreshRate = lRefreshRate; } public void run() { try { while (!stop) { synchronized (this) { if (currentAction != null) { parent.getDisplay().asyncExec(new Runnable() { public void run() { if ( WfclientPlugin.getDefault().getModel().isConnected()){ currentAction.run(); } } }); this.wait(refreshRate * 1000); } } } } catch (InterruptedException e) { } } } private void stopCurrentRefresher() { if (refresher != null) { refresher.stop = true; while (refresher.isAlive()) { try { synchronized (this) { this.wait(10); } } catch (InterruptedException e) { } } } } public void restartRefresher(int lRefreshRateSecs){ stopCurrentRefresher(); preferences.refreshEachSecs = lRefreshRateSecs; if (preferences.refreshEachSecs > 0) { refresher = new Refresher(preferences.refreshEachSecs); refresher.start(); } } private class Preferences{ public int refreshEachSecs = 0; } class CmdAction extends Action{ String command; boolean preferencesOpened = false; PreparedOutput output; OutputPreferencesWindow prefWindow; Menu popupMenu = new Menu(table); private CmdAction(){} public CmdAction(String lCommand, String lText, String lToolTip, PreparedOutput lOutput){ super(); command = lCommand; output = lOutput; setText(lText); setToolTipText(lToolTip); prefWindow = new OutputPreferencesWindow(getSite().getShell(), output); } public void run() { synchronized (output) { executeCommand(command, null); currentAction = this; } table.setMenu(popupMenu); } public void openPreferences(){ prefWindow.open(); run(); } } class MappingsAtNCmdAction extends CmdAction{ String commandWithoutPars; OutputPreferencesN prefWindow; public MappingsAtNCmdAction(String lCommand, String lText, String lToolTip, PreparedOutput lOutput){ super(lCommand, lText, lToolTip, lOutput); commandWithoutPars = lCommand; prefWindow = new OutputPreferencesN(getSite().getShell(), output); createPopupMenu(); } private void createPopupMenu(){ MenuItem lItem = new MenuItem(popupMenu, SWT.CASCADE); lItem.setText("why mapping doesn't run?"); lItem.addSelectionListener(new SelectionListener(){ public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } public void widgetSelected(SelectionEvent e) { TableItem[] tableItems = table.getSelection(); String lMappingName = tableItems[0].getText(0); String lN = tableItems[0].getText(1); try{ Output lOutputView = (Output)getSite().getPage().showView(Output.ID); ConsoleOutput lConsoleView = (ConsoleOutput)getSite().getPage().showView(ConsoleOutput.ID); lOutputView.executeCommand("whyMappingDoesntRunp('" + lMappingName + "'," + lN + ")", lConsoleView); }catch(PartInitException ex){} } }); } public void run() { currentAction = this; if ( ! preferencesOpened){ prefWindow.open(); preferencesOpened = true; } command = commandWithoutPars + "(" + prefWindow.n + ", " + (prefWindow.all ? "True" : "False") + ")"; super.run(); } public void openPreferences(){ prefWindow.open(); run(); } } class ReportCmdAction extends CmdAction{ OutputPreferencesReport prefWindow; public ReportCmdAction(String lText, String lToolTip, PreparedOutput lOutput){ super(null, lText, lToolTip, lOutput); prefWindow = new OutputPreferencesReport(getSite().getShell(), output); } public void run() { if ( ! preferencesOpened){ prefWindow.open(); preferencesOpened = true; } currentAction = this; if ( prefWindow.whereString != null){ command = "reportp('" + prefWindow.reportString + "', '" + prefWindow.whereString+ "')"; }else{ command = "reportp('" + prefWindow.reportString + "')"; } super.run(); } public void openPreferences(){ prefWindow.open(); run(); } } private void contributeToActionBars() { IActionBars bars = getViewSite().getActionBars(); fillLocalPullDown(bars.getMenuManager()); fillLocalToolBar(bars.getToolBarManager()); } private void createActions(){ Vector<action rel='nofollow' onclick='return false;'> lCmdActions = new Vector<action rel='nofollow' onclick='return false;'>(); CmdAction lObjectsAction = new CmdAction("getObjectsp()", "Objects", "Gets objects", this); lCmdActions.add(lObjectsAction); Menu lObjectsActionMenu = lObjectsAction.popupMenu; MenuItem lShowObjectInBrowser = new MenuItem(lObjectsActionMenu, SWT.CASCADE); lShowObjectInBrowser.setText("Show object in browser"); lShowObjectInBrowser.addSelectionListener(new SelectionListener(){ public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } public void widgetSelected(SelectionEvent e) { TableItem[] tableItems = table.getSelecti
评论
    相关推荐
    • 数据仓库和数据挖掘技术教程
      数据挖掘技术是一种越来越被广泛使用的新的技术和方法
    • 数据仓库与数据挖掘(华电)
      华北电力大学研究生课程数据仓库与数据挖掘,郑玲老师主讲,木有拷贝她课件的童鞋可以下载下来看看哈。期末考试很有用哈。
    • 超实用Teradata数据仓库培训资料
      由浅入深层层深入数据仓库,让您真正了解Teradata产品
    • 数据仓库
      项目设置 安装 克隆存储库: git clone git@github....安装项目所需的依赖项。 npm install 要在文件夹的根目录中开始开发,请运行命令: npm start 它将运行本地开发服务器,所有更改将立即反映在浏览器中。
    • 数据仓库总体设计报告
      数据仓库总体设计报告以实践认知世界,以实事构架世界,数据仓库总体设计报告总能给你最需要、最实用、最...该文档为数据仓库总体设计报告,是一份很不错的参考资料,具有较高参考价值,感兴趣的可以下载看看
    • Oracle数据仓库解决方案
      Oracle数据仓库解决方案
    • 数据仓库和数据挖掘在商业活动中的应用
      介绍了数据仓库和数据挖掘在商业活动中的应用,对数据仓库工程师很有价值
    • 数据仓库的设计与开发
      NULL 博文链接:https://turnround.iteye.com/blog/1993964
    • 数据仓库使用手册
      传统的关系数据库一般采用二维数据表的形式来表示数据,以维是行,另一维是列,行和列的交叉处就是数据元素。关系数据的基础是关系数据库模型,通过...使用维护阶段包括:数据仓库应用、数据仓库维护和数据仓库评价。
    • 数据仓库一些期刊资料
      为了写论文,在中国知网下的,全是pdf格式