Search in sources :

Example 1 with RetrieveRemoteConfsService

use of org.talend.repository.hadoopcluster.conf.RetrieveRemoteConfsService in project tbd-studio-se by Talend.

the class HadoopImportRemoteOptionPage method addListener.

private void addListener() {
    selectClusterButton.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            try {
                IRetrieveConfsJobService retrieveJobServer = connectionForm.getRetrieveJobService();
                if (retrieveJobServer != null) {
                    retrieveJobServer.setDistributionVersion(distriVersion);
                    retrieveJobServer.setSelectedCluster(getSelectedCluster());
                    confsService = (IRetrieveConfsService) retrieveJobServer;
                } else if (configurator != null) {
                    HadoopCluster cluster = configurator.getCluster(getSelectedCluster());
                    confsService = new RetrieveRemoteConfsService(cluster);
                }
                if (confsService != null) {
                    servicesTableComp.setServices(confsService.getAllServices());
                }
            } catch (Exception ex) {
                ExceptionHandler.process(ex);
            }
        }
    });
}
Also used : SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) IRetrieveConfsService(org.talend.repository.hadoopcluster.service.IRetrieveConfsService) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IRetrieveConfsJobService(org.talend.repository.hadoopcluster.configurator.IRetrieveConfsJobService) RetrieveRemoteConfsService(org.talend.repository.hadoopcluster.conf.RetrieveRemoteConfsService) HadoopCluster(org.talend.repository.hadoopcluster.configurator.HadoopCluster)

Aggregations

SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 RetrieveRemoteConfsService (org.talend.repository.hadoopcluster.conf.RetrieveRemoteConfsService)1 HadoopCluster (org.talend.repository.hadoopcluster.configurator.HadoopCluster)1 IRetrieveConfsJobService (org.talend.repository.hadoopcluster.configurator.IRetrieveConfsJobService)1 IRetrieveConfsService (org.talend.repository.hadoopcluster.service.IRetrieveConfsService)1