dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02075
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 694: Codestyle fix
------------------------------------------------------------
revno: 694
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-09-14 14:56:14 +0200
message:
Codestyle fix
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/pom.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DeleteReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/GetReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ListReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/NoAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ValidateUpdateReportExcelAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/GetDataElementOrderAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateDataElementGroupOrderAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateSortedDataElementAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/configuration/action/GetReportConfigurationAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLDescriptionResponse.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-excel-reporting/pom.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/pom.xml 2009-09-14 08:36:11 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/pom.xml 2009-09-14 12:56:14 +0000
@@ -33,7 +33,6 @@
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-service-excel-reporting</artifactId>
- <version>2.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
@@ -105,7 +104,6 @@
<version>3.5-beta5</version>
</dependency>
-
</dependencies>
</project>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -41,121 +41,144 @@
* @author Chau Thu Tran
* @version $Id$
*/
-public class AddReportExcelAction implements Action {
-
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ReportExcelService reportService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
- private String name;
-
- private String excel;
-
- private Integer periodRow;
-
- private Integer periodCol;
-
- private Integer organisationRow;
-
- private Integer organisationCol;
-
- private String reportType;
-
- private ReportExcel report;
-
- private String group;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setReportService(ReportExcelService reportService) {
- this.reportService = reportService;
- }
-
- public void setGroup(String group) {
- this.group = group;
- }
-
- public void setReportType(String reportType) {
- this.reportType = reportType;
- }
-
- public ReportExcel getReport() {
- return report;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setExcel(String excel) {
- this.excel = excel;
- }
-
- public void setPeriodRow(Integer periodRow) {
- this.periodRow = periodRow;
- }
-
- public void setPeriodCol(Integer periodCol) {
- this.periodCol = periodCol;
- }
-
- public void setOrganisationRow(Integer organisationRow) {
- this.organisationRow = organisationRow;
- }
-
- public void setOrganisationCol(Integer organisationCol) {
- this.organisationCol = organisationCol;
- }
-
- public String execute() throws Exception {
-
- if (reportType.equalsIgnoreCase(ReportExcel.TYPE.NORMAL)) {
- report = new ReportExcelNormal();
- }
-
- if (reportType
- .equalsIgnoreCase(ReportExcel.TYPE.ORGANIZATION_GROUP_LISTING)) {
- report = new ReportExcelOganiztionGroupListing();
- }
-
- if (reportType.equalsIgnoreCase(ReportExcel.TYPE.CATEGORY)) {
- report = new ReportExcelCategory();
-
- }
-
- if (reportType.equalsIgnoreCase(ReportExcel.TYPE.PERIOD_COLUMN_LISTING)) {
- report = new ReportExcelPeriodColumnListing();
- }
-
- report.setName(name);
- report.setExcelTemplateFile(excel);
- report.setGroup(group);
-
- if (periodCol == null || periodRow == null) {
- report.setPeriodColumn(-1);
- report.setPeriodRow(-1);
- } else {
- report.setPeriodColumn(periodCol);
- report.setPeriodRow(periodRow);
- }
- if (organisationCol == null || organisationRow == null) {
- report.setOrganisationColumn(-1);
- report.setOrganisationRow(-1);
- } else {
- report.setOrganisationColumn(organisationCol);
- report.setOrganisationRow(organisationRow);
- }
-
- reportService.addReportExcel(report);
-
- return SUCCESS;
-
- }
+public class AddReportExcelAction
+ implements Action
+{
+
+ // -------------------------------------------
+ // Dependency
+ // -------------------------------------------
+
+ private ReportExcelService reportService;
+
+ // -------------------------------------------
+ // Input & Output
+ // -------------------------------------------
+
+ private String name;
+
+ private String excel;
+
+ private Integer periodRow;
+
+ private Integer periodCol;
+
+ private Integer organisationRow;
+
+ private Integer organisationCol;
+
+ private String reportType;
+
+ private ReportExcel report;
+
+ private String group;
+
+ // -------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ public void setGroup( String group )
+ {
+ this.group = group;
+ }
+
+ public void setReportType( String reportType )
+ {
+ this.reportType = reportType;
+ }
+
+ public ReportExcel getReport()
+ {
+ return report;
+ }
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public void setExcel( String excel )
+ {
+ this.excel = excel;
+ }
+
+ public void setPeriodRow( Integer periodRow )
+ {
+ this.periodRow = periodRow;
+ }
+
+ public void setPeriodCol( Integer periodCol )
+ {
+ this.periodCol = periodCol;
+ }
+
+ public void setOrganisationRow( Integer organisationRow )
+ {
+ this.organisationRow = organisationRow;
+ }
+
+ public void setOrganisationCol( Integer organisationCol )
+ {
+ this.organisationCol = organisationCol;
+ }
+
+ public String execute()
+ throws Exception
+ {
+
+ if ( reportType.equalsIgnoreCase( ReportExcel.TYPE.NORMAL ) )
+ {
+ report = new ReportExcelNormal();
+ }
+
+ if ( reportType.equalsIgnoreCase( ReportExcel.TYPE.ORGANIZATION_GROUP_LISTING ) )
+ {
+ report = new ReportExcelOganiztionGroupListing();
+ }
+
+ if ( reportType.equalsIgnoreCase( ReportExcel.TYPE.CATEGORY ) )
+ {
+ report = new ReportExcelCategory();
+
+ }
+
+ if ( reportType.equalsIgnoreCase( ReportExcel.TYPE.PERIOD_COLUMN_LISTING ) )
+ {
+ report = new ReportExcelPeriodColumnListing();
+ }
+
+ report.setName( name );
+ report.setExcelTemplateFile( excel );
+ report.setGroup( group );
+
+ if ( periodCol == null || periodRow == null )
+ {
+ report.setPeriodColumn( -1 );
+ report.setPeriodRow( -1 );
+ }
+ else
+ {
+ report.setPeriodColumn( periodCol );
+ report.setPeriodRow( periodRow );
+ }
+ if ( organisationCol == null || organisationRow == null )
+ {
+ report.setOrganisationColumn( -1 );
+ report.setOrganisationRow( -1 );
+ }
+ else
+ {
+ report.setOrganisationColumn( organisationCol );
+ report.setOrganisationRow( organisationRow );
+ }
+
+ reportService.addReportExcel( report );
+
+ return SUCCESS;
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DeleteReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DeleteReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/DeleteReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -66,5 +66,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/GetReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/GetReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/GetReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -95,7 +95,6 @@
public String execute()
throws Exception
{
-
if ( id != null )
{
report = reportService.getReportExcel( id );
@@ -104,6 +103,7 @@
{
return ERROR;
}
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ListReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ListReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ListReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -1,3 +1,5 @@
+package org.hisp.dhis.reportexcel.action;
+
/*
* Copyright (c) 2004-2007, University of Oslo
* All rights reserved.
@@ -25,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package org.hisp.dhis.reportexcel.action;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@
import org.hisp.dhis.reportexcel.ReportExcel;
import org.hisp.dhis.reportexcel.ReportExcelService;
import org.hisp.dhis.reportexcel.comparator.ReportExcelNameComparator;
-import org.hisp.dhis.user.CurrentUserService;
+
import com.opensymphony.xwork2.Action;
/**
@@ -44,12 +44,16 @@
public class ListReportExcelAction
implements Action
{
-
// -------------------------------------------
// Dependency
// -------------------------------------------
- private ReportExcelService reportService;
+ private ReportExcelService reportService;
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
// -------------------------------------------
// Output
@@ -57,21 +61,10 @@
private List<ReportExcel> reports;
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
-
public List<ReportExcel> getReports()
{
return reports;
- }
-
- // -------------------------------------------------------------------------
+ }
public String execute()
throws Exception
@@ -82,5 +75,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/NoAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/NoAction.java 2009-09-14 12:56:14 +0000
@@ -35,7 +35,6 @@
public class NoAction
implements Action
{
-
public String execute()
throws Exception
{
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -29,7 +29,6 @@
import org.hisp.dhis.reportexcel.ReportExcel;
import org.hisp.dhis.reportexcel.ReportExcelService;
-import org.hisp.dhis.system.util.TimeUtils;
import com.opensymphony.xwork2.Action;
@@ -40,7 +39,6 @@
public class UpdateReportExcelAction
implements Action
{
-
// -------------------------------------------
// Dependency
// -------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ValidateUpdateReportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ValidateUpdateReportExcelAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/ValidateUpdateReportExcelAction.java 2009-09-14 12:56:14 +0000
@@ -112,6 +112,7 @@
message = i18n.getString( "excel_is_null" );
return ERROR;
}
+
if ( excel.trim().length() == 0 )
{
message = i18n.getString( "excel_is_null" );
@@ -120,5 +121,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/GetDataElementOrderAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/GetDataElementOrderAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/GetDataElementOrderAction.java 2009-09-14 12:56:14 +0000
@@ -78,5 +78,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java 2009-09-14 05:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java 2009-09-14 12:56:14 +0000
@@ -100,7 +100,6 @@
public String execute()
throws Exception
{
-
ReportExcelCategory reportExcelCategory = (ReportExcelCategory) reportService.getReportExcel( id );
DataElementGroupOrder dataElementGroupOrder = new DataElementGroupOrder();
@@ -129,5 +128,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateDataElementGroupOrderAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateDataElementGroupOrderAction.java 2009-09-14 05:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateDataElementGroupOrderAction.java 2009-09-14 12:56:14 +0000
@@ -104,11 +104,9 @@
for ( String id : dataElementIds )
{
-
DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( id ) );
dataElements.add( dataElement );
-
}
dataElementGroupOrder.setDataElements( dataElements );
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateSortedDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateSortedDataElementAction.java 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/UpdateSortedDataElementAction.java 2009-09-14 12:56:14 +0000
@@ -122,5 +122,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/configuration/action/GetReportConfigurationAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/configuration/action/GetReportConfigurationAction.java 2009-09-14 05:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/configuration/action/GetReportConfigurationAction.java 2009-09-14 12:56:14 +0000
@@ -29,8 +29,6 @@
return templateDirectory;
}
-
-
public String execute()
throws Exception
{
@@ -38,5 +36,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLDescriptionResponse.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLDescriptionResponse.java 2009-09-14 08:36:11 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLDescriptionResponse.java 2009-09-14 12:56:14 +0000
@@ -111,7 +111,6 @@
*/
private void writeXMLDescription()
- throws IOException
{
Sheet sheet = this.WORKBOOK.getSheet( 0 );