Search in sources :

Example 51 with CommonTaskExec

use of com.cubrid.common.ui.spi.progress.CommonTaskExec in project cubrid-manager by CUBRID.

the class ConfigParaHelp method performGetHAConf.

/**
	 * Perform the task of get ha.conf
	 * 
	 * @param serverInfo the CubridServer
	 * @return the List<String>
	 */
public static List<String> performGetHAConf(ServerInfo serverInfo) {
    List<String> confContent = new ArrayList<String>();
    CommonTaskExec taskExcutor = new CommonTaskExec(com.cubrid.cubridmanager.ui.host.Messages.getHaConfTaskRunning);
    GetHAConfParameterTask getHAConfParameterTask = new GetHAConfParameterTask(serverInfo);
    taskExcutor.addTask(getHAConfParameterTask);
    new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
    if (taskExcutor.isSuccess()) {
        confContent = getHAConfParameterTask.getConfContents();
    }
    return confContent;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) ArrayList(java.util.ArrayList) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) GetHAConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetHAConfParameterTask)

Example 52 with CommonTaskExec

use of com.cubrid.common.ui.spi.progress.CommonTaskExec in project cubrid-manager by CUBRID.

the class ConfigParaHelp method performGetCmConf.

/**
	 * Perform the task of get cm.conf
	 * 
	 * @param serverInfo the CubridServer
	 * @return the List<String>
	 */
public static List<String> performGetCmConf(ServerInfo serverInfo) {
    List<String> confContent = new ArrayList<String>();
    CommonTaskExec taskExcutor = new CommonTaskExec(com.cubrid.cubridmanager.ui.host.Messages.getCmConfTaskRunning);
    GetCMConfParameterTask getCMConfParameterTask = new GetCMConfParameterTask(serverInfo);
    taskExcutor.addTask(getCMConfParameterTask);
    new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
    if (taskExcutor.isSuccess()) {
        confContent = getCMConfParameterTask.getConfContents();
    }
    return confContent;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) GetCMConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetCMConfParameterTask) ArrayList(java.util.ArrayList) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)

Example 53 with CommonTaskExec

use of com.cubrid.common.ui.spi.progress.CommonTaskExec in project cubrid-manager by CUBRID.

the class ConfigParaHelp method performGetCubridConf.

/**
	 * Perform the task of get cubrid.conf
	 * 
	 * @param serverInfo the CubridServer
	 * @return the List<String>
	 */
public static List<String> performGetCubridConf(ServerInfo serverInfo) {
    List<String> confContent = new ArrayList<String>();
    CommonTaskExec taskExcutor = new CommonTaskExec(com.cubrid.cubridmanager.ui.host.Messages.getCubridConfTaskRunning);
    GetCubridConfParameterTask getCubridConfParameterTask = new GetCubridConfParameterTask(serverInfo);
    taskExcutor.addTask(getCubridConfParameterTask);
    new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
    if (taskExcutor.isSuccess()) {
        confContent = getCubridConfParameterTask.getConfContents();
    }
    return confContent;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) ArrayList(java.util.ArrayList) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) GetCubridConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask)

Example 54 with CommonTaskExec

use of com.cubrid.common.ui.spi.progress.CommonTaskExec in project cubrid-manager by CUBRID.

the class ConfigParaHelp method performImportBrokerConf.

/**
	 * Perform the import task for cubrid_broker.conf
	 * 
	 * @param serverInfo the CubridserverInfo
	 * @param confParamList the List<String>
	 */
public static void performImportBrokerConf(ServerInfo serverInfo, List<String> confParamList) {
    CommonTaskExec taskExcutor = new CommonTaskExec(Messages.setBrokerConfParametersTaskName);
    SetBrokerConfParameterTask task = new SetBrokerConfParameterTask(serverInfo);
    task.setConfContents(confParamList);
    taskExcutor.addTask(task);
    new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
    if (taskExcutor.isSuccess()) {
        CommonUITool.openInformationBox(Messages.titleSuccess, Messages.restartBrokerMsg);
        task.finish();
    }
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) SetBrokerConfParameterTask(com.cubrid.cubridmanager.core.broker.task.SetBrokerConfParameterTask)

Example 55 with CommonTaskExec

use of com.cubrid.common.ui.spi.progress.CommonTaskExec in project cubrid-manager by CUBRID.

the class ConfigParaHelp method performGetBrokerConf.

/**
	 * Perform the task of get cubrid_broker.conf
	 * 
	 * @param serverInfo the CubridServer
	 * @return the List<String>
	 */
public static List<String> performGetBrokerConf(ServerInfo serverInfo) {
    List<String> confContent = new ArrayList<String>();
    CommonTaskExec taskExcutor = new CommonTaskExec(com.cubrid.cubridmanager.ui.host.Messages.getBrokerConfTaskRunning);
    GetBrokerConfParameterTask getBrokerConfParameterTask = new GetBrokerConfParameterTask(serverInfo);
    taskExcutor.addTask(getBrokerConfParameterTask);
    new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
    if (taskExcutor.isSuccess()) {
        confContent = getBrokerConfParameterTask.getConfContents();
    }
    return confContent;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) ArrayList(java.util.ArrayList) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) GetBrokerConfParameterTask(com.cubrid.cubridmanager.core.broker.task.GetBrokerConfParameterTask)

Aggregations

CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)106 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)106 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)81 TreeViewer (org.eclipse.jface.viewers.TreeViewer)31 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)24 ArrayList (java.util.ArrayList)24 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)23 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)18 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)14 ISchemaNode (com.cubrid.common.ui.spi.model.ISchemaNode)13 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)13 DefaultCubridNode (com.cubrid.common.ui.spi.model.DefaultCubridNode)12 LogInfo (com.cubrid.cubridmanager.core.logs.model.LogInfo)11 IEditorPart (org.eclipse.ui.IEditorPart)11 DefaultSchemaNode (com.cubrid.common.ui.spi.model.DefaultSchemaNode)9 HashMap (java.util.HashMap)9 AbstractUITask (com.cubrid.common.core.task.AbstractUITask)8 Map (java.util.Map)8 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)8 ISelectionProvider (org.eclipse.jface.viewers.ISelectionProvider)8