cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1080705 - in /cxf/trunk: rt/core/src/test/java/org/apache/cxf/bus/extension/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/ rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/ rt/management-web/...
Date Fri, 11 Mar 2011 18:00:25 GMT
Author: dkulp
Date: Fri Mar 11 18:00:25 2011
New Revision: 1080705

URL: http://svn.apache.org/viewvc?rev=1080705&view=rev
Log:
Set svn properties

Modified:
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt   (contents, props changed)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java   (contents, props changed)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java   (contents, props changed)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java   (contents, props changed)
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java   (props changed)
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java   (props changed)
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java   (props changed)
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java   (contents, props changed)
    cxf/trunk/rt/ws/security/src/test/resources/saml1_sv.properties   (props changed)
    cxf/trunk/rt/ws/security/src/test/resources/saml2_hok.properties   (props changed)
    cxf/trunk/rt/ws/security/src/test/resources/saml2_sv.properties   (props changed)
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/ResponseInterceptorType.java   (props changed)
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespBreakElementCountThreshold.xml   (props changed)
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java   (props changed)
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java   (props changed)
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties   (props changed)
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml   (props changed)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusExtensionLoadingTest.java   (props changed)
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/simple/Caculator.java   (props changed)

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt?rev=1080705&r1=1080704&r2=1080705&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt Fri Mar 11 18:00:25 2011
@@ -1,5 +1,5 @@
-# Comment
- # Comment2
-org.apache.cxf.foo.FooImpl:org.apache.cxf.foo.Foo
-java.lang.Boolean::true
-java.lang.Long::true
+# Comment
+ # Comment2
+org.apache.cxf.foo.FooImpl:org.apache.cxf.foo.Foo
+java.lang.Boolean::true
+java.lang.Long::true

