Author: ningjiang
Date: Fri Sep 12 04:10:15 2008
New Revision: 694680

URL: http://svn.apache.org/viewvc?rev=694680&view=rev
Log:
Fixed the CS errors

Modified:
    
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapComponent.java
    
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
    
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
    
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
    
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapTestSupport.java
    
activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java

Modified: 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapComponent.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapComponent.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapComponent.java
 (original)
+++ 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapComponent.java
 Fri Sep 12 04:10:15 2008
@@ -16,13 +16,13 @@
  */
 package org.apache.camel.component.ldap;
 
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultComponent;
 
-import java.util.Map;
-
 /**
  * Represents the component that manages [EMAIL PROTECTED] LdapEndpoint}(s).
  *

Modified: 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
 (original)
+++ 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
 Fri Sep 12 04:10:15 2008
@@ -30,15 +30,15 @@
 
 /**
  * Represents an endpoint that synchronously invokes an LDAP server when a 
producer sends a message to it.
- * 
- * @version 
+ *
+ * @version
  */
 public class LdapEndpoint<E extends Exchange> extends DefaultEndpoint<E> {
     public static final String SYSTEM_DN  = "ou=system";
     public static final String OBJECT_SCOPE = "object";
     public static final String ONELEVEL_SCOPE = "onelevel";
     public static final String SUBTREE_SCOPE = "subtree";
-    
+
     private String remaining;
     private String base = SYSTEM_DN;
     private String scope = SUBTREE_SCOPE;
@@ -53,43 +53,43 @@
         this.remaining = remaining;
     }
 
