use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class DeleteStatusMonitorTemplateAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @param obj Object
* @return boolean true if suppoorted , false otherwise
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (!CubridNodeType.STATUS_MONITOR_TEMPLATE.equals(node.getType())) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || StatusMonitorAuthType.AUTH_ADMIN != userInfo.getStatusMonitorAuth()) {
return false;
}
return true;
} else if (obj instanceof Object[]) {
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class EditMonitorInstanceAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @param obj Object the given object
* @return boolean true if is supported , false otherwise
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (!CubridNodeType.STATUS_MONITOR_TEMPLATE.equals(node.getType())) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || StatusMonitorAuthType.AUTH_ADMIN != userInfo.getStatusMonitorAuth()) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowDatabaseMonitorHistoryAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @param obj Object
* @return boolean true if supported , false otherwise
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (!CubridNodeType.MONITOR_FOLDER.equals(node.getType())) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (StatusMonitorAuthType.AUTH_ADMIN != userInfo.getStatusMonitorAuth() && StatusMonitorAuthType.AUTH_MONITOR != userInfo.getStatusMonitorAuth())) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowHostSystemMonitorHistoryAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @param obj Object
* @return boolean true if supported , false otherwise
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (!CubridNodeType.MONITOR_FOLDER.equals(node.getType())) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (StatusMonitorAuthType.AUTH_ADMIN != userInfo.getStatusMonitorAuth() && StatusMonitorAuthType.AUTH_MONITOR != userInfo.getStatusMonitorAuth())) {
return false;
}
return true;
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ShowStatusMonitorAction method isSupported.
/**
* Return whether this action support this object,if not support,this action
* will be disabled
*
* @param obj Object
* @return boolean true if supported , false otherwise
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (!CubridNodeType.STATUS_MONITOR_TEMPLATE.equals(node.getType())) {
return false;
}
ServerUserInfo userInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (userInfo == null || (StatusMonitorAuthType.AUTH_ADMIN != userInfo.getStatusMonitorAuth() && StatusMonitorAuthType.AUTH_MONITOR != userInfo.getStatusMonitorAuth())) {
return false;
}
return true;
}
return false;
}
Aggregations