You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/04/02 04:48:04 UTC

svn commit: r761150 - in /camel/trunk/components: camel-jms/src/main/java/org/apache/camel/component/jms/ camel-mail/src/main/java/org/apache/camel/component/mail/ camel-web/src/main/java/org/apache/camel/web/resources/

Author: ningjiang
Date: Thu Apr  2 02:48:04 2009
New Revision: 761150

URL: http://svn.apache.org/viewvc?rev=761150&view=rev
Log:
CAMEL-1507 Added the missing MailConstants.java and fixed some CS errors

Added:
    camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java   (with props)
Modified:
    camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
    camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java

Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java?rev=761150&r1=761149&r2=761150&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java (original)
+++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java Thu Apr  2 02:48:04 2009
@@ -157,8 +157,8 @@
                 String name = names.nextElement().toString();
                 try {
                     Object value = jmsMessage.getObjectProperty(name);
-                    if (headerFilterStrategy != null && 
-                        headerFilterStrategy.applyFilterToExternalHeaders(name, value, exchange)) {
+                    if (headerFilterStrategy != null
+                        && headerFilterStrategy.applyFilterToExternalHeaders(name, value, exchange)) {
                         continue;
                     }
 
@@ -400,7 +400,7 @@
         if (LOG.isDebugEnabled()) {
             LOG.debug("Could not determine specific JmsMessage type to use from body."
                     + " Will use generic JmsMessage."
-                    + (body != null ? (" Body class: " + body.getClass().getCanonicalName()) : "") );
+                    + (body != null ? (" Body class: " + body.getClass().getCanonicalName()) : ""));
         }
 
         // return a default message

Added: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java?rev=761150&view=auto
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java (added)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConstants.java Thu Apr  2 02:48:04 2009
@@ -0,0 +1,29 @@
+/**
+ * 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.mail;
+
+public final class MailConstants {
+    public static final String DEFAULT_ALTERNATE_BODY_HEADER = "mailAlternateBody";
+    public static final String DEFAULT_FOLDER_NAME = "INBOX";
+    public static final String DEFAULT_FROM = "camel@localhost";    
+    public static final long DEFAULT_CONNECTION_TIMEOUT = 30000L;
+    
+    private MailConstants() {
+        // utility class
+    }
+}

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

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

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java?rev=761150&r1=761149&r2=761150&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java (original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java Thu Apr  2 02:48:04 2009
@@ -16,13 +16,12 @@
  */
 package org.apache.camel.web.resources;
 
-import com.sun.jersey.api.representation.Form;
-import com.sun.jersey.api.view.Viewable;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.view.RouteDotGenerator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Collections;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -37,12 +36,15 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collections;
+
+import com.sun.jersey.api.representation.Form;
+import com.sun.jersey.api.view.Viewable;
+
+import org.apache.camel.model.RouteDefinition;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.view.RouteDotGenerator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A single Camel Route which is used to implement one or more