本文整理汇总了Java中org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageJDBC类的典型用法代码示例。如果您正苦于以下问题:Java CreateDatabaseWizardPageJDBC类的具体用法?Java CreateDatabaseWizardPageJDBC怎么用?Java CreateDatabaseWizardPageJDBC使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CreateDatabaseWizardPageJDBC类属于org.pentaho.di.ui.core.database.wizard包,在下文中一共展示了CreateDatabaseWizardPageJDBC类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNextPage
import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageJDBC; //导入依赖的package包/类
public IWizardPage getNextPage()
{
IWizard wiz = getWizard();
IWizardPage nextPage;
switch(info.getAccessType())
{
case DatabaseMeta.TYPE_ACCESS_OCI:
nextPage = wiz.getPage("oci"); // OCI //$NON-NLS-1$
break;
case DatabaseMeta.TYPE_ACCESS_ODBC:
nextPage = wiz.getPage("odbc");; // ODBC //$NON-NLS-1$
break;
case DatabaseMeta.TYPE_ACCESS_PLUGIN:
nextPage = wiz.getPage(info.getDatabaseTypeDesc());; // e.g. SAPR3
break;
default: // Generic or Native
if(info.getDatabaseType()==DatabaseMeta.TYPE_DATABASE_GENERIC)
{ // Generic
nextPage = wiz.getPage("generic");; // generic //$NON-NLS-1$
} else { // Native
nextPage = wiz.getPage("jdbc"); //$NON-NLS-1$
if (nextPage!=null)
{
// Set the port number...
((CreateDatabaseWizardPageJDBC)nextPage).setData();
}
}
break;
}
return nextPage;
}
示例2: createAndRunDatabaseWizard
import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageJDBC; //导入依赖的package包/类
/**
* Shows a wizard that creates a new database connection...
* @param shell
* @param props
* @param databases
* @return DatabaseMeta when finished or null when canceled
*/
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, PropsUI props, List<DatabaseMeta> databases)
{
DatabaseMeta newDBInfo = new DatabaseMeta();
final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases);
page1.createControl(shell);
final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("ifx", props, newDBInfo);
pageifx.createControl(shell);
final CreateDatabaseWizardPageJDBC pagejdbc = new CreateDatabaseWizardPageJDBC("jdbc", props, newDBInfo);
pagejdbc.createControl(shell);
final CreateDatabaseWizardPageOCI pageoci = new CreateDatabaseWizardPageOCI("oci", props, newDBInfo);
pageoci.createControl(shell);
final CreateDatabaseWizardPageODBC pageodbc = new CreateDatabaseWizardPageODBC("odbc", props, newDBInfo);
pageodbc.createControl(shell);
final CreateDatabaseWizardPageOracle pageoracle = new CreateDatabaseWizardPageOracle("oracle", props, newDBInfo);
final CreateDatabaseWizardPageSAPR3 pageSAPR3 = new CreateDatabaseWizardPageSAPR3("SAPR3", props, newDBInfo);
pageSAPR3.createControl(shell);
final CreateDatabaseWizardPageGeneric pageGeneric = new CreateDatabaseWizardPageGeneric("generic", props, newDBInfo);
pageGeneric.createControl(shell);
final CreateDatabaseWizardPage2 page2 = new CreateDatabaseWizardPage2("2", props, newDBInfo);
page2.createControl(shell);
wizardFinished=false; // set to false for safety only
Wizard wizard = new Wizard()
{
/**
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
public boolean performFinish()
{
wizardFinished=true;
return true;
}
/**
* @see org.eclipse.jface.wizard.Wizard#canFinish()
*/
public boolean canFinish()
{
return page2.canFinish();
}
};
wizard.addPage(page1);
wizard.addPage(pageoci);
wizard.addPage(pageodbc);
wizard.addPage(pagejdbc);
wizard.addPage(pageoracle);
wizard.addPage(pageifx);
wizard.addPage(pageSAPR3);
wizard.addPage(pageGeneric);
wizard.addPage(page2);
WizardDialog wd = new WizardDialog(shell, wizard);
WizardDialog.setDefaultImage(GUIResource.getInstance().getImageWizard());
wd.setMinimumPageSize(700,400);
wd.updateSize();
wd.open();
if(!wizardFinished){
newDBInfo=null;
}
return newDBInfo;
}
示例3: createAndRunDatabaseWizard
import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageJDBC; //导入依赖的package包/类
/**
* Shows a wizard that creates a new database connection...
* @param shell
* @param props
* @param databases
* @return DatabaseMeta when finished or null when canceled
*/
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, PropsUI props, List<DatabaseMeta> databases)
{
DatabaseMeta newDBInfo = new DatabaseMeta();
final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases);
final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("ifx", props, newDBInfo);
final CreateDatabaseWizardPageJDBC pagejdbc = new CreateDatabaseWizardPageJDBC("jdbc", props, newDBInfo);
final CreateDatabaseWizardPageOCI pageoci = new CreateDatabaseWizardPageOCI("oci", props, newDBInfo);
final CreateDatabaseWizardPageODBC pageodbc = new CreateDatabaseWizardPageODBC("odbc", props, newDBInfo);
final CreateDatabaseWizardPageOracle pageoracle = new CreateDatabaseWizardPageOracle("oracle", props, newDBInfo);
final CreateDatabaseWizardPageSAPR3 pageSAPR3 = new CreateDatabaseWizardPageSAPR3("SAPR3", props, newDBInfo);
final CreateDatabaseWizardPageGeneric pageGeneric = new CreateDatabaseWizardPageGeneric("generic", props, newDBInfo);
final CreateDatabaseWizardPage2 page2 = new CreateDatabaseWizardPage2("2", props, newDBInfo);
wizardFinished=false; // set to false for safety only
Wizard wizard = new Wizard()
{
/**
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
public boolean performFinish()
{
wizardFinished=true;
return true;
}
/**
* @see org.eclipse.jface.wizard.Wizard#canFinish()
*/
public boolean canFinish()
{
return page2.canFinish();
}
};
wizard.addPage(page1);
wizard.addPage(pageoci);
wizard.addPage(pageodbc);
wizard.addPage(pagejdbc);
wizard.addPage(pageoracle);
wizard.addPage(pageifx);
wizard.addPage(pageSAPR3);
wizard.addPage(pageGeneric);
wizard.addPage(page2);
WizardDialog wd = new WizardDialog(shell, wizard);
WizardDialog.setDefaultImage(GUIResource.getInstance().getImageWizard());
wd.setMinimumPageSize(700,400);
wd.updateSize();
wd.open();
if(!wizardFinished){
newDBInfo=null;
}
return newDBInfo;
}