dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11456
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3269: (local vn) - Changed model api based on global core.
------------------------------------------------------------
revno: 3269
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-04 11:54:43 +0700
message:
(local vn) - Changed model api based on global core.
removed:
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrganisationUnitGroupForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrganisationUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/DeleteDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/GetDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/ListOrganisationUnitGroupAtLevelAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/OpenUpdateOrganisationUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAtLevelAction.java
added:
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrgUnitGroupForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrgUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/DeleteDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/GetDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/SaveDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/ListOrgUnitGroupAtLevelAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/OpenUpdateOrgUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAtLevelAction.java
modified:
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/Bookmark.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java
local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/SaveBookmarkAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/DeleteDataElementGroupOrderAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/AddDataEntryStatusAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DeleteDataEntryStatusAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataEntryStatusAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByDataSetAction.java
local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByPeriodsAction.java
local/vn/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
local/vn/dhis-web-excel-reporting/src/main/resources/struts.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 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/Bookmark.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/Bookmark.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/Bookmark.java 2011-04-04 04:54:43 +0000
@@ -27,14 +27,14 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.AbstractNameableObject;
/**
* @author Tran Thanh Tri
*/
@SuppressWarnings( "serial" )
public class Bookmark
- extends IdentifiableObject
+ extends AbstractNameableObject
{
public static final String CHART = "CHART";
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java 2011-04-04 04:54:43 +0000
@@ -63,9 +63,9 @@
private Collection<UserAuthorityGroup> userRoles;
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Constructors
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public ReportExcel()
{
@@ -75,7 +75,6 @@
public Collection<ReportExcelItem> getReportItemBySheet( Integer sheetNo )
{
-
Set<ReportExcelItem> results = new HashSet<ReportExcelItem>();
for ( ReportExcelItem reportExcelItem : this.reportExcelItems )
@@ -87,7 +86,6 @@
}
return results;
-
}
public abstract boolean isCategory();
@@ -155,9 +153,9 @@
return "[" + name + "]";
}
- // ----------------------------------------------------------------------
- // Support methord
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // Support method
+ // -------------------------------------------------------------------------
public boolean reportExcelItemIsExist( String name, int sheetNo )
{
@@ -195,9 +193,9 @@
return null;
}
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Getters and setters
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int getId()
{
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java 2011-04-04 04:54:43 +0000
@@ -36,7 +36,6 @@
public class ReportExcelNormal
extends ReportExcel
{
-
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java 2011-04-04 04:54:43 +0000
@@ -39,7 +39,6 @@
public class ReportExcelPeriodColumnListing
extends ReportExcel
{
-
private Set<PeriodColumn> periodColumns = new HashSet<PeriodColumn>();
// -------------------------------------------------------------------------
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java 2011-04-04 04:54:43 +0000
@@ -41,16 +41,17 @@
* @version $Id$
*/
-public class ExcelItemGroup implements Serializable
+public class ExcelItemGroup
+ implements Serializable
{
private int id;
private String name;
+ private String type;
+
private Set<ExcelItem> excelItems;
- private String type;
-
private Set<OrganisationUnit> organisationAssocitions;
private List<OrganisationUnitGroup> organisationUnitGroups;
@@ -59,13 +60,12 @@
private PeriodType periodType;
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Constructors
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public ExcelItemGroup()
{
-
}
// -------------------------------------------------------------------------
@@ -111,9 +111,9 @@
return true;
}
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Getters and setters
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int getId()
{
@@ -195,9 +195,9 @@
this.periodType = periodType;
}
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// getType
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public boolean isCategory()
{
@@ -219,9 +219,9 @@
return this.getType().equalsIgnoreCase( TYPE.NORMAL );
}
- // ----------------------------------------------------------------------
- // Support methord
- // ----------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // Support method
+ // -------------------------------------------------------------------------
public boolean excelItemIsExist( String name )
{
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java 2011-04-04 04:54:43 +0000
@@ -7,12 +7,11 @@
public interface ExcelItemService
{
-
String ID = ExcelItemService.class.getName();
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Excelitem group services
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int addExcelItemGroup( ExcelItemGroup excelItemGroup );
@@ -28,9 +27,9 @@
public Collection<ExcelItemGroup> getExcelItemGroups( OrganisationUnit organisationUnit );
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Excelitem services
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int addExcelItem( ExcelItem excelItem );
@@ -44,9 +43,9 @@
public ExcelItem getExcelItem( String name );
- // --------------------------------------
+ // -------------------------------------------------------------------------
// DataElement Order
- // --------------------------------------
+ // -------------------------------------------------------------------------
public DataElementGroupOrder getDataElementGroupOrder( Integer id );
=== modified file 'local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java'
--- local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java 2011-02-23 21:45:31 +0000
+++ local/vn/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java 2011-04-04 04:54:43 +0000
@@ -7,12 +7,11 @@
public interface ExcelItemStore
{
-
String ID = ExcelItemStore.class.getName();
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Excelitem group services
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int addExcelItemGroup( ExcelItemGroup excelItemGroup );
@@ -23,14 +22,14 @@
public Collection<ExcelItemGroup> getAllExcelItemGroup();
public ExcelItemGroup getExcelItemGroup( int id );
-
+
public ExcelItemGroup getExcelItemGroup( String name );
public Collection<ExcelItemGroup> getExcelItemGroups( OrganisationUnit organisationUnit );
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Excelitem services
- // ----------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public int addExcelItem( ExcelItem excelItem );
@@ -41,12 +40,12 @@
public Collection<ExcelItem> getAllExcelItem();
public ExcelItem getExcelItem( int id );
-
+
public ExcelItem getExcelItem( String name );
- // --------------------------------------
+ // -------------------------------------------------------------------------
// DataElement Order
- // --------------------------------------
+ // -------------------------------------------------------------------------
public DataElementGroupOrder getDataElementGroupOrder( Integer id );
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java 2010-08-23 08:51:26 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/AddReportExcelAction.java 2011-04-04 04:54:43 +0000
@@ -44,16 +44,15 @@
public class AddReportExcelAction
implements Action
{
-
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Input & Output
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private String name;
@@ -73,9 +72,9 @@
private String group;
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------
+ // -------------------------------------------------------------------------
public void setReportService( ReportExcelService reportService )
{
@@ -130,7 +129,6 @@
public String execute()
throws Exception
{
-
if ( reportType.equalsIgnoreCase( ReportExcel.TYPE.NORMAL ) )
{
report = new ReportExcelNormal();
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/SaveBookmarkAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/SaveBookmarkAction.java 2010-07-13 15:50:08 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/SaveBookmarkAction.java 2011-04-04 04:54:43 +0000
@@ -40,9 +40,9 @@
public class SaveBookmarkAction
implements Action
{
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private BookmarkService bookmarkService;
@@ -58,9 +58,9 @@
this.selectionManager = selectionManager;
}
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private String description;
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/DeleteDataElementGroupOrderAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/DeleteDataElementGroupOrderAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/DeleteDataElementGroupOrderAction.java 2011-04-04 04:54:43 +0000
@@ -38,27 +38,26 @@
public class DeleteDataElementGroupOrderAction
implements Action
{
-
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
- // -------------------------------------------
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ // -------------------------------------------------------------------------
// Input & Ouput
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private Integer id;
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
+ // -------------------------------------------------------------------------
public void setId( Integer id )
{
@@ -69,7 +68,7 @@
throws Exception
{
reportService.deleteDataElementGroupOrder( id );
-
+
return SUCCESS;
}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/category/action/SaveDataElementGroupOrderAction.java 2011-04-04 04:54:43 +0000
@@ -45,17 +45,17 @@
public class SaveDataElementGroupOrderAction
implements Action
{
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
private DataElementService dataElementService;
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private Integer id;
@@ -65,9 +65,9 @@
private List<String> dataElementIds = new ArrayList<String>();
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------
+ // -------------------------------------------------------------------------
public void setReportService( ReportExcelService reportService )
{
@@ -104,6 +104,10 @@
this.code = code;
}
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -117,11 +121,9 @@
for ( String id : dataElementIds )
{
-
DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( id ) );
dataElements.add( dataElement );
-
}
dataElementGroupOrder.setDataElements( dataElements );
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/AddDataEntryStatusAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/AddDataEntryStatusAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/AddDataEntryStatusAction.java 2011-04-04 04:54:43 +0000
@@ -1,7 +1,7 @@
package org.hisp.dhis.reportexcel.dataentrystatus.action;
/*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,26 +40,25 @@
public class AddDataEntryStatusAction
implements Action
{
-
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
private DataSetService dataSetService;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private Integer dataSetId;
private boolean makeDefault;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
public void setDataSetService( DataSetService dataSetService )
{
@@ -80,6 +79,10 @@
this.makeDefault = makeDefault;
}
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -94,5 +97,4 @@
return SUCCESS;
}
-
}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java 2010-12-30 09:13:41 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java 2011-04-04 04:54:43 +0000
@@ -38,7 +38,6 @@
import org.hisp.dhis.dataset.CompleteDataSetRegistration;
import org.hisp.dhis.dataset.CompleteDataSetRegistrationService;
import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
@@ -63,9 +62,9 @@
public class DefaultDataEntryStatusAction
implements Action
{
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
@@ -75,17 +74,15 @@
private OrganisationUnitSelectionManager selectionManager;
- private DataSetService dataSetService;
-
private PeriodService periodService;
private CompleteDataSetRegistrationService completeDataSetRegistrationService;
private I18nFormat format;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Output
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private List<DataEntryStatus> dataStatus;
@@ -95,14 +92,9 @@
private OrganisationUnit organisationUnit;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------------
-
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
+ // -------------------------------------------------------------------------
public OrganisationUnit getOrganisationUnit()
{
@@ -165,6 +157,10 @@
return format;
}
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -172,8 +168,7 @@
if ( organisationUnit != null )
{
-
- dataSets = new ArrayList<DataSet>( dataSetService.getDataSetsBySource( organisationUnit ) );
+ dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
if ( !currentUserService.currentUserIsSuper() )
{
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DeleteDataEntryStatusAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DeleteDataEntryStatusAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DeleteDataEntryStatusAction.java 2011-04-04 04:54:43 +0000
@@ -5,7 +5,7 @@
import com.opensymphony.xwork2.Action;
/*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,21 +33,21 @@
public class DeleteDataEntryStatusAction
implements Action
{
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private Integer dataStatusId;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
public void setDataStatusId( Integer dataStatusId )
{
@@ -59,6 +59,10 @@
this.reportService = reportService;
}
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -66,5 +70,4 @@
return SUCCESS;
}
-
}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataEntryStatusAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataEntryStatusAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataEntryStatusAction.java 2011-04-04 04:54:43 +0000
@@ -1,7 +1,7 @@
package org.hisp.dhis.reportexcel.dataentrystatus.action;
/*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,23 +39,23 @@
public class GetDataEntryStatusAction
implements Action
{
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private ReportExcelService reportService;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Input & Output
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private Integer id;
private DataEntryStatus dataStatus;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
public DataEntryStatus getDataStatus()
{
@@ -72,6 +72,10 @@
this.reportService = reportService;
}
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -79,5 +83,4 @@
return SUCCESS;
}
-
}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java 2010-12-30 09:13:41 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java 2011-04-04 04:54:43 +0000
@@ -1,4 +1,5 @@
package org.hisp.dhis.reportexcel.dataentrystatus.action;
+
/*
* Copyright (c) 2004-2010, University of Oslo
* All rights reserved.
@@ -32,7 +33,6 @@
import java.util.Set;
import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.user.CurrentUserService;
@@ -41,6 +41,7 @@
import org.hisp.dhis.user.UserService;
import com.opensymphony.xwork2.Action;
+
/**
* @author Tran Thanh Tri
* @version $Id$
@@ -48,27 +49,25 @@
public class GetDataSetAction
implements Action
{
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------------
-
- private DataSetService dataSetService;
-
+ // -------------------------------------------------------------------------
+
+ private CurrentUserService currentUserService;
+
private OrganisationUnitSelectionManager selectionManager;
private UserService userService;
- private CurrentUserService currentUserService;
-
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Ouput
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
private List<DataSet> dataSets;
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
// Getter & Setter
- // -------------------------------------------------
+ // -------------------------------------------------------------------------
public List<DataSet> getDataSets()
{
@@ -85,25 +84,21 @@
this.currentUserService = currentUserService;
}
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
-
public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
{
this.selectionManager = selectionManager;
}
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
-
public String execute()
throws Exception
{
if ( selectionManager.getSelectedOrganisationUnit() != null )
{
-
- dataSets = new ArrayList<DataSet>( dataSetService.getDataSetsBySource( selectionManager
- .getSelectedOrganisationUnit() ) );
+ dataSets = new ArrayList<DataSet>( selectionManager.getSelectedOrganisationUnit().getDataSets() );
if ( !currentUserService.currentUserIsSuper() )
{
@@ -119,9 +114,9 @@
dataSets.retainAll( dataSetUserAuthorityGroups );
}
}
-
+
Collections.sort( dataSets, new DataSetNameComparator() );
-
+
return SUCCESS;
}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByDataSetAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByDataSetAction.java 2010-10-07 07:10:30 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByDataSetAction.java 2011-04-04 04:54:43 +0000
@@ -1,7 +1,7 @@
package org.hisp.dhis.reportexcel.datasetcompleted.action;
/*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,9 @@
implements Action
{
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private PeriodService periodService;
@@ -66,7 +66,7 @@
{
this.periodService = periodService;
}
-
+
private DataSetService dataSetService;
public void setDataSetService( DataSetService dataSetService )
@@ -96,9 +96,9 @@
this.format = format;
}
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private Integer periodId;
@@ -114,9 +114,9 @@
this.dataSetIds = dataSetIds;
}
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Output
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private List<OrganisationUnit> organisationUnits;
@@ -146,7 +146,10 @@
return completedValues;
}
- @Override
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -168,9 +171,8 @@
for ( OrganisationUnit o : organisationUnits )
{
- if ( dataSetService.getDataSetsBySource( o ).contains( dataSet ) )
+ if ( o.getDataSets().contains( dataSet ) )
{
-
completeDataSetRegistration = completeDataSetRegistrationService.getCompleteDataSetRegistration(
dataSet, period, o );
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByPeriodsAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByPeriodsAction.java 2010-10-07 07:10:30 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/ViewCompletedReportByPeriodsAction.java 2011-04-04 04:54:43 +0000
@@ -60,9 +60,9 @@
implements Action
{
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Dependency
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private PeriodService periodService;
@@ -100,9 +100,9 @@
this.dataValueService = dataValueService;
}
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Input
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private Integer dataSetId;
@@ -118,9 +118,9 @@
this.periodIds = periodIds;
}
- // -------------------------------------------
+ // -------------------------------------------------------------------------
// Output
- // -------------------------------------------
+ // -------------------------------------------------------------------------
private List<OrganisationUnit> organisationUnits;
@@ -150,7 +150,10 @@
return completedValues;
}
- @Override
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
public String execute()
throws Exception
{
@@ -172,7 +175,7 @@
for ( OrganisationUnit o : organisationUnits )
{
- if ( dataSetService.getDataSetsBySource( o ).contains( dataSet ) )
+ if ( o.getDataSets().contains( dataSet ) )
{
Collection<DataElement> dataElements = dataSet.getDataElements();
Collection<DataValue> values = dataValueService.getDataValues( o, period, dataElements );
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrgUnitGroupForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrgUnitGroupForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrgUnitGroupForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class OpenUpdateOrgUnitGroupForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
+
+ private List<OrganisationUnitGroup> selectedOrganisationUnitGroups;
+
+ private ExcelItemGroup excelItemGroup;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public List<OrganisationUnitGroup> getSelectedOrganisationUnitGroups()
+ {
+ return selectedOrganisationUnitGroups;
+ }
+
+ public ExcelItemGroup getExcelItemGroup()
+ {
+ return excelItemGroup;
+ }
+
+ public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups()
+ {
+ return availableOrganisationUnitGroups;
+ }
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ this.excelItemGroup = excelItemService.getExcelItemGroup( id );
+
+ this.availableOrganisationUnitGroups = new ArrayList<OrganisationUnitGroup>( this.organisationUnitGroupService
+ .getAllOrganisationUnitGroups() );
+
+ this.selectedOrganisationUnitGroups = excelItemGroup.getOrganisationUnitGroups();
+
+ availableOrganisationUnitGroups.removeAll( selectedOrganisationUnitGroups );
+
+ Collections.sort( this.availableOrganisationUnitGroups, new OrganisationUnitGroupNameComparator() );
+
+ return SUCCESS;
+ }
+
+}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrganisationUnitGroupForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrganisationUnitGroupForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/OpenUpdateOrganisationUnitGroupForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.action;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class OpenUpdateOrganisationUnitGroupForCategoryAction implements Action {
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
-
- private List<OrganisationUnitGroup> selectedOrganisationUnitGroups;
-
- private ExcelItemGroup excelItemGroup;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public List<OrganisationUnitGroup> getSelectedOrganisationUnitGroups() {
- return selectedOrganisationUnitGroups;
- }
-
- public ExcelItemGroup getExcelItemGroup() {
- return excelItemGroup;
- }
-
- public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups() {
- return availableOrganisationUnitGroups;
- }
-
- public void setOrganisationUnitGroupService(
- OrganisationUnitGroupService organisationUnitGroupService) {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- // -------------------------------------------
- // Action implementation
- // -------------------------------------------
-
- public String execute() throws Exception {
-
- this.excelItemGroup = excelItemService.getExcelItemGroup(id);
-
- this.availableOrganisationUnitGroups = new ArrayList<OrganisationUnitGroup>(
- this.organisationUnitGroupService
- .getAllOrganisationUnitGroups());
-
- this.selectedOrganisationUnitGroups = excelItemGroup
- .getOrganisationUnitGroups();
-
- availableOrganisationUnitGroups
- .removeAll(selectedOrganisationUnitGroups);
-
- Collections.sort(this.availableOrganisationUnitGroups,
- new OrganisationUnitGroupNameComparator());
-
- return SUCCESS;
- }
-
-}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrgUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrgUnitGroupAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrgUnitGroupAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class UpdateOrgUnitGroupAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private List<String> selectedOrganisationUnitGroups;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public void setSelectedOrganisationUnitGroups( List<String> selectedOrganisationUnitGroups )
+ {
+ this.selectedOrganisationUnitGroups = selectedOrganisationUnitGroups;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ExcelItemGroup excelItemGroup = (ExcelItemGroup) excelItemService.getExcelItemGroup( id );
+
+ List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
+
+ for ( String oid : this.selectedOrganisationUnitGroups )
+ {
+ OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
+ .getOrganisationUnitGroup( Integer.parseInt( oid ) );
+
+ organisationUnitGroups.add( organisationUnitGroup );
+ }
+
+ excelItemGroup.setOrganisationUnitGroups( organisationUnitGroups );
+
+ excelItemService.updateExcelItemGroup( excelItemGroup );
+
+ return SUCCESS;
+ }
+
+}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrganisationUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrganisationUnitGroupAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/UpdateOrganisationUnitGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class UpdateOrganisationUnitGroupAction implements Action {
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private List<String> selectedOrganisationUnitGroups;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setOrganisationUnitGroupService(
- OrganisationUnitGroupService organisationUnitGroupService) {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public void setSelectedOrganisationUnitGroups(
- List<String> selectedOrganisationUnitGroups) {
- this.selectedOrganisationUnitGroups = selectedOrganisationUnitGroups;
- }
-
- // -------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------
-
- public String execute() throws Exception {
-
- ExcelItemGroup excelItemGroup = (ExcelItemGroup) excelItemService
- .getExcelItemGroup(id);
-
- List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
-
- for (String oid : this.selectedOrganisationUnitGroups) {
- OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
- .getOrganisationUnitGroup(Integer.parseInt(oid));
-
- organisationUnitGroups.add(organisationUnitGroup);
- }
-
- excelItemGroup.setOrganisationUnitGroups(organisationUnitGroups);
-
- excelItemService.updateExcelItemGroup(excelItemGroup);
-
- return SUCCESS;
- }
-
-}
=== removed directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup'
=== removed directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action'
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/DeleteDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/DeleteDataElementGroupOrderForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/DeleteDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class DeleteDataElementGroupOrderForCategoryAction
- implements Action
-{
-
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- // -------------------------------------------
- // Input & Ouput
- // -------------------------------------------
-
- private Integer id;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
-
- // -------------------------------------------
- // Implementation Action
- // -------------------------------------------
-
- public String execute()
- throws Exception
- {
- excelItemService.deleteDataElementGroupOrder( id );
-
- return SUCCESS;
- }
-
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/GetDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/GetDataElementGroupOrderForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/GetDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import org.hisp.dhis.reportexcel.DataElementGroupOrder;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class GetDataElementGroupOrderForCategoryAction implements Action {
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private DataElementGroupOrder dataElementGroupOrder;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public DataElementGroupOrder getDataElementGroupOrder() {
- return dataElementGroupOrder;
- }
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- // -------------------------------------------
- // Action implementation
- // -------------------------------------------
-
- public String execute() throws Exception {
-
- dataElementGroupOrder = excelItemService.getDataElementGroupOrder(id.intValue());
-
- return SUCCESS;
- }
-
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/SaveDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.reportexcel.DataElementGroupOrder;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-
-public class SaveDataElementGroupOrderForCategoryAction implements Action {
-
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- private DataElementService dataElementService;
-
- // -------------------------------------------
- // Input
- // -------------------------------------------
-
- private Integer id;
-
- private String name;
-
- private String code;
-
- private List<String> dataElementIds = new ArrayList<String>();
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setDataElementService(DataElementService dataElementService) {
- this.dataElementService = dataElementService;
- }
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setDataElementIds(List<String> dataElementIds) {
- this.dataElementIds = dataElementIds;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- public String execute() throws Exception {
-
- ExcelItemGroup excelItemGroup = (ExcelItemGroup) excelItemService
- .getExcelItemGroup(id);
-
- DataElementGroupOrder dataElementGroupOrder = new DataElementGroupOrder();
- dataElementGroupOrder.setName(name);
- dataElementGroupOrder.setCode(code);
-
- List<DataElement> dataElements = new ArrayList<DataElement>();
-
- for (String id : dataElementIds) {
-
- DataElement dataElement = dataElementService.getDataElement(Integer
- .parseInt(id));
-
- dataElements.add(dataElement);
- }
-
- dataElementGroupOrder.setDataElements(dataElements);
-
- List<DataElementGroupOrder> dataElementGroupOrders = excelItemGroup
- .getDataElementOrders();
-
- dataElementGroupOrders.add(dataElementGroupOrder);
-
- excelItemGroup.setDataElementOrders(dataElementGroupOrders);
-
- excelItemService.updateExcelItemGroup(excelItemGroup);
-
- return SUCCESS;
- }
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateDataElementGroupOrderForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.reportexcel.DataElementGroupOrder;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class UpdateDataElementGroupOrderForCategoryAction implements Action {
-
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- private DataElementService dataElementService;
-
- // -------------------------------------------
- // Input
- // -------------------------------------------
-
- private Integer id;
-
- private Integer dataElementGroupOrderId;
-
- private String name;
-
- private String code;
-
- private List<String> dataElementIds = new ArrayList<String>();
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setDataElementGroupOrderId(Integer dataElementGroupOrderId) {
- this.dataElementGroupOrderId = dataElementGroupOrderId;
- }
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public void setDataElementService(DataElementService dataElementService) {
- this.dataElementService = dataElementService;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setDataElementIds(List<String> dataElementIds) {
- this.dataElementIds = dataElementIds;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- // -------------------------------------------
- // Action implementation
- // -------------------------------------------
-
- public String execute() throws Exception {
-
- DataElementGroupOrder dataElementGroupOrder = excelItemService
- .getDataElementGroupOrder(dataElementGroupOrderId);
-
- List<DataElement> dataElements = new ArrayList<DataElement>();
-
- for (String id : dataElementIds) {
-
- DataElement dataElement = dataElementService.getDataElement(Integer
- .parseInt(id));
-
- dataElements.add(dataElement);
- }
-
- dataElementGroupOrder.setDataElements(dataElements);
-
- dataElementGroupOrder.setName(name);
-
- dataElementGroupOrder.setCode(code);
-
- excelItemService.updateDataElementGroupOrder(dataElementGroupOrder);
-
- return SUCCESS;
- }
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 2010-09-06 09:12:16 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.reportexcel.DataElementGroupOrder;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class UpdateSortedDataElementForCategoryAction
- implements Action
-{
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- private DataElementService dataElementService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private List<String> dataElementIds = new ArrayList<String>();
-
- public String message;
-
- public I18n i18n;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public String getMessage()
- {
- return message;
- }
-
- public void setExcelItemService( ExcelItemService excelItemService )
- {
- this.excelItemService = excelItemService;
- }
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public void setDataElementIds( List<String> dataElementIds )
- {
- this.dataElementIds = dataElementIds;
- }
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------
- // Action implementation
- // -------------------------------------------
-
- public String execute()
- throws Exception
- {
-
- DataElementGroupOrder dataElementGroupOrder = excelItemService.getDataElementGroupOrder( id.intValue() );
-
- List<DataElement> dataElements = new ArrayList<DataElement>();
-
- for ( String dataElementId : this.dataElementIds )
- {
-
- DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) );
- dataElements.add( dataElement );
-
- }
-
- dataElementGroupOrder.setDataElements( dataElements );
-
- this.message = i18n.getString( "update_sort_dataelement_success" );
-
- excelItemService.updateDataElementGroupOrder( dataElementGroupOrder );
-
- return SUCCESS;
- }
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/dataelementgroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.dataelementgroup.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.reportexcel.DataElementGroupOrder;
-import org.hisp.dhis.reportexcel.action.ActionSupport;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
-import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class UpdateSortedDataElementGroupOrderForCategoryAction extends
- ActionSupport {
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ExcelItemService excelItemService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer excelItemGroupId;
-
- private List<String> dataElementGroupOrderId = new ArrayList<String>();
-
- // -------------------------------------------
- // Getters & Setters
- // -------------------------------------------
-
- public void setExcelItemService(ExcelItemService excelItemService) {
- this.excelItemService = excelItemService;
- }
-
- public void setExcelItemGroupId(Integer excelItemGroupId) {
- this.excelItemGroupId = excelItemGroupId;
- }
-
- public void setDataElementGroupOrderId(List<String> dataElementGroupOrderId) {
- this.dataElementGroupOrderId = dataElementGroupOrderId;
- }
-
- // -------------------------------------------
- // Action implementation
- // -------------------------------------------
-
- public String execute() throws Exception {
-
- ExcelItemGroup excelItemGroup = excelItemService
- .getExcelItemGroup(excelItemGroupId);
-
- List<DataElementGroupOrder> dataElementGroupOrders = new ArrayList<DataElementGroupOrder>();
-
- for (String id : this.dataElementGroupOrderId) {
-
- DataElementGroupOrder daElementGroupOrder = excelItemService
- .getDataElementGroupOrder(Integer.parseInt(id));
-
- dataElementGroupOrders.add(daElementGroupOrder);
-
- }
-
- excelItemGroup.setDataElementOrders(dataElementGroupOrders);
-
- excelItemService.updateExcelItemGroup(excelItemGroup);
-
- message = i18n.getString("success");
-
- return SUCCESS;
- }
-
-}
=== added directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup'
=== added directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action'
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/DeleteDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/DeleteDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/DeleteDataElementGroupOrderForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class DeleteDataElementGroupOrderForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ // -------------------------------------------------------------------------
+ // Input & Ouput
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Implementation Action
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ excelItemService.deleteDataElementGroupOrder( id );
+
+ return SUCCESS;
+ }
+
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/GetDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/GetDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/GetDataElementGroupOrderForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class GetDataElementGroupOrderForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private DataElementGroupOrder dataElementGroupOrder;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public DataElementGroupOrder getDataElementGroupOrder()
+ {
+ return dataElementGroupOrder;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+
+ dataElementGroupOrder = excelItemService.getDataElementGroupOrder( id.intValue() );
+
+ return SUCCESS;
+ }
+
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/SaveDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/SaveDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/SaveDataElementGroupOrderForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+
+public class SaveDataElementGroupOrderForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ private DataElementService dataElementService;
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private String name;
+
+ private String code;
+
+ private List<String> dataElementIds = new ArrayList<String>();
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public void setDataElementIds( List<String> dataElementIds )
+ {
+ this.dataElementIds = dataElementIds;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setCode( String code )
+ {
+ this.code = code;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ExcelItemGroup excelItemGroup = (ExcelItemGroup) excelItemService.getExcelItemGroup( id );
+
+ DataElementGroupOrder dataElementGroupOrder = new DataElementGroupOrder();
+ dataElementGroupOrder.setName( name );
+ dataElementGroupOrder.setCode( code );
+
+ List<DataElement> dataElements = new ArrayList<DataElement>();
+
+ for ( String id : dataElementIds )
+ {
+ DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( id ) );
+
+ dataElements.add( dataElement );
+ }
+
+ dataElementGroupOrder.setDataElements( dataElements );
+
+ List<DataElementGroupOrder> dataElementGroupOrders = excelItemGroup.getDataElementOrders();
+
+ dataElementGroupOrders.add( dataElementGroupOrder );
+
+ excelItemGroup.setDataElementOrders( dataElementGroupOrders );
+
+ excelItemService.updateExcelItemGroup( excelItemGroup );
+
+ return SUCCESS;
+ }
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateDataElementGroupOrderForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class UpdateDataElementGroupOrderForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ private DataElementService dataElementService;
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private Integer dataElementGroupOrderId;
+
+ private String name;
+
+ private String code;
+
+ private List<String> dataElementIds = new ArrayList<String>();
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setDataElementGroupOrderId( Integer dataElementGroupOrderId )
+ {
+ this.dataElementGroupOrderId = dataElementGroupOrderId;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public void setDataElementIds( List<String> dataElementIds )
+ {
+ this.dataElementIds = dataElementIds;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public void setCode( String code )
+ {
+ this.code = code;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ DataElementGroupOrder dataElementGroupOrder = excelItemService
+ .getDataElementGroupOrder( dataElementGroupOrderId );
+
+ List<DataElement> dataElements = new ArrayList<DataElement>();
+
+ for ( String id : dataElementIds )
+ {
+
+ DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( id ) );
+
+ dataElements.add( dataElement );
+ }
+
+ dataElementGroupOrder.setDataElements( dataElements );
+
+ dataElementGroupOrder.setName( name );
+
+ dataElementGroupOrder.setCode( code );
+
+ excelItemService.updateDataElementGroupOrder( dataElementGroupOrder );
+
+ return SUCCESS;
+ }
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class UpdateSortedDataElementForCategoryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ private DataElementService dataElementService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private List<String> dataElementIds = new ArrayList<String>();
+
+ public String message;
+
+ public I18n i18n;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public void setDataElementIds( List<String> dataElementIds )
+ {
+ this.dataElementIds = dataElementIds;
+ }
+
+ public void setI18n( I18n i18n )
+ {
+ this.i18n = i18n;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ DataElementGroupOrder dataElementGroupOrder = excelItemService.getDataElementGroupOrder( id.intValue() );
+
+ List<DataElement> dataElements = new ArrayList<DataElement>();
+
+ for ( String dataElementId : this.dataElementIds )
+ {
+
+ DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) );
+ dataElements.add( dataElement );
+
+ }
+
+ dataElementGroupOrder.setDataElements( dataElements );
+
+ this.message = i18n.getString( "update_sort_dataelement_success" );
+
+ excelItemService.updateDataElementGroupOrder( dataElementGroupOrder );
+
+ return SUCCESS;
+ }
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/degroup/action/UpdateSortedDataElementGroupOrderForCategoryAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.excelitemgroup.degroup.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
+import org.hisp.dhis.reportexcel.action.ActionSupport;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
+import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class UpdateSortedDataElementGroupOrderForCategoryAction
+ extends ActionSupport
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ExcelItemService excelItemService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer excelItemGroupId;
+
+ private List<String> dataElementGroupOrderId = new ArrayList<String>();
+
+ // -------------------------------------------------------------------------
+ // Getters & Setters
+ // -------------------------------------------------------------------------
+
+ public void setExcelItemService( ExcelItemService excelItemService )
+ {
+ this.excelItemService = excelItemService;
+ }
+
+ public void setExcelItemGroupId( Integer excelItemGroupId )
+ {
+ this.excelItemGroupId = excelItemGroupId;
+ }
+
+ public void setDataElementGroupOrderId( List<String> dataElementGroupOrderId )
+ {
+ this.dataElementGroupOrderId = dataElementGroupOrderId;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ExcelItemGroup excelItemGroup = excelItemService.getExcelItemGroup( excelItemGroupId );
+
+ List<DataElementGroupOrder> dataElementGroupOrders = new ArrayList<DataElementGroupOrder>();
+
+ for ( String id : this.dataElementGroupOrderId )
+ {
+ DataElementGroupOrder daElementGroupOrder = excelItemService.getDataElementGroupOrder( Integer
+ .parseInt( id ) );
+
+ dataElementGroupOrders.add( daElementGroupOrder );
+ }
+
+ excelItemGroup.setDataElementOrders( dataElementGroupOrders );
+
+ excelItemService.updateExcelItemGroup( excelItemGroup );
+
+ message = i18n.getString( "success" );
+
+ return SUCCESS;
+ }
+
+}
=== removed directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting'
=== removed directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action'
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/ListOrganisationUnitGroupAtLevelAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/ListOrganisationUnitGroupAtLevelAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/ListOrganisationUnitGroupAtLevelAction.java 1970-01-01 00:00:00 +0000
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.organisationunitgrouplisting.action;
-
-import java.util.List;
-import java.util.Map;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
-import org.hisp.dhis.reportexcel.ReportExcelService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id$
- */
-public class ListOrganisationUnitGroupAtLevelAction
- implements Action
-{
-
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ReportExcelService reportService;
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- private Map<OrganisationUnitGroup, OrganisationUnitLevel> organisationUnitGroupAtLevel;
-
- public Map<OrganisationUnitGroup, OrganisationUnitLevel> getOrganisationUnitGroupAtLevel()
- {
- return organisationUnitGroupAtLevel;
- }
-
- private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
-
- public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups()
- {
- return availableOrganisationUnitGroups;
- }
-
- private List<OrganisationUnitLevel> organisationUnitLevel;
-
- public List<OrganisationUnitLevel> getOrganisationUnitLevel()
- {
- return organisationUnitLevel;
- }
-
- private ReportExcelOganiztionGroupListing reportExcel;
-
- public ReportExcelOganiztionGroupListing getReportExcel()
- {
- return reportExcel;
- }
-
- @Override
- public String execute()
- throws Exception
- {
- organisationUnitLevel = organisationUnitService.getOrganisationUnitLevels();
-
- reportExcel = (ReportExcelOganiztionGroupListing) reportService.getReportExcel( id );
-
- availableOrganisationUnitGroups = reportExcel.getOrganisationUnitGroups();
-
- organisationUnitGroupAtLevel = reportExcel.getOrganisationUnitLevels();
-
- return SUCCESS;
- }
-
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/OpenUpdateOrganisationUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/OpenUpdateOrganisationUnitGroupAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/OpenUpdateOrganisationUnitGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.organisationunitgrouplisting.action;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator;
-import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
-import org.hisp.dhis.reportexcel.ReportExcelService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id$
- */
-public class OpenUpdateOrganisationUnitGroupAction
- implements Action
-{
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ReportExcelService reportService;
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
-
- private List<OrganisationUnitGroup> selectedOrganisationUnitGroups;
-
- private ReportExcelOganiztionGroupListing reportExcelOganiztionGroupListing;
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public ReportExcelOganiztionGroupListing getReportExcelOganiztionGroupListing()
- {
- return reportExcelOganiztionGroupListing;
- }
-
- public List<OrganisationUnitGroup> getSelectedOrganisationUnitGroups()
- {
- return selectedOrganisationUnitGroups;
- }
-
- public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups()
- {
- return availableOrganisationUnitGroups;
- }
-
- public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
- {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public String execute()
- throws Exception
- {
- this.reportExcelOganiztionGroupListing = (ReportExcelOganiztionGroupListing) reportService.getReportExcel( id );
-
- this.availableOrganisationUnitGroups = new ArrayList<OrganisationUnitGroup>( this.organisationUnitGroupService
- .getAllOrganisationUnitGroups() );
-
- this.selectedOrganisationUnitGroups = reportExcelOganiztionGroupListing.getOrganisationUnitGroups();
-
- availableOrganisationUnitGroups.removeAll( selectedOrganisationUnitGroups );
-
- Collections.sort( this.availableOrganisationUnitGroups, new OrganisationUnitGroupNameComparator() );
-
- return SUCCESS;
- }
-
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.organisationunitgrouplisting.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
-import org.hisp.dhis.reportexcel.ReportExcelService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id$
- */
-public class UpdateOrganisationUnitGroupAction
- implements Action
-{
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ReportExcelService reportService;
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer id;
-
- private List<String> selectedOrganisationUnitGroups = new ArrayList<String>();
-
- // -------------------------------------------
- // Getter & Setter
- // -------------------------------------------
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
-
- public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
- {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public void setSelectedOrganisationUnitGroups( List<String> selectedOrganisationUnitGroups )
- {
- this.selectedOrganisationUnitGroups = selectedOrganisationUnitGroups;
- }
-
- public String execute()
- throws Exception
- {
- ReportExcelOganiztionGroupListing reportExcelOganiztionGroupListing = (ReportExcelOganiztionGroupListing) reportService
- .getReportExcel( id );
-
- List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
-
- for ( String oid : this.selectedOrganisationUnitGroups )
- {
- OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
- .getOrganisationUnitGroup( Integer.parseInt( oid ) );
-
- organisationUnitGroups.add( organisationUnitGroup );
- }
-
- reportExcelOganiztionGroupListing.setOrganisationUnitGroups( organisationUnitGroups );
-
- reportService.updateReportExcel( reportExcelOganiztionGroupListing );
-
- return SUCCESS;
- }
-
-}
=== removed file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAtLevelAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAtLevelAction.java 2010-04-12 21:23:33 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/organisationunitgrouplisting/action/UpdateOrganisationUnitGroupAtLevelAction.java 1970-01-01 00:00:00 +0000
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.reportexcel.organisationunitgrouplisting.action;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
-import org.hisp.dhis.reportexcel.ReportExcelService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id$
- */
-public class UpdateOrganisationUnitGroupAtLevelAction
- implements Action
-{
- // -------------------------------------------
- // Dependency
- // -------------------------------------------
-
- private ReportExcelService reportService;
-
- public void setReportService( ReportExcelService reportService )
- {
- this.reportService = reportService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
- {
- this.organisationUnitGroupService = organisationUnitGroupService;
- }
-
- // -------------------------------------------
- // Input & Output
- // -------------------------------------------
-
- private Integer reportId;
-
- public void setReportId( Integer reportId )
- {
- this.reportId = reportId;
- }
-
- private Integer orgUnitGroupId;
-
- public void setOrgUnitGroupId( Integer orgUnitGroupId )
- {
- this.orgUnitGroupId = orgUnitGroupId;
- }
-
- private Integer levelId;
-
- public void setLevelId( Integer levelId )
- {
- this.levelId = levelId;
- }
-
- @Override
- public String execute()
- throws Exception
- {
- ReportExcelOganiztionGroupListing reportExcel = (ReportExcelOganiztionGroupListing) reportService
- .getReportExcel( reportId );
-
- Map<OrganisationUnitGroup, OrganisationUnitLevel> orgUniGroupAtLevels = new HashMap<OrganisationUnitGroup, OrganisationUnitLevel>(
- reportExcel.getOrganisationUnitLevels() );
-
- OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
- .getOrganisationUnitGroup( orgUnitGroupId );
-
- if ( levelId != null )
- {
- OrganisationUnitLevel organisationUnitLevel = organisationUnitService.getOrganisationUnitLevel( levelId );
-
- orgUniGroupAtLevels.put( organisationUnitGroup, organisationUnitLevel );
-
- }else{
-
- orgUniGroupAtLevels.remove( organisationUnitGroup );
-
- }
-
- reportExcel.setOrganisationUnitLevels( orgUniGroupAtLevels );
-
- reportService.updateReportExcel( reportExcel );
-
- return SUCCESS;
- }
-
-}
=== added directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting'
=== added directory 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action'
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/ListOrgUnitGroupAtLevelAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/ListOrgUnitGroupAtLevelAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/ListOrgUnitGroupAtLevelAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.orgunitgrouplisting.action;
+
+import java.util.List;
+import java.util.Map;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
+import org.hisp.dhis.reportexcel.ReportExcelService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class ListOrgUnitGroupAtLevelAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ReportExcelService reportService;
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ private Map<OrganisationUnitGroup, OrganisationUnitLevel> organisationUnitGroupAtLevel;
+
+ public Map<OrganisationUnitGroup, OrganisationUnitLevel> getOrganisationUnitGroupAtLevel()
+ {
+ return organisationUnitGroupAtLevel;
+ }
+
+ private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
+
+ public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups()
+ {
+ return availableOrganisationUnitGroups;
+ }
+
+ private List<OrganisationUnitLevel> organisationUnitLevel;
+
+ public List<OrganisationUnitLevel> getOrganisationUnitLevel()
+ {
+ return organisationUnitLevel;
+ }
+
+ private ReportExcelOganiztionGroupListing reportExcel;
+
+ public ReportExcelOganiztionGroupListing getReportExcel()
+ {
+ return reportExcel;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ organisationUnitLevel = organisationUnitService.getOrganisationUnitLevels();
+
+ reportExcel = (ReportExcelOganiztionGroupListing) reportService.getReportExcel( id );
+
+ availableOrganisationUnitGroups = reportExcel.getOrganisationUnitGroups();
+
+ organisationUnitGroupAtLevel = reportExcel.getOrganisationUnitLevels();
+
+ return SUCCESS;
+ }
+
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/OpenUpdateOrgUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/OpenUpdateOrgUnitGroupAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/OpenUpdateOrgUnitGroupAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.orgunitgrouplisting.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator;
+import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
+import org.hisp.dhis.reportexcel.ReportExcelService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class OpenUpdateOrgUnitGroupAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ReportExcelService reportService;
+
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private List<OrganisationUnitGroup> availableOrganisationUnitGroups;
+
+ private List<OrganisationUnitGroup> selectedOrganisationUnitGroups;
+
+ private ReportExcelOganiztionGroupListing reportExcelOganiztionGroupListing;
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public ReportExcelOganiztionGroupListing getReportExcelOganiztionGroupListing()
+ {
+ return reportExcelOganiztionGroupListing;
+ }
+
+ public List<OrganisationUnitGroup> getSelectedOrganisationUnitGroups()
+ {
+ return selectedOrganisationUnitGroups;
+ }
+
+ public List<OrganisationUnitGroup> getAvailableOrganisationUnitGroups()
+ {
+ return availableOrganisationUnitGroups;
+ }
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ this.reportExcelOganiztionGroupListing = (ReportExcelOganiztionGroupListing) reportService.getReportExcel( id );
+
+ this.availableOrganisationUnitGroups = new ArrayList<OrganisationUnitGroup>( this.organisationUnitGroupService
+ .getAllOrganisationUnitGroups() );
+
+ this.selectedOrganisationUnitGroups = reportExcelOganiztionGroupListing.getOrganisationUnitGroups();
+
+ availableOrganisationUnitGroups.removeAll( selectedOrganisationUnitGroups );
+
+ Collections.sort( this.availableOrganisationUnitGroups, new OrganisationUnitGroupNameComparator() );
+
+ return SUCCESS;
+ }
+
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.orgunitgrouplisting.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
+import org.hisp.dhis.reportexcel.ReportExcelService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class UpdateOrgUnitGroupAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ReportExcelService reportService;
+
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ private List<String> selectedOrganisationUnitGroups = new ArrayList<String>();
+
+ // -------------------------------------------------------------------------
+ // Getter & Setter
+ // -------------------------------------------------------------------------
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ public void setSelectedOrganisationUnitGroups( List<String> selectedOrganisationUnitGroups )
+ {
+ this.selectedOrganisationUnitGroups = selectedOrganisationUnitGroups;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ReportExcelOganiztionGroupListing reportExcelOganiztionGroupListing = (ReportExcelOganiztionGroupListing) reportService
+ .getReportExcel( id );
+
+ List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
+
+ for ( String oid : this.selectedOrganisationUnitGroups )
+ {
+ OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
+ .getOrganisationUnitGroup( Integer.parseInt( oid ) );
+
+ organisationUnitGroups.add( organisationUnitGroup );
+ }
+
+ reportExcelOganiztionGroupListing.setOrganisationUnitGroups( organisationUnitGroups );
+
+ reportService.updateReportExcel( reportExcelOganiztionGroupListing );
+
+ return SUCCESS;
+ }
+
+}
=== added file 'local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAtLevelAction.java'
--- local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAtLevelAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/orgunitgrouplisting/action/UpdateOrgUnitGroupAtLevelAction.java 2011-04-04 04:54:43 +0000
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2004-2010, 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.reportexcel.orgunitgrouplisting.action;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.reportexcel.ReportExcelOganiztionGroupListing;
+import org.hisp.dhis.reportexcel.ReportExcelService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class UpdateOrgUnitGroupAtLevelAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private ReportExcelService reportService;
+
+ public void setReportService( ReportExcelService reportService )
+ {
+ this.reportService = reportService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer reportId;
+
+ public void setReportId( Integer reportId )
+ {
+ this.reportId = reportId;
+ }
+
+ private Integer orgUnitGroupId;
+
+ public void setOrgUnitGroupId( Integer orgUnitGroupId )
+ {
+ this.orgUnitGroupId = orgUnitGroupId;
+ }
+
+ private Integer levelId;
+
+ public void setLevelId( Integer levelId )
+ {
+ this.levelId = levelId;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ReportExcelOganiztionGroupListing reportExcel = (ReportExcelOganiztionGroupListing) reportService
+ .getReportExcel( reportId );
+
+ Map<OrganisationUnitGroup, OrganisationUnitLevel> orgUniGroupAtLevels = new HashMap<OrganisationUnitGroup, OrganisationUnitLevel>(
+ reportExcel.getOrganisationUnitLevels() );
+
+ OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
+ .getOrganisationUnitGroup( orgUnitGroupId );
+
+ if ( levelId != null )
+ {
+ OrganisationUnitLevel organisationUnitLevel = organisationUnitService.getOrganisationUnitLevel( levelId );
+
+ orgUniGroupAtLevels.put( organisationUnitGroup, organisationUnitLevel );
+ }
+ else
+ {
+ orgUniGroupAtLevels.remove( organisationUnitGroup );
+ }
+
+ reportExcel.setOrganisationUnitLevels( orgUniGroupAtLevels );
+
+ reportService.updateReportExcel( reportExcel );
+
+ return SUCCESS;
+ }
+
+}
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-03-28 08:34:07 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-04-04 04:54:43 +0000
@@ -256,37 +256,37 @@
<!-- REPORT ORGANISATION UNIT GROUP LISTING BEAN -->
<bean
- id="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.OpenUpdateOrganisationUnitGroupAction"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.OpenUpdateOrganisationUnitGroupAction"
- scope="prototype">
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.ListOrganisationUnitGroupAtLevelAction"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.ListOrganisationUnitGroupAtLevelAction"
- scope="prototype">
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAtLevelAction"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAtLevelAction"
- scope="prototype">
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAction"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAction"
+ id="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.OpenUpdateOrgUnitGroupAction"
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.OpenUpdateOrgUnitGroupAction"
+ scope="prototype">
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.ListOrgUnitGroupAtLevelAction"
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.ListOrgUnitGroupAtLevelAction"
+ scope="prototype">
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="organisationUnitService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrgUnitGroupAtLevelAction"
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrgUnitGroupAtLevelAction"
+ scope="prototype">
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="organisationUnitService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrgUnitGroupAction"
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrgUnitGroupAction"
scope="prototype">
<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
<property name="organisationUnitGroupService"
@@ -571,7 +571,6 @@
<property name="userService" ref="org.hisp.dhis.user.UserService" />
<property name="selectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
<property name="completeDataSetRegistrationService"
ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
@@ -583,9 +582,8 @@
scope="prototype">
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
<property name="userService" ref="org.hisp.dhis.user.UserService" />
- <property name="selectionManager"
+ <property name="selectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
</bean>
<!-- DATA SET COMPLETED BEAN -->
@@ -898,8 +896,8 @@
</bean>
<bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateOrganisationUnitGroupAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateOrganisationUnitGroupAction"
+ id="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateOrgUnitGroupAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateOrgUnitGroupAction"
scope="prototype">
<property name="excelItemService"
ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
@@ -908,8 +906,8 @@
</bean>
<bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrganisationUnitGroupForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrganisationUnitGroupForCategoryAction"
+ id="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrgUnitGroupForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrgUnitGroupForCategoryAction"
scope="prototype">
<property name="excelItemService"
ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
@@ -922,51 +920,51 @@
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.DeleteDataElementGroupOrderForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.DeleteDataElementGroupOrderForCategoryAction"
- scope="prototype">
- <property name="excelItemService"
- ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderForCategoryAction"
- scope="prototype">
- <property name="excelItemService"
- ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.SaveDataElementGroupOrderForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.SaveDataElementGroupOrderForCategoryAction"
- scope="prototype">
- <property name="excelItemService"
- ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateDataElementGroupOrderForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateDataElementGroupOrderForCategoryAction"
- scope="prototype">
- <property name="excelItemService"
- ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementForCategoryAction"
- scope="prototype">
- <property name="excelItemService"
- ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementGroupOrderForCategoryAction"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementGroupOrderForCategoryAction"
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.DeleteDataElementGroupOrderForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.DeleteDataElementGroupOrderForCategoryAction"
+ scope="prototype">
+ <property name="excelItemService"
+ ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.GetDataElementGroupOrderForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.GetDataElementGroupOrderForCategoryAction"
+ scope="prototype">
+ <property name="excelItemService"
+ ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.SaveDataElementGroupOrderForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.SaveDataElementGroupOrderForCategoryAction"
+ scope="prototype">
+ <property name="excelItemService"
+ ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateDataElementGroupOrderForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateDataElementGroupOrderForCategoryAction"
+ scope="prototype">
+ <property name="excelItemService"
+ ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementForCategoryAction"
+ scope="prototype">
+ <property name="excelItemService"
+ ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementGroupOrderForCategoryAction"
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementGroupOrderForCategoryAction"
scope="prototype">
<property name="excelItemService"
ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
=== modified file 'local/vn/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- local/vn/dhis-web-excel-reporting/src/main/resources/struts.xml 2011-03-25 09:11:30 +0000
+++ local/vn/dhis-web-excel-reporting/src/main/resources/struts.xml 2011-04-04 04:54:43 +0000
@@ -250,7 +250,7 @@
<!-- REPORT ORGANISATION UNIT GROUP LISTING ACTION -->
<action name="openUpdateOrgnisationUnitGroupListingReport"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.OpenUpdateOrganisationUnitGroupAction">
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.OpenUpdateOrganisationUnitGroupAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-excel-reporting/organisationUnitGroupListingReport.vm</param>
<param name="menu">/dhis-web-excel-reporting/menu.vm</param>
@@ -258,20 +258,20 @@
</action>
<action name="updateOrgnisationUnitGroupListingReport"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAction">
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrganisationUnitGroupAction">
<result name="success" type="redirect">listReportExcel.action
</result>
</action>
<action name="organisationUnitAtLevels"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.ListOrganisationUnitGroupAtLevelAction">
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.ListOrganisationUnitGroupAtLevelAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-excel-reporting/organisationUnitAtLevels.vm</param>
<param name="menu">/dhis-web-excel-reporting/menu.vm</param>
</action>
<action name="updateOrganisationUnitGroupAtLevel"
- class="org.hisp.dhis.reportexcel.organisationunitgrouplisting.action.UpdateOrganisationUnitGroupAtLevelAction">
+ class="org.hisp.dhis.reportexcel.orgunitgrouplisting.action.UpdateOrganisationUnitGroupAtLevelAction">
<result name="success" type="velocity-xml">
/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
</action>
@@ -905,33 +905,33 @@
</action>
<action name="addDataElementGroupOrderForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.SaveDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.SaveDataElementGroupOrderForCategoryAction">
<result name="success" type="redirect">
listDataElementGroupOrderForExcelItemGroup.action?id=${id}
</result>
</action>
<action name="updateDataElementGroupOrderForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateDataElementGroupOrderForCategoryAction">
<result name="success" type="redirect">
listDataElementGroupOrderForExcelItemGroup.action?id=${id}
</result>
</action>
<action name="deleteDataElementGroupOrderForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.DeleteDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.DeleteDataElementGroupOrderForCategoryAction">
<result name="success" type="velocity-xml">
/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
</action>
<action name="getDataElementGroupOrderForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.GetDataElementGroupOrderForCategoryAction">
<result name="success" type="velocity-xml">
/dhis-web-excel-reporting/responseDataElementOrder.vm</result>
</action>
<action name="openSortDataElementForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.GetDataElementGroupOrderForCategoryAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-excel-reporting/import/sortDataElements.vm</param>
<param name="menu">/dhis-web-excel-reporting/menu.vm</param>
@@ -940,13 +940,13 @@
</action>
<action name="updateSortedDataElementsForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementForCategoryAction">
<result name="success" type="velocity-xml">
/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
</action>
<action name="updateSortedDataElementGroupOrderForCategory"
- class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.UpdateSortedDataElementGroupOrderForCategoryAction">
+ class="org.hisp.dhis.reportexcel.excelitemgroup.degroup.action.UpdateSortedDataElementGroupOrderForCategoryAction">
<result name="success" type="velocity-xml">
/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
</action>