struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [30/50] git commit: Adds additional methods needed by ParametersInterceptor
Date Fri, 27 Jun 2014 11:23:58 GMT
Adds additional methods needed by ParametersInterceptor


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3d77c348
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3d77c348
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3d77c348

Branch: refs/heads/feature/WW-4295-localization
Commit: 3d77c348b15f438c5dcab9790daacfd4d43cd02b
Parents: e8e5b51
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Wed May 14 08:25:22 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Wed May 14 08:25:22 2014 +0200

----------------------------------------------------------------------
 .../xwork2/DefaultExcludedPatternsChecker.java  | 19 +++--------
 .../xwork2/ExcludedPatternsChecker.java         | 35 ++++++++++++++++++++
 2 files changed, 39 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/3d77c348/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultExcludedPatternsChecker.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultExcludedPatternsChecker.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultExcludedPatternsChecker.java
index 3860e57..eabd621 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultExcludedPatternsChecker.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultExcludedPatternsChecker.java
@@ -46,29 +46,14 @@ public class DefaultExcludedPatternsChecker implements ExcludedPatternsChecker
{
         }
     }
 
-    /**
-     * Allows add additional excluded patterns during runtime
-     *
-     * @param commaDelimitedPatterns comma delimited string with patterns
-     */
     public void addExcludedPatterns(String commaDelimitedPatterns) {
         addExcludedPatterns(TextParseUtil.commaDelimitedStringToSet(commaDelimitedPatterns));
     }
 
-    /**
-     * Allows add additional excluded patterns during runtime
-     *
-     * @param additionalPatterns array of additional excluded patterns
-     */
     public void addExcludedPatterns(String[] additionalPatterns) {
         addExcludedPatterns(new HashSet<String>(Arrays.asList(additionalPatterns)));
     }
 
-    /**
-     * Allows add additional excluded patterns during runtime
-     *
-     * @param additionalPatterns set of additional patterns
-     */
     public void addExcludedPatterns(Set<String> additionalPatterns) {
         if (LOG.isTraceEnabled()) {
             LOG.trace("Adding additional excluded patterns [#0]", additionalPatterns);
@@ -90,4 +75,8 @@ public class DefaultExcludedPatternsChecker implements ExcludedPatternsChecker
{
         return IsExcluded.no();
     }
 
+    public Set<Pattern> getExcludedPatterns() {
+        return excludedPatterns;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/3d77c348/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
index c4730ea..ac0ff6e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
@@ -1,5 +1,6 @@
 package com.opensymphony.xwork2;
 
+import java.util.Set;
 import java.util.regex.Pattern;
 
 /**
@@ -7,8 +8,42 @@ import java.util.regex.Pattern;
  */
 public interface ExcludedPatternsChecker {
 
+    /**
+     * Checks if value matches any of patterns on exclude list
+     *
+     * @param value to check
+     * @return object containing result of matched pattern and pattern itself
+     */
     public IsExcluded isExcluded(String value);
 
+    /**
+     * Allows add additional excluded patterns during runtime
+     *
+     * @param commaDelimitedPatterns comma delimited string with patterns
+     */
+    public void addExcludedPatterns(String commaDelimitedPatterns);
+
+    /**
+     * Allows add additional excluded patterns during runtime
+     *
+     * @param additionalPatterns array of additional excluded patterns
+     */
+    public void addExcludedPatterns(String[] additionalPatterns);
+
+    /**
+     * Allows add additional excluded patterns during runtime
+     *
+     * @param additionalPatterns set of additional patterns
+     */
+    public void addExcludedPatterns(Set<String> additionalPatterns);
+
+    /**
+     * Allow access list of all defined excluded patterns
+     *
+     * @return set of excluded patterns
+     */
+    public Set<Pattern> getExcludedPatterns();
+
     public final static class IsExcluded {
 
         private final boolean excluded;


Mime
View raw message