← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 920: Modify import excel item group.

 

------------------------------------------------------------
revno: 920
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2009-10-29 12:21:01 +0700
message:
  Modify import excel item group.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java
  dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/DefaultExcelItemService.java
  dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/hibernate/HibernateExcelItemStore.java
  dhis-2/dhis-services/dhis-service-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/excelitem/hibernate/ExcelItemGroup.hbm.xml
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelStore.java	2009-09-17 15:02:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelStore.java	2009-10-29 05:21:01 +0000
@@ -82,7 +82,7 @@
     public Collection<Integer> getSheets( Integer reportId );
 
     // --------------------------------------
-    // Report DataElement Order
+    // DataElement Order
     // --------------------------------------
 
     public DataElementGroupOrder getDataElementGroupOrder( Integer id );
@@ -110,4 +110,6 @@
     Collection<DataEntryStatus> getDataEntryStatusDefaultByDataSets( Collection<DataSet> dataSets );
 
     public int countDataValueOfDataSet( DataSet dataSet, OrganisationUnit organisationUnit, Period period );
+    
+
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java	2009-10-29 05:21:01 +0000
@@ -27,90 +27,99 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.List;
 import java.util.Set;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 
 /**
  * @author Chau Thu Tran
  * @version $Id$
  */
-public class ExcelItemGroup
-{
-    private int id;
-
-    private String name;
-
-    private Set<ExcelItem> excelItems;
-
-    private String excelTemplateFile;
-    
-    private String type;
-    
-    private Set<OrganisationUnit> organisationAssocitions;
-
-    // ----------------------------------------------------------------------
-    // Constructors
-    // ----------------------------------------------------------------------
-
-    public ExcelItemGroup()
-    {
-       
-    }
-   
-    // -------------------------------------------------------------------------
-    // Internal classes
-    // -------------------------------------------------------------------------
-
-    public static class TYPE
-    {
-        public static final String NORMAL = "NORMAL";
-
-        public static final String CATEGORY = "CATEGORY";
-
-        public static final String PERIOD_COLUMN_LISTING = "PERIOD_COLUMN_LISTING";
-
-        public static final String ORGANIZATION_GROUP_LISTING = "ORGANIZATION_GROUP_LISTING";
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + name.hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals( Object obj )
-    {
-        if ( this == obj )
-            return true;
-        if ( obj == null )
-            return false;
-        if ( getClass() != obj.getClass() )
-            return false;
-        ExcelItemGroup other = (ExcelItemGroup) obj;
-        if ( name != other.name )
-            return false;
-        return true;
-    }
-
-    // ----------------------------------------------------------------------
-    // Getters and setters
-    // ----------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public String getType() {
+public class ExcelItemGroup {
+	private int id;
+
+	private String name;
+
+	private Set<ExcelItem> excelItems;
+
+	private String excelTemplateFile;
+
+	private String type;
+
+	private Set<OrganisationUnit> organisationAssocitions;
+
+	private List<OrganisationUnitGroup> organisationUnitGroups;
+	
+	private List<DataElementGroupOrder> dataElementOrders;
+
+	// ----------------------------------------------------------------------
+	// Constructors
+	// ----------------------------------------------------------------------
+
+	public ExcelItemGroup() {
+
+	}
+
+	// -------------------------------------------------------------------------
+	// Internal classes
+	// -------------------------------------------------------------------------
+
+	public static class TYPE {
+		public static final String NORMAL = "NORMAL";
+
+		public static final String CATEGORY = "CATEGORY";
+
+		public static final String PERIOD_COLUMN_LISTING = "PERIOD_COLUMN_LISTING";
+
+		public static final String ORGANIZATION_GROUP_LISTING = "ORGANIZATION_GROUP_LISTING";
+	}
+
+	// -------------------------------------------------------------------------
+	// hashCode and equals
+	// -------------------------------------------------------------------------
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + name.hashCode();
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		ExcelItemGroup other = (ExcelItemGroup) obj;
+		if (name != other.name)
+			return false;
+		return true;
+	}
+
+	// ----------------------------------------------------------------------
+	// Getters and setters
+	// ----------------------------------------------------------------------
+
+	public int getId() {
+		return id;
+	}
+
+	public List<DataElementGroupOrder> getDataElementOrders() {
+		return dataElementOrders;
+	}
+
+	public void setDataElementOrders(List<DataElementGroupOrder> dataElementOrders) {
+		this.dataElementOrders = dataElementOrders;
+	}
+
+	public String getType() {
 		return type;
 	}
 
@@ -118,30 +127,34 @@
 		this.type = type;
 	}
 
-	public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public String getExcelTemplateFile()
-    {
-        return excelTemplateFile;
-    }
-
-    public void setExcelTemplateFile( String excelTemplateFile )
-    {
-        this.excelTemplateFile = excelTemplateFile;
-    }
+	public void setId(int id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public List<OrganisationUnitGroup> getOrganisationUnitGroups() {
+		return organisationUnitGroups;
+	}
+
+	public void setOrganisationUnitGroups(
+			List<OrganisationUnitGroup> organisationUnitGroups) {
+		this.organisationUnitGroups = organisationUnitGroups;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getExcelTemplateFile() {
+		return excelTemplateFile;
+	}
+
+	public void setExcelTemplateFile(String excelTemplateFile) {
+		this.excelTemplateFile = excelTemplateFile;
+	}
 
 	public Set<ExcelItem> getExcelItems() {
 		return excelItems;
@@ -160,4 +173,28 @@
 		this.organisationAssocitions = organisationAssocitions;
 	}
 	
+	// ----------------------------------------------------------------------
+	// getType
+	// ----------------------------------------------------------------------
+
+	public boolean isCategory()
+    {
+        return this.getType().equalsIgnoreCase( TYPE.CATEGORY );
+    }
+
+    public boolean isOrganisationUnitGroupListing()
+    {
+        return this.getType().equalsIgnoreCase( TYPE.ORGANIZATION_GROUP_LISTING );
+    }
+
+    public boolean isPeriodColumnListing()
+    {
+        return this.getType().equalsIgnoreCase( TYPE.PERIOD_COLUMN_LISTING );
+    }
+
+    public boolean isNormal()
+    {
+        return this.getType().equalsIgnoreCase( TYPE.NORMAL );
+    }
+
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemService.java	2009-10-29 05:21:01 +0000
@@ -3,40 +3,52 @@
 import java.util.Collection;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 
 public interface ExcelItemService {
 
 	String ID = ExcelItemService.class.getName();
-	
+
 	// ----------------------------------------------------------------------------
 	// Excelitem group services
 	// ----------------------------------------------------------------------------
-	
+
 	public void addExcelItemGroup(ExcelItemGroup excelItemGroup);
-	
+
 	public void updateExcelItemGroup(ExcelItemGroup excelItemGroup);
-	
+
 	public void deleteExcelItemGroup(int id);
-	
+
 	public Collection<ExcelItemGroup> getAllExcelItemGroup();
-	
+
 	public ExcelItemGroup getExcelItemGroup(int id);
 
-	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit( OrganisationUnit organisationUnit );
-	
+	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit(
+			OrganisationUnit organisationUnit);
+
 	// ----------------------------------------------------------------------------
 	// Excelitem services
 	// ----------------------------------------------------------------------------
-	
+
 	public void addExcelItem(ExcelItem excelItem);
-	
+
 	public void updateExcelItem(ExcelItem excelItem);
-	
+
 	public void deleteExcelItem(int id);
-	
+
 	public Collection<ExcelItem> getAllExcelItem();
-		
+
 	public ExcelItem getExcelItem(int id);
-	
+
+	// --------------------------------------
+	// DataElement Order
+	// --------------------------------------
+
+	public DataElementGroupOrder getDataElementGroupOrder(Integer id);
+
+	public void updateDataElementGroupOrder(
+			DataElementGroupOrder dataElementGroupOrder);
+
+	public void deleteDataElementGroupOrder(Integer id);
+
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemStore.java	2009-10-29 05:21:01 +0000
@@ -3,39 +3,51 @@
 import java.util.Collection;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 
 public interface ExcelItemStore {
 
 	String ID = ExcelItemStore.class.getName();
-	
+
 	// ----------------------------------------------------------------------------
 	// Excelitem group services
 	// ----------------------------------------------------------------------------
-	
+
 	public void addExcelItemGroup(ExcelItemGroup excelItemGroup);
-	
+
 	public void updateExcelItemGroup(ExcelItemGroup excelItemGroup);
-	
+
 	public void deleteExcelItemGroup(int id);
-	
+
 	public Collection<ExcelItemGroup> getAllExcelItemGroup();
-	
+
 	public ExcelItemGroup getExcelItemGroup(int id);
 
-	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit( OrganisationUnit organisationUnit );
-	
+	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit(
+			OrganisationUnit organisationUnit);
+
 	// ----------------------------------------------------------------------------
 	// Excelitem services
 	// ----------------------------------------------------------------------------
-	
+
 	public void addExcelItem(ExcelItem excelItem);
-	
+
 	public void updateExcelItem(ExcelItem excelItem);
-	
+
 	public void deleteExcelItem(int id);
-	
+
 	public Collection<ExcelItem> getAllExcelItem();
-		
+
 	public ExcelItem getExcelItem(int id);
+
+	// --------------------------------------
+	// DataElement Order
+	// --------------------------------------
+
+	public DataElementGroupOrder getDataElementGroupOrder(Integer id);
+
+	public void updateDataElementGroupOrder(
+			DataElementGroupOrder dataElementGroupOrder);
+
+	public void deleteDataElementGroupOrder(Integer id);
 }

=== modified file 'dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/DefaultExcelItemService.java'
--- dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/DefaultExcelItemService.java	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/DefaultExcelItemService.java	2009-10-29 05:21:01 +0000
@@ -30,6 +30,7 @@
 import java.util.Collection;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -81,8 +82,9 @@
 
 	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit(
 			OrganisationUnit organisationUnit) {
-	
-		return excelItemStore.getExcelItemGroupsByOrganisationUnit(organisationUnit);
+
+		return excelItemStore
+				.getExcelItemGroupsByOrganisationUnit(organisationUnit);
 	}
 
 	// --------------------------------------
@@ -114,4 +116,21 @@
 		return excelItemStore.getExcelItem(id);
 	}
 
+	// --------------------------------------
+	// DataElement Order
+	// --------------------------------------
+
+	public DataElementGroupOrder getDataElementGroupOrder(Integer id) {
+		return excelItemStore.getDataElementGroupOrder(id);
+	}
+
+	public void updateDataElementGroupOrder(
+			DataElementGroupOrder dataElementGroupOrder) {
+		excelItemStore.updateDataElementGroupOrder(dataElementGroupOrder);
+	}
+
+	public void deleteDataElementGroupOrder(Integer id) {
+		excelItemStore.deleteDataElementGroupOrder(id);
+	}
+
 }

=== modified file 'dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/hibernate/HibernateExcelItemStore.java'
--- dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/hibernate/HibernateExcelItemStore.java	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-services/dhis-service-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitem/hibernate/HibernateExcelItemStore.java	2009-10-29 05:21:01 +0000
@@ -7,7 +7,7 @@
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.reportexcel.ReportExcel;
+import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItem;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemStore;
@@ -69,7 +69,7 @@
 
 		Session session = sessionFactory.getCurrentSession();
 
-		session.delete( getExcelItem(id));
+		session.delete(getExcelItem(id));
 	}
 
 	@SuppressWarnings("unchecked")
@@ -88,20 +88,20 @@
 
 		session.saveOrUpdate(excelItem);
 	}
