com.fastchar.systemtool.provider.FastJobMenuProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-systemtool Show documentation
Show all versions of fastchar-systemtool Show documentation
FastChar-SystemTool is a FastChar-ExtJs plugin.
package com.fastchar.systemtool.provider;
import com.fastchar.annotation.AFastClassFind;
import com.fastchar.core.FastChar;
import com.fastchar.extjs.core.menus.FastMenuInfo;
import com.fastchar.extjs.interfaces.IFastMenuListener;
import com.fastchar.job.quartz.FastQuartzConfig;
import com.fastchar.systemtool.FastSystemToolConfig;
/**
* @author 沈建(Janesen)
* @date 2021/6/3 15:47
*/
@AFastClassFind("com.fastchar.job.FastJob")
public class FastJobMenuProvider implements IFastMenuListener {
@Override
public boolean onAddMenu(FastMenuInfo menuInfo) {
FastSystemToolConfig config = FastChar.getConfig(FastSystemToolConfig.class);
if (menuInfo.getText().equals("任务计划日志")) {
if (!config.isLogJob()) {
return false;
}
return FastChar.getConfig(FastQuartzConfig.class).isUseDatabase();
}
return true;
}
}