cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1057397 [1/3] - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/logging/ common/common/src/test/java/org/apache/cxf/staxutils/resources/ distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/...
Date Mon, 10 Jan 2011 22:18:04 GMT
Author: dkulp
Date: Mon Jan 10 22:18:02 2011
New Revision: 1057397

URL: http://svn.apache.org/viewvc?rev=1057397&view=rev
Log:
Merged revisions 1057393 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1057393 | dkulp | 2011-01-10 17:07:10 -0500 (Mon, 10 Jan 2011) | 2 lines
  
  Set SVN properties on a bunch of things to make sure line endings and such are correct
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java   (props changed)
    cxf/branches/2.3.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/AddRequest.xml   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/pom.xml   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/test/resources/log4j.properties   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/mtosi_1.1/README.txt   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/bin/gencerts.sh   (props changed)
    cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/DocLiteralInInterceptorTest.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/test/resources/org/apache/cxf/interceptor/resources/multiPartDocLitBareReq.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/BigDecimalStringTest.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/struct5.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchConditionTest.java   (contents, props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceAegisElementProvider.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceJava5TypeCreator.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceTypeCreator.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/dispatch/bus-dispatch.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/HelloServiceInterceptor.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/HelloServiceProxyFactory.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/transports/common/pom.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpServletRequestSnapshot.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/DefaultMessageIdCache.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MessageIdCache.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyEngineImplInitTest.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/policy/src/test/resources/org/apache/cxf/ws/policy/PolicyEngineImplInitTest-context.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/example-sts-issued-saml-assertion.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/protect_token_policy_asym_x509_direct_ref.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/protect_token_policy_asym_x509_direct_ref_complement.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/protect_token_policy_asym_x509_issuer_serial.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/protect_token_policy_asym_x509_issuer_serial_complement.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/signed_elements_Basic256Sha256_policy.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/signed_elements_with_sst_issued_token_policy.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/transport_binding_policy.xml   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/wss-242.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/container-integration/grizzly/pom.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsWsdlNs.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsWsdlNsImpl.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisWSDLNSTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/databinding/src/test/resources/aegisWSDLNSBeans.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/HugeResponseInterceptor.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/MalformedResponseInterceptor.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespBreakThreshold.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/resources/GreetMeDocLiteralRespMalformed.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/TestMustUnderstandHandler.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/resources/wsdl_systest_jaxws/request.xsd   (contents, props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/resources/wsdl_systest_jaxws/response-in.xsd   (contents, props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/resources/wsdl_systest_jaxws/response.xsd   (contents, props changed)
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/resources/wsdl_systest_jaxws/schemaValidation.wsdl   (contents, props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/GzipServer.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HWSoapMessageDocProvider.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/resources/GreetMeDocLiteralResp.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/jms/gzipBus.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/LoggingHandler.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultImpl.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/SOAPFaultRequestTestCase.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/Server.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/handlers.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/resources/wsdl_systest/catalog.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/resources/wsdl_systest/envelope.xsd   (props changed)
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/resources/wsdl_systest/soap_fault.wsdl   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/resources/AddNumbersDispatchReq.xml   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/jaxws22/org/apache/cxf/systest/ws/addr_responses/Hello.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/jaxws22/org/apache/cxf/systest/ws/addr_responses/HelloImpl.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/jaxws22/org/apache/cxf/systest/ws/addr_responses/HelloService.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/jaxws22/org/apache/cxf/systest/ws/addr_responses/Server.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/jaxws22/org/apache/cxf/systest/ws/addr_responses/WSAResponsesClientServerTest.java   (props changed)
    cxf/branches/2.3.x-fixes/systests/ws-specs/src/test/resources/wsdl_systest_responses/responses.wsdl   (props changed)
    cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf2934/Address.java   (props changed)
    cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf2934/Employee.java   (props changed)
    cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf2934/Name.java   (props changed)
    cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf2934/WebParamService.java   (props changed)
    cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf2941/WebResultService.java   (props changed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1057393

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Propchange: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/AddRequest.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/AddRequest.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/pom.xml
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Mon Jan 10 22:18:02 2011
@@ -1 +1 @@
-text/plain
+text/xml

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/java_first_jms/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/mtosi_1.1/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/mtosi_1.1/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_rm/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/bin/gencerts.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/bin/gencerts.sh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java?rev=1057397&r1=1057396&r2=1057397&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java (original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java Mon Jan 10 22:18:02 2011
@@ -1,50 +1,50 @@
-/**
- * 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.binding.soap.interceptor;
-
-import java.util.Map;
-
-import org.apache.cxf.binding.soap.SoapBindingConstants;
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-
-/**
- * Tibco Business Works uses SoapAction instead of the standard spelling SOAPAction. 
- * So this interceptor adds a SoapAction header if SOAPAction is set in protocol header
- */
-public class TibcoSoapActionInterceptor extends AbstractPhaseInterceptor<SoapMessage> {
-
-    private static final String SOAPACTION_TIBCO = "SoapAction";
-
-    public TibcoSoapActionInterceptor() {
-        super(Phase.PREPARE_SEND);
-    }
-
-    @SuppressWarnings("unchecked")
-    public void handleMessage(SoapMessage soapMessage) throws Fault {
-        Map<String, Object> headers = (Map<String, Object>)soapMessage.get(Message.PROTOCOL_HEADERS);
-        if (headers != null && headers.containsKey(SoapBindingConstants.SOAP_ACTION)) {
-            headers.put(SOAPACTION_TIBCO, headers.get(SoapBindingConstants.SOAP_ACTION));
-        }
-    }
-
-}
+/**
+ * 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.binding.soap.interceptor;
+
+import java.util.Map;
+
+import org.apache.cxf.binding.soap.SoapBindingConstants;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+/**
+ * Tibco Business Works uses SoapAction instead of the standard spelling SOAPAction. 
+ * So this interceptor adds a SoapAction header if SOAPAction is set in protocol header
+ */
+public class TibcoSoapActionInterceptor extends AbstractPhaseInterceptor<SoapMessage> {
+
+    private static final String SOAPACTION_TIBCO = "SoapAction";
+
+    public TibcoSoapActionInterceptor() {
+        super(Phase.PREPARE_SEND);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void handleMessage(SoapMessage soapMessage) throws Fault {
+        Map<String, Object> headers = (Map<String, Object>)soapMessage.get(Message.PROTOCOL_HEADERS);
+        if (headers != null && headers.containsKey(SoapBindingConstants.SOAP_ACTION)) {
+            headers.put(SOAPACTION_TIBCO, headers.get(SoapBindingConstants.SOAP_ACTION));
+        }
+    }
+
+}

Propchange: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/TibcoSoapActionInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/DocLiteralInInterceptorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/DocLiteralInInterceptorTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/core/src/test/resources/org/apache/cxf/interceptor/resources/multiPartDocLitBareReq.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/core/src/test/resources/org/apache/cxf/interceptor/resources/multiPartDocLitBareReq.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/StreamDataSource.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/BigDecimalStringTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/struct5.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/struct5.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java?rev=1057397&r1=1057396&r2=1057397&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java Mon Jan 10 22:18:02 2011
@@ -1,46 +1,46 @@
-/**
- * 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;
-
-import java.util.List;
-
-/**
- * Composite 'and' search condition   
- */
-public class AndSearchCondition<T> extends AbstractComplexCondition<T> {
-
-    public AndSearchCondition() {
-        super(ConditionType.AND);
-    }
-    
-    public AndSearchCondition(List<SearchCondition<T>> conditions) {
-        super(conditions, ConditionType.AND);    
-    }
-    
-    
-    public boolean isMet(T pojo) {
-        for (SearchCondition<T> sc : conditions) {
-            if (!sc.isMet(pojo)) {
-                return false;
-            }
-        }
-        return true;
-    }
-    
-}
+/**
+ * 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;
+
+import java.util.List;
+
+/**
+ * Composite 'and' search condition   
+ */
+public class AndSearchCondition<T> extends AbstractComplexCondition<T> {
+
+    public AndSearchCondition() {
+        super(ConditionType.AND);
+    }
+    
+    public AndSearchCondition(List<SearchCondition<T>> conditions) {
+        super(conditions, ConditionType.AND);    
+    }
+    
+    
+    public boolean isMet(T pojo) {
+        for (SearchCondition<T> sc : conditions) {
+            if (!sc.isMet(pojo)) {
+                return false;
+            }
+        }
+        return true;
+    }
+    
+}

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/AndSearchCondition.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java?rev=1057397&r1=1057396&r2=1057397&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java Mon Jan 10 22:18:02 2011
@@ -1,187 +1,187 @@
-/**
- * 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;
-
-import java.beans.IntrospectionException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Bean introspection utility.
- */
-class Beanspector<T> {
-
-    private Class<T> tclass;
-    private T tobj;
-    private Map<String, Method> getters = new HashMap<String, Method>();
-    private Map<String, Method> setters = new HashMap<String, Method>();
-
-    public Beanspector(Class<T> tclass) {
-        if (tclass == null) {
-            throw new IllegalArgumentException("tclass is null");
-        }
-        this.tclass = tclass;
-        init();
-    }
-
-    public Beanspector(T tobj) {
-        if (tobj == null) {
-            throw new IllegalArgumentException("tobj is null");
-        }
-        this.tobj = tobj;
-        init();
-    }
-
-    @SuppressWarnings("unchecked")
-    private void init() {
-        if (tclass == null) {
-            tclass = (Class<T>)tobj.getClass();
-        }
-        for (Method m : tclass.getMethods()) {
-            if (isGetter(m)) {
-                getters.put(getterName(m), m);
-            } else if (isSetter(m)) {
-                setters.put(setterName(m), m);
-            }
-        }
-        // check type equality for getter-setter pairs
-        Set<String> pairs = new HashSet<String>(getters.keySet());
-        pairs.retainAll(setters.keySet());
-        for (String accessor : pairs) {
-            Class<?> getterClass = getters.get(accessor).getReturnType();
-            Class<?> setterClass = setters.get(accessor).getParameterTypes()[0];
-            if (!getterClass.equals(setterClass)) {
-                throw new IllegalArgumentException(String
-                    .format("Accessor '%s' type mismatch, getter type is %s while setter type is %s",
-                            accessor, getterClass.getName(), setterClass.getName()));
-            }
-        }
-    }
-
-    public T getBean() {
-        return tobj;
-    }
-
-    public Set<String> getGettersNames() {
-        return Collections.unmodifiableSet(getters.keySet());
-    }
-
-    public Set<String> getSettersNames() {
-        return Collections.unmodifiableSet(setters.keySet());
-    }
-
-    public Class<?> getAccessorType(String getterOrSetterName) throws Exception {
-        Method m = getters.get(getterOrSetterName);
-        if (m == null) {
-            m = setters.get(getterOrSetterName);
-        }
-        if (m == null) {
-            String msg = String.format("Accessor '%s' not found, "
-                                       + "known setters are: %s, known getters are: %s", getterOrSetterName,
-                                       setters.keySet(), getters.keySet());
-            throw new IntrospectionException(msg);
-        }
-        return m.getReturnType();
-    }
-
-    public Beanspector<T> swap(T newobject) throws Exception {
-        if (newobject == null) {
-            throw new IllegalArgumentException("newobject is null");
-        }
-        tobj = newobject;
-        return this;
-    }
-
-    public Beanspector<T> instantiate() throws Exception {
-        tobj = tclass.newInstance();
-        return this;
-    }
-
-    public Beanspector<T> setValue(String setterName, Object value) throws Throwable {
-        Method m = setters.get(setterName);
-        if (m == null) {
-            String msg = String.format("Setter '%s' not found, " + "known setters are: %s", setterName,
-                                       setters.keySet());
-            throw new IntrospectionException(msg);
-        }
-        setValue(m, value);
-        return this;
-    }
-
-    public Beanspector<T> setValue(Map<String, Object> settersWithValues) throws Throwable {
-        for (Map.Entry<String, Object> entry : settersWithValues.entrySet()) {
-            setValue(entry.getKey(), entry.getValue());
-        }
-        return this;
-    }
-
-    public Beanspector<T> setValue(Method setter, Object value) throws Throwable {
-        Class<?> paramType = setter.getParameterTypes()[0];
-        try {
-            setter.invoke(tobj, value);
-            return this;
-        } catch (InvocationTargetException e) {
-            throw e.getCause();
-        } catch (IllegalArgumentException e) {
-            String msg = String.format("; setter parameter type: %s, set value type: %s",
-                                       paramType.getName(), value.getClass().getName());
-            throw new IllegalArgumentException(e.getMessage() + msg);
-        } catch (Exception e) {
-            throw e;
-        }
-    }
-
-    public Object getValue(String getterName) throws Throwable {
-        return getValue(getters.get(getterName));
-    }
-
-    public Object getValue(Method getter) throws Throwable {
-        try {
-            return getter.invoke(tobj);
-        } catch (InvocationTargetException e) {
-            throw e.getCause();
-        } catch (Exception e) {
-            throw e;
-        }
-    }
-
-    private boolean isGetter(Method m) {
-        return m.getParameterTypes().length == 0
-               && (m.getName().startsWith("get") || m.getName().startsWith("is"));
-    }
-
-    private String getterName(Method m) {
-        return m.getName().replace("is", "").replace("get", "").toLowerCase();
-    }
-
-    private boolean isSetter(Method m) {
-        return m.getReturnType().equals(void.class) && m.getParameterTypes().length == 1
-               && (m.getName().startsWith("set") || m.getName().startsWith("is"));
-    }
-
-    private String setterName(Method m) {
-        return m.getName().replace("is", "").replace("set", "").toLowerCase();
-    }
-
-}
+/**
+ * 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;
+
+import java.beans.IntrospectionException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Bean introspection utility.
+ */
+class Beanspector<T> {
+
+    private Class<T> tclass;
+    private T tobj;
+    private Map<String, Method> getters = new HashMap<String, Method>();
+    private Map<String, Method> setters = new HashMap<String, Method>();
+
+    public Beanspector(Class<T> tclass) {
+        if (tclass == null) {
+            throw new IllegalArgumentException("tclass is null");
+        }
+        this.tclass = tclass;
+        init();
+    }
+
+    public Beanspector(T tobj) {
+        if (tobj == null) {
+            throw new IllegalArgumentException("tobj is null");
+        }
+        this.tobj = tobj;
+        init();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void init() {
+        if (tclass == null) {
+            tclass = (Class<T>)tobj.getClass();
+        }
+        for (Method m : tclass.getMethods()) {
+            if (isGetter(m)) {
+                getters.put(getterName(m), m);
+            } else if (isSetter(m)) {
+                setters.put(setterName(m), m);
+            }
+        }
+        // check type equality for getter-setter pairs
+        Set<String> pairs = new HashSet<String>(getters.keySet());
+        pairs.retainAll(setters.keySet());
+        for (String accessor : pairs) {
+            Class<?> getterClass = getters.get(accessor).getReturnType();
+            Class<?> setterClass = setters.get(accessor).getParameterTypes()[0];
+            if (!getterClass.equals(setterClass)) {
+                throw new IllegalArgumentException(String
+                    .format("Accessor '%s' type mismatch, getter type is %s while setter type is %s",
+                            accessor, getterClass.getName(), setterClass.getName()));
+            }
+        }
+    }
+
+    public T getBean() {
+        return tobj;
+    }
+
+    public Set<String> getGettersNames() {
+        return Collections.unmodifiableSet(getters.keySet());
+    }
+
+    public Set<String> getSettersNames() {
+        return Collections.unmodifiableSet(setters.keySet());
+    }
+
+    public Class<?> getAccessorType(String getterOrSetterName) throws Exception {
+        Method m = getters.get(getterOrSetterName);
+        if (m == null) {
+            m = setters.get(getterOrSetterName);
+        }
+        if (m == null) {
+            String msg = String.format("Accessor '%s' not found, "
+                                       + "known setters are: %s, known getters are: %s", getterOrSetterName,
+                                       setters.keySet(), getters.keySet());
+            throw new IntrospectionException(msg);
+        }
+        return m.getReturnType();
+    }
+
+    public Beanspector<T> swap(T newobject) throws Exception {
+        if (newobject == null) {
+            throw new IllegalArgumentException("newobject is null");
+        }
+        tobj = newobject;
+        return this;
+    }
+
+    public Beanspector<T> instantiate() throws Exception {
+        tobj = tclass.newInstance();
+        return this;
+    }
+
+    public Beanspector<T> setValue(String setterName, Object value) throws Throwable {
+        Method m = setters.get(setterName);
+        if (m == null) {
+            String msg = String.format("Setter '%s' not found, " + "known setters are: %s", setterName,
+                                       setters.keySet());
+            throw new IntrospectionException(msg);
+        }
+        setValue(m, value);
+        return this;
+    }
+
+    public Beanspector<T> setValue(Map<String, Object> settersWithValues) throws Throwable {
+        for (Map.Entry<String, Object> entry : settersWithValues.entrySet()) {
+            setValue(entry.getKey(), entry.getValue());
+        }
+        return this;
+    }
+
+    public Beanspector<T> setValue(Method setter, Object value) throws Throwable {
+        Class<?> paramType = setter.getParameterTypes()[0];
+        try {
+            setter.invoke(tobj, value);
+            return this;
+        } catch (InvocationTargetException e) {
+            throw e.getCause();
+        } catch (IllegalArgumentException e) {
+            String msg = String.format("; setter parameter type: %s, set value type: %s",
+                                       paramType.getName(), value.getClass().getName());
+            throw new IllegalArgumentException(e.getMessage() + msg);
+        } catch (Exception e) {
+            throw e;
+        }
+    }
+
+    public Object getValue(String getterName) throws Throwable {
+        return getValue(getters.get(getterName));
+    }
+
+    public Object getValue(Method getter) throws Throwable {
+        try {
+            return getter.invoke(tobj);
+        } catch (InvocationTargetException e) {
+            throw e.getCause();
+        } catch (Exception e) {
+            throw e;
+        }
+    }
+
+    private boolean isGetter(Method m) {
+        return m.getParameterTypes().length == 0
+               && (m.getName().startsWith("get") || m.getName().startsWith("is"));
+    }
+
+    private String getterName(Method m) {
+        return m.getName().replace("is", "").replace("get", "").toLowerCase();
+    }
+
+    private boolean isSetter(Method m) {
+        return m.getReturnType().equals(void.class) && m.getParameterTypes().length == 1
+               && (m.getName().startsWith("set") || m.getName().startsWith("is"));
+    }
+
+    private String setterName(Method m) {
+        return m.getName().replace("is", "").replace("set", "").toLowerCase();
+    }
+
+}

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/Beanspector.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java?rev=1057397&r1=1057396&r2=1057397&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java Mon Jan 10 22:18:02 2011
@@ -1,39 +1,39 @@
-/**
- * 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;
-
-public class FiqlParseException extends Exception {
-
-    public FiqlParseException() {
-        super();
-    }
-
-    public FiqlParseException(String arg0, Throwable arg1) {
-        super(arg0, arg1);
-    }
-
-    public FiqlParseException(String arg0) {
-        super(arg0);
-    }
-
-    public FiqlParseException(Throwable arg0) {
-        super(arg0);
-    }
-
-}
+/**
+ * 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;
+
+public class FiqlParseException extends Exception {
+
+    public FiqlParseException() {
+        super();
+    }
+
+    public FiqlParseException(String arg0, Throwable arg1) {
+        super(arg0, arg1);
+    }
+
+    public FiqlParseException(String arg0) {
+        super(arg0);
+    }
+
+    public FiqlParseException(Throwable arg0) {
+        super(arg0);
+    }
+
+}

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParseException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java?rev=1057397&r1=1057396&r2=1057397&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java Mon Jan 10 22:18:02 2011
@@ -1,363 +1,363 @@
-/**
- * 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;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-import org.apache.cxf.jaxrs.utils.InjectionUtils;
-
-/**
- * Parses <a href="http://tools.ietf.org/html/draft-nottingham-atompub-fiql-00">FIQL</a> expression to
- * construct {@link SearchCondition} structure. Since this class operates on Java type T, not on XML
- * structures "selectors" part of specification is not applicable; instead selectors describes getters of type
- * T used as search condition type (see {@link SimpleSearchCondition#isMet(Object)} for details.
- * 
- * @param <T> type of search condition.
- */
-public class FiqlParser<T> {
-
-    public static final String OR = ",";
-    public static final String AND = ";";
-
-    public static final String GT = "=gt=";
-    public static final String GE = "=ge=";
-    public static final String LT = "=lt=";
-    public static final String LE = "=le=";
-    public static final String EQ = "==";
-    public static final String NEQ = "!=";
-
-    private static Map<String, ConditionType> operatorsMap;
-    static {
-        operatorsMap = new HashMap<String, ConditionType>();
-        operatorsMap.put(GT, ConditionType.GREATER_THAN);
-        operatorsMap.put(GE, ConditionType.GREATER_OR_EQUALS);
-        operatorsMap.put(LT, ConditionType.LESS_THAN);
-        operatorsMap.put(LE, ConditionType.LESS_OR_EQUALS);
-        operatorsMap.put(EQ, ConditionType.EQUALS);
-        operatorsMap.put(NEQ, ConditionType.NOT_EQUALS);
-    }
-
-    private Beanspector<T> beanspector;
-
-    /**
-     * Creates FIQL parser.
-     * 
-     * @param tclass - class of T used to create condition objects in built syntax tree. Class T must have
-     *            accessible no-arg constructor and complementary setters to these used in FIQL expressions.
-     */
-    public FiqlParser(Class<T> tclass) {
-        beanspector = new Beanspector<T>(tclass);
-    }
-
-    /**
-     * Parses expression and builds search filter. Names used in FIQL expression are names of getters/setters
-     * in type T.
-     * <p>
-     * Example:
-     * 
-     * <pre>
-     * class Condition {
-     *   public String getFoo() {...}
-     *   public void setFoo(String foo) {...}
-     *   public int getBar() {...}
-     *   public void setBar(int bar) {...}
-     * }
-     * 
-     * FiqlParser&lt;Condition> parser = new FiqlParser&lt;Condition&gt;(Condition.class);
-     * parser.parse("foo==mystery*;bar=ge=10");
-     * </pre>
-     * 
-     * @param fiqlExpression expression of filter.
-     * @return tree of {@link SearchCondition} objects representing runtime search structure.
-     * @throws FiqlParseException when expression does not follow FIQL grammar
-     */
-    public SearchCondition<T> parse(String fiqlExpression) throws FiqlParseException {
-        ASTNode<T> ast = parseAndsOrsBrackets(fiqlExpression);
-        // System.out.println(ast);
-        return ast.build();
-    }
-
-    private ASTNode<T> parseAndsOrsBrackets(String expr) throws FiqlParseException {
-        List<String> subexpressions = new ArrayList<String>();
-        List<String> operators = new ArrayList<String>();
-        int level = 0;
-        int lastIdx = 0;
-        int idx = 0;
-        for (idx = 0; idx < expr.length(); idx++) {
-            char c = expr.charAt(idx);
-            if (c == '(') {
-                level++;
-            } else if (c == ')') {
-                level--;
-                if (level < 0) {
-                    throw new FiqlParseException(String.format("Unexpected closing bracket at position %d",
-                                                               idx));
-                }
-            }
-            String cs = Character.toString(c);
-            boolean isOperator = AND.equals(cs) || OR.equals(cs);
-            if (level == 0 && isOperator) {
-                String s1 = expr.substring(lastIdx, idx);
-                String s2 = expr.substring(idx, idx + 1);
-                subexpressions.add(s1);
-                operators.add(s2);
-                lastIdx = idx + 1;
-            }
-            boolean isEnd = idx == expr.length() - 1;
-            if (isEnd) {
-                String s1 = expr.substring(lastIdx, idx + 1);
-                subexpressions.add(s1);
-                operators.add(null);
-                lastIdx = idx + 1;
-            }
-        }
-        if (level != 0) {
-            throw new FiqlParseException(String
-                .format("Unmatched opening and closing brackets in expression: %s", expr));
-        }
-        if (operators.get(operators.size() - 1) != null) {
-            String op = operators.get(operators.size() - 1);
-            String ex = subexpressions.get(subexpressions.size() - 1);
-            throw new FiqlParseException("Dangling operator at the end of expression: ..." + ex + op);
-        }
-        // looking for adjacent ANDs then group them into ORs
-        // Note: in case not ANDs is found (e.g only ORs) every single subexpression is
-        // treated as "single item group of ANDs"
-        int from = 0;
-        int to = 0;
-        SubExpression ors = new SubExpression(OR);
-        while (to < operators.size()) {
-            while (to < operators.size() && AND.equals(operators.get(to))) {
-                to++;
-            }
-            SubExpression ands = new SubExpression(AND);
-            for (; from <= to; from++) {
-                String subex = subexpressions.get(from);
-                ASTNode<T> node = null;
-                if (subex.startsWith("(")) {
-                    node = parseAndsOrsBrackets(subex.substring(1, subex.length() - 1));
-                } else {
-                    node = parseComparison(subex);
-                }
-                ands.add(node);
-            }
-            to = from;
-            if (ands.getSubnodes().size() == 1) {
-                ors.add(ands.getSubnodes().get(0));
-            } else {
-                ors.add(ands);
-            }
-        }
-        if (ors.getSubnodes().size() == 1) {
-            return ors.getSubnodes().get(0);
-        } else {
-            return ors;
-        }
-    }
-
-    private Comparison parseComparison(String expr) throws FiqlParseException {
-        String comparators = GT + "|" + GE + "|" + LT + "|" + LE + "|" + EQ + "|" + NEQ;
-        String s1 = "[\\p{ASCII}]+(" + comparators + ")";
-        Pattern p = Pattern.compile(s1);
-        Matcher m = p.matcher(expr);
-        if (m.find()) {
-            String name = expr.substring(0, m.start(1));
-            String operator = m.group(1);
-            String value = expr.substring(m.end(1));
-            if ("".equals(value)) {
-                throw new FiqlParseException("Not a comparison expression: " + expr);
-            }
-            Object castedValue = parseDatatype(name, value);
-            return new Comparison(name, operator, castedValue);
-        } else {
-            throw new FiqlParseException("Not a comparison expression: " + expr);
-        }
-    }
-
-    private Object parseDatatype(String setter, String value) throws FiqlParseException {
-        Object castedValue = value;
-        Class<?> valueType;
-        try {
-            valueType = beanspector.getAccessorType(setter);
-        } catch (Exception e) {
-            throw new FiqlParseException(e);
-        }
-        if (Date.class.isAssignableFrom(valueType)) {
-            DateFormat df;
-            try {
-                df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-                // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon
-                int idx = value.lastIndexOf(':');
-                if (idx != -1) {
-                    String v = value.substring(0, idx) + value.substring(idx + 1);
-                    castedValue = df.parse(v);
-                } else {
-                    castedValue = df.parse(value);
-                }
-            } catch (ParseException e) {
-                // is that duration?
-                try {
-                    Date now = new Date();
-                    DatatypeFactory.newInstance().newDuration(value).addTo(now);
-                    castedValue = now;
-                } catch (DatatypeConfigurationException e1) {
-                    throw new FiqlParseException(e1);
-                } catch (IllegalArgumentException e1) {
-                    throw new FiqlParseException("Can parse " + value + " neither as date nor duration", e);
-                }
-            }
-        } else {
-            try {
-                castedValue = InjectionUtils.convertStringToPrimitive(value, valueType);
-            } catch (Exception e) {
-                throw new FiqlParseException("Cannot convert String value \"" + value
-                                             + "\" to a value of class " + valueType.getName(), e);
-            }
-        }
-        return castedValue;
-    }
-
-    // node of abstract syntax tree
-    private interface ASTNode<T> {
-        SearchCondition<T> build() throws FiqlParseException;
-    }
-
-    private class SubExpression implements ASTNode<T> {
-        private String operator;
-        private List<ASTNode<T>> subnodes = new ArrayList<ASTNode<T>>();
-
-        public SubExpression(String operator) {
-            this.operator = operator;
-        }
-
-        public void add(ASTNode<T> node) {
-            subnodes.add(node);
-        }
-
-        public List<ASTNode<T>> getSubnodes() {
-            return Collections.unmodifiableList(subnodes);
-        }
-
-        @Override
-        public String toString() {
-            String s = operator.equals(AND) ? "AND" : "OR";
-            s += ":[";
-            for (int i = 0; i < subnodes.size(); i++) {
-                s += subnodes.get(i);
-                if (i < subnodes.size() - 1) {
-                    s += ", ";
-                }
-            }
-            s += "]";
-            return s;
-        }
-
-        public SearchCondition<T> build() throws FiqlParseException {
-            boolean hasSubtree = false;
-            for (ASTNode<T> node : subnodes) {
-                if (node instanceof FiqlParser.SubExpression) {
-                    hasSubtree = true;
-                    break;
-                }
-            }
-            if (!hasSubtree && AND.equals(operator)) {
-                try {
-                    // Optimization: single SimpleSearchCondition for 'AND' conditions
-                    Map<String, ConditionType> map = new HashMap<String, ConditionType>();
-                    beanspector.instantiate();
-                    for (ASTNode<T> node : subnodes) {
-                        FiqlParser<T>.Comparison comp = (Comparison)node;
-                        map.put(comp.getName(), operatorsMap.get(comp.getOperator()));
-                        beanspector.setValue(comp.getName(), comp.getValue());
-                    }
-                    return new SimpleSearchCondition<T>(map, beanspector.getBean());
-                } catch (Throwable e) {
-                    throw new RuntimeException(e);
-                }
-            } else {
-                List<SearchCondition<T>> scNodes = new ArrayList<SearchCondition<T>>();
-                for (ASTNode<T> node : subnodes) {
-                    scNodes.add(node.build());
-                }
-                if (OR.equals(operator)) {
-                    return new OrSearchCondition<T>(scNodes);
-                } else {
-                    return new AndSearchCondition<T>(scNodes);
-                }
-            }
-        }
-    }
-
-    private class Comparison implements ASTNode<T> {
-        private String name;
-        private String operator;
-        private Object value;
-
-        public Comparison(String name, String operator, Object value) {
-            this.name = name;
-            this.operator = operator;
-            this.value = value;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public String getOperator() {
-            return operator;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        @Override
-        public String toString() {
-            return name + " " + operator + " " + value + " (" + value.getClass().getSimpleName() + ")";
-        }
-
-        public SearchCondition<T> build() throws FiqlParseException {
-            T cond = createTemplate(name, value);
-            ConditionType ct = operatorsMap.get(operator);
-            return new SimpleSearchCondition<T>(ct, cond);
-        }
-
-        private T createTemplate(String setter, Object val) throws FiqlParseException {
-            try {
-                beanspector.instantiate().setValue(setter, val);
-                return beanspector.getBean();
-            } catch (Throwable e) {
-                throw new FiqlParseException(e);
-            }
-        }
-    }
-}
+/**
+ * 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;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
+
+/**
+ * Parses <a href="http://tools.ietf.org/html/draft-nottingham-atompub-fiql-00">FIQL</a> expression to
+ * construct {@link SearchCondition} structure. Since this class operates on Java type T, not on XML
+ * structures "selectors" part of specification is not applicable; instead selectors describes getters of type
+ * T used as search condition type (see {@link SimpleSearchCondition#isMet(Object)} for details.
+ * 
+ * @param <T> type of search condition.
+ */
+public class FiqlParser<T> {
+
+    public static final String OR = ",";
+    public static final String AND = ";";
+
+    public static final String GT = "=gt=";
+    public static final String GE = "=ge=";
+    public static final String LT = "=lt=";
+    public static final String LE = "=le=";
+    public static final String EQ = "==";
+    public static final String NEQ = "!=";
+
+    private static Map<String, ConditionType> operatorsMap;
+    static {
+        operatorsMap = new HashMap<String, ConditionType>();
+        operatorsMap.put(GT, ConditionType.GREATER_THAN);
+        operatorsMap.put(GE, ConditionType.GREATER_OR_EQUALS);
+        operatorsMap.put(LT, ConditionType.LESS_THAN);
+        operatorsMap.put(LE, ConditionType.LESS_OR_EQUALS);
+        operatorsMap.put(EQ, ConditionType.EQUALS);
+        operatorsMap.put(NEQ, ConditionType.NOT_EQUALS);
+    }
+
+    private Beanspector<T> beanspector;
+
+    /**
+     * Creates FIQL parser.
+     * 
+     * @param tclass - class of T used to create condition objects in built syntax tree. Class T must have
+     *            accessible no-arg constructor and complementary setters to these used in FIQL expressions.
+     */
+    public FiqlParser(Class<T> tclass) {
+        beanspector = new Beanspector<T>(tclass);
+    }
+
+    /**
+     * Parses expression and builds search filter. Names used in FIQL expression are names of getters/setters
+     * in type T.
+     * <p>
+     * Example:
+     * 
+     * <pre>
+     * class Condition {
+     *   public String getFoo() {...}
+     *   public void setFoo(String foo) {...}
+     *   public int getBar() {...}
+     *   public void setBar(int bar) {...}
+     * }
+     * 
+     * FiqlParser&lt;Condition> parser = new FiqlParser&lt;Condition&gt;(Condition.class);
+     * parser.parse("foo==mystery*;bar=ge=10");
+     * </pre>
+     * 
+     * @param fiqlExpression expression of filter.
+     * @return tree of {@link SearchCondition} objects representing runtime search structure.
+     * @throws FiqlParseException when expression does not follow FIQL grammar
+     */
+    public SearchCondition<T> parse(String fiqlExpression) throws FiqlParseException {
+        ASTNode<T> ast = parseAndsOrsBrackets(fiqlExpression);
+        // System.out.println(ast);
+        return ast.build();
+    }
+
+    private ASTNode<T> parseAndsOrsBrackets(String expr) throws FiqlParseException {
+        List<String> subexpressions = new ArrayList<String>();
+        List<String> operators = new ArrayList<String>();
+        int level = 0;
+        int lastIdx = 0;
+        int idx = 0;
+        for (idx = 0; idx < expr.length(); idx++) {
+            char c = expr.charAt(idx);
+            if (c == '(') {
+                level++;
+            } else if (c == ')') {
+                level--;
+                if (level < 0) {
+                    throw new FiqlParseException(String.format("Unexpected closing bracket at position %d",
+                                                               idx));
+                }
+            }
+            String cs = Character.toString(c);
+            boolean isOperator = AND.equals(cs) || OR.equals(cs);
+            if (level == 0 && isOperator) {
+                String s1 = expr.substring(lastIdx, idx);
+                String s2 = expr.substring(idx, idx + 1);
+                subexpressions.add(s1);
+                operators.add(s2);
+                lastIdx = idx + 1;
+            }
+            boolean isEnd = idx == expr.length() - 1;
+            if (isEnd) {
+                String s1 = expr.substring(lastIdx, idx + 1);
+                subexpressions.add(s1);
+                operators.add(null);
+                lastIdx = idx + 1;
+            }
+        }
+        if (level != 0) {
+            throw new FiqlParseException(String
+                .format("Unmatched opening and closing brackets in expression: %s", expr));
+        }
+        if (operators.get(operators.size() - 1) != null) {
+            String op = operators.get(operators.size() - 1);
+            String ex = subexpressions.get(subexpressions.size() - 1);
+            throw new FiqlParseException("Dangling operator at the end of expression: ..." + ex + op);
+        }
+        // looking for adjacent ANDs then group them into ORs
+        // Note: in case not ANDs is found (e.g only ORs) every single subexpression is
+        // treated as "single item group of ANDs"
+        int from = 0;
+        int to = 0;
+        SubExpression ors = new SubExpression(OR);
+        while (to < operators.size()) {
+            while (to < operators.size() && AND.equals(operators.get(to))) {
+                to++;
+            }
+            SubExpression ands = new SubExpression(AND);
+            for (; from <= to; from++) {
+                String subex = subexpressions.get(from);
+                ASTNode<T> node = null;
+                if (subex.startsWith("(")) {
+                    node = parseAndsOrsBrackets(subex.substring(1, subex.length() - 1));
+                } else {
+                    node = parseComparison(subex);
+                }
+                ands.add(node);
+            }
+            to = from;
+            if (ands.getSubnodes().size() == 1) {
+                ors.add(ands.getSubnodes().get(0));
+            } else {
+                ors.add(ands);
+            }
+        }
+        if (ors.getSubnodes().size() == 1) {
+            return ors.getSubnodes().get(0);
+        } else {
+            return ors;
+        }
+    }
+
+    private Comparison parseComparison(String expr) throws FiqlParseException {
+        String comparators = GT + "|" + GE + "|" + LT + "|" + LE + "|" + EQ + "|" + NEQ;
+        String s1 = "[\\p{ASCII}]+(" + comparators + ")";
+        Pattern p = Pattern.compile(s1);
+        Matcher m = p.matcher(expr);
+        if (m.find()) {
+            String name = expr.substring(0, m.start(1));
+            String operator = m.group(1);
+            String value = expr.substring(m.end(1));
+            if ("".equals(value)) {
+                throw new FiqlParseException("Not a comparison expression: " + expr);
+            }
+            Object castedValue = parseDatatype(name, value);
+            return new Comparison(name, operator, castedValue);
+        } else {
+            throw new FiqlParseException("Not a comparison expression: " + expr);
+        }
+    }
+
+    private Object parseDatatype(String setter, String value) throws FiqlParseException {
+        Object castedValue = value;
+        Class<?> valueType;
+        try {
+            valueType = beanspector.getAccessorType(setter);
+        } catch (Exception e) {
+            throw new FiqlParseException(e);
+        }
+        if (Date.class.isAssignableFrom(valueType)) {
+            DateFormat df;
+            try {
+                df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+                // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon
+                int idx = value.lastIndexOf(':');
+                if (idx != -1) {
+                    String v = value.substring(0, idx) + value.substring(idx + 1);
+                    castedValue = df.parse(v);
+                } else {
+                    castedValue = df.parse(value);
+                }
+            } catch (ParseException e) {
+                // is that duration?
+                try {
+                    Date now = new Date();
+                    DatatypeFactory.newInstance().newDuration(value).addTo(now);
+                    castedValue = now;
+                } catch (DatatypeConfigurationException e1) {
+                    throw new FiqlParseException(e1);
+                } catch (IllegalArgumentException e1) {
+                    throw new FiqlParseException("Can parse " + value + " neither as date nor duration", e);
+                }
+            }
+        } else {
+            try {
+                castedValue = InjectionUtils.convertStringToPrimitive(value, valueType);
+            } catch (Exception e) {
+                throw new FiqlParseException("Cannot convert String value \"" + value
+                                             + "\" to a value of class " + valueType.getName(), e);
+            }
+        }
+        return castedValue;
+    }
+
+    // node of abstract syntax tree
+    private interface ASTNode<T> {
+        SearchCondition<T> build() throws FiqlParseException;
+    }
+
+    private class SubExpression implements ASTNode<T> {
+        private String operator;
+        private List<ASTNode<T>> subnodes = new ArrayList<ASTNode<T>>();
+
+        public SubExpression(String operator) {
+            this.operator = operator;
+        }
+
+        public void add(ASTNode<T> node) {
+            subnodes.add(node);
+        }
+
+        public List<ASTNode<T>> getSubnodes() {
+            return Collections.unmodifiableList(subnodes);
+        }
+
+        @Override
+        public String toString() {
+            String s = operator.equals(AND) ? "AND" : "OR";
+            s += ":[";
+            for (int i = 0; i < subnodes.size(); i++) {
+                s += subnodes.get(i);
+                if (i < subnodes.size() - 1) {
+                    s += ", ";
+                }
+            }
+            s += "]";
+            return s;
+        }
+
+        public SearchCondition<T> build() throws FiqlParseException {
+            boolean hasSubtree = false;
+            for (ASTNode<T> node : subnodes) {
+                if (node instanceof FiqlParser.SubExpression) {
+                    hasSubtree = true;
+                    break;
+                }
+            }
+            if (!hasSubtree && AND.equals(operator)) {
+                try {
+                    // Optimization: single SimpleSearchCondition for 'AND' conditions
+                    Map<String, ConditionType> map = new HashMap<String, ConditionType>();
+                    beanspector.instantiate();
+                    for (ASTNode<T> node : subnodes) {
+                        FiqlParser<T>.Comparison comp = (Comparison)node;
+                        map.put(comp.getName(), operatorsMap.get(comp.getOperator()));
+                        beanspector.setValue(comp.getName(), comp.getValue());
+                    }
+                    return new SimpleSearchCondition<T>(map, beanspector.getBean());
+                } catch (Throwable e) {
+                    throw new RuntimeException(e);
+                }
+            } else {
+                List<SearchCondition<T>> scNodes = new ArrayList<SearchCondition<T>>();
+                for (ASTNode<T> node : subnodes) {
+                    scNodes.add(node.build());
+                }
+                if (OR.equals(operator)) {
+                    return new OrSearchCondition<T>(scNodes);
+                } else {
+                    return new AndSearchCondition<T>(scNodes);
+                }
+            }
+        }
+    }
+
+    private class Comparison implements ASTNode<T> {
+        private String name;
+        private String operator;
+        private Object value;
+
+        public Comparison(String name, String operator, Object value) {
+            this.name = name;
+            this.operator = operator;
+            this.value = value;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public String getOperator() {
+            return operator;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        @Override
+        public String toString() {
+            return name + " " + operator + " " + value + " (" + value.getClass().getSimpleName() + ")";
+        }
+
+        public SearchCondition<T> build() throws FiqlParseException {
+            T cond = createTemplate(name, value);
+            ConditionType ct = operatorsMap.get(operator);
+            return new SimpleSearchCondition<T>(ct, cond);
+        }
+
+        private T createTemplate(String setter, Object val) throws FiqlParseException {
+            try {
+                beanspector.instantiate().setValue(setter, val);
+                return beanspector.getBean();
+            } catch (Throwable e) {
+                throw new FiqlParseException(e);
+            }
+        }
+    }
+}

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/FiqlParser.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message