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.
39 lines
1.5 KiB
39 lines
1.5 KiB
2 years ago
|
package com.hzdatalink.gsdes;
|
||
|
|
||
|
import com.fr.intelli.record.Focus;
|
||
|
import com.fr.intelli.record.Original;
|
||
|
import com.fr.io.collection.ExportCollection;
|
||
|
import com.fr.io.exporter.AppExporter;
|
||
|
import com.fr.plugin.context.PluginContexts;
|
||
|
import com.fr.plugin.transform.FunctionRecorder;
|
||
|
import com.fr.record.analyzer.EnableMetrics;
|
||
|
import com.fr.stable.fun.Authorize;
|
||
|
import com.fr.web.core.ReportSessionIDInfor;
|
||
|
import com.fr.web.core.reserve.DefaultExportExtension;
|
||
|
import com.hzdatalink.gsdes.export.EncryptExporter;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
/**
|
||
|
* @Author xx
|
||
|
* @Date 2021/11/23
|
||
|
* @Description
|
||
|
**/
|
||
|
@FunctionRecorder
|
||
|
@Authorize(callSignKey = Constants.PLUGIN_ID)
|
||
|
@EnableMetrics
|
||
|
public class EncodeExportExtensionProvider extends DefaultExportExtension {
|
||
|
|
||
|
@Override
|
||
|
@Focus(id = Constants.PLUGIN_ID, text = "xx加密", source = Original.PLUGIN)
|
||
|
public ExportCollection createCollection(HttpServletRequest req, HttpServletResponse res,
|
||
|
ReportSessionIDInfor info, String format, String filename, boolean isEmbed) throws Exception {
|
||
|
ExportCollection collection = super.createCollection(req, res, info, format, filename, isEmbed);
|
||
|
AppExporter exporter = collection.getExporter();
|
||
|
if (PluginContexts.currentContext().isAvailable()) {
|
||
|
collection.setExporter(new EncryptExporter(exporter));
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
}
|