Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 68109 invoked from network); 3 Apr 2009 06:41:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 06:41:59 -0000 Received: (qmail 32048 invoked by uid 500); 3 Apr 2009 06:41:58 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 32006 invoked by uid 500); 3 Apr 2009 06:41:58 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 31997 invoked by uid 99); 3 Apr 2009 06:41:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 06:41:58 +0000 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; Fri, 03 Apr 2009 06:41:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8041023888E7; Fri, 3 Apr 2009 06:41:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r761538 - in /camel/branches/camel-1.x: ./ components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java Date: Fri, 03 Apr 2009 06:41:35 -0000 To: commits@camel.apache.org From: davsclaus@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090403064135.8041023888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davsclaus Date: Fri Apr 3 06:41:34 2009 New Revision: 761538 URL: http://svn.apache.org/viewvc?rev=761538&view=rev Log: Merged revisions 761536 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk ........ r761536 | davsclaus | 2009-04-03 08:37:02 +0200 (Fri, 03 Apr 2009) | 1 line CAMEL-1496: Atom and RSS supports having URI parameteres on http/https feeds. ........ Modified: camel/branches/camel-1.x/ (props changed) camel/branches/camel-1.x/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java camel/branches/camel-1.x/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java Propchange: camel/branches/camel-1.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 3 06:41:34 2009 @@ -1 +1 @@ -/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194 +/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536 Propchange: camel/branches/camel-1.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-1.x/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java?rev=761538&r1=761537&r2=761538&view=diff ============================================================================== --- camel/branches/camel-1.x/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java (original) +++ camel/branches/camel-1.x/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomComponent.java Fri Apr 3 06:41:34 2009 @@ -16,21 +16,34 @@ */ package org.apache.camel.component.atom; +import java.net.URI; import java.util.Map; import org.apache.camel.Endpoint; import org.apache.camel.impl.DefaultComponent; +import org.apache.camel.util.URISupport; /** * An Atom Component. *

- * Camel uses Apache Abdera as the Atom implementation. + * Camel uses Apache Abdera as the Atom implementation. * * @version $Revision$ */ public class AtomComponent extends DefaultComponent { protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { + + // Parameters should be kept in the remaining path, since they might be needed to get the actual ATOM feed + URI remainingUri = URISupport.createRemainingURI(new URI(remaining), parameters); + + // if http or https then the uri should include the parameters as we can have URI parameters + // that need to be sent to the remote server when retrieving feeds + String scheme = remainingUri.getScheme(); + if (scheme != null && (scheme.equals("http") || scheme.equals("https"))) { + return new AtomEndpoint(uri, this, remainingUri.toString()); + } + return new AtomEndpoint(uri, this, remaining); } Modified: camel/branches/camel-1.x/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java?rev=761538&r1=761537&r2=761538&view=diff ============================================================================== --- camel/branches/camel-1.x/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java (original) +++ camel/branches/camel-1.x/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomProducerTest.java Fri Apr 3 06:41:34 2009 @@ -25,7 +25,7 @@ public void testNotYetImplemented() throws Exception { try { - context.getEndpoint("atom:file:target/out.atom").createProducer(); + context.getEndpoint("atom:file://target/out.atom").createProducer(); fail("Should have thrown an UnsupportedOperationException"); } catch (UnsupportedOperationException e) { // ok