Propchange: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java?rev=1080705&r1=1080704&r2=1080705&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java Fri Mar 11 18:00:25 2011
@@ -1,259 +1,259 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.jaxrs.ext.search.client;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.xml.datatype.Duration;
-
-import org.apache.cxf.jaxrs.ext.search.FiqlParser;
-
-/**
- * Builds client-side search condition that passed to backend can be consumed by {@link FiqlParser}.
- * <p>
- * Examples:
- * 
- * <pre>
- * FiqlSearchConditionBuilder b = new FiqlSearchConditionBuilder();
- * b.query().is(&quot;price&quot;).equalTo(123.5).build();
- * // gives &quot;price==123.5&quot;
- * b.query().is(&quot;price&quot;).greaterThan(30).and().is(&quot;price&quot;).lessThan(50).build();
- * // gives &quot;price=gt=30.0;price=lt=50.0&quot;
- * </pre>
- * 
- * For very complex junctions nested "and"/"or" are allowed (breaking a bit fluency of interface) and looks
- * like the following example:
- * 
- * <pre>
- * PartialCondition c = b.query();
- * c.is("price").lessThan(100).and().or(
- *      c.is("title").equalTo("The lord*"), 
- *      c.is("author").equalTo("R.R.Tolkien")).build();
- * // gives "price=lt=100.0;(title==The lord*,author==R.R.Tolkien)"
- * </pre>
- */
-public class FiqlSearchConditionBuilder implements SearchConditionBuilder {
-
-    public String build() {
-        return "";
-    }
-
-    public PartialCondition query() {
-        return new Builder();
-    }
-
-    private static class Builder implements SearchConditionBuilder.Property,
-        SearchConditionBuilder.CompleteCondition, SearchConditionBuilder.PartialCondition {
-        private String result = "";
-        private Builder parent;
-        private DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-
-        public Builder() {
-            parent = null;
-        }
-
-        public Builder(Builder parent) {
-            this.parent = parent;
-        }
-
-        public String build() {
-            return buildPartial(null);
-            // if (parent != null) {
-            // return parent.build() + result;
-            // } else {
-            // return result;
-            // }
-        }
-
-        // builds from parent but not further then exclude builder
-        private String buildPartial(Builder exclude) {
-            if (parent != null && !parent.equals(exclude)) {
-                return parent.buildPartial(exclude) + result;
-            } else {
-                return result;
-            }
-        }
-
-        public CompleteCondition after(Date date) {
-            result += FiqlParser.GT + toString(date);
-            return this;
-        }
-
-        public CompleteCondition before(Date date) {
-            result += FiqlParser.LT + toString(date);
-            return this;
-        }
-
-        public CompleteCondition equalTo(String literalOrPattern) {
-            result += FiqlParser.EQ + literalOrPattern;
-            return this;
-        }
-
-        public CompleteCondition equalTo(double number) {
-            result += FiqlParser.EQ + number;
-            return this;
-        }
-
-        public CompleteCondition equalTo(Date date) {
-            result += FiqlParser.EQ + toString(date);
-            return this;
-        }
-
-        public CompleteCondition greaterOrEqualTo(double number) {
-            result += FiqlParser.GE + number;
-            return this;
-        }
-
-        public CompleteCondition greaterThan(double number) {
-            result += FiqlParser.GT + number;
-            return this;
-        }
-
-        public CompleteCondition lessOrEqualTo(double number) {
-            result += FiqlParser.LE + number;
-            return this;
-        }
-
-        public CompleteCondition lessThan(double number) {
-            result += FiqlParser.LT + number;
-            return this;
-        }
-
-        public CompleteCondition lexicalAfter(String literal) {
-            result += FiqlParser.GT + literal;
-            return this;
-        }
-
-        public CompleteCondition lexicalBefore(String literal) {
-            result += FiqlParser.LT + literal;
-            return this;
-        }
-
-        public CompleteCondition lexicalNotAfter(String literal) {
-            result += FiqlParser.LE + literal;
-            return this;
-        }
-
-        public CompleteCondition lexicalNotBefore(String literal) {
-            result += FiqlParser.GE + literal;
-            return this;
-        }
-
-        public CompleteCondition notAfter(Date date) {
-            result += FiqlParser.LE + toString(date);
-            return this;
-        }
-
-        public CompleteCondition notBefore(Date date) {
-            result += FiqlParser.GE + toString(date);
-            return this;
-        }
-
-        public CompleteCondition notEqualTo(String literalOrPattern) {
-            result += FiqlParser.NEQ + literalOrPattern;
-            return this;
-        }
-
-        public CompleteCondition notEqualTo(double number) {
-            result += FiqlParser.NEQ + number;
-            return this;
-        }
-
-        public CompleteCondition notEqualTo(Date date) {
-            result += FiqlParser.NEQ + toString(date);
-            return this;
-        }
-
-        public CompleteCondition after(Duration distanceFromNow) {
-            result += FiqlParser.GT + distanceFromNow;
-            return this;
-        }
-
-        public CompleteCondition before(Duration distanceFromNow) {
-            result += FiqlParser.LT + distanceFromNow;
-            return this;
-        }
-
-        public CompleteCondition equalTo(Duration distanceFromNow) {
-            result += FiqlParser.EQ + distanceFromNow;
-            return this;
-        }
-
-        public CompleteCondition notAfter(Duration distanceFromNow) {
-            result += FiqlParser.LE + distanceFromNow;
-            return this;
-        }
-
-        public CompleteCondition notBefore(Duration distanceFromNow) {
-            result += FiqlParser.GE + distanceFromNow;
-            return this;
-        }
-
-        public CompleteCondition notEqualTo(Duration distanceFromNow) {
-            result += FiqlParser.NEQ + distanceFromNow;
-            return this;
-        }
-
-        public PartialCondition and() {
-            result += FiqlParser.AND;
-            return this;
-        }
-
-        public PartialCondition or() {
-            result += FiqlParser.OR;
-            return this;
-        }
-
-        public CompleteCondition and(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn) {
-            result += "(" + ((Builder)c1).buildPartial(this) + FiqlParser.AND
-                      + ((Builder)c2).buildPartial(this);
-            for (CompleteCondition c : cn) {
-                result += FiqlParser.AND + ((Builder)c).buildPartial(this);
-            }
-            result += ")";
-            return this;
-        }
-
-        public CompleteCondition or(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn) {
-            result += "(" + ((Builder)c1).buildPartial(this) + FiqlParser.OR
-                      + ((Builder)c2).buildPartial(this);
-            for (CompleteCondition c : cn) {
-                result += FiqlParser.OR + ((Builder)c).buildPartial(this);
-            }
-            result += ")";
-            return this;
-        }
-
-        public Property is(String property) {
-            Builder b = new Builder(this);
-            b.result = property;
-            return b;
-        }
-
-        private String toString(Date date) {
-            String s = df.format(date);
-            // zone in XML is "+01:00" in Java is "+0100"; adding semicolon
-            int len = s.length();
-            return s.substring(0, len - 2) + ":" + s.substring(len - 2, len);
-        }
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.ext.search.client;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.xml.datatype.Duration;
+
+import org.apache.cxf.jaxrs.ext.search.FiqlParser;
+
+/**
+ * Builds client-side search condition that passed to backend can be consumed by {@link FiqlParser}.
+ * <p>
+ * Examples:
+ * 
+ * <pre>
+ * FiqlSearchConditionBuilder b = new FiqlSearchConditionBuilder();
+ * b.query().is(&quot;price&quot;).equalTo(123.5).build();
+ * // gives &quot;price==123.5&quot;
+ * b.query().is(&quot;price&quot;).greaterThan(30).and().is(&quot;price&quot;).lessThan(50).build();
+ * // gives &quot;price=gt=30.0;price=lt=50.0&quot;
+ * </pre>
+ * 
+ * For very complex junctions nested "and"/"or" are allowed (breaking a bit fluency of interface) and looks
+ * like the following example:
+ * 
+ * <pre>
+ * PartialCondition c = b.query();
+ * c.is("price").lessThan(100).and().or(
+ *      c.is("title").equalTo("The lord*"), 
+ *      c.is("author").equalTo("R.R.Tolkien")).build();
+ * // gives "price=lt=100.0;(title==The lord*,author==R.R.Tolkien)"
+ * </pre>
+ */
+public class FiqlSearchConditionBuilder implements SearchConditionBuilder {
+
+    public String build() {
+        return "";
+    }
+
+    public PartialCondition query() {
+        return new Builder();
+    }
+
+    private static class Builder implements SearchConditionBuilder.Property,
+        SearchConditionBuilder.CompleteCondition, SearchConditionBuilder.PartialCondition {
+        private String result = "";
+        private Builder parent;
+        private DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+
+        public Builder() {
+            parent = null;
+        }
+
+        public Builder(Builder parent) {
+            this.parent = parent;
+        }
+
+        public String build() {
+            return buildPartial(null);
+            // if (parent != null) {
+            // return parent.build() + result;
+            // } else {
+            // return result;
+            // }
+        }
+
+        // builds from parent but not further then exclude builder
+        private String buildPartial(Builder exclude) {
+            if (parent != null && !parent.equals(exclude)) {
+                return parent.buildPartial(exclude) + result;
+            } else {
+                return result;
+            }
+        }
+
+        public CompleteCondition after(Date date) {
+            result += FiqlParser.GT + toString(date);
+            return this;
+        }
+
+        public CompleteCondition before(Date date) {
+            result += FiqlParser.LT + toString(date);
+            return this;
+        }
+
+        public CompleteCondition equalTo(String literalOrPattern) {
+            result += FiqlParser.EQ + literalOrPattern;
+            return this;
+        }
+
+        public CompleteCondition equalTo(double number) {
+            result += FiqlParser.EQ + number;
+            return this;
+        }
+
+        public CompleteCondition equalTo(Date date) {
+            result += FiqlParser.EQ + toString(date);
+            return this;
+        }
+
+        public CompleteCondition greaterOrEqualTo(double number) {
+            result += FiqlParser.GE + number;
+            return this;
+        }
+
+        public CompleteCondition greaterThan(double number) {
+            result += FiqlParser.GT + number;
+            return this;
+        }
+
+        public CompleteCondition lessOrEqualTo(double number) {
+            result += FiqlParser.LE + number;
+            return this;
+        }
+
+        public CompleteCondition lessThan(double number) {
+            result += FiqlParser.LT + number;
+            return this;
+        }
+
+        public CompleteCondition lexicalAfter(String literal) {
+            result += FiqlParser.GT + literal;
+            return this;
+        }
+
+        public CompleteCondition lexicalBefore(String literal) {
+            result += FiqlParser.LT + literal;
+            return this;
+        }
+
+        public CompleteCondition lexicalNotAfter(String literal) {
+            result += FiqlParser.LE + literal;
+            return this;
+        }
+
+        public CompleteCondition lexicalNotBefore(String literal) {
+            result += FiqlParser.GE + literal;
+            return this;
+        }
+
+        public CompleteCondition notAfter(Date date) {
+            result += FiqlParser.LE + toString(date);
+            return this;
+        }
+
+        public CompleteCondition notBefore(Date date) {
+            result += FiqlParser.GE + toString(date);
+            return this;
+        }
+
+        public CompleteCondition notEqualTo(String literalOrPattern) {
+            result += FiqlParser.NEQ + literalOrPattern;
+            return this;
+        }
+
+        public CompleteCondition notEqualTo(double number) {
+            result += FiqlParser.NEQ + number;
+            return this;
+        }
+
+        public CompleteCondition notEqualTo(Date date) {
+            result += FiqlParser.NEQ + toString(date);
+            return this;
+        }
+
+        public CompleteCondition after(Duration distanceFromNow) {
+            result += FiqlParser.GT + distanceFromNow;
+            return this;
+        }
+
+        public CompleteCondition before(Duration distanceFromNow) {
+            result += FiqlParser.LT + distanceFromNow;
+            return this;
+        }
+
+        public CompleteCondition equalTo(Duration distanceFromNow) {
+            result += FiqlParser.EQ + distanceFromNow;
+            return this;
+        }
+
+        public CompleteCondition notAfter(Duration distanceFromNow) {
+            result += FiqlParser.LE + distanceFromNow;
+            return this;
+        }
+
+        public CompleteCondition notBefore(Duration distanceFromNow) {
+            result += FiqlParser.GE + distanceFromNow;
+            return this;
+        }
+
+        public CompleteCondition notEqualTo(Duration distanceFromNow) {
+            result += FiqlParser.NEQ + distanceFromNow;
+            return this;
+        }
+
+        public PartialCondition and() {
+            result += FiqlParser.AND;
+            return this;
+        }
+
+        public PartialCondition or() {
+            result += FiqlParser.OR;
+            return this;
+        }
+
+        public CompleteCondition and(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn) {
+            result += "(" + ((Builder)c1).buildPartial(this) + FiqlParser.AND
+                      + ((Builder)c2).buildPartial(this);
+            for (CompleteCondition c : cn) {
+                result += FiqlParser.AND + ((Builder)c).buildPartial(this);
+            }
+            result += ")";
+            return this;
+        }
+
+        public CompleteCondition or(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn) {
+            result += "(" + ((Builder)c1).buildPartial(this) + FiqlParser.OR
+                      + ((Builder)c2).buildPartial(this);
+            for (CompleteCondition c : cn) {
+                result += FiqlParser.OR + ((Builder)c).buildPartial(this);
+            }
+            result += ")";
+            return this;
+        }
+
+        public Property is(String property) {
+            Builder b = new Builder(this);
+            b.result = property;
+            return b;
+        }
+
+        private String toString(Date date) {
+            String s = df.format(date);
+            // zone in XML is "+01:00" in Java is "+0100"; adding semicolon
+            int len = s.length();
+            return s.substring(0, len - 2) + ":" + s.substring(len - 2, len);
+        }
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java?rev=1080705&r1=1080704&r2=1080705&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java Fri Mar 11 18:00:25 2011
@@ -1,133 +1,133 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.jaxrs.ext.search.client;
-
-import java.util.Date;
-
-import javax.xml.datatype.Duration;
-
-/**
- * Builds client-side search condition string using `fluent interface' style. It helps build create part of
- * URL that will be parsed by server-side counterpart e.g. FiqlSearchConditionBuilder has FiqlParser.
- */
-public interface SearchConditionBuilder {
-
-    /** Creates unconstrained query (no conditions) */
-    PartialCondition query();
-
-    /** Finalize condition construction and build search condition. */
-    String build();
-
-    public interface Property {
-        /** Is textual property equal to given literal or matching given pattern? */
-        CompleteCondition equalTo(String literalOrPattern);
-
-        /** Is numeric property equal to given number? */
-        CompleteCondition equalTo(double number);
-
-        /** Is date property same as given date? */
-        CompleteCondition equalTo(Date date);
-
-        /** Is date property same as date distant from now by given period of time? */
-        CompleteCondition equalTo(Duration distanceFromNow);
-
-        /** Is textual property different than given literal or not matching given pattern? */
-        CompleteCondition notEqualTo(String literalOrPattern);
-
-        /** Is numeric property different than given number? */
-        CompleteCondition notEqualTo(double number);
-
-        /** Is date property different than given date? */
-        CompleteCondition notEqualTo(Date date);
-
-        /** Is date property different than date distant from now by given period of time? */
-        CompleteCondition notEqualTo(Duration distanceFromNow);
-
-        /** Is numeric property greater than given number? */
-        CompleteCondition greaterThan(double number);
-
-        /** Is numeric property less than given number? */
-        CompleteCondition lessThan(double number);
-
-        /** Is numeric property greater or equal to given number? */
-        CompleteCondition greaterOrEqualTo(double number);
-
-        /** Is numeric property less or equal to given number? */
-        CompleteCondition lessOrEqualTo(double number);
-
-        /** Is date property after (greater than) given date? */
-        CompleteCondition after(Date date);
-
-        /** Is date property before (less than) given date? */
-        CompleteCondition before(Date date);
-
-        /** Is date property not before (greater or equal to) given date? */
-        CompleteCondition notBefore(Date date);
-
-        /** Is date property not after (less or equal to) given date? */
-        CompleteCondition notAfter(Date date);
-
-        /** Is date property after (greater than) date distant from now by given period of time? */
-        CompleteCondition after(Duration distanceFromNow);
-
-        /** Is date property before (less than) date distant from now by given period of time? */
-        CompleteCondition before(Duration distanceFromNow);
-
-        /** Is date property not after (less or equal to) date distant from now by given period of time? */
-        CompleteCondition notAfter(Duration distanceFromNow);
-
-        /** Is date property not before (greater or equal to) date distant from now by given 
-         * period of time? */
-        CompleteCondition notBefore(Duration distanceFromNow);
-
-        /** Is textual property lexically after (greater than) given literal? */
-        CompleteCondition lexicalAfter(String literal);
-
-        /** Is textual property lexically before (less than) given literal? */
-        CompleteCondition lexicalBefore(String literal);
-
-        /** Is textual property lexically not before (greater or equal to) given literal? */
-        CompleteCondition lexicalNotBefore(String literal);
-
-        /** Is textual property lexically not after (less or equal to) given literal? */
-        CompleteCondition lexicalNotAfter(String literal);
-    }
-    
-    public interface PartialCondition {
-        /** Get property of inspected entity type */
-        Property is(String property);
-
-        /** Conjunct multiple expressions */
-        CompleteCondition and(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn);
-
-        /** Disjunct multiple expressions */
-        CompleteCondition or(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn);
-    }
-    
-    public interface CompleteCondition /*extends PartialCondition*/ {
-        /** Conjunct current expression with another */
-        PartialCondition and();
-
-        /** Disjunct current expression with another */
-        PartialCondition or();
-
-        /** Finalize condition construction and build search condition. */
-        String build();
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.ext.search.client;
+
+import java.util.Date;
+
+import javax.xml.datatype.Duration;
+
+/**
+ * Builds client-side search condition string using `fluent interface' style. It helps build create part of
+ * URL that will be parsed by server-side counterpart e.g. FiqlSearchConditionBuilder has FiqlParser.
+ */
+public interface SearchConditionBuilder {
+
+    /** Creates unconstrained query (no conditions) */
+    PartialCondition query();
+
+    /** Finalize condition construction and build search condition. */
+    String build();
+
+    public interface Property {
+        /** Is textual property equal to given literal or matching given pattern? */
+        CompleteCondition equalTo(String literalOrPattern);
+
+        /** Is numeric property equal to given number? */
+        CompleteCondition equalTo(double number);
+
+        /** Is date property same as given date? */
+        CompleteCondition equalTo(Date date);
+
+        /** Is date property same as date distant from now by given period of time? */
+        CompleteCondition equalTo(Duration distanceFromNow);
+
+        /** Is textual property different than given literal or not matching given pattern? */
+        CompleteCondition notEqualTo(String literalOrPattern);
+
+        /** Is numeric property different than given number? */
+        CompleteCondition notEqualTo(double number);
+
+        /** Is date property different than given date? */
+        CompleteCondition notEqualTo(Date date);
+
+        /** Is date property different than date distant from now by given period of time? */
+        CompleteCondition notEqualTo(Duration distanceFromNow);
+
+        /** Is numeric property greater than given number? */
+        CompleteCondition greaterThan(double number);
+
+        /** Is numeric property less than given number? */
+        CompleteCondition lessThan(double number);
+
+        /** Is numeric property greater or equal to given number? */
+        CompleteCondition greaterOrEqualTo(double number);
+
+        /** Is numeric property less or equal to given number? */
+        CompleteCondition lessOrEqualTo(double number);
+
+        /** Is date property after (greater than) given date? */
+        CompleteCondition after(Date date);
+
+        /** Is date property before (less than) given date? */
+        CompleteCondition before(Date date);
+
+        /** Is date property not before (greater or equal to) given date? */
+        CompleteCondition notBefore(Date date);
+
+        /** Is date property not after (less or equal to) given date? */
+        CompleteCondition notAfter(Date date);
+
+        /** Is date property after (greater than) date distant from now by given period of time? */
+        CompleteCondition after(Duration distanceFromNow);
+
+        /** Is date property before (less than) date distant from now by given period of time? */
+        CompleteCondition before(Duration distanceFromNow);
+
+        /** Is date property not after (less or equal to) date distant from now by given period of time? */
+        CompleteCondition notAfter(Duration distanceFromNow);
+
+        /** Is date property not before (greater or equal to) date distant from now by given 
+         * period of time? */
+        CompleteCondition notBefore(Duration distanceFromNow);
+
+        /** Is textual property lexically after (greater than) given literal? */
+        CompleteCondition lexicalAfter(String literal);
+
+        /** Is textual property lexically before (less than) given literal? */
+        CompleteCondition lexicalBefore(String literal);
+
+        /** Is textual property lexically not before (greater or equal to) given literal? */
+        CompleteCondition lexicalNotBefore(String literal);
+
+        /** Is textual property lexically not after (less or equal to) given literal? */
+        CompleteCondition lexicalNotAfter(String literal);
+    }
+    
+    public interface PartialCondition {
+        /** Get property of inspected entity type */
+        Property is(String property);
+
+        /** Conjunct multiple expressions */
+        CompleteCondition and(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn);
+
+        /** Disjunct multiple expressions */
+        CompleteCondition or(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn);
+    }
+    
+    public interface CompleteCondition /*extends PartialCondition*/ {
+        /** Conjunct current expression with another */
+        PartialCondition and();
+
+        /** Disjunct current expression with another */
+        PartialCondition or();
+
+        /** Finalize condition construction and build search condition. */
+        String build();
+    }
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/SearchConditionBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java?rev=1080705&r1=1080704&r2=1080705&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java Fri Mar 11 18:00:25 2011
@@ -1,264 +1,264 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.jaxrs.ext.search.client;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.Duration;
-
-import static junit.framework.Assert.assertEquals;
-
-import org.apache.cxf.jaxrs.ext.search.client.SearchConditionBuilder.PartialCondition;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class FiqlSearchConditionBuilderTest {
-    private static FiqlSearchConditionBuilder b = new FiqlSearchConditionBuilder();
-    private static TimeZone tz;
-    private DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm Z");
-    
-    @BeforeClass
-    public static void beforeClass() {
-        tz = TimeZone.getDefault();
-        TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
-    }
-    
-    @AfterClass
-    public static void afterClass() {
-        // restoring defaults
-        TimeZone.setDefault(tz);
-    }
-    
-    
-    @Test
-    public void testEmptyBuild() {
-        assertEquals("", b.build());
-    }
-
-    @Test
-    public void testEqualToString() {
-        String ret = b.query().is("foo").equalTo("literalOrPattern*").build();
-        assertEquals("foo==literalOrPattern*", ret);
-    }
-
-    @Test
-    public void testEqualToNumber() {
-        String ret = b.query().is("foo").equalTo(123.5).build();
-        assertEquals("foo==123.5", ret);
-    }
-
-    @Test
-    public void testEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-01 12:34 +0000");
-        String ret = b.query().is("foo").equalTo(d).build();
-        assertEquals("foo==2011-03-01T12:34:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testEqualToDuration() throws ParseException, DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").equalTo(d).build();
-        assertEquals("foo==-P0Y0M1DT12H0M0S", ret);
-    }
-
-    @Test
-    public void testNotEqualToString() {
-        String ret = b.query().is("foo").notEqualTo("literalOrPattern*").build();
-        assertEquals("foo!=literalOrPattern*", ret);
-    }
-
-    @Test
-    public void testNotEqualToNumber() {
-        String ret = b.query().is("foo").notEqualTo(123.5).build();
-        assertEquals("foo!=123.5", ret);
-    }
-
-    @Test
-    public void testNotEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-01 12:34 +0000");
-        String ret = b.query().is("foo").notEqualTo(d).build();
-        assertEquals("foo!=2011-03-01T12:34:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testNotEqualToDuration() throws ParseException, DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").notEqualTo(d).build();
-        assertEquals("foo!=-P0Y0M1DT12H0M0S", ret);
-    }
-
-    @Test
-    public void testGreaterThanString() {
-        String ret = b.query().is("foo").lexicalAfter("abc").build();
-        assertEquals("foo=gt=abc", ret);
-    }
-
-    @Test
-    public void testLessThanString() {
-        String ret = b.query().is("foo").lexicalBefore("abc").build();
-        assertEquals("foo=lt=abc", ret);
-    }
-
-    @Test
-    public void testLessOrEqualToString() {
-        String ret = b.query().is("foo").lexicalNotAfter("abc").build();
-        assertEquals("foo=le=abc", ret);
-    }
-
-    @Test
-    public void testGreaterOrEqualToString() {
-        String ret = b.query().is("foo").lexicalNotBefore("abc").build();
-        assertEquals("foo=ge=abc", ret);
-    }
-    
-    @Test
-    public void testGreaterThanNumber() {
-        String ret = b.query().is("foo").greaterThan(25).build();
-        assertEquals("foo=gt=25.0", ret);
-    }
-
-    @Test
-    public void testLessThanNumber() {
-        String ret = b.query().is("foo").lessThan(25.333).build();
-        assertEquals("foo=lt=25.333", ret);
-    }
-
-    @Test
-    public void testLessOrEqualToNumber() {
-        String ret = b.query().is("foo").lessOrEqualTo(0).build();
-        assertEquals("foo=le=0.0", ret);
-    }
-
-    @Test
-    public void testGreaterOrEqualToNumber() {
-        String ret = b.query().is("foo").greaterOrEqualTo(-5).build();
-        assertEquals("foo=ge=-5.0", ret);
-    }
-
-    @Test
-    public void testGreaterThanDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
-        String ret = b.query().is("foo").after(d).build();
-        assertEquals("foo=gt=2011-03-02T22:33:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testLessThanDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
-        String ret = b.query().is("foo").before(d).build();
-        assertEquals("foo=lt=2011-03-02T22:33:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testLessOrEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
-        String ret = b.query().is("foo").notAfter(d).build();
-        assertEquals("foo=le=2011-03-02T22:33:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testGreaterOrEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
-        String ret = b.query().is("foo").notBefore(d).build();
-        assertEquals("foo=ge=2011-03-02T22:33:00.000+00:00", ret);
-    }
-
-    @Test
-    public void testGreaterThanDuration() throws DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").after(d).build();
-        assertEquals("foo=gt=-P0Y0M1DT12H0M0S", ret);
-    }
-
-    @Test
-    public void testLessThanDuration() throws DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").before(d).build();
-        assertEquals("foo=lt=-P0Y0M1DT12H0M0S", ret);
-    }
-
-    @Test
-    public void testLessOrEqualToDuration() throws DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").notAfter(d).build();
-        assertEquals("foo=le=-P0Y0M1DT12H0M0S", ret);
-    }
-
-    @Test
-    public void testGreaterOrEqualToDuration() throws DatatypeConfigurationException {
-        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
-        String ret = b.query().is("foo").notBefore(d).build();
-        assertEquals("foo=ge=-P0Y0M1DT12H0M0S", ret);
-    }
-    
-    @Test
-    public void testOrSimple() {
-        String ret = b.query().is("foo").greaterThan(20).or().is("foo").lessThan(10).build();
-        assertEquals("foo=gt=20.0,foo=lt=10.0", ret);
-    }    
-    
-    @Test
-    public void testAndSimple() {
-        String ret = b.query().is("foo").greaterThan(20).and().is("bar").equalTo("plonk").build();
-        assertEquals("foo=gt=20.0;bar==plonk", ret);
-    }
-    
-    @Test
-    public void testOrComplex() {
-        PartialCondition c = b.query();
-        String ret = c.or(c.is("foo").equalTo("aaa"), c.is("bar").equalTo("bbb")).build();
-        assertEquals("(foo==aaa,bar==bbb)", ret);
-    }    
-
-    @Test
-    public void testAndComplex() {
-        PartialCondition c = b.query();
-        String ret = c.and(c.is("foo").equalTo("aaa"), c.is("bar").equalTo("bbb")).build();
-        assertEquals("(foo==aaa;bar==bbb)", ret);
-    }    
-
-    @Test
-    public void testComplex1() {
-        PartialCondition c = b.query();
-        String ret = c.is("foo").equalTo(123.4).or().and(
-            c.is("bar").equalTo("asadf*"), 
-            c.is("baz").lessThan(20)).build();
-        assertEquals("foo==123.4,(bar==asadf*;baz=lt=20.0)", ret);
-    }
-
-    @Test
-    public void testComplex2() {
-        PartialCondition c = b.query();
-        String ret = c.is("foo").equalTo(123.4).or().is("foo").equalTo("null").and().or(
-            c.is("bar").equalTo("asadf*"), 
-            c.is("baz").lessThan(20).and().or(
-                c.is("sub1").equalTo(0),
-                c.is("sub2").equalTo(0))).build();
-        
-        assertEquals("foo==123.4,foo==null;(bar==asadf*,baz=lt=20.0;(sub1==0.0,sub2==0.0))", ret);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.ext.search.client;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+
+import static junit.framework.Assert.assertEquals;
+
+import org.apache.cxf.jaxrs.ext.search.client.SearchConditionBuilder.PartialCondition;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class FiqlSearchConditionBuilderTest {
+    private static FiqlSearchConditionBuilder b = new FiqlSearchConditionBuilder();
+    private static TimeZone tz;
+    private DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm Z");
+    
+    @BeforeClass
+    public static void beforeClass() {
+        tz = TimeZone.getDefault();
+        TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+    }
+    
+    @AfterClass
+    public static void afterClass() {
+        // restoring defaults
+        TimeZone.setDefault(tz);
+    }
+    
+    
+    @Test
+    public void testEmptyBuild() {
+        assertEquals("", b.build());
+    }
+
+    @Test
+    public void testEqualToString() {
+        String ret = b.query().is("foo").equalTo("literalOrPattern*").build();
+        assertEquals("foo==literalOrPattern*", ret);
+    }
+
+    @Test
+    public void testEqualToNumber() {
+        String ret = b.query().is("foo").equalTo(123.5).build();
+        assertEquals("foo==123.5", ret);
+    }
+
+    @Test
+    public void testEqualToDate() throws ParseException {
+        Date d = df.parse("2011-03-01 12:34 +0000");
+        String ret = b.query().is("foo").equalTo(d).build();
+        assertEquals("foo==2011-03-01T12:34:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testEqualToDuration() throws ParseException, DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").equalTo(d).build();
+        assertEquals("foo==-P0Y0M1DT12H0M0S", ret);
+    }
+
+    @Test
+    public void testNotEqualToString() {
+        String ret = b.query().is("foo").notEqualTo("literalOrPattern*").build();
+        assertEquals("foo!=literalOrPattern*", ret);
+    }
+
+    @Test
+    public void testNotEqualToNumber() {
+        String ret = b.query().is("foo").notEqualTo(123.5).build();
+        assertEquals("foo!=123.5", ret);
+    }
+
+    @Test
+    public void testNotEqualToDate() throws ParseException {
+        Date d = df.parse("2011-03-01 12:34 +0000");
+        String ret = b.query().is("foo").notEqualTo(d).build();
+        assertEquals("foo!=2011-03-01T12:34:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testNotEqualToDuration() throws ParseException, DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").notEqualTo(d).build();
+        assertEquals("foo!=-P0Y0M1DT12H0M0S", ret);
+    }
+
+    @Test
+    public void testGreaterThanString() {
+        String ret = b.query().is("foo").lexicalAfter("abc").build();
+        assertEquals("foo=gt=abc", ret);
+    }
+
+    @Test
+    public void testLessThanString() {
+        String ret = b.query().is("foo").lexicalBefore("abc").build();
+        assertEquals("foo=lt=abc", ret);
+    }
+
+    @Test
+    public void testLessOrEqualToString() {
+        String ret = b.query().is("foo").lexicalNotAfter("abc").build();
+        assertEquals("foo=le=abc", ret);
+    }
+
+    @Test
+    public void testGreaterOrEqualToString() {
+        String ret = b.query().is("foo").lexicalNotBefore("abc").build();
+        assertEquals("foo=ge=abc", ret);
+    }
+    
+    @Test
+    public void testGreaterThanNumber() {
+        String ret = b.query().is("foo").greaterThan(25).build();
+        assertEquals("foo=gt=25.0", ret);
+    }
+
+    @Test
+    public void testLessThanNumber() {
+        String ret = b.query().is("foo").lessThan(25.333).build();
+        assertEquals("foo=lt=25.333", ret);
+    }
+
+    @Test
+    public void testLessOrEqualToNumber() {
+        String ret = b.query().is("foo").lessOrEqualTo(0).build();
+        assertEquals("foo=le=0.0", ret);
+    }
+
+    @Test
+    public void testGreaterOrEqualToNumber() {
+        String ret = b.query().is("foo").greaterOrEqualTo(-5).build();
+        assertEquals("foo=ge=-5.0", ret);
+    }
+
+    @Test
+    public void testGreaterThanDate() throws ParseException {
+        Date d = df.parse("2011-03-02 22:33 +0000");
+        String ret = b.query().is("foo").after(d).build();
+        assertEquals("foo=gt=2011-03-02T22:33:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testLessThanDate() throws ParseException {
+        Date d = df.parse("2011-03-02 22:33 +0000");
+        String ret = b.query().is("foo").before(d).build();
+        assertEquals("foo=lt=2011-03-02T22:33:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testLessOrEqualToDate() throws ParseException {
+        Date d = df.parse("2011-03-02 22:33 +0000");
+        String ret = b.query().is("foo").notAfter(d).build();
+        assertEquals("foo=le=2011-03-02T22:33:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testGreaterOrEqualToDate() throws ParseException {
+        Date d = df.parse("2011-03-02 22:33 +0000");
+        String ret = b.query().is("foo").notBefore(d).build();
+        assertEquals("foo=ge=2011-03-02T22:33:00.000+00:00", ret);
+    }
+
+    @Test
+    public void testGreaterThanDuration() throws DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").after(d).build();
+        assertEquals("foo=gt=-P0Y0M1DT12H0M0S", ret);
+    }
+
+    @Test
+    public void testLessThanDuration() throws DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").before(d).build();
+        assertEquals("foo=lt=-P0Y0M1DT12H0M0S", ret);
+    }
+
+    @Test
+    public void testLessOrEqualToDuration() throws DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").notAfter(d).build();
+        assertEquals("foo=le=-P0Y0M1DT12H0M0S", ret);
+    }
+
+    @Test
+    public void testGreaterOrEqualToDuration() throws DatatypeConfigurationException {
+        Duration d = DatatypeFactory.newInstance().newDuration(false, 0, 0, 1, 12, 0, 0); 
+        String ret = b.query().is("foo").notBefore(d).build();
+        assertEquals("foo=ge=-P0Y0M1DT12H0M0S", ret);
+    }
+    
+    @Test
+    public void testOrSimple() {
+        String ret = b.query().is("foo").greaterThan(20).or().is("foo").lessThan(10).build();
+        assertEquals("foo=gt=20.0,foo=lt=10.0", ret);
+    }    
+    
+    @Test
+    public void testAndSimple() {
+        String ret = b.query().is("foo").greaterThan(20).and().is("bar").equalTo("plonk").build();
+        assertEquals("foo=gt=20.0;bar==plonk", ret);
+    }
+    
+    @Test
+    public void testOrComplex() {
+        PartialCondition c = b.query();
+        String ret = c.or(c.is("foo").equalTo("aaa"), c.is("bar").equalTo("bbb")).build();
+        assertEquals("(foo==aaa,bar==bbb)", ret);
+    }    
+
+    @Test
+    public void testAndComplex() {
+        PartialCondition c = b.query();
+        String ret = c.and(c.is("foo").equalTo("aaa"), c.is("bar").equalTo("bbb")).build();
+        assertEquals("(foo==aaa;bar==bbb)", ret);
+    }    
+
+    @Test
+    public void testComplex1() {
+        PartialCondition c = b.query();
+        String ret = c.is("foo").equalTo(123.4).or().and(
+            c.is("bar").equalTo("asadf*"), 
+            c.is("baz").lessThan(20)).build();
+        assertEquals("foo==123.4,(bar==asadf*;baz=lt=20.0)", ret);
+    }
+
+    @Test
+    public void testComplex2() {
+        PartialCondition c = b.query();
+        String ret = c.is("foo").equalTo(123.4).or().is("foo").equalTo("null").and().or(
+            c.is("bar").equalTo("asadf*"), 
+            c.is("baz").lessThan(20).and().or(
+                c.is("sub1").equalTo(0),
+                c.is("sub2").equalTo(0))).build();
+        
+        assertEquals("foo==123.4,foo==null;(bar==asadf*,baz=lt=20.0;(sub1==0.0,sub2==0.0))", ret);
+    }
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java?rev=1080705&r1=1080704&r2=1080705&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java (original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java Fri Mar 11 18:00:25 2011
@@ -1,49 +1,49 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.transport.http;
-
-import java.io.IOException;
-import java.net.URL;
-
-public class HTTPException extends IOException {
-    private int responseCode;
-    private String responseMessage;
-    private URL url;
-    
-    public HTTPException(int responseCode, String responseMessage, URL url) {
-        super("HTTP response '" + responseCode + ": " 
-              + responseMessage + "' when communicating with " + url.toString());
-        this.responseCode = responseCode;
-        this.responseMessage = responseMessage;
-        this.url = url;
-    }
-
-    public int getResponseCode() {
-        return responseCode;
-    }
-
-    public String getResponseMessage() {
-        return responseMessage;
-    }
-
-    public URL getUrl() {
-        return url;
-    }
- 
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.transport.http;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class HTTPException extends IOException {
+    private int responseCode;
+    private String responseMessage;
+    private URL url;
+    
+    public HTTPException(int responseCode, String responseMessage, URL url) {
+        super("HTTP response '" + responseCode + ": " 
+              + responseMessage + "' when communicating with " + url.toString());
+        this.responseCode = responseCode;
+        this.responseMessage = responseMessage;
+        this.url = url;
+    }
+
+    public int getResponseCode() {
+        return responseCode;
+    }
+
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    public URL getUrl() {
+        return url;
+    }
+ 
+}

Propchange: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml1_sv.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml1_sv.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml1_sv.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_hok.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_hok.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_hok.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_sv.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_sv.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/ws/security/src/test/resources/saml2_sv.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/ResponseInterceptorType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/ResponseInterceptorType.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespBreakElementCountThreshold.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespBreakElementCountThreshold.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespBreakElementCountThreshold.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusExtensionLoadingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusExtensionLoadingTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/simple/Caculator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message