Search in sources :

Example 1 with DatabaseWizard

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();
    }
}
Also used : DBConnectionRepNode(org.talend.dq.nodes.DBConnectionRepNode) DatabaseWizard(org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard) IWizard(org.eclipse.jface.wizard.IWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 2 with DatabaseWizard

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);
}
Also used : HashMap(java.util.HashMap) DatabaseWizard(org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard) RepositoryNode(org.talend.repository.model.RepositoryNode)

Example 3 with DatabaseWizard

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;
}
Also used : ITDQRepositoryService(org.talend.core.ITDQRepositoryService) DatabaseWizard(org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard) IWizard(org.eclipse.jface.wizard.IWizard) RepositoryNode(org.talend.repository.model.RepositoryNode) DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

DatabaseWizard (org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard)3 IWizard (org.eclipse.jface.wizard.IWizard)2 WizardDialog (org.eclipse.jface.wizard.WizardDialog)2 RepositoryNode (org.talend.repository.model.RepositoryNode)2 HashMap (java.util.HashMap)1 ITDQRepositoryService (org.talend.core.ITDQRepositoryService)1 DBConnectionRepNode (org.talend.dq.nodes.DBConnectionRepNode)1 DelimitedFileWizard (org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard)1