From commits-return-6544-apmail-servicemix-commits-archive=servicemix.apache.org@servicemix.apache.org Wed Apr 30 15:36:58 2008 Return-Path: Delivered-To: apmail-servicemix-commits-archive@www.apache.org Received: (qmail 15808 invoked from network); 30 Apr 2008 15:36:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2008 15:36:58 -0000 Received: (qmail 51840 invoked by uid 500); 30 Apr 2008 15:36:59 -0000 Delivered-To: apmail-servicemix-commits-archive@servicemix.apache.org Received: (qmail 51823 invoked by uid 500); 30 Apr 2008 15:36:59 -0000 Mailing-List: contact commits-help@servicemix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@servicemix.apache.org Delivered-To: mailing list commits@servicemix.apache.org Received: (qmail 51812 invoked by uid 99); 30 Apr 2008 15:36:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 08:36:59 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 15:36:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AEC83238895F; Wed, 30 Apr 2008 08:36:32 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r652401 - in /servicemix/smx4/nmr/trunk: assembly/src/main/filtered-resources/ nmr/core/src/main/java/org/apache/servicemix/nmr/core/ Date: Wed, 30 Apr 2008 15:36:30 -0000 To: commits@servicemix.apache.org From: gnodet@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080430153632.AEC83238895F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gnodet Date: Wed Apr 30 08:36:26 2008 New Revision: 652401 URL: http://svn.apache.org/viewvc?rev=652401&view=rev Log: Add ASF headers and add missing bundle in the feature Modified: servicemix/smx4/nmr/trunk/assembly/src/main/filtered-resources/features.xml servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/CamelConverter.java servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/Converter.java servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DummyConverter.java Modified: servicemix/smx4/nmr/trunk/assembly/src/main/filtered-resources/features.xml URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/assembly/src/main/filtered-resources/features.xml?rev=652401&r1=652400&r2=652401&view=diff ============================================================================== --- servicemix/smx4/nmr/trunk/assembly/src/main/filtered-resources/features.xml (original) +++ servicemix/smx4/nmr/trunk/assembly/src/main/filtered-resources/features.xml Wed Apr 30 08:36:26 2008 @@ -27,10 +27,11 @@ nmr - mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/${geronimo.activation.version} + mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version} + mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/${geronimo.activation.version} mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/${geronimo.javamail.version} mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta.version} - mvn:http://svn.apache.org/repos/asf/servicemix/m2-repo!org.apache.xbean/xbean-classloader/${xbean.version} + mvn:org.apache.xbean/xbean-classloader/${xbean.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox-3.2.3/${pom.version} mvn:org.apache.servicemix.jbi/org.apache.servicemix.jbi.api/${pom.version} mvn:org.apache.servicemix.jbi/org.apache.servicemix.jbi.runtime/${pom.version} Modified: servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/CamelConverter.java URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/CamelConverter.java?rev=652401&r1=652400&r2=652401&view=diff ============================================================================== --- servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/CamelConverter.java (original) +++ servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/CamelConverter.java Wed Apr 30 08:36:26 2008 @@ -1,17 +1,32 @@ +/* + * 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.servicemix.nmr.core; /** - * Created by IntelliJ IDEA. -* User: gnodet -* Date: Feb 21, 2008 -* Time: 10:42:57 PM -* To change this template use File | Settings | File Templates. -*/ + * A converter using Camel underneath + */ class CamelConverter implements Converter { + final org.apache.camel.impl.converter.DefaultTypeConverter tc = new org.apache.camel.impl.converter.DefaultTypeConverter( new org.apache.camel.impl.ReflectionInjector()); + public T convert(Object body, Class type) { return tc.convertTo(type, body); } + } Modified: servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/Converter.java URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/Converter.java?rev=652401&r1=652400&r2=652401&view=diff ============================================================================== --- servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/Converter.java (original) +++ servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/Converter.java Wed Apr 30 08:36:26 2008 @@ -1,12 +1,32 @@ +/* + * 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.servicemix.nmr.core; /** - * Created by IntelliJ IDEA. -* User: gnodet -* Date: Feb 21, 2008 -* Time: 10:42:38 PM -* To change this template use File | Settings | File Templates. -*/ + * Allow pluggable conversion strategies + */ interface Converter { + + /** + * Convert the body to the given class + * @param body the object to convert + * @param type the expected type + * @return a converted object or null + */ T convert(Object body, Class type); + } Modified: servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DummyConverter.java URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DummyConverter.java?rev=652401&r1=652400&r2=652401&view=diff ============================================================================== --- servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DummyConverter.java (original) +++ servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DummyConverter.java Wed Apr 30 08:36:26 2008 @@ -1,14 +1,28 @@ +/* + * 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.servicemix.nmr.core; /** - * Created by IntelliJ IDEA. -* User: gnodet -* Date: Feb 21, 2008 -* Time: 10:43:10 PM -* To change this template use File | Settings | File Templates. -*/ + * A dummy converter, that actually does nothing. + */ class DummyConverter implements Converter { + public T convert(Object body, Class type) { return null; } + }