You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
2 years ago
|
/*
|
||
|
* Copyright (C), 2018-2021
|
||
|
* Project: starter
|
||
|
* FileName: PluginMonitor
|
||
|
* Author: xx
|
||
|
* Date: 2022/12/18 20:10
|
||
|
*/
|
||
|
package com.fr.plugin.akfgp;
|
||
|
|
||
|
import com.fr.plugin.akfgp.format.OutputExcelPlus;
|
||
|
import com.fr.plugin.context.PluginContext;
|
||
|
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor;
|
||
|
import com.fr.schedule.extension.report.job.output.BaseOutputFormat;
|
||
|
import com.fr.schedule.extension.report.job.output.OutputExcel;
|
||
|
|
||
|
import static com.fr.plugin.akfgp.format.OutputExcelPlus.CONVERT_TO_EXCEL_PLUS;
|
||
|
import static com.fr.schedule.extension.report.job.output.OutputExcel.CONVERT_TO_EXCEL;
|
||
|
|
||
|
/**
|
||
|
* <Function Description><br>
|
||
|
* <PluginMonitor>
|
||
|
*
|
||
|
* @author xx
|
||
|
* @since 1.0.0
|
||
|
*/
|
||
|
public class PluginMonitor extends AbstractPluginLifecycleMonitor {
|
||
|
public PluginMonitor() {
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void afterRun(PluginContext pluginContext) {
|
||
|
BaseOutputFormat.removeOutputFormat(CONVERT_TO_EXCEL_PLUS);
|
||
|
BaseOutputFormat.registerOutputFormat(new OutputExcelPlus());
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void beforeStop(PluginContext pluginContext) {
|
||
|
BaseOutputFormat.removeOutputFormat(CONVERT_TO_EXCEL);
|
||
|
BaseOutputFormat.registerOutputFormat(new OutputExcel());
|
||
|
}
|
||
|
}
|