Search in sources :

Example 6 with UserDetailInfo

use of com.cubrid.cubridmanager.core.cubrid.user.model.UserDetailInfo in project cubrid-manager by CUBRID.

the class DBAuthComparator method editUser.

/**
	 * edit User
	 */
public void editUser() {
    TableItem[] items = userTableViewer.getTable().getSelection();
    if (items.length == 1) {
        TableItem item = items[0];
        UserDetailInfo userInfo = (UserDetailInfo) item.getData();
        Set<String> typeSet = new HashSet<String>();
        typeSet.add(NodeType.USER);
        ICubridNode userNode = CommonUITool.findNode(database, typeSet, userInfo.getUserName());
        if (userNode != null) {
            EditUserAction action = (EditUserAction) ActionManager.getInstance().getAction(EditUserAction.ID);
            action.doRun((ISchemaNode) userNode);
            refresh();
        }
    } else {
        CommonUITool.openWarningBox(Messages.errNoUserSelected);
    }
}
Also used : TableItem(org.eclipse.swt.widgets.TableItem) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) EditUserAction(com.cubrid.common.ui.cubrid.user.action.EditUserAction) UserDetailInfo(com.cubrid.cubridmanager.core.cubrid.user.model.UserDetailInfo) HashSet(java.util.HashSet)

Aggregations

UserDetailInfo (com.cubrid.cubridmanager.core.cubrid.user.model.UserDetailInfo)6 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)2 SQLException (java.sql.SQLException)2 HashSet (java.util.HashSet)2 TableItem (org.eclipse.swt.widgets.TableItem)2 ITask (com.cubrid.common.core.task.ITask)1 DeleteUserAction (com.cubrid.common.ui.cubrid.user.action.DeleteUserAction)1 EditUserAction (com.cubrid.common.ui.cubrid.user.action.EditUserAction)1 CommonTaskJobExec (com.cubrid.common.ui.spi.progress.CommonTaskJobExec)1 ITaskExecutorInterceptor (com.cubrid.common.ui.spi.progress.ITaskExecutorInterceptor)1 JobFamily (com.cubrid.common.ui.spi.progress.JobFamily)1 TaskJobExecutor (com.cubrid.common.ui.spi.progress.TaskJobExecutor)1 AuthType (com.cubrid.cubridmanager.core.cubrid.user.model.AuthType)1 DBAuth (com.cubrid.cubridmanager.core.cubrid.user.model.DBAuth)1 DbUserInfo (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfo)1 DbUserInfoList (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfoList)1 GetAllUserAuthorizationsTask (com.cubrid.cubridmanager.core.cubrid.user.task.GetAllUserAuthorizationsTask)1 GetUserListTask (com.cubrid.cubridmanager.core.cubrid.user.task.GetUserListTask)1 Statement (java.sql.Statement)1 ArrayList (java.util.ArrayList)1