dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16967
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6606: Unused imports
------------------------------------------------------------
revno: 6606
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-04-16 17:48:50 +0200
message:
Unused imports
modified:
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/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-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/AddRouteAction.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/DisplayRoutesAction.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/ShowAddRouteFormAction.java
--
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/Dxf2DataEndpoint.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java 2012-04-16 15:40:44 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataEndpoint.java 2012-04-16 15:48:50 +0000
@@ -51,9 +51,9 @@
return dataValueSetService;
}
- // -------------------------------------------------------------------------------
- // parameters supported by this endpoint
- // -------------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // Parameters supported by this endpoint
+ // -------------------------------------------------------------------------
protected ImportOptions importOptions;
@@ -72,8 +72,6 @@
importOptions.setDryRun( dryRun );
}
- // -------------------------------------------------------------------------------
-
public Dxf2DataEndpoint( String uri, Dxf2Component component, DataValueSetService dataValueSetService )
{
super( uri, component );
=== 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:40:44 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataEndpoint.java 2012-04-16 15:48:50 +0000
@@ -57,9 +57,9 @@
return this.options;
}
- // -------------------------------------------------------------------------------
- // Parameters supported by this endpoint
- // -------------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // Parameters supported by this end point
+ // -------------------------------------------------------------------------
public void setDryRun( Boolean dryRun )
{
=== 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:40:44 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2MetaDataProducer.java 2012-04-16 15:48:50 +0000
@@ -54,6 +54,7 @@
public void process( Exchange exchange ) throws Exception
{
log.info( this.getEndpoint().getEndpointUri() + " : " + exchange.getIn().getBody() );
+
Dxf2MetaDataEndpoint endpoint = (Dxf2MetaDataEndpoint) this.getEndpoint();
MetaData metadata = JacksonUtils.fromXml( (InputStream) exchange.getIn().getBody(), MetaData.class );
=== 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:40:44 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/converters/XMLConverterWrappers.java 2012-04-16 15:48:50 +0000
@@ -43,7 +43,8 @@
public class XMLConverterWrappers
{
@Converter
- public static MetaData toMetaData(InputStream inputStream) throws IOException
+ public static MetaData toMetaData( InputStream inputStream )
+ throws IOException
{
return JacksonUtils.fromXml( inputStream, MetaData.class );
}
=== 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:40:44 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/management/DHIS2LifecycleStrategy.java 2012-04-16 15:48:50 +0000
@@ -51,7 +51,8 @@
private final Log log = LogFactory.getLog( DHIS2LifecycleStrategy.class );
@Override
- public void onContextStart(CamelContext context) throws VetoCamelContextStartException
+ public void onContextStart( CamelContext context )
+ throws VetoCamelContextStartException
{
log.info( "Camel context started" );
// todo: pickup routes from dhis2_home
@@ -60,31 +61,31 @@
@Override
public void onContextStop( CamelContext cc )
{
- log.info( "Camel context stopped");
+ log.info( "Camel context stopped" );
}
@Override
public void onComponentAdd( String name, Component cmpnt )
{
- log.info( "Camel component added: " + name);
+ log.info( "Camel component added: " + name );
}
@Override
public void onComponentRemove( String name, Component cmpnt )
{
- log.info( "Camel component removed: " + name);
+ log.info( "Camel component removed: " + name );
}
@Override
public void onEndpointAdd( Endpoint endpnt )
{
- log.info( "Camel endpoint added: " + endpnt.getEndpointUri());
+ log.info( "Camel endpoint added: " + endpnt.getEndpointUri() );
}
@Override
public void onEndpointRemove( Endpoint endpnt )
{
- log.info( "Camel endpoint removed: " + endpnt.getEndpointUri());
+ log.info( "Camel endpoint removed: " + endpnt.getEndpointUri() );
}
@Override
@@ -100,30 +101,30 @@
@Override
public void onRoutesAdd( Collection<Route> clctn )
{
- log.debug( "Camel routes added");
+ log.debug( "Camel routes added" );
}
@Override
public void onRoutesRemove( Collection<Route> clctn )
{
- log.debug( "Camel routes removed");
+ log.debug( "Camel routes removed" );
}
@Override
public void onRouteContextCreate( RouteContext rc )
{
- log.debug( "Camel route context created");
+ log.debug( "Camel route context created" );
}
@Override
public void onErrorHandlerAdd( RouteContext rc, Processor prcsr, ErrorHandlerFactory ehf )
{
- log.info( "Camel error handler added: " + ehf.toString());
+ log.info( "Camel error handler added: " + ehf.toString() );
}
@Override
public void onThreadPoolAdd( CamelContext cc, ThreadPoolExecutor tpe, String string, String string1, String string2, String string3 )
{
- log.debug( "Camel threadpool added");
+ log.debug( "Camel threadpool added" );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/AddRouteAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/AddRouteAction.java 2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/AddRouteAction.java 2012-04-16 15:48:50 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
import com.opensymphony.xwork2.Action;
import java.io.File;
import java.io.FileInputStream;
@@ -44,16 +43,18 @@
implements Action
{
private static final Log log = LogFactory.getLog( AddRouteAction.class );
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
- CamelContext builtinCamelContext;
-
- public void setBuiltinCamelContext(CamelContext camelContext) {
+
+ private CamelContext builtinCamelContext;
+
+ public void setBuiltinCamelContext( CamelContext camelContext )
+ {
this.builtinCamelContext = camelContext;
}
-
+
private File file;
public void setUpload( File file )
@@ -68,12 +69,6 @@
this.fileName = fileName;
}
- private String contentType;
-
- public void setUploadContentType( String contentType )
- {
- this.contentType = contentType;
- }
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -81,19 +76,24 @@
public String execute()
throws Exception
{
- log.info("Uploaded " + fileName);
- if (file!=null) {
- FileInputStream is = new FileInputStream(file);
- try {
- RoutesDefinition routes = builtinCamelContext.loadRoutesDefinition(is);
- builtinCamelContext.addRouteDefinitions(routes.getRoutes());
- }
- catch (Exception e )
- {
- log.info("Unable to load route: " + e.getMessage());
- return ERROR;
- }
+ log.info( "Uploaded " + fileName );
+
+ if ( file != null )
+ {
+ FileInputStream is = new FileInputStream( file );
+
+ try
+ {
+ RoutesDefinition routes = builtinCamelContext.loadRoutesDefinition( is );
+ builtinCamelContext.addRouteDefinitions( routes.getRoutes() );
+ }
+ catch ( Exception e )
+ {
+ log.info( "Unable to load route: " + e.getMessage() );
+ return ERROR;
+ }
}
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/DisplayRoutesAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/DisplayRoutesAction.java 2012-04-08 11:41:33 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/DisplayRoutesAction.java 2012-04-16 15:48:50 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
import com.opensymphony.xwork2.Action;
import java.util.List;
import org.apache.camel.CamelContext;
@@ -43,19 +42,20 @@
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
- CamelContext builtinCamelContext;
-
- public void setBuiltinCamelContext(CamelContext camelContext) {
+
+ private CamelContext builtinCamelContext;
+
+ public void setBuiltinCamelContext( CamelContext camelContext )
+ {
this.builtinCamelContext = camelContext;
}
-
- List<RouteDefinition> routeDefinitions;
-
- public List<RouteDefinition> getRouteDefinitions() {
+
+ private List<RouteDefinition> routeDefinitions;
+
+ public List<RouteDefinition> getRouteDefinitions()
+ {
return routeDefinitions;
}
-
// -------------------------------------------------------------------------
// Action implementation
@@ -65,7 +65,7 @@
throws Exception
{
routeDefinitions = builtinCamelContext.getRouteDefinitions();
-
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/ShowAddRouteFormAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/ShowAddRouteFormAction.java 2012-04-16 15:12:08 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/integration/ShowAddRouteFormAction.java 2012-04-16 15:48:50 +0000
@@ -27,14 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
import com.opensymphony.xwork2.Action;
-import java.io.File;
-import java.io.FileInputStream;
-import org.apache.camel.CamelContext;
-import org.apache.camel.model.RoutesDefinition;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* @author Bob Jolliffe
@@ -43,11 +36,10 @@
public class ShowAddRouteFormAction
implements Action
{
- private static final Log log = LogFactory.getLog( ShowAddRouteFormAction.class );
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------