forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r488485 - /forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
Date Tue, 19 Dec 2006 01:27:20 GMT
Author: rgardler
Date: Mon Dec 18 17:27:19 2006
New Revision: 488485

URL: http://svn.apache.org/viewvc?view=rev&rev=488485
Log:
Start of a wildcard matcher - it doesn't actually implement anything yet, it is essentially
a matcher that will always return the source URI supplied to it. It is useful as a "pass through"
matcher

Added:
    forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
  (with props)

Added: forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java?view=auto&rev=488485
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
(added)
+++ forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
Mon Dec 18 17:27:19 2006
@@ -0,0 +1,38 @@
+package org.apache.forrest.core.matcher;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.apache.forrest.core.exception.ProcessingException;
+import org.apache.log4j.Logger;
+
+import com.sun.org.apache.regexp.internal.RE;
+import com.sun.org.apache.regexp.internal.RESyntaxException;
+
+/**
+ * A Wildcard Matcher is based on Cocoons Widcard Matcher.
+ * 
+ * @TODO actual implement something useful rather than always
+ * return true
+ */
+public class WildcardMatcher extends AbstractMatcher {
+
+	Logger log = Logger.getLogger(WildcardMatcher.class);
+
+	/**
+	 * Create an REMatcher using the supplied Regular Expression.
+	 * 
+	 * @param pattern
+	 */
+	public WildcardMatcher(String pattern) {
+		this.setPattern(pattern);
+	}
+
+	@Override
+	public URI substituteVariables(URI requestURI, URI sourceURI)
+			throws ProcessingException {
+		return sourceURI;
+	}
+
+}

Propchange: forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/matcher/WildcardMatcher.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message