You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/05/21 09:04:09 UTC

[2/5] git commit: Cleans up after moving to package

Cleans up after moving to package


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

Branch: refs/heads/feature/exclude-object-class
Commit: ec98c8a95beb58fface26371b5ae3829493259f5
Parents: 7faf91a
Author: Lukasz Lenart <lu...@apache.org>
Authored: Mon May 19 10:08:30 2014 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Mon May 19 10:08:30 2014 +0200

----------------------------------------------------------------------
 .../xwork2/ExcludedPatternsChecker.java         | 82 --------------------
 .../DefaultExcludedPatternsChecker.java         |  2 +-
 2 files changed, 1 insertion(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/ec98c8a9/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
deleted file mode 100644
index ac0ff6e..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatternsChecker.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.opensymphony.xwork2;
-
-import java.util.Set;
-import java.util.regex.Pattern;
-
-/**
- * Used across different interceptors to check if given string matches one of the excluded patterns.
- */
-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;
-        private final Pattern excludedPattern;
-
-        public static IsExcluded yes(Pattern excludedPattern) {
-            return new IsExcluded(true, excludedPattern);
-        }
-
-        public static IsExcluded no() {
-            return new IsExcluded(false, null);
-        }
-
-        private IsExcluded(boolean excluded, Pattern excludedPattern) {
-            this.excluded = excluded;
-            this.excludedPattern = excludedPattern;
-        }
-
-        public boolean isExcluded() {
-            return excluded;
-        }
-
-        public Pattern getExcludedPattern() {
-            return excludedPattern;
-        }
-
-        @Override
-        public String toString() {
-            return "IsExcluded { " +
-                    "excluded=" + excluded +
-                    ", excludedPattern=" + excludedPattern +
-                    " }";
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/ec98c8a9/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index f2abed6..53854d3 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -11,7 +11,7 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.regex.Pattern;
 
-public class DefaultExcludedPatternsChecker implements com.opensymphony.xwork2.ExcludedPatternsChecker {
+public class DefaultExcludedPatternsChecker implements ExcludedPatternsChecker {
 
     private static final Logger LOG = LoggerFactory.getLogger(DefaultExcludedPatternsChecker.class);