com.fastchar.extjs.systemtool.provider.FastBaseMenuProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-extjs-systemtool Show documentation
Show all versions of fastchar-extjs-systemtool Show documentation
FastChar-ExtJs-SystemTool is a FastChar-ExtJs plugin.
The newest version!
package com.fastchar.extjs.systemtool.provider;
import com.fastchar.core.FastChar;
import com.fastchar.extjs.systemtool.FastSystemToolConfig;
import com.fastchar.job.quartz.FastQuartzConfig;
import com.fastchar.utils.FastClassUtils;
/**
* @author 沈建(Janesen)
*/
public class FastBaseMenuProvider {
public Boolean onShowMenu(String menuTitle) {
FastSystemToolConfig config = FastChar.getConfig(FastSystemToolConfig.class);
if (menuTitle.equals("任务计划日志")) {
if (!config.isLogJob()) {
return false;
}
if (FastClassUtils.getClass("com.fastchar.job.FastJob", false) == null) {
return false;
}
}
if (menuTitle.equals("系统HTTP日志")) {
if (!config.isLogHttp()) {
return false;
}
if (FastClassUtils.getClass("com.fastchar.http.core.FastHttpRequest", false) == null) {
return false;
}
}
if (menuTitle.equals("系统WebDriver日志")) {
if (!config.isLogSelenium()) {
return false;
}
if (FastClassUtils.getClass("com.fastchar.selenium.FastSeleniumConfig", false) == null) {
return false;
}
}
if (menuTitle.equals("系统Socket连接列表")
|| menuTitle.equals("系统Socket消息日志")) {
if (!config.isLogSocket()) {
return false;
}
if (FastClassUtils.getClass("com.fastchar.socket.FastSocketServerConfig", false) == null) {
return false;
}
}
if (menuTitle.equals("任务计划日志")) {
if (!config.isLogJob()) {
return false;
}
return FastChar.getConfig(FastQuartzConfig.class).isUseDatabase();
}
if (menuTitle.equals("系统请求日志")) {
return config.isLogActionRequest();
}
if (menuTitle.equals("系统SQL日志")) {
return config.isLogSql();
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy