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); + } + } +}