All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fastchar.systemtool.provider.FastJobMenuProvider Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy