本文整理汇总了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;未经允许,请勿转载。 |
请发表评论