-       public Consumer<E> createConsumer(Processor processor) throws Exception 
{
+    public Consumer<E> createConsumer(Processor processor) throws Exception {
         throw new RuntimeCamelException("An LDAP Consumer would be the LDAP 
server itself! No such support here");
-       }
+    }
 
-       public Producer<E> createProducer() throws Exception {
+    public Producer<E> createProducer() throws Exception {
         return new LdapProducer(this, remaining, base, 
toSearchControlScope(scope));
-       }
+    }
+
+    public boolean isSingleton() {
+        return true;
+    }
+
+    public String getBase() {
+        return base;
+    }
+
+    public void setBase(String base) {
+        this.base = base;
+    }
+
+    public String getScope() {
+        return scope;
+    }
+
+    public void setScope(String scope) {
+        this.scope = scope;
+    }
 
-       public boolean isSingleton() {
-               return true;
-       }
-       
-       public String getBase() {
-               return base;
-       }
-       
-       public void setBase(String base) {
-               this.base = base;
-       }
-       
-       public String getScope() {
-               return scope;
-       }
-       
-       public void setScope(String scope) {
-               this.scope = scope;
-       }
-       
-       private int toSearchControlScope(String scope) throws CamelException {
-               if (scope.equalsIgnoreCase(OBJECT_SCOPE)) {
-                       return SearchControls.OBJECT_SCOPE;
-               } else if (scope.equalsIgnoreCase(ONELEVEL_SCOPE)) {
-                       return SearchControls.ONELEVEL_SCOPE;
-           } else if (scope.equalsIgnoreCase(SUBTREE_SCOPE)) {
+    private int toSearchControlScope(String scope) throws CamelException {
+        if (scope.equalsIgnoreCase(OBJECT_SCOPE)) {
+            return SearchControls.OBJECT_SCOPE;
+        } else if (scope.equalsIgnoreCase(ONELEVEL_SCOPE)) {
+            return SearchControls.ONELEVEL_SCOPE;
+        } else if (scope.equalsIgnoreCase(SUBTREE_SCOPE)) {
             return SearchControls.SUBTREE_SCOPE;
         } else {
-            throw new CamelException("Invalid search scope \"" + scope 
+            throw new CamelException("Invalid search scope \"" + scope
                 + "\" for LdapEndpoint: " + getEndpointUri());
         }
     }

Modified: 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
 (original)
+++ 
activemq/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapProducer.java
 Fri Sep 12 04:10:15 2008
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -42,32 +41,32 @@
 
     public LdapProducer(LdapEndpoint endpoint, String remaining, String base, 
int scope) throws Exception {
         super(endpoint);
-        
+
         ldapContext = 
(DirContext)getEndpoint().getCamelContext().getRegistry().lookup(remaining);
         searchBase = base;
         controls = new SearchControls();
         controls.setSearchScope(scope);
     }
 
-       public void process(Exchange exchange) throws Exception {
+    public void process(Exchange exchange) throws Exception {
         String filter = exchange.getIn().getBody(String.class);
 
         // could throw NamingException
         List<SearchResult> data = new ArrayList<SearchResult>();
-        NamingEnumeration<SearchResult> namingEnumeration = 
+        NamingEnumeration<SearchResult> namingEnumeration =
             ldapContext.search(searchBase, filter, getControls());
-        
-        while(namingEnumeration.hasMore()) {
+
+        while (namingEnumeration.hasMore()) {
             data.add(namingEnumeration.next());
         }
         exchange.getOut().setBody(data);
-       }
+    }
 
     public DirContext getDirContext() {
-       return ldapContext;
+        return ldapContext;
     }
-    
+
     protected SearchControls getControls() {
-       return controls;
+        return controls;
     }
 }

Modified: 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java
 Fri Sep 12 04:10:15 2008
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -28,7 +27,7 @@
 
 
 public class LdapRouteTest extends LdapTestSupport {
-       
+
     public void testLdapRoute() throws Exception {
         // START SNIPPET: invoke
         Endpoint endpoint = context.getEndpoint("direct:start");
@@ -44,7 +43,7 @@
         assertNotNull(out.getOut());
         Collection<SearchResult> data = out.getOut().getBody(Collection.class);
         assertNotNull("out body could not be converted to a Collection - was: 
" + out.getOut().getBody(), data);
-        
+
         assertFalse(contains("uid=test1,ou=test,ou=system", data));
         assertTrue(contains("uid=test2,ou=test,ou=system", data));
         assertTrue(contains("uid=testNoOU,ou=test,ou=system", data));

Modified: 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapTestSupport.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapTestSupport.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapTestSupport.java
 (original)
+++ 
activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapTestSupport.java
 Fri Sep 12 04:10:15 2008
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -61,7 +60,7 @@
 
         // disable JMX
         System.setProperty(JmxSystemPropertyKeys.DISABLED, "true");
-        
+
         // create Camel context
         context = createCamelContext();
         assertValidContext(context);
@@ -81,13 +80,13 @@
 
         log.debug("Routing Rules are: " + context.getRoutes());
     }
-    
+
     @Override
     public void tearDown() throws Exception {
         log.debug("tearDown test: " + getName());
         template.stop();
         stopCamelContext();
-        
+
         super.tearDown();
     }
 
@@ -95,15 +94,15 @@
         Set<SearchResult> results = new HashSet<SearchResult>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
-        
+
         NamingEnumeration<SearchResult> namingEnumeration = ctx.search(
             ServerDNConstants.SYSTEM_DN, filter, controls);
-        while(namingEnumeration.hasMore()) {
+        while (namingEnumeration.hasMore()) {
             results.add(namingEnumeration.next());
         }
         return results;
     }
-    
+
     protected boolean contains(String dn, Collection<SearchResult> results) {
         for (SearchResult result : results) {
             if (result.getNameInNamespace().equals(dn)) {
@@ -113,7 +112,7 @@
 
         return false;
     }
-    
+
     protected CamelContext createCamelContext() throws Exception {
         return new DefaultCamelContext(createRegistry());
     }

Modified: 
activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java?rev=694680&r1=694679&r2=694680&view=diff
==============================================================================
--- 
activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
 (original)
+++ 
activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
 Fri Sep 12 04:10:15 2008
@@ -91,6 +91,21 @@
     protected boolean useDot;
 
     /**
+     * The classpath based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.applicationContextUri}"
+     */
+    protected String applicationContextUri;
+
+    /**
+     * The filesystem based application context uri that spring wants to get.
+     *
+     * @parameter expression="${camel.fileApplicationContextUri}"
+     */
+    protected String fileApplicationContextUri;
+
+
+    /**
      * Reference to Maven 2 Project.
      *
      * @parameter expression="${project}"
@@ -115,19 +130,6 @@
      */
     private File outputDirectory;
 
-    /**
-     * The classpath based application context uri that spring wants to get.
-     *
-     * @parameter expression="${camel.applicationContextUri}"
-     */
-    protected String applicationContextUri;
-
-    /**
-     * The filesystem based application context uri that spring wants to get.
-     *
-     * @parameter expression="${camel.fileApplicationContextUri}"
-     */
-    protected String fileApplicationContextUri;
 
     /**
      * In the case of multiple camel contexts, setting aggregate == true will


Reply via email to