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.
 
 

46 lines
1.4 KiB

/*
* Copyright (C), 2015-2019
* FileName: RequestHandlerBridge
* Author: xx
* Date: 2019/8/17 22:20
* Description: RequestHandlerBridge
* History:
* <author> <time> <version> <desc>
*/
package com.fr.plugin.tabledataservice.request;
import com.fanruan.api.i18n.I18nKit;
import com.fanruan.api.log.LogKit;
import com.fr.decision.fun.impl.AbstractHttpHandlerProvider;
import com.fr.decision.fun.impl.BaseHttpHandler;
import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.tabledataservice.ConfigTableDataService;
import com.fr.plugin.tabledataservice.Constants;
import com.fr.stable.fun.Authorize;
/**
* 〈Function Description〉<br>
* 〈RequestHandlerBridge〉
*
* @author xx
* @since 1.0.0
*/
@Authorize(callSignKey = Constants.PLUGIN_ID)
public class RequestHandlerBridge extends AbstractHttpHandlerProvider {
public RequestHandlerBridge() {
ConfigTableDataService.getInstance();
}
@Override
public BaseHttpHandler[] registerHandlers() {
if (PluginContexts.currentContext().isAvailable()) {
return new BaseHttpHandler[]{
new TableDataHandler(),
new ReportDataHandler()
};
} else {
LogKit.error(I18nKit.getLocText("Plugin-tabledataservice_Licence_Expired"));
return new BaseHttpHandler[]{};
}
}
}