-	
-	public ExcelItem getExcelItem(int id){
-		
+
+	public ExcelItem getExcelItem(int id) {
+
 		Session session = sessionFactory.getCurrentSession();
 
 		Criteria criteria = session.createCriteria(ExcelItem.class);
 
 		criteria.add(Restrictions.eq("id", id));
 
-		return (ExcelItem)criteria.uniqueResult();
+		return (ExcelItem) criteria.uniqueResult();
 	}
 
 	public void addExcelItemGroup(ExcelItemGroup excelItemGroup) {
-		
+
 		sessionFactory.getCurrentSession().save(excelItemGroup);
 	}
 
@@ -109,12 +109,12 @@
 
 		Session session = sessionFactory.getCurrentSession();
 
-		session.delete( getExcelItemGroup(id));
+		session.delete(getExcelItemGroup(id));
 	}
 
 	@SuppressWarnings("unchecked")
 	public Collection<ExcelItemGroup> getAllExcelItemGroup() {
-		
+
 		Session session = sessionFactory.getCurrentSession();
 
 		Criteria criteria = session.createCriteria(ExcelItemGroup.class);
@@ -130,29 +130,46 @@
 
 		criteria.add(Restrictions.eq("id", id));
 
-		return (ExcelItemGroup)criteria.uniqueResult();
+		return (ExcelItemGroup) criteria.uniqueResult();
 	}
 
 	public void updateExcelItemGroup(ExcelItemGroup excelItemGroup) {
-		
+
 		Session session = sessionFactory.getCurrentSession();
 
 		session.saveOrUpdate(excelItemGroup);
 
 	}
