From c431e243fe11122e92214f62276b606acb238917 Mon Sep 17 00:00:00 2001 From: "binbin.hou" <1060732496@qq.com> Date: Tue, 7 Jan 2020 13:27:55 +0800 Subject: [PATCH] [Feature] add for new --- .idea/vcs.xml | 6 + doc/issues/issues.md | 31 +----- ...‘é€çš„多线程处ç†.md => v1-åŸºæœ¬æ•æ„Ÿè¯çš„去é‡.md} | 0 doc/issues/v2-åŸºæœ¬æ•æ„Ÿè¯çš„æ ‡ç­¾.md | 2 + doc/issues/v3-其他常è§é‚®ç®±çš„æ”¯æŒ.md | 15 --- doc/issues/v4-针对邮件模æ¿çš„æ”¯æŒ.md | 3 - doc/issues/v5-针对å‘件人池化的实现.md | 10 -- pom.xml | 21 ++-- .../sensitive/word/api/package-info.java | 5 + .../sensitive/word/bs/SensitiveWordBs.java | 103 ++++++++++++++++++ .../houbb/sensitive/word/bs/package-info.java | 5 + .../houbb/sensitive/word/package-info.java | 1 + 12 files changed, 134 insertions(+), 68 deletions(-) create mode 100644 .idea/vcs.xml rename doc/issues/{v6-邮件å‘é€çš„多线程处ç†.md => v1-åŸºæœ¬æ•æ„Ÿè¯çš„去é‡.md} (100%) create mode 100644 doc/issues/v2-åŸºæœ¬æ•æ„Ÿè¯çš„æ ‡ç­¾.md delete mode 100644 doc/issues/v3-其他常è§é‚®ç®±çš„æ”¯æŒ.md delete mode 100644 doc/issues/v4-针对邮件模æ¿çš„æ”¯æŒ.md delete mode 100644 doc/issues/v5-针对å‘件人池化的实现.md create mode 100644 src/main/java/com/github/houbb/sensitive/word/api/package-info.java create mode 100644 src/main/java/com/github/houbb/sensitive/word/bs/SensitiveWordBs.java create mode 100644 src/main/java/com/github/houbb/sensitive/word/bs/package-info.java create mode 100644 src/main/java/com/github/houbb/sensitive/word/package-info.java diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/doc/issues/issues.md b/doc/issues/issues.md index a1d8187..ea49530 100644 --- a/doc/issues/issues.md +++ b/doc/issues/issues.md @@ -1,31 +1,4 @@ -# 多收件人的概念 +# åŒ…å« -## 收件人 -## 抄é€è€… - -## 秘密抄é€è€… - -# 池化 - -## å‘件人 - -类似于线程池,å¯ä»¥è®¾ç½®æ± åŒ–的概念。 - -## å‘é€çš„æ€§èƒ½ - -å‘逿—¶å¤šçº¿ç¨‹æ”¯æŒã€‚ - -# 常è§å…¶ä»–é‚®ç®±æ”¯æŒ - -## 网易 - -## QQ - -## gmail - -qq gmail xxx - -# 对于模æ¿çš„æ”¯æŒ - -FTL 模æ¿çš„æ”¯æŒã€‚ \ No newline at end of file +# filter \ No newline at end of file diff --git a/doc/issues/v6-邮件å‘é€çš„多线程处ç†.md b/doc/issues/v1-åŸºæœ¬æ•æ„Ÿè¯çš„去é‡.md similarity index 100% rename from doc/issues/v6-邮件å‘é€çš„多线程处ç†.md rename to doc/issues/v1-åŸºæœ¬æ•æ„Ÿè¯çš„去é‡.md diff --git a/doc/issues/v2-åŸºæœ¬æ•æ„Ÿè¯çš„æ ‡ç­¾.md b/doc/issues/v2-åŸºæœ¬æ•æ„Ÿè¯çš„æ ‡ç­¾.md new file mode 100644 index 0000000..3681cfd --- /dev/null +++ b/doc/issues/v2-åŸºæœ¬æ•æ„Ÿè¯çš„æ ‡ç­¾.md @@ -0,0 +1,2 @@ +一个è¯å¯ä»¥æœ‰å¤šä¸ªæ ‡ç­¾ã€‚ + diff --git a/doc/issues/v3-其他常è§é‚®ç®±çš„æ”¯æŒ.md b/doc/issues/v3-其他常è§é‚®ç®±çš„æ”¯æŒ.md deleted file mode 100644 index c777b88..0000000 --- a/doc/issues/v3-其他常è§é‚®ç®±çš„æ”¯æŒ.md +++ /dev/null @@ -1,15 +0,0 @@ -# 常è§å…¶ä»–é‚®ç®±æ”¯æŒ - -## 网易 - -## QQ - -## gmail - -## 自定义 - -å…许用户自定义属性é…置。 - -- å¯ä»¥æä¾›å¸¸è§çš„å¸¸é‡ key+value,优化使用体验。 - -- æä¾›é»˜è®¤é‚®ä»¶é…ç½®æ¨¡æ¿ \ No newline at end of file diff --git a/doc/issues/v4-针对邮件模æ¿çš„æ”¯æŒ.md b/doc/issues/v4-针对邮件模æ¿çš„æ”¯æŒ.md deleted file mode 100644 index b3972c6..0000000 --- a/doc/issues/v4-针对邮件模æ¿çš„æ”¯æŒ.md +++ /dev/null @@ -1,3 +0,0 @@ -# 对于模æ¿çš„æ”¯æŒ - -FTL 模æ¿çš„æ”¯æŒã€‚ \ No newline at end of file diff --git a/doc/issues/v5-针对å‘件人池化的实现.md b/doc/issues/v5-针对å‘件人池化的实现.md deleted file mode 100644 index 088cba1..0000000 --- a/doc/issues/v5-针对å‘件人池化的实现.md +++ /dev/null @@ -1,10 +0,0 @@ -# 池化 - -## å‘件人 - -类似于线程池,å¯ä»¥è®¾ç½®æ± åŒ–的概念。 - -## å‘é€çš„æ€§èƒ½ - -å‘逿—¶å¤šçº¿ç¨‹æ”¯æŒã€‚ -。 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 160a97c..fe7808f 100644 --- a/pom.xml +++ b/pom.xml @@ -25,9 +25,8 @@ 1.7 - + 0.1.66 - 1.6.2 4.12 @@ -36,13 +35,13 @@ + + com.github.houbb + heaven + ${heaven.version} + - - com.sun.mail - javax.mail - ${javax.mail.version} - junit @@ -59,6 +58,10 @@ + + com.github.houbb + heaven + @@ -66,10 +69,6 @@ junit - - com.sun.mail - javax.mail - diff --git a/src/main/java/com/github/houbb/sensitive/word/api/package-info.java b/src/main/java/com/github/houbb/sensitive/word/api/package-info.java new file mode 100644 index 0000000..14434b7 --- /dev/null +++ b/src/main/java/com/github/houbb/sensitive/word/api/package-info.java @@ -0,0 +1,5 @@ +/** + * api 定义 + * @since 0.0.1 + */ +package com.github.houbb.sensitive.word.api; \ No newline at end of file diff --git a/src/main/java/com/github/houbb/sensitive/word/bs/SensitiveWordBs.java b/src/main/java/com/github/houbb/sensitive/word/bs/SensitiveWordBs.java new file mode 100644 index 0000000..c7f80bb --- /dev/null +++ b/src/main/java/com/github/houbb/sensitive/word/bs/SensitiveWordBs.java @@ -0,0 +1,103 @@ +package com.github.houbb.sensitive.word.bs; + +import com.github.houbb.heaven.util.lang.StringUtil; +import com.github.houbb.heaven.util.util.CollectionUtil; + +import java.util.List; + +/** + * æ•æ„Ÿè¯å¼•导类 + * @author binbin.hou + * @since 0.0.1 + */ +public class SensitiveWordBs { + + /** + * ç§æœ‰åŒ–构造器 + * @since 0.0.1 + */ + private SensitiveWordBs(){} + + /** + * 待验è¯å­—ç¬¦ä¸²ä¿¡æ¯ + * ps: å¯ä»¥æ·»åŠ å¤šä¸ªè¾…åŠ©ç±» xxxStringProvider + * 如 FileXXX + * @since 0.0.1 + */ + private volatile String target; + + /** + * 新建验è¯å®žä¾‹ + * @param string 字符串 + * @return this + * @since 0.0.1 + */ + public static SensitiveWordBs newInstance(final String string) { + SensitiveWordBs instance = new SensitiveWordBs(); + instance.target = string; + return instance; + } + + /** + * æŒ‡å®šç›®æ ‡å­—ç¬¦ä¸²ä¿¡æ¯ + * @param string 字符串 + * @return this + * @since 0.0.1 + */ + public SensitiveWordBs target(final String string) { + this.target = string; + return this; + } + + /** + * 是å¦åˆæ³• + * @return æ˜¯å¦ + * @since 0.0.1 + * @see #contains() 是å¦åŒ…å« + */ + public boolean valid() { + return !contains(); + } + + /** + * 是å¦åŒ…嫿•æ„Ÿè¯ + * @return æ˜¯å¦ + * @since 0.0.1 + * @see #findAll() 列表ä¸ä¸ºç©ºå³å¯ + */ + public boolean contains() { + return CollectionUtil.isNotEmpty(findAll()); + } + + /** + * è¿”å›žæ‰€æœ‰çš„æ•æ„Ÿè¯ + * 1. 这里是默认去é‡çš„。 + * @return æ•æ„Ÿè¯åˆ—表 + * @since 0.0.1 + */ + public List findAll() { + return null; + } + + /** + * 执行过滤 + * 1. 使用默认策略 + * 2. 默认策略就是直接移除。 + * @return 过滤åŽçš„结果 + * @since 0.0.1 + */ + public String filter() { + return filter(StringUtil.EMPTY); + } + + /** + * 指定过滤的字符,执行过滤 + * 1. filter åªæ˜¯ä¸€ç§ç‰¹æ®Šçš„字符串替æ¢ç­–略。 + * @return 过滤åŽçš„结果 + * @since 0.0.1 + */ + public String filter(final String filter) { + return ""; + } + +} diff --git a/src/main/java/com/github/houbb/sensitive/word/bs/package-info.java b/src/main/java/com/github/houbb/sensitive/word/bs/package-info.java new file mode 100644 index 0000000..e6f6053 --- /dev/null +++ b/src/main/java/com/github/houbb/sensitive/word/bs/package-info.java @@ -0,0 +1,5 @@ +/** + * 引导类定义 + * @since 0.0.1 + */ +package com.github.houbb.sensitive.word.bs; \ No newline at end of file diff --git a/src/main/java/com/github/houbb/sensitive/word/package-info.java b/src/main/java/com/github/houbb/sensitive/word/package-info.java new file mode 100644 index 0000000..ce67093 --- /dev/null +++ b/src/main/java/com/github/houbb/sensitive/word/package-info.java @@ -0,0 +1 @@ +package com.github.houbb.sensitive.word; \ No newline at end of file