Search in sources :

Example 1 with UserManagementDialog

use of com.cubrid.cubridmanager.ui.common.dialog.UserManagementDialog in project cubrid-manager by CUBRID.

the class UserManagementAction method run.

/**
	 * Open the user management dialog and manage CUBRID Manager user
	 */
public void run() {
    Object[] obj = this.getSelectedObj();
    if (obj == null || obj.length <= 0 || !isSupported(obj[0])) {
        setEnabled(false);
        return;
    }
    ICubridNode node = (ICubridNode) obj[0];
    final CubridServer server = node.getServer();
    final UserManagementDialog dialog = new UserManagementDialog(getShell());
    dialog.setServer(server);
    TaskExecutor taskExcutor = new GetUserInfoTaskExecutor(dialog, getShell());
    GetCMUserListTask getCMUserListTask = new GetCMUserListTask(server.getServerInfo());
    taskExcutor.addTask(getCMUserListTask);
    new ExecTaskWithProgress(taskExcutor).exec();
    if (taskExcutor.isSuccess()) {
        dialog.open();
    }
}
Also used : TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) GetCMUserListTask(com.cubrid.cubridmanager.core.common.task.GetCMUserListTask) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) CubridServer(com.cubrid.common.ui.spi.model.CubridServer) UserManagementDialog(com.cubrid.cubridmanager.ui.common.dialog.UserManagementDialog)

Aggregations

CubridServer (com.cubrid.common.ui.spi.model.CubridServer)1 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 GetCMUserListTask (com.cubrid.cubridmanager.core.common.task.GetCMUserListTask)1 UserManagementDialog (com.cubrid.cubridmanager.ui.common.dialog.UserManagementDialog)1