← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6605: Unused imports

 

------------------------------------------------------------
revno: 6605
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-04-16 17:40:44 +0200
message:
  Unused imports
modified:
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2Component.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataEndpoint.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataProducer.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/converters/XMLConverterWrappers.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/management/DHIS2LifecycleStrategy.java
  dhis-2/dhis-services/dhis-service-integration/src/main/resources/META-INF/dhis/beans.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2Component.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2Component.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2Component.java	2012-04-16 15:40:44 +0000
@@ -28,15 +28,15 @@
  */
 
 import java.util.Map;
+
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 import org.hisp.dhis.dxf2.datavalueset.DataValueSetService;
-import org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService;
 import org.hisp.dhis.dxf2.metadata.ImportService;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
- * A DHIS2 specific camel component for creating dhis2 endpoints
+ * A DHIS 2 specific camel component for creating dhis2 endpoints
  * 
  * Two forms of uri are supported for the endpoints:
  * 1.  uri="dhis2:metadata?<options>" creates a metadata endpoint for importing metadata 
@@ -46,7 +46,8 @@
  * 
  * @author bobj
  */
-public class Dxf2Component extends DefaultComponent
+public class Dxf2Component 
+    extends DefaultComponent
 {
     public static final String DATA = "data";
 
@@ -54,24 +55,13 @@
     
     @Autowired
     private ImportService importService;
-
-    public void setImportService( ImportService importService )
-    {
-        this.importService = importService;
-    }
     
     @Autowired
     private DataValueSetService dataValueSetService;
 
-    public void setDataValueSetService( DataValueSetService dataValueSetService )
-    {
-        this.dataValueSetService = dataValueSetService;
-    }
-
     @Override
     protected Endpoint createEndpoint( String uri, String remaining, Map<String, Object> parameters ) throws Exception
     {
-        System.out.println("Creating endpoint for "+uri+" , "+remaining);
         if ( !remaining.equals( DATA ) && !remaining.equals( METADATA ) ) 
         {
             throw new UnsupportedOperationException( "Invalid dhis2 uri part " + remaining);

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java	2012-04-16 15:40:44 +0000
@@ -34,18 +34,16 @@
 import org.hisp.dhis.dxf2.datavalueset.DataValueSetService;
 import org.hisp.dhis.dxf2.metadata.ImportOptions;
 import org.hisp.dhis.importexport.ImportStrategy;
-;
 
 /**
- *
  * dataendpoint is created using a uri of the form:
  * dhis2:metadata?dryRun=true|false&importStrategy=NEW|NEW_AND_UPDATES|UPDATES
  * 
  * @author bobj
  */
-public class Dxf2DataEndpoint extends DefaultEndpoint
+public class Dxf2DataEndpoint 
+    extends DefaultEndpoint
 {
-
     protected DataValueSetService dataValueSetService;
 
     public DataValueSetService getDataValueSetService()

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java	2012-04-16 15:40:44 +0000
@@ -34,12 +34,11 @@
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 
 /**
- *
  * @author bobj
  */
-public class Dxf2DataProducer extends DefaultProducer
+public class Dxf2DataProducer 
+    extends DefaultProducer
 {
-
     public Dxf2DataProducer( Dxf2DataEndpoint endpoint )
     {
         super( endpoint );

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataEndpoint.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataEndpoint.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataEndpoint.java	2012-04-16 15:40:44 +0000
@@ -40,7 +40,8 @@
  * 
  * @author bobj
  */
-public class Dxf2MetaDataEndpoint extends DefaultEndpoint
+public class Dxf2MetaDataEndpoint 
+    extends DefaultEndpoint
 {
     protected ImportService importService;
 
@@ -57,7 +58,7 @@
     }
 
     // -------------------------------------------------------------------------------
-    // parameters supported by this endpoint 
+    // Parameters supported by this endpoint 
     // -------------------------------------------------------------------------------
     
     public void setDryRun( Boolean dryRun )
@@ -65,9 +66,6 @@
         options.setDryRun( dryRun );
     }
     
-    
-    // -------------------------------------------------------------------------------
-
     public Dxf2MetaDataEndpoint( String uri, Dxf2Component component, ImportService importService )
     {
         super( uri, component );
@@ -75,11 +73,6 @@
         options= new ImportOptions();
     }
 
-//    public Dxf2MetaDataEndpoint( String endpointUri )
-//    {
-//        super( endpointUri );
-//    }
-
     @Override
     public Producer createProducer() throws Exception
     {

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataProducer.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataProducer.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataProducer.java	2012-04-16 15:40:44 +0000
@@ -28,25 +28,22 @@
  */
 
 import java.io.InputStream;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.dxf2.importsummary.ImportSummary;
-import org.hisp.dhis.dxf2.metadata.ImportOptions;
-import org.hisp.dhis.dxf2.metadata.ImportService;
 import org.hisp.dhis.dxf2.metadata.MetaData;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 
 /**
- *
  * @author bobj
  */
-public class Dxf2MetaDataProducer extends DefaultProducer
+public class Dxf2MetaDataProducer 
+    extends DefaultProducer
 {
-
-    private static final transient Log log = LogFactory.getLog( Dxf2MetaDataProducer.class );
+    private static final Log log = LogFactory.getLog( Dxf2MetaDataProducer.class );
 
     public Dxf2MetaDataProducer( Dxf2MetaDataEndpoint endpoint)
     {

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/converters/XMLConverterWrappers.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/converters/XMLConverterWrappers.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/converters/XMLConverterWrappers.java	2012-04-16 15:40:44 +0000
@@ -35,7 +35,7 @@
 
 /**
  * This class contains annotated static methods to allow various conversions between
- * dhis api objects and dxf2 representatation within integration routes
+ * dhis api objects and dxf2 representations within integration routes
  * 
  * @author bobj
  */

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/management/DHIS2LifecycleStrategy.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/management/DHIS2LifecycleStrategy.java	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/management/DHIS2LifecycleStrategy.java	2012-04-16 15:40:44 +0000
@@ -1,9 +1,31 @@
+package org.hisp.dhis.integration.management;
+
 /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package org.hisp.dhis.integration.management;
-
 
 import java.util.Collection;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -21,17 +43,17 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
- *
  * @author bobj
  */
-public class DHIS2LifecycleStrategy implements LifecycleStrategy
+public class DHIS2LifecycleStrategy 
+    implements LifecycleStrategy
 {
     private final Log log = LogFactory.getLog( DHIS2LifecycleStrategy.class );
     
     @Override
     public void onContextStart(CamelContext context) throws VetoCamelContextStartException
     {
-        log.info( "Camel context started");
+        log.info( "Camel context started" );
         // todo: pickup routes from dhis2_home
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-integration/src/main/resources/META-INF/dhis/beans.xml	2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/resources/META-INF/dhis/beans.xml	2012-04-16 15:40:44 +0000
@@ -8,7 +8,8 @@
 
   <bean id="importService" class="org.hisp.dhis.dxf2.metadata.DefaultImportService" />
   
-  <!-- custom lifecycle strategy -->
+  <!-- Custom lifecycle strategy -->
+  
   <bean id="lifecyclestrategy" class="org.hisp.dhis.integration.management.DHIS2LifecycleStrategy" />
   
   <camel:camelContext id="camel-builtin">