Search in sources :

Example 11 with ServerUserInfo

use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.

the class EditBrokerConfigAction method isSupported.

public boolean isSupported(Object obj) {
    if (obj instanceof CubridServer) {
        CubridServer server = (CubridServer) obj;
        ServerUserInfo userInfo = server.getServerInfo().getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    } else if (obj instanceof CubridBrokerFolder) {
        CubridServer server = ((CubridBrokerFolder) obj).getServer();
        ServerUserInfo userInfo = server.getServerInfo().getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : ServerUserInfo(com.cubrid.cubridmanager.core.common.model.ServerUserInfo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer) CubridBrokerFolder(com.cubrid.cubridmanager.ui.spi.model.CubridBrokerFolder)

Example 12 with ServerUserInfo

use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.

the class EditHAConfigAction method isSupported.

/**
	 * 
	 * Return whether this action support this object,if not support,this action
	 * will be disabled
	 * 
	 * @param obj the Object
	 * @return <code>true</code> if support this obj;<code>false</code>
	 *         otherwise
	 */
public boolean isSupported(Object obj) {
    if (obj instanceof CubridServer) {
        CubridServer server = (CubridServer) obj;
        ServerInfo serverInfo = server.getServerInfo();
        if (!CompatibleUtil.isSupportNewHAConfFile(serverInfo)) {
            return false;
        }
        ServerUserInfo userInfo = serverInfo.getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) ServerUserInfo(com.cubrid.cubridmanager.core.common.model.ServerUserInfo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer)

Example 13 with ServerUserInfo

use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.

the class ExportBrokerConfigAction method isSupported.

/**
	 * 
	 * Return whether this action support this object,if not support,this action
	 * will be disabled
	 * 
	 * @param obj the Object
	 * @return <code>true</code> if support this obj;<code>false</code>
	 *         otherwise
	 */
public boolean isSupported(Object obj) {
    if (obj instanceof CubridServer) {
        CubridServer server = (CubridServer) obj;
        ServerUserInfo userInfo = server.getServerInfo().getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : ServerUserInfo(com.cubrid.cubridmanager.core.common.model.ServerUserInfo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer)

Example 14 with ServerUserInfo

use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.

the class ExportCubridConfigAction method isSupported.

/**
	 * 
	 * Return whether this action support this object,if not support,this action
	 * will be disabled
	 * 
	 * @param obj the Object
	 * @return <code>true</code> if support this obj;<code>false</code>
	 *         otherwise
	 */
public boolean isSupported(Object obj) {
    if (obj instanceof CubridServer) {
        CubridServer server = (CubridServer) obj;
        ServerUserInfo userInfo = server.getServerInfo().getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : ServerUserInfo(com.cubrid.cubridmanager.core.common.model.ServerUserInfo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer)

Example 15 with ServerUserInfo

use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.

the class ExportHAConfigAction method isSupported.

/**
	 * 
	 * Return whether this action support this object,if not support,this action
	 * will be disabled
	 * 
	 * @param obj the Object
	 * @return <code>true</code> if support this obj;<code>false</code>
	 *         otherwise
	 */
public boolean isSupported(Object obj) {
    if (obj instanceof CubridServer) {
        CubridServer server = (CubridServer) obj;
        ServerInfo serverInfo = server.getServerInfo();
        if (!CompatibleUtil.isSupportNewHAConfFile(serverInfo)) {
            return false;
        }
        ServerUserInfo userInfo = serverInfo.getLoginedUserInfo();
        if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) ServerUserInfo(com.cubrid.cubridmanager.core.common.model.ServerUserInfo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer)

Aggregations

ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)101 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)33 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)23 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)21 CubridServer (com.cubrid.common.ui.spi.model.CubridServer)19 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)18 ArrayList (java.util.ArrayList)16 UpdateCMUserTask (com.cubrid.cubridmanager.core.common.task.UpdateCMUserTask)12 ServerType (com.cubrid.cubridmanager.core.common.model.ServerType)10 DbUserInfo (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfo)10 CubridNodeChangedEvent (com.cubrid.common.ui.spi.event.CubridNodeChangedEvent)9 GetCMUserListTask (com.cubrid.cubridmanager.core.common.task.GetCMUserListTask)8 GetDatabaseListTask (com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask)8 CubridBrokerFolder (com.cubrid.cubridmanager.ui.spi.model.CubridBrokerFolder)8 Map (java.util.Map)8 MonitoringTask (com.cubrid.cubridmanager.core.common.task.MonitoringTask)7 ITask (com.cubrid.common.core.task.ITask)6 BrokerInfos (com.cubrid.cubridmanager.core.broker.model.BrokerInfos)6 GetBrokerConfParameterTask (com.cubrid.cubridmanager.core.broker.task.GetBrokerConfParameterTask)6 GetCMConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCMConfParameterTask)6