插件开发工具库,推荐依赖该工具库。
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.
 
 

32 lines
794 B

package com.fanruan.api.util;
import com.fr.json.JSONObject;
import com.fr.license.exception.RegistEditionException;
import com.fr.regist.FRCoreContext;
import com.fr.regist.FunctionPoint;
/**
* 获取Lic相关信息的类
*/
public class LicKit {
public LicKit() {
}
/**
* 获取Lic的JSON信息
* @return JSONObject
*/
public static JSONObject getJsonFromLic() {
return FRCoreContext.getLicense().getJSONObject();
}
/**
* 检查某个功能点的lic权限,如果没有权限就跳转到没有lic权限的报错页面
* @param point 功能点
*/
public static void checkFunctionPointSupport(FunctionPoint point) {
if (!point.isSupport()) {
throw new RegistEditionException(point);
}
}
}