use of org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard in project tdq-studio-se by Talend.
the class ConnectionInfoPage method changeConnectionInformations.
/**
* Change connection informations with server, port etc., and update related analyses.
*
* MOD yyi 9082 2010-02-25
*/
protected void changeConnectionInformations() {
DBConnectionRepNode node = getCurrentRepNode();
if (node != null) {
IWizard wizard = new DatabaseWizard(PlatformUI.getWorkbench(), false, node, null);
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.setPageSize(780, 550);
wizard.setContainer(dialog);
dialog.open();
}
}
use of org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard in project tdq-studio-se by Talend.
the class CreateHiveOfHCAction method createWizard.
/*
* (non-Javadoc)
*
* @see org.talend.dataprofiler.core.ui.action.AbstractMetadataCreationAction#createWizard()
*/
@Override
protected IWizard createWizard() {
RepositoryNode dbRootNode = RepositoryNodeHelper.getDBConnectionRootNode();
Map<String, String> initMap = new HashMap<String, String>();
HadoopClusterUtils.getDefault().initConnectionParameters(initMap, node);
return new DatabaseWizard(PlatformUI.getWorkbench(), true, dbRootNode, getExistingNames(), initMap);
}
use of org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard in project tdq-studio-se by Talend.
the class ConnectionTypePage method getNextPage.
@Override
public IWizardPage getNextPage() {
RepositoryNode node = null;
IWizard nextWizard = null;
// make the next wizard do not open the created connection
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);
tdqRepService.setIsOpenConnectionEditorAfterCreate(Boolean.TRUE);
int selectionIndex = connectionType.getSelectionIndex();
switch(selectionIndex) {
case // db
0:
node = (RepositoryNode) RepositoryNodeHelper.getMetadataFolderNode(EResourceConstant.DB_CONNECTIONS);
nextWizard = new DatabaseWizard(PlatformUI.getWorkbench(), true, node, null);
break;
case // file
1:
node = (RepositoryNode) RepositoryNodeHelper.getMetadataFolderNode(EResourceConstant.FILEDELIMITED);
nextWizard = new DelimitedFileWizard(PlatformUI.getWorkbench(), true, node, null);
break;
default:
break;
}
WizardDialog dialog = new WizardDialog(null, nextWizard);
dialog.setPageSize(550, 550);
if (WizardDialog.OK == dialog.open()) {
publishSelectDataEvent(nextWizard, tdqRepService);
}
// make it back to initial value if cancel it
tdqRepService.setIsOpenConnectionEditorAfterCreate(Boolean.FALSE);
return null;
}
Aggregations