-	
-	@SuppressWarnings( "unchecked" )
+
+	@SuppressWarnings("unchecked")
 	public Collection<ExcelItemGroup> getExcelItemGroupsByOrganisationUnit(
 			OrganisationUnit organisationUnit) {
-		
-		Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( ReportExcel.class );
-
-        criteria.createAlias( "organisationAssocitions", "o" );
-
-        criteria.add( Restrictions.eq( "o.id", organisationUnit.getId() ) );
-
-        return criteria.list();
+
+		Session session = sessionFactory.getCurrentSession();
+
+		Criteria criteria = session.createCriteria(ExcelItemGroup.class);
+
+		criteria.createAlias("organisationAssocitions", "o");
+
+		criteria.add(Restrictions.eq("o.id", organisationUnit.getId()));
+
+		return criteria.list();
+	}
+
+	public DataElementGroupOrder getDataElementGroupOrder(Integer id) {
+		Session session = sessionFactory.getCurrentSession();
+		return (DataElementGroupOrder) session.get(DataElementGroupOrder.class,
+				id);
+	}
+
+	public void updateDataElementGroupOrder(
+			DataElementGroupOrder dataElementGroupOrder) {
+		Session session = sessionFactory.getCurrentSession();
+		session.update(dataElementGroupOrder);
+	}
+
+	public void deleteDataElementGroupOrder(Integer id) {
+		Session session = sessionFactory.getCurrentSession();
+		session.delete(this.getDataElementGroupOrder(id));
 	}
 }

