use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class AddShardAction method isSupported.
/**
*
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj
* the object
* @return <code>true</code> if support this object;<code>false</code>
* otherwise
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo != null && userInfo.getDbCreateAuthType() == DbCreateAuthType.AUTH_ADMIN) {
return true;
}
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowShardStatusAction 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 supported;<code>false</code>
*/
public boolean isSupported(Object obj) {
if (obj instanceof CubridShardFolder) {
CubridShardFolder selection = ((CubridShardFolder) obj);
if (!selection.isEnable()) {
return false;
}
ServerUserInfo userInfo = selection.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (CasAuthType.AUTH_ADMIN != userInfo.getCasAuth() && CasAuthType.AUTH_MONITOR != userInfo.getCasAuth())) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowBrokerEnvStatusAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj the object
* @return <code>true</code> if supported;<code>false</code>
*/
public boolean isSupported(Object obj) {
if (obj instanceof CubridBrokerFolder) {
CubridBrokerFolder selection = ((CubridBrokerFolder) obj);
ServerUserInfo userInfo = selection.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (CasAuthType.AUTH_ADMIN != userInfo.getCasAuth() && CasAuthType.AUTH_MONITOR != userInfo.getCasAuth())) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowBrokerStatusAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj the object
* @return <code>true</code> if supported;<code>false</code>
*/
public boolean isSupported(Object obj) {
if (obj instanceof CubridBroker) {
CubridBroker selection = ((CubridBroker) obj);
ServerUserInfo userInfo = selection.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (CasAuthType.AUTH_ADMIN != userInfo.getCasAuth() && CasAuthType.AUTH_MONITOR != userInfo.getCasAuth())) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class StartBrokerAction method isSupportedNode.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj the object
* @return <code>true</code> if supported;<code>false</code>
*/
public static boolean isSupportedNode(Object obj) {
if (obj instanceof CubridBroker) {
CubridBroker selection = ((CubridBroker) obj);
ServerUserInfo userInfo = selection.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || CasAuthType.AUTH_ADMIN != userInfo.getCasAuth()) {
return false;
}
CubridBrokerFolder parent = (CubridBrokerFolder) (selection.getParent());
return parent.isRunning() && !selection.isRunning();
}
return false;
}
Aggregations