From fa0421f466194742477bb2548a404419c4bafe37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 27 Aug 2020 18:06:19 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-4017=20H5=E6=8F=92=E4=BB=B6=E5=8E=BB?= =?UTF-8?q?=E6=8E=89FMobileLicUtils=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/util/LicKit.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/com/fanruan/api/util/LicKit.java diff --git a/src/main/java/com/fanruan/api/util/LicKit.java b/src/main/java/com/fanruan/api/util/LicKit.java new file mode 100644 index 0000000..434e8f9 --- /dev/null +++ b/src/main/java/com/fanruan/api/util/LicKit.java @@ -0,0 +1,21 @@ +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; + +public class LicKit { + public LicKit() { + } + + public static JSONObject getJsonFromLic() { + return FRCoreContext.getLicense().getJSONObject(); + } + + public static void checkFunctionPointSupport(FunctionPoint point) { + if (!point.isSupport()) { + throw new RegistEditionException(point); + } + } +}