=== modified file 'dhis-2/dhis-services/dhis-service-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/excelitem/hibernate/ExcelItemGroup.hbm.xml'
--- dhis-2/dhis-services/dhis-service-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/excelitem/hibernate/ExcelItemGroup.hbm.xml	2009-10-27 06:36:41 +0000
+++ dhis-2/dhis-services/dhis-service-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/excelitem/hibernate/ExcelItemGroup.hbm.xml	2009-10-29 05:21:01 +0000
@@ -3,28 +3,44 @@
 	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
 <hibernate-mapping>
-	<class name="org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup" table="excelitemgroup">
-		
+	<class name="org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup"
+		table="excelitemgroup">
+
 		<id name="id" column="excelitemgroupid">
 			<generator class="native" />
 		</id>
-		
+
 		<property name="name" />
-		
+
 		<property name="type" />
-		
+
 		<property name="excelTemplateFile" column="exceltemplate" />
-		
+
 		<set name="excelItems" lazy="false" cascade="delete">
 			<key column="excelitemgroupid" />
 			<one-to-many class="org.hisp.dhis.reportexcel.excelitem.ExcelItem" />
 		</set>
-		
-		<set name="organisationAssocitions" table="excelgroup_associations" lazy="false">
+
+		<set name="organisationAssocitions" table="excelgroup_associations"
+			lazy="false">
 			<key column="excelitemgroupid" />
 			<many-to-many class="org.hisp.dhis.organisationunit.OrganisationUnit"
-				column="organisationid"  foreign-key="fk_excelitemgroup_organisation"/>
-		</set>		
+				column="organisationid" foreign-key="fk_excelitemgroup_organisation" />
+		</set>
+
+		<list name="organisationUnitGroups" table="excelitemgroup_organisationgroup">
+			<key column="excelitemgroupid" />
+			<list-index column="grouporder" base="0" />
+			<many-to-many class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
+				column="oganisationunitgroupid" foreign-key="fk_excelitemgroup_organisationgroup" />
+		</list>
+
+		<list name="dataElementOrders" table="excelitemgroup_dataelementgrouporder"
+			cascade="all" lazy="false">
+			<key column="excelitemgroupid" />
+			<list-index base="0" column="dataelementgrouporder" />
+			<one-to-many class="org.hisp.dhis.reportexcel.DataElementGroupOrder" />
+		</list>
 
 	</class>
 </hibernate-mapping>

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2009-10-29 03:02:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2009-10-29 05:21:01 +0000
@@ -967,7 +967,7 @@
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-	<!-- EXCELITEM GROUP                                               -->
+	<!-- EXCEL ITEM GROUP                                               -->
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
 	<bean
@@ -1057,6 +1057,33 @@
 		<property name="organisationUnitGroupService"
 			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
 	</bean>
+	
+	<bean
+		id="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrganisationUnitGroupForCategoryAction"
+		class="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrganisationUnitGroupForCategoryAction"
+		scope="prototype">
+		<property name="excelItemService"
+			ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+		<property name="organisationUnitGroupService"
+			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+	</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="organisationUnitGroupService"
+			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+	</bean>
+	
+	<bean
+		id="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderByCategoryAction"
+		class="org.hisp.dhis.reportexcel.excelitemgroup.dataelementgroup.action.GetDataElementGroupOrderByCategoryAction"
+		scope="prototype">
+		<property name="excelItemService" ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 	<!-- EXCEL ITEM                                                    -->

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml	2009-10-29 03:02:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml	2009-10-29 05:21:01 +0000
@@ -820,6 +820,20 @@
 			<param name="stylesheets">style/ui.theme.css,style/basic.css</param>
 		</action>
 
+		<action name="openUpdateOrganisationUnitGroupForCategory"
+			class="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateOrganisationUnitGroupForCategoryAction">
+			<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>
+			<param name="javascripts">javascript/commons.js</param>
+		</action>
+
+		<action name="saveDataElementGroupOrderForCategory"
+			class="org.hisp.dhis.reportexcel.excelitemgroup.action.SaveDataElementGroupOrderForCategoryAction">
+			<result name="success" type="redirect">listReportExcel.action
+			</result>
+		</action>
+		
 		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 		<!-- EXCEL ITEM                                                     -->
 		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->