← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17357: Codestyle

 

------------------------------------------------------------
revno: 17357
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-11-04 18:56:37 -0500
message:
  Codestyle
modified:
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataExportAction.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-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataExportAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataExportAction.java	2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataExportAction.java	2014-11-04 23:56:37 +0000
@@ -50,7 +50,6 @@
 
 /**
  * @author Lars Helge Overland
- * @version $Id$
  */
 public class DataExportAction
     implements Action
@@ -70,18 +69,18 @@
 
     private CurrentUserService currentUserService;
 
-    public void setCurrentUserService( CurrentUserService currentUserService)
+    public void setCurrentUserService( CurrentUserService currentUserService )
     {
         this.currentUserService = currentUserService;
     }
-    
+
     private DataElementService dataElementService;
 
     public void setDataElementService( DataElementService dataElementService )
     {
         this.dataElementService = dataElementService;
     }
-    
+
     private OrganisationUnitService organisationUnitService;
 
     public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
@@ -136,7 +135,7 @@
     {
         this.exportFormat = exportFormat;
     }
-    
+
     private boolean dataValue;
 
     public void setDataValue( boolean dataValue )
@@ -150,7 +149,7 @@
     {
         this.dataValueDaily = dataValueDaily;
     }
-    
+
     private String startDate;
 
     public void setStartDate( String startDate )
@@ -175,76 +174,71 @@
     {
         ExportParams params = new ExportParams();
 
-        if ( dataValue || dataValueDaily  )
+        if ( dataValue || dataValueDaily )
         {
             params.setCategories( null );
             params.setCategoryCombos( null );
             params.setCategoryOptions( null );
             params.setCategoryOptionCombos( null );
             /*
-            params.setDataElementGroups( null );
-            params.setDataElementGroupSets( null );
-            params.setIndicators( null );
-            params.setIndicatorTypes( null );
-            params.setIndicatorGroups( null );
-            params.setIndicatorGroupSets( null );
-            params.setDataDictionaries( null );
-            params.setDataSets( null );
-            params.setOrganisationUnitGroups( null );
-            params.setOrganisationUnitGroupSets( null );
-            params.setOrganisationUnitLevels( null );
-            params.setValidationRules( null );
-            params.setReports( null );
-            params.setReportTables( null );
-            params.setPeriods( null ); // TODO Include only relevant periods
-            params.setCharts( null );
-            params.setPeriods( null );*/
-            
+             * params.setDataElementGroups( null );
+             * params.setDataElementGroupSets( null ); params.setIndicators(
+             * null ); params.setIndicatorTypes( null );
+             * params.setIndicatorGroups( null ); params.setIndicatorGroupSets(
+             * null ); params.setDataDictionaries( null ); params.setDataSets(
+             * null ); params.setOrganisationUnitGroups( null );
+             * params.setOrganisationUnitGroupSets( null );
+             * params.setOrganisationUnitLevels( null );
+             * params.setValidationRules( null ); params.setReports( null );
+             * params.setReportTables( null ); params.setPeriods( null ); //
+             * TODO Include only relevant periods params.setCharts( null );
+             * params.setPeriods( null );
+             */
+
             Set<Integer> dataElementz = new HashSet<>();
-            
+
             Collection<DataElement> children = dataElementService.getAllDataElements();
-            
+
             for ( DataElement child : children )
             {
-            	dataElementz.add( child.getId() );
+                dataElementz.add( child.getId() );
             }
-            
+
             params.setDataElements( dataElementz );
-            
+
             Set<Integer> orgUnits = new HashSet<>();
-            
+
             Collection<OrganisationUnit> orgChildren = organisationUnitService.getAllOrganisationUnits();
-            
+
             for ( OrganisationUnit child : orgChildren )
             {
-            	orgUnits.add( child.getId() );
+                orgUnits.add( child.getId() );
             }
-            
+
             params.setOrganisationUnits( orgUnits );
         }
 
-        
-        if(dataValue){
-        	params.setMetaData( false );
-        }
-        
-        if(dataValueDaily){
-        	params.setMetaData( false );
-        }
-
-        System.out.println(dataValue+" "+dataValueDaily+" "+startDate+" "+endDate);
-        //params.setMetaData( true );
+        if ( dataValue )
+        {
+            params.setMetaData( false );
+        }
+
+        if ( dataValueDaily )
+        {
+            params.setMetaData( false );
+        }
+
+        // params.setMetaData( true );
         params.setIncludeDataValues( true );
         params.setCurrentUser( currentUserService.getCurrentUser() );
-        params.setDataValue(dataValue);
-        params.setDataValueDaily(dataValueDaily);
-        
+        params.setDataValue( dataValue );
+        params.setDataValueDaily( dataValueDaily );
+
         params.setI18n( i18n );
         params.setFormat( format );
-        params.setStartDate(getMediumDate( startDate ));
-        params.setEndDate(getMediumDate( endDate ));
-        
-        
+        params.setStartDate( getMediumDate( startDate ) );
+        params.setEndDate( getMediumDate( endDate ) );
+
         ExportService exportService = serviceProvider.provide( exportFormat );
 
         inputStream = exportService.exportData( params );