Search in sources :

Example 1 with GetAllClassesTaskExecutor

use of com.cubrid.cubridmanager.ui.replication.control.GetAllClassesTaskExecutor in project cubrid-manager by CUBRID.

the class SelectTablesPage method pageChanged.

/**
	 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
	 * @param event PageChangedEvent
	 */
public void pageChanged(PageChangedEvent event) {
    IWizardPage page = (IWizardPage) event.getSelectedPage();
    if (page.getName().equals(PAGENAME)) {
        SelectDatabasePage selectDatabasePage = (SelectDatabasePage) getWizard().getPage(SelectDatabasePage.PAGENAME);
        String dbName = selectDatabasePage.getDbName();
        String dbaPassword = selectDatabasePage.getDbaPassword();
        if (host != null && host.isValid()) {
            String ip = host.getIp();
            String port = host.getPort();
            String userName = host.getUserName();
            String password = host.getPassword();
            GetAllClassesTaskExecutor taskExcutor = new GetAllClassesTaskExecutor(getShell(), ip, port, userName, password, dbName, dbaPassword);
            new ExecTaskWithProgress(taskExcutor).exec();
            if (taskExcutor.isSuccess()) {
                DBClasses dbClasses = taskExcutor.getDBClasses();
                selectTableComp.fillTableViewer(dbClasses);
                selectTableComp.setReplAllTables(master.isReplicateAll());
                selectTableComp.setSelectedTableList(master.getReplicatedClassList());
                setErrorMessage(null);
                setPageComplete(isEditable);
            } else {
                setErrorMessage(Messages.errPreviousPage);
                setPageComplete(false);
            }
        }
    }
}
Also used : ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) IWizardPage(org.eclipse.jface.wizard.IWizardPage) DBClasses(com.cubrid.cubridmanager.core.cubrid.table.model.DBClasses) GetAllClassesTaskExecutor(com.cubrid.cubridmanager.ui.replication.control.GetAllClassesTaskExecutor)

Aggregations

ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 DBClasses (com.cubrid.cubridmanager.core.cubrid.table.model.DBClasses)1 GetAllClassesTaskExecutor (com.cubrid.cubridmanager.ui.replication.control.GetAllClassesTaskExecutor)1 IWizardPage (org.eclipse.jface.wizard.IWizardPage)1