• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JobLoadProgressDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.ui.job.dialog.JobLoadProgressDialog的典型用法代码示例。如果您正苦于以下问题:Java JobLoadProgressDialog类的具体用法?Java JobLoadProgressDialog怎么用?Java JobLoadProgressDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JobLoadProgressDialog类属于org.pentaho.di.ui.job.dialog包,在下文中一共展示了JobLoadProgressDialog类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: openFile

import org.pentaho.di.ui.job.dialog.JobLoadProgressDialog; //导入依赖的package包/类
public void openFile(boolean importfile) {
	if (rep == null || importfile) // Load from XML
	{
		FileDialog dialog = new FileDialog(shell, SWT.OPEN);
		dialog.setFilterExtensions(Const.STRING_TRANS_AND_JOB_FILTER_EXT);
		dialog.setFilterNames(Const.getTransformationAndJobFilterNames());
		setFilterPath(dialog);
		String fname = dialog.open();
		if (fname != null) {
			lastDirOpened = dialog.getFilterPath();
			openFile(fname, importfile);
		}
	} else {
		SelectObjectDialog sod = new SelectObjectDialog(shell, rep);
		if (sod.open() != null) {
			String type = sod.getObjectType();
			String name = sod.getObjectName();
			RepositoryDirectory repdir = sod.getDirectory();

			// Load a transformation
			if (RepositoryObject.STRING_OBJECT_TYPE_TRANSFORMATION.equals(type)) {
				TransLoadProgressDialog tlpd = new TransLoadProgressDialog(shell, rep, name, repdir);
				TransMeta transMeta = tlpd.open();
				sharedObjectsFileMap.put(transMeta.getSharedObjects().getFilename(), transMeta.getSharedObjects());
				setTransMetaVariables(transMeta);
				
				if (transMeta != null) {
					if (log.isDetailed())
						log.logDetailed(toString(), Messages.getString("Spoon.Log.LoadToTransformation", name, repdir.getDirectoryName()));// "Transformation ["+transname+"] in directory ["+repdir+"] loaded from the repository."
					props.addLastFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, name, repdir.getPath(), true, rep.getName());
					addMenuLast();
					transMeta.clearChanged();
					transMeta.setFilename(name);
					addTransGraph(transMeta);
				}
				refreshGraph();
				refreshTree();
				refreshHistory();
			} else
			// Load a job
			if (RepositoryObject.STRING_OBJECT_TYPE_JOB.equals(type)) {
				JobLoadProgressDialog jlpd = new JobLoadProgressDialog(shell, rep, name, repdir);
				JobMeta jobMeta = jlpd.open();
				sharedObjectsFileMap.put(jobMeta.getSharedObjects().getFilename(), jobMeta.getSharedObjects());
				setJobMetaVariables(jobMeta);
				if (jobMeta != null) {
					props.addLastFile(LastUsedFile.FILE_TYPE_JOB, name, repdir.getPath(), true, rep.getName());
					saveSettings();
					addMenuLast();
					delegates.jobs.addJobGraph(jobMeta);
				}
				refreshGraph();
				refreshTree();
			}
		}
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:58,代码来源:Spoon.java


示例2: loadLastUsedFile

import org.pentaho.di.ui.job.dialog.JobLoadProgressDialog; //导入依赖的package包/类
private void loadLastUsedFile(LastUsedFile lastUsedFile, RepositoryMeta repositoryMeta, boolean trackIt) throws KettleException {
	boolean useRepository = repositoryMeta != null;

	// Perhaps we need to connect to the repository?
	// 
	if (lastUsedFile.isSourceRepository()) {
		if (!Const.isEmpty(lastUsedFile.getRepositoryName())) {
			if (useRepository && !lastUsedFile.getRepositoryName().equalsIgnoreCase(repositoryMeta.getName())) {
				// We just asked...
				useRepository = false;
			}
		}
	}

	if (useRepository && lastUsedFile.isSourceRepository()) {
		if (rep != null) // load from this repository...
		{
			if (rep.getName().equalsIgnoreCase(lastUsedFile.getRepositoryName())) {
				RepositoryDirectory repdir = rep.getDirectoryTree().findDirectory(lastUsedFile.getDirectory());
				if (repdir != null) {
					// Are we loading a transformation or a job?
					if (lastUsedFile.isTransformation()) {
						if (log.isDetailed())
							log.logDetailed(toString(), Messages.getString("Spoon.Log.AutoLoadingTransformation", lastUsedFile.getFilename(), lastUsedFile.getDirectory()));// "Auto loading transformation ["+lastfiles[0]+"] from repository directory ["+lastdirs[0]+"]"
						TransLoadProgressDialog tlpd = new TransLoadProgressDialog(shell, rep, lastUsedFile.getFilename(), repdir);
						TransMeta transMeta = tlpd.open();
						if (transMeta != null) {
							if (trackIt)
								props.addLastFile(LastUsedFile.FILE_TYPE_TRANSFORMATION, lastUsedFile.getFilename(), repdir.getPath(), true, rep.getName());
							transMeta.setFilename(lastUsedFile.getFilename());
							transMeta.clearChanged();
							addTransGraph(transMeta);
							refreshTree();
						}
					} else if (lastUsedFile.isJob()) {
						JobLoadProgressDialog progressDialog = new JobLoadProgressDialog(shell, rep, lastUsedFile.getFilename(), repdir);
						JobMeta jobMeta = progressDialog.open();
						if (trackIt)
							props.addLastFile(LastUsedFile.FILE_TYPE_JOB, lastUsedFile.getFilename(), repdir.getPath(), true, rep.getName());
						jobMeta.clearChanged();
						delegates.jobs.addJobGraph(jobMeta);
					}
					refreshTree();
				}
			}
		}
	}

	if (!lastUsedFile.isSourceRepository() && !Const.isEmpty(lastUsedFile.getFilename())) {
		if (lastUsedFile.isTransformation()) {
			openFile(lastUsedFile.getFilename(), false);
			/*
			 * TransMeta transMeta = new
			 * TransMeta(lastUsedFile.getFilename());
			 * transMeta.setFilename(lastUsedFile.getFilename());
			 * transMeta.clearChanged();
			 * props.addLastFile(LastUsedFile.FILE_TYPE_TRANSFORMATION,
			 * lastUsedFile.getFilename(), null, false, null);
			 * addTransGraph(transMeta);
			 */
		}
		if (lastUsedFile.isJob()) {
			openFile(lastUsedFile.getFilename(), false);
			/*
			 * JobMeta jobMeta = new JobMeta(log,
			 * lastUsedFile.getFilename(), rep);
			 * jobMeta.setFilename(lastUsedFile.getFilename());
			 * jobMeta.clearChanged();
			 * props.addLastFile(LastUsedFile.FILE_TYPE_JOB,
			 * lastUsedFile.getFilename(), null, false, null);
			 * addJobGraph(jobMeta);
			 */
		}
		refreshTree();
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:77,代码来源:Spoon.java


示例3: loadLastUsedFile

import org.pentaho.di.ui.job.dialog.JobLoadProgressDialog; //导入依赖的package包/类
private void loadLastUsedFile(
    LastUsedFile lastUsedFile, String repositoryName, boolean trackIt ) throws KettleException {
  boolean useRepository = repositoryName != null;
  // Perhaps we need to connect to the repository?
  //
  if ( lastUsedFile.isSourceRepository() ) {
    if ( !Utils.isEmpty( lastUsedFile.getRepositoryName() ) ) {
      if ( useRepository && !lastUsedFile.getRepositoryName().equalsIgnoreCase( repositoryName ) ) {
        // We just asked...
        useRepository = false;
      }
    }
  }

  if ( useRepository && lastUsedFile.isSourceRepository() ) {
    if ( rep != null ) { // load from this repository...
      if ( rep.getName().equalsIgnoreCase( lastUsedFile.getRepositoryName() ) ) {
        RepositoryDirectoryInterface rdi = rep.findDirectory( lastUsedFile.getDirectory() );
        if ( rdi != null ) {
          // Are we loading a transformation or a job?
          if ( lastUsedFile.isTransformation() ) {
            if ( log.isDetailed() ) {
              // "Auto loading transformation ["+lastfiles[0]+"] from repository directory ["+lastdirs[0]+"]"
              log.logDetailed( BaseMessages.getString( PKG, "Spoon.Log.AutoLoadingTransformation", lastUsedFile
                .getFilename(), lastUsedFile.getDirectory() ) );
            }
            TransLoadProgressDialog tlpd =
              new TransLoadProgressDialog( shell, rep, lastUsedFile.getFilename(), rdi, null );
            TransMeta transMeta = tlpd.open();
            if ( transMeta != null ) {
              if ( trackIt ) {
                props.addLastFile( LastUsedFile.FILE_TYPE_TRANSFORMATION, lastUsedFile.getFilename(), rdi
                  .getPath(), true, rep.getName(), getUsername(), null );
              }
              // transMeta.setFilename(lastUsedFile.getFilename());
              transMeta.clearChanged();
              addTransGraph( transMeta );
              refreshTree();
            }
          } else if ( lastUsedFile.isJob() ) {
            JobLoadProgressDialog progressDialog =
              new JobLoadProgressDialog( shell, rep, lastUsedFile.getFilename(), rdi, null );
            JobMeta jobMeta = progressDialog.open();
            if ( jobMeta != null ) {
              if ( trackIt ) {
                props.addLastFile(
                  LastUsedFile.FILE_TYPE_JOB, lastUsedFile.getFilename(), rdi.getPath(), true, rep
                    .getName(), getUsername(), null );
              }
              jobMeta.clearChanged();
              addJobGraph( jobMeta );
            }
          }
          refreshTree();
        }
      }
    }
  }

  if ( !lastUsedFile.isSourceRepository() && !Utils.isEmpty( lastUsedFile.getFilename() ) ) {
    if ( lastUsedFile.isTransformation() ) {
      openFile( lastUsedFile.getFilename(), rep != null );
    }
    if ( lastUsedFile.isJob() ) {
      openFile( lastUsedFile.getFilename(), false );
    }
    refreshTree();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:70,代码来源:Spoon.java



注:本文中的org.pentaho.di.ui.job.dialog.JobLoadProgressDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XMPPServerInfo类代码示例发布时间:2022-05-22
下一篇:
Java Language类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap