camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r748092 - in /camel/trunk/components/camel-atom/src: main/java/org/apache/camel/component/atom/ test/java/org/apache/camel/component/atom/
Date Thu, 26 Feb 2009 11:25:58 GMT
Author: davsclaus
Date: Thu Feb 26 11:25:57 2009
New Revision: 748092

URL: http://svn.apache.org/viewvc?rev=748092&view=rev
Log:
CAMEL-1373: Using CamelCase keys.

Added:
    camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
  (with props)
Modified:
    camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
    camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java

Added: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java?rev=748092&view=auto
==============================================================================
--- camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
(added)
+++ camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
Thu Feb 26 11:25:57 2009
@@ -0,0 +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.camel.component.atom;
+
+/**
+ * Atom constants
+ */
+public final class AtomConstants {
+
+    /**
+     * Header key for the {@link org.apache.abdera.model.Feed} object is stored on the in
message on the exchange.
+     */
+    public static final String ATOM_FEED = "CamelAtomFeed";
+
+    private AtomConstants() {
+        // utility class
+    }
+}

Propchange: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomConstants.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java?rev=748092&r1=748091&r2=748092&view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
(original)
+++ camel/trunk/components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEndpoint.java
Thu Feb 26 11:25:57 2009
@@ -31,10 +31,6 @@
  * @version $Revision$
  */
 public class AtomEndpoint extends FeedEndpoint {
-    /**
-     * Header key for the {@link org.apache.abdera.model.Feed} object is stored on the in
message on the exchange.
-     */
-    public static final String HEADER_ATOM_FEED = "org.apache.camel.component.atom.feed";
 
     public AtomEndpoint() {
     }
@@ -53,14 +49,14 @@
 
     @Override
     public Exchange createExchange(Object feed) {
-        Exchange exchange = createExchangeWithFeedHeader(feed, HEADER_ATOM_FEED);
+        Exchange exchange = createExchangeWithFeedHeader(feed, AtomConstants.ATOM_FEED);
         exchange.getIn().setBody(((Feed)feed).getEntries());
         return exchange;
     }
 
     @Override
     public Exchange createExchange(Object feed, Object entry) {
-        Exchange exchange = createExchangeWithFeedHeader(feed, HEADER_ATOM_FEED);
+        Exchange exchange = createExchangeWithFeedHeader(feed, AtomConstants.ATOM_FEED);
         exchange.getIn().setBody(entry);
         return exchange;
     }

Modified: camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java?rev=748092&r1=748091&r2=748092&view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java
(original)
+++ camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingConsumerTest.java
Thu Feb 26 11:25:57 2009
@@ -39,9 +39,9 @@
         Message in = exchange.getIn();
         assertNotNull(in);
         assertTrue(in.getBody() instanceof List);
-        assertTrue(in.getHeader(AtomEndpoint.HEADER_ATOM_FEED) instanceof Feed);
+        assertTrue(in.getHeader(AtomConstants.ATOM_FEED) instanceof Feed);
 
-        Feed feed = in.getHeader(AtomEndpoint.HEADER_ATOM_FEED, Feed.class);
+        Feed feed = in.getHeader(AtomConstants.ATOM_FEED, Feed.class);
         assertEquals("James Strachan", feed.getAuthor().getName());
 
         List entries = in.getBody(List.class);



Mime
View raw message