From 560e1d63c835d6f9a6d363677389096fedd5cbae Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Tue, 24 Sep 2019 19:28:38 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=A0=B9=E6=8D=AEpr=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E8=BF=9B=E8=A1=8C=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/container/NameObjectCreator.java | 19 ------------------- .../com/fanruan/api/session/SessionKit.java | 13 +++++++++++++ .../java/com/fanruan/api/util/ArrayKit.java | 9 +++++++++ .../java/com/fanruan/api/util/RenderKit.java | 10 ---------- src/main/java/com/fanruan/api/web/WebKit.java | 17 ----------------- 5 files changed, 22 insertions(+), 46 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/design/ui/container/NameObjectCreator.java delete mode 100644 src/main/java/com/fanruan/api/web/WebKit.java diff --git a/src/main/java/com/fanruan/api/design/ui/container/NameObjectCreator.java b/src/main/java/com/fanruan/api/design/ui/container/NameObjectCreator.java deleted file mode 100644 index 3145797..0000000 --- a/src/main/java/com/fanruan/api/design/ui/container/NameObjectCreator.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.fanruan.api.design.ui.container; - -import com.fr.design.beans.BasicBeanPane; - -/** - * 创建一个名称空间对象 - * */ -public class NameObjectCreator extends com.fr.design.gui.controlpane.NameObjectCreator{ - public NameObjectCreator(String menuName, Class clazz, Class updatePane) { - super(menuName, clazz, updatePane); - } - public NameObjectCreator(String menuName, String iconPath, Class clazz) { - super(menuName, iconPath, clazz); - } - - public NameObjectCreator(String menuName, String iconPath, Class clazz, Class updatePane) { - super(menuName, iconPath, clazz, updatePane); - } -} diff --git a/src/main/java/com/fanruan/api/session/SessionKit.java b/src/main/java/com/fanruan/api/session/SessionKit.java index 83b8381..9f0091c 100644 --- a/src/main/java/com/fanruan/api/session/SessionKit.java +++ b/src/main/java/com/fanruan/api/session/SessionKit.java @@ -5,9 +5,13 @@ import com.fr.stable.web.SessionProvider; import com.fr.web.core.ReportSessionIDInfor; import com.fr.web.core.SessionPoolManager; import com.fr.web.session.SessionIDInfo; +import com.fr.web.utils.WebUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + /** * @author richie * @version 10.0 @@ -32,4 +36,13 @@ public class SessionKit { public static NameSpace asNameSpace(String sessionId) { return SessionIDInfo.asNameSpace(sessionId); } + + /** + * 将HTTPServletRequest中的所有参数都读取出来,存储在一个Map中,返回出去 + * @param req 请求 + * @return 参数的map + * */ + public static Map parameters4SessionIDInfor(HttpServletRequest req){ + return WebUtils.parameters4SessionIDInfor(req); + } } diff --git a/src/main/java/com/fanruan/api/util/ArrayKit.java b/src/main/java/com/fanruan/api/util/ArrayKit.java index ed5b319..ac62c64 100644 --- a/src/main/java/com/fanruan/api/util/ArrayKit.java +++ b/src/main/java/com/fanruan/api/util/ArrayKit.java @@ -58,6 +58,15 @@ public class ArrayKit { public static boolean isEmpty(T[] array) { return ArrayUtils.isEmpty(array); } + /** + * 判断数组是否为空 + * + * @param array 源数组 + * @return 返回数组判断为空的结果 + */ + public static boolean isEmpty(boolean[] array) { + return ArrayUtils.isEmpty(array); + } /** * 移除目标数组中对应下标的元素 * diff --git a/src/main/java/com/fanruan/api/util/RenderKit.java b/src/main/java/com/fanruan/api/util/RenderKit.java index ad40f2e..65d27f7 100644 --- a/src/main/java/com/fanruan/api/util/RenderKit.java +++ b/src/main/java/com/fanruan/api/util/RenderKit.java @@ -33,14 +33,4 @@ public class RenderKit { public static String render(String s, Calculator c) throws Exception { return TemplateUtils.render(s, c); } - /** - * 根据参数, 来计算文档字符串 - * @param string 待渲染的文本模板 - * @return 返回渲染后的文本 - * @throws Exception 渲染过程中出现错误则抛出此异常 - */ - public static String render(String string) throws Exception { - return TemplateUtils.render(string); - } - } diff --git a/src/main/java/com/fanruan/api/web/WebKit.java b/src/main/java/com/fanruan/api/web/WebKit.java deleted file mode 100644 index 8d2823a..0000000 --- a/src/main/java/com/fanruan/api/web/WebKit.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.fanruan.api.web; - -import com.fr.web.utils.WebUtils; - -import javax.servlet.http.HttpServletRequest; -import java.util.Map; - -public class WebKit { - /** - * 将HTTPServletRequest中的所有参数都读取出来,存储在一个Map中,返回出去 - * @param req 请求 - * @return 参数的map - * */ - public static Map parameters4SessionIDInfor(HttpServletRequest req){ - return WebUtils.parameters4SessionIDInfor(req); - } -}