camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r713473 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/impl/ components/camel-http/src/main/java/org/apache/camel/component/http/ components/camel-jetty/src/main/java/org/apa...
Date Wed, 12 Nov 2008 19:37:05 GMT
Author: janstey
Date: Wed Nov 12 11:37:04 2008
New Revision: 713473

URL: http://svn.apache.org/viewvc?rev=713473&view=rev
Log:
CAMEL-1061 - Further removals

Removed:
    activemq/camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
    activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpBinding.java
    activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
    activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcProducer.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java Wed Nov 12
11:37:04 2008
@@ -123,12 +123,6 @@
      */
     void setCamelContext(CamelContext context);
 
-    @Deprecated
-    CamelContext getContext();
-    
-    @Deprecated
-    void setContext(CamelContext context);
-
     /**
      * Should all properties be known or does the endpoint allow unknown options?
      * <p/>
@@ -141,7 +135,7 @@
      * This options is used by a few components for instance the HTTP based that can have
      * dynamic URI options appended that is targeted for an external system.
      * <p/>
-     * Most endpoints is configued to be <b>not</b> lenient.
+     * Most endpoints is configured to be <b>not</b> lenient.
      */
     boolean isLenientProperties();
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
Wed Nov 12 11:37:04 2008
@@ -197,16 +197,6 @@
     protected void setEndpointUri(String endpointUri) {
         this.endpointUri = endpointUri;
     }
-    
-    @Deprecated
-    public CamelContext getContext() {
-        return getCamelContext();
-    }
-    
-    @Deprecated
-    public void setContext(CamelContext context) {
-        setCamelContext(context);
-    }
 
     public boolean isLenientProperties() {
         // default should be false for most components

Modified: activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpBinding.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpBinding.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpBinding.java
(original)
+++ activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpBinding.java
Wed Nov 12 11:37:04 2008
@@ -35,11 +35,6 @@
  */
 public class HttpBinding {
 
-    // This should be a set of lower-case strings
-    @Deprecated
-    public static final Set<String> DEFAULT_HEADERS_TO_IGNORE = new HashSet<String>(Arrays.asList(
-            "content-length", "content-type", HttpProducer.HTTP_RESPONSE_CODE.toLowerCase()));
-
     private boolean useReaderForPayload;
     private HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy();
 
@@ -124,34 +119,6 @@
             && !headerFilterStrategy.applyFilterToCamelHeaders(headerName, headerValue);
     }
 
-    /*
-     * Override the set of headers to ignore for responses and new requests.
-     * @param headersToIgnore should be a set of lower-case strings
-     *
-     * @deprecated please use {@link HeaderPropagationStrategy} instead
-     */
-    @Deprecated
-    public void setIgnoredHeaders(Set<String> headersToIgnore) {
-        if (headerFilterStrategy instanceof DefaultHeaderFilterStrategy) {
-            ((DefaultHeaderFilterStrategy)headerFilterStrategy)
-                .setOutFilter(headersToIgnore);
-        }
-    }
-
-    /**
-     * @deprecated please use {@link org.apache.camel.spi.HeaderFilterStrategy} instead
-     */
-    @Deprecated
-    public Set<String> getIgnoredHeaders() {
-        if (headerFilterStrategy instanceof DefaultHeaderFilterStrategy) {
-            return ((DefaultHeaderFilterStrategy)headerFilterStrategy)
-                    .getOutFilter();
-        } else {
-            return null;
-        }
-
-    }
-
     public boolean isUseReaderForPayload() {
         return useReaderForPayload;
     }

Modified: activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
(original)
+++ activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Wed Nov 12 11:37:04 2008
@@ -49,10 +49,6 @@
     public static final String HTTP_URI = "http.uri";
     public static final String HTTP_RESPONSE_CODE = "http.responseCode";
     public static final String QUERY = "org.apache.camel.component.http.query";    
-    // This should be a set of lower-case strings
-    @Deprecated
-    public static final Set<String> HEADERS_TO_SKIP =
-        new HashSet<String>(Arrays.asList("content-length", "content-type", HTTP_RESPONSE_CODE.toLowerCase()));
     private static final transient Log LOG = LogFactory.getLog(HttpProducer.class);
     private HttpClient httpClient;
 

Modified: activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcProducer.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcProducer.java
(original)
+++ activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcProducer.java
Wed Nov 12 11:37:04 2008
@@ -66,11 +66,6 @@
 public class JhcProducer extends DefaultProducer implements AsyncProcessor {
 
     public static final String HTTP_RESPONSE_CODE = "http.responseCode";
-
-    @Deprecated
-    public static final Set<String> HEADERS_TO_SKIP = new HashSet<String>(Arrays.asList(
-            "content-length", "content-type", HTTP_RESPONSE_CODE.toLowerCase()));
-
     private static final transient Log LOG = LogFactory.getLog(JhcProducer.class);
 
     private int nbThreads = 2;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Wed Nov 12 11:37:04 2008
@@ -184,12 +184,6 @@
         if (recipients.containsKey(Message.RecipientType.BCC)) {
             appendRecipientToMimeMessage(mimeMessage, Message.RecipientType.BCC.toString(),
recipients.get(Message.RecipientType.BCC));
         }
-
-        // fallback to use destination if no TO provided at all
-        String destination = endpoint.getConfiguration().getDestination();
-        if (destination != null && mimeMessage.getRecipients(Message.RecipientType.TO)
== null) {
-            appendRecipientToMimeMessage(mimeMessage, Message.RecipientType.TO.toString(),
destination);
-        }
     }
 
     /**

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
Wed Nov 12 11:37:04 2008
@@ -48,24 +48,6 @@
         this.configuration = new MailConfiguration();
     }
 
-    /**
-     * Static builder method
-     *
-     * @deprecated will be removed in Camel 2.0
-     */
-    public static MailComponent mailComponent() {
-        return new MailComponent();
-    }
-
-    /**
-     * Static builder method
-     *
-     * @deprecated will be removed in Camel 2.0
-     */
-    public static MailComponent mailComponent(MailConfiguration configuration) {
-        return new MailComponent(configuration);
-    }
-
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws
Exception {
         URI url = new URI(uri);

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
Wed Nov 12 11:37:04 2008
@@ -54,7 +54,6 @@
     private boolean ignoreUriScheme;
     private boolean processOnlyUnseenMessages = true;
     private Map<Message.RecipientType, String> recipients = new HashMap<Message.RecipientType,
String>();
-    private String destination;
     private int fetchSize = -1;
     private boolean debugMode;
     private long connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;
@@ -260,35 +259,17 @@
 
     public void setUsername(String username) {
         this.username = username;
-        if (destination == null) {
+        if (getRecipients().size() == 0) {
             // set default destination to username@host for backwards compatibility
             // can be overridden by URI parameters
             String address = username;
             if (address.indexOf("@") == -1) {
                 address += "@" + host;
             }
-            destination = address;
+            setTo(address);
         }
     }
 
-    /**
-     * Gets the destination (recipient <tt>To</tt> email address).
-     *
-     * @deprecated use {@link #getRecipients()}
-     */
-    public String getDestination() {
-        return destination;
-    }
-
-    /**
-     * Sets the destination (recipient <tt>To</tt> email address).
-     *
-     * @deprecated use {@link #setTo(String)}
-     */
-    public void setDestination(String destination) {
-        this.destination = destination;
-    }
-
     public String getFrom() {
         return from;
     }

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java?rev=713473&r1=713472&r2=713473&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
Wed Nov 12 11:37:04 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.mail;
 
+import javax.mail.Message;
+
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 
@@ -31,7 +33,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 25, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
     }
 
@@ -42,7 +44,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 143, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
     }
 
@@ -53,7 +55,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 110, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
     }
 
@@ -64,7 +66,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", MailUtils.DEFAULT_PORT_SMTP, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
@@ -83,7 +85,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", MailUtils.DEFAULT_PORT_POP3, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
@@ -102,7 +104,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", MailUtils.DEFAULT_PORT_IMAP, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
@@ -123,7 +125,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 30, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "riders", config.getFolderName());
         assertEquals("encoding", "iso-8859-1", config.getDefaultEncoding());
         assertEquals("from", "me@camelriders.org", config.getFrom());
@@ -135,14 +137,14 @@
         assertEquals("contentType", "text/html", config.getContentType());
     }
 
-    public void testDestination() {
-        MailEndpoint endpoint = resolveMandatoryEndpoint("smtp://james@myhost:25/?password=secret&destination=someone@outthere.com&folderName=XXX");
+    public void testTo() {
+        MailEndpoint endpoint = resolveMandatoryEndpoint("smtp://james@myhost:25/?password=secret&to=someone@outthere.com&folderName=XXX");
         MailConfiguration config = endpoint.getConfiguration();
         assertEquals("getProtocol()", "smtp", config.getProtocol());
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 25, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "someone@outthere.com", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "someone@outthere.com",
config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "XXX", config.getFolderName());
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
@@ -159,7 +161,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 25, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
@@ -176,7 +178,7 @@
         assertEquals("getHost()", "myhost", config.getHost());
         assertEquals("getPort()", 110, config.getPort());
         assertEquals("getUsername()", "james", config.getUsername());
-        assertEquals("getDestination()", "james@myhost", config.getDestination());
+        assertEquals("getRecipients().get(Message.RecipientType.TO)", "james@myhost", config.getRecipients().get(Message.RecipientType.TO));
         assertEquals("folder", "INBOX", config.getFolderName());
         assertEquals("fetchSize", 5, config.getFetchSize());
     }



Mime
View raw message