From 635e03f693adc5933f3cafd925083c63ef7a5fca Mon Sep 17 00:00:00 2001 From: Palin Date: Sat, 7 Sep 2019 13:25:39 +0800 Subject: [PATCH] =?UTF-8?q?finkit=E5=88=9D=E6=AC=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/design/ui/container/ReportletPane.java | 4 ++++ .../com/fanruan/api/err/ValidationException.java | 4 ++++ .../java/com/fanruan/api/function/FunctionKit.java | 6 ++++++ src/main/java/com/fanruan/api/net/NetworkKit.java | 6 ++++++ .../java/com/fanruan/api/newer/NodeVisitor.java | 4 ++++ .../com/fanruan/api/newer/RHFunctionProcessor.java | 4 ++++ .../fanruan/api/newer/TemplateSessionIDInfo.java | 4 ++++ src/main/java/com/fanruan/api/util/RenderKit.java | 13 +++++++++++++ 8 files changed, 45 insertions(+) create mode 100644 src/main/java/com/fanruan/api/design/ui/container/ReportletPane.java create mode 100644 src/main/java/com/fanruan/api/err/ValidationException.java create mode 100644 src/main/java/com/fanruan/api/newer/NodeVisitor.java create mode 100644 src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java create mode 100644 src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java diff --git a/src/main/java/com/fanruan/api/design/ui/container/ReportletPane.java b/src/main/java/com/fanruan/api/design/ui/container/ReportletPane.java new file mode 100644 index 0000000..4337dcd --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/ReportletPane.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.ui.container; + +public class ReportletPane extends com.fr.design.gui.itree.filetree.ReportletPane { +} diff --git a/src/main/java/com/fanruan/api/err/ValidationException.java b/src/main/java/com/fanruan/api/err/ValidationException.java new file mode 100644 index 0000000..1d8fcad --- /dev/null +++ b/src/main/java/com/fanruan/api/err/ValidationException.java @@ -0,0 +1,4 @@ +package com.fanruan.api.err; + +public abstract class ValidationException extends com.fr.design.Exception.ValidationException { +} diff --git a/src/main/java/com/fanruan/api/function/FunctionKit.java b/src/main/java/com/fanruan/api/function/FunctionKit.java index 68eaa19..adb5419 100644 --- a/src/main/java/com/fanruan/api/function/FunctionKit.java +++ b/src/main/java/com/fanruan/api/function/FunctionKit.java @@ -7,6 +7,7 @@ import com.fr.file.FunctionManager; import com.fr.file.FunctionManagerProvider; import com.fr.script.Calculator; import com.fr.stable.StringUtils; +import com.fr.stable.fun.FunctionHelper; import com.fr.stable.script.FunctionDef; import java.util.ArrayList; @@ -84,4 +85,9 @@ public class FunctionKit { public static com.fr.file.FunctionManager getInstance() { return com.fr.file.FunctionManager.getInstance(); } + + public static int generateFunctionID(String var0) { + return FunctionHelper.generateFunctionID(var0); + } + } \ No newline at end of file diff --git a/src/main/java/com/fanruan/api/net/NetworkKit.java b/src/main/java/com/fanruan/api/net/NetworkKit.java index d534934..ebc52ef 100644 --- a/src/main/java/com/fanruan/api/net/NetworkKit.java +++ b/src/main/java/com/fanruan/api/net/NetworkKit.java @@ -1,5 +1,6 @@ package com.fanruan.api.net; +import com.fr.base.ServerConfig; import com.fr.data.NetworkHelper; import org.jetbrains.annotations.Nullable; @@ -117,4 +118,9 @@ public class NetworkKit { public static @Nullable String getHTTPRequestParameter(HttpServletRequest req, String... paraNames) { return NetworkHelper.getHTTPRequestParameter(req, paraNames); } + + + public static String createServletURL(HttpServletRequest req) { + return NetworkHelper.createServletURL(req, ServerConfig.getInstance().getServletName()); + } } diff --git a/src/main/java/com/fanruan/api/newer/NodeVisitor.java b/src/main/java/com/fanruan/api/newer/NodeVisitor.java new file mode 100644 index 0000000..3abc52c --- /dev/null +++ b/src/main/java/com/fanruan/api/newer/NodeVisitor.java @@ -0,0 +1,4 @@ +package com.fanruan.api.newer; + +public abstract class NodeVisitor extends com.fr.stable.core.NodeVisitor { +} diff --git a/src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java b/src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java new file mode 100644 index 0000000..374e5cf --- /dev/null +++ b/src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java @@ -0,0 +1,4 @@ +package com.fanruan.api.newer; + +public abstract class RHFunctionProcessor extends com.fr.plugin.form.widget.monitor.RHFunctionProcessor { +} diff --git a/src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java b/src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java new file mode 100644 index 0000000..160fdcd --- /dev/null +++ b/src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java @@ -0,0 +1,4 @@ +package com.fanruan.api.newer; + +public abstract class TemplateSessionIDInfo extends com.fr.web.core.TemplateSessionIDInfo { +} diff --git a/src/main/java/com/fanruan/api/util/RenderKit.java b/src/main/java/com/fanruan/api/util/RenderKit.java index 3858679..cf5311c 100644 --- a/src/main/java/com/fanruan/api/util/RenderKit.java +++ b/src/main/java/com/fanruan/api/util/RenderKit.java @@ -1,6 +1,7 @@ package com.fanruan.api.util; import com.fr.base.TemplateUtils; +import com.fr.script.Calculator; import java.util.Map; @@ -19,4 +20,16 @@ public class RenderKit { public static String renderParameter4Tpl(String text, Map map) throws Exception { return TemplateUtils.renderParameter4Tpl(text, map); } + + /** + * 根据参数, 来计算文档字符串 + * @param var0 待渲染的文本模板 + * @param var1 参数集合 + * @return 返回渲染后的文本 + * @throws Exception 渲染过程中出现错误则抛出此异常 + */ + public static String render(String var0, Calculator var1) throws Exception { + return TemplateUtils.render(var0, var1); + } + }