=== modified file 'local/vn/dhis-api-vn/pom.xml'
--- local/vn/dhis-api-vn/pom.xml	2009-09-01 10:56:13 +0000
+++ local/vn/dhis-api-vn/pom.xml	2009-09-01 13:08:49 +0000
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis</artifactId>
-    <version>2.0.1-SNAPSHOT</version>
+    <version>2.0.2-SNAPSHOT</version>
   </parent>
   
   <artifactId>dhis-api-vn</artifactId>

=== removed directory 'local/vn/dhis-api-vn/src/main/java/META-INF'
=== removed file 'local/vn/dhis-api-vn/src/main/java/META-INF/MANIFEST.MF'
--- local/vn/dhis-api-vn/src/main/java/META-INF/MANIFEST.MF	2009-07-13 00:23:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/META-INF/MANIFEST.MF	1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-

=== removed directory 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status'
=== modified file 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelService.java'
--- local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelService.java	2009-07-13 00:23:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelService.java	2009-09-01 13:08:49 +0000
@@ -41,7 +41,7 @@
     // Service of Report
     // --------------------------------------
 
-    public void addReport( ReportExcelInterface report );
+    public int addReport( ReportExcelInterface report );
 
     public void updateReport( ReportExcelInterface report );
 

=== modified file 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelStore.java'
--- local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelStore.java	2009-07-13 00:23:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/report/ReportExcelStore.java	2009-09-01 13:08:49 +0000
@@ -41,7 +41,7 @@
     // Service of Report
     // --------------------------------------
 
-    public void addReport( ReportExcelInterface report );
+    public int addReport( ReportExcelInterface report );
 
     public void updateReport( ReportExcelInterface report );
 

=== added directory 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status'
=== renamed file 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatus.java' => 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatus.java'
--- local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatus.java	2009-09-01 11:25:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatus.java	2009-09-01 13:08:49 +0000
@@ -1,4 +1,4 @@
-package org.hisp.dhis.status;
+package org.hisp.dhis.vn.status;
 
 /*
  * Copyright (c) 2004-2007, University of Oslo
@@ -55,6 +55,17 @@
 
     private boolean completed;
 
+    public DataStatus()
+    {   
+    }
+    
+    public DataStatus( DataSet dataSet, boolean frontPage, PeriodType periodType )
+    {
+        this.dataSet = dataSet;
+        this.frontPage = frontPage;
+        this.periodType = periodType;
+    }
+        
     public int getCompletedPercent()
     {
         return (int) ((new Double( numberOfDataValue ) / new Double( numberOfDataElement )) * 100);

=== renamed file 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatusService.java' => 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatusService.java'
--- local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatusService.java	2009-09-01 11:25:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatusService.java	2009-09-01 13:08:49 +0000
@@ -1,4 +1,4 @@
-package org.hisp.dhis.status;
+package org.hisp.dhis.vn.status;
 
 import java.util.Collection;
 
@@ -37,21 +37,19 @@
  */
 public interface DataStatusService
 {
-
-    public abstract void save( DataStatus dataStatus );
-
-    public abstract DataStatus get( int id );
-
-    public abstract void delete( int id );
-
-    public abstract void update( DataStatus dataStatus );
-
-    public abstract Collection<DataStatus> getALL();
-
-    public abstract Collection<DataStatus> getDataStatusDefault();
-    
-    public abstract Collection<DataStatus> getDataStatusByDataSets(Collection<DataSet> dataSets);
-    
-    public abstract Collection<DataStatus> getDataStatusDefaultByDataSets(Collection<DataSet> dataSets);
-
+    int save( DataStatus dataStatus );
+
+    DataStatus get( int id );
+
+    void delete( int id );
+
+    void update( DataStatus dataStatus );
+
+    Collection<DataStatus> getALL();
+
+    Collection<DataStatus> getDataStatusDefault();
+
+    Collection<DataStatus> getDataStatusByDataSets( Collection<DataSet> dataSets );
+
+    Collection<DataStatus> getDataStatusDefaultByDataSets( Collection<DataSet> dataSets );
 }

=== renamed file 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatusStore.java' => 'local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatusStore.java'
--- local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/status/DataStatusStore.java	2009-09-01 11:25:50 +0000
+++ local/vn/dhis-api-vn/src/main/java/org/hisp/dhis/vn/status/DataStatusStore.java	2009-09-01 13:08:49 +0000
@@ -1,4 +1,4 @@
-package org.hisp.dhis.status;
+package org.hisp.dhis.vn.status;
 
 import java.util.Collection;
 
@@ -37,21 +37,21 @@
  */
 public interface DataStatusStore
 {
-
-    public abstract void save( DataStatus dataStatus );
-
-    public abstract DataStatus get( int id );
-
-    public abstract void delete( int id );
-
-    public abstract void update( DataStatus dataStatus );
-
-    public abstract Collection<DataStatus> getALL();
-
-    public abstract Collection<DataStatus> getDataStatusDefault();
-
-    public abstract Collection<DataStatus> getDataStatusByDataSets( Collection<DataSet> dataSets );
-
-    public abstract Collection<DataStatus> getDataStatusDefaultByDataSets( Collection<DataSet> dataSets );
-
+    String ID = DataStatusStore.class.getName();
+    
+    int save( DataStatus dataStatus );
+
+    DataStatus get( int id );
+
+    void delete( int id );
+
+    void update( DataStatus dataStatus );
+
+    Collection<DataStatus> getALL();
+
+    Collection<DataStatus> getDataStatusDefault();
+
+    Collection<DataStatus> getDataStatusByDataSets( Collection<DataSet> dataSets );
+
+    Collection<DataStatus> getDataStatusDefaultByDataSets( Collection<DataSet> dataSets );
 }

=== modified file 'local/vn/dhis-service-vn/pom.xml'
--- local/vn/dhis-service-vn/pom.xml	2009-09-01 10:22:24 +0000
+++ local/vn/dhis-service-vn/pom.xml	2009-09-01 13:08:49 +0000
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-services</artifactId>
-    <version>2.0.1-SNAPSHOT</version>
+    <version>2.0.2-SNAPSHOT</version>
   </parent>
   
   <artifactId>dhis-service-vn</artifactId>
@@ -21,13 +21,11 @@
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-api</artifactId>
     </dependency>
-	<!--
      <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-api-vn</artifactId>
-      <version>2.0.1-SNAPSHOT</version>
+      <version>2.0.2-SNAPSHOT</version>
     </dependency>
-	-->
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-jdbc</artifactId>

=== removed directory 'local/vn/dhis-service-vn/src/main/java/META-INF'
=== removed file 'local/vn/dhis-service-vn/src/main/java/META-INF/MANIFEST.MF'
--- local/vn/dhis-service-vn/src/main/java/META-INF/MANIFEST.MF	2009-07-13 00:23:50 +0000
+++ local/vn/dhis-service-vn/src/main/java/META-INF/MANIFEST.MF	1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-

=== removed directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status'
=== removed directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status/hibernate'
=== modified file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/DefaultReportExcelService.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/DefaultReportExcelService.java	2009-09-01 12:22:47 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/DefaultReportExcelService.java	2009-09-01 13:08:49 +0000
@@ -54,9 +54,9 @@
     // Service of Report
     // -------------------------------------------------
 
-    public void addReport( ReportExcelInterface report )
+    public int addReport( ReportExcelInterface report )
     {
-        reportStore.addReport( report );
+        return reportStore.addReport( report );
     }
 
     public void updateReport( ReportExcelInterface report )

=== modified file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/hibernate/HibernateReportExcelStore.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/hibernate/HibernateReportExcelStore.java	2009-09-01 12:22:47 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/report/hibernate/HibernateReportExcelStore.java	2009-09-01 13:08:49 +0000
@@ -62,11 +62,11 @@
     // Service of Report
     // --------------------------------------
 
-    public void addReport( ReportExcelInterface report )
+    public int addReport( ReportExcelInterface report )
     {
         Session session = sessionFactory.getCurrentSession();
 
-        session.save( report );
+        return (Integer) session.save( report );
     }
 
     public void updateReport( ReportExcelInterface report )

=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status'
=== renamed file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status/DefaultDataStatusService.java' => 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status/DefaultDataStatusService.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status/DefaultDataStatusService.java	2009-09-01 12:22:47 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status/DefaultDataStatusService.java	2009-09-01 13:08:49 +0000
@@ -1,4 +1,4 @@
-package org.hisp.dhis.status;
+package org.hisp.dhis.vn.status;
 
 import java.util.Collection;
 
@@ -55,6 +55,11 @@
     // Implement
     // -------------------------------------------------
 
+    public int save( DataStatus dataStatus )
+    {
+        return dataStatusStore.save( dataStatus );
+    }
+
     public void delete( int id )
     {
         dataStatusStore.delete( id );
@@ -65,11 +70,6 @@
         return dataStatusStore.get( id );
     }
 
-    public void save( DataStatus dataStatus )
-    {
-        dataStatusStore.save( dataStatus );
-    }
-
     public void update( DataStatus dataStatus )
     {
         dataStatusStore.update( dataStatus );

=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status/hibernate'
=== renamed file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status/hibernate/HibernateDataStatusStore.java' => 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status/hibernate/HibernateDataStatusStore.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/status/hibernate/HibernateDataStatusStore.java	2009-09-01 12:22:47 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/vn/status/hibernate/HibernateDataStatusStore.java	2009-09-01 13:08:49 +0000
@@ -1,4 +1,4 @@
-package org.hisp.dhis.status.hibernate;
+package org.hisp.dhis.vn.status.hibernate;
 
 import java.util.Collection;
 import java.util.HashSet;
@@ -8,8 +8,8 @@
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.status.DataStatus;
-import org.hisp.dhis.status.DataStatusStore;
+import org.hisp.dhis.vn.status.DataStatus;
+import org.hisp.dhis.vn.status.DataStatusStore;
 
 /*
  * Copyright (c) 2004-2007, University of Oslo
@@ -60,12 +60,18 @@
     // Implement
     // -------------------------------------------------
 
+    public int save( DataStatus dataStatus )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        return (Integer) session.save( dataStatus );
+    }
+    
     public void delete( int id )
     {
         Session session = sessionFactory.getCurrentSession();
 
         session.delete( session.get( DataStatus.class, id ) );
-
     }
 
     public DataStatus get( int id )
@@ -75,14 +81,6 @@
         return (DataStatus) session.get( DataStatus.class, id );
     }
 
-    public void save( DataStatus dataStatus )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.save( dataStatus );
-
-    }
-
     public void update( DataStatus dataStatus )
     {
         Session session = sessionFactory.getCurrentSession();

=== modified file 'local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml	2009-09-01 12:22:47 +0000
+++ local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml	2009-09-01 13:08:49 +0000
@@ -4,6 +4,8 @@
   xsi:schemaLocation="
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
   
+  <!-- ReportExcel -->
+  
   <bean id="org.hisp.dhis.vn.report.ReportExcelStore"
     class="org.hisp.dhis.vn.report.hibernate.HibernateReportExcelStore">
     <property name="sessionFactory" ref="sessionFactory"/>
@@ -15,15 +17,17 @@
    	  ref="org.hisp.dhis.vn.report.ReportExcelStore"/>
   </bean>
   
-  <bean id="org.hisp.dhis.status.DataStatusStore"
-    class="org.hisp.dhis.status.hibernate.HibernateDataStatusStore">
+  <!-- DataStatus -->
+  
+  <bean id="org.hisp.dhis.vn.status.DataStatusStore"
+    class="org.hisp.dhis.vn.status.hibernate.HibernateDataStatusStore">
     <property name="sessionFactory" ref="sessionFactory"/>
   </bean>
   
-  <bean id="org.hisp.dhis.status.DataStatusService"
-    class="org.hisp.dhis.status.DefaultDataStatusService">
+  <bean id="org.hisp.dhis.vn.status.DataStatusService"
+    class="org.hisp.dhis.vn.status.DefaultDataStatusService">
     <property name="dataStatusStore"
-   	  ref="org.hisp.dhis.status.DataStatusStore"/>
+   	  ref="org.hisp.dhis.vn.status.DataStatusStore"/>
   </bean>
    
 </beans>

=== renamed file 'local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/status/hibernate/ReportExcel.hbm.xml' => 'local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/status/hibernate/DataStatus.hbm.xml'
--- local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/status/hibernate/ReportExcel.hbm.xml	2009-09-01 11:25:50 +0000
+++ local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/status/hibernate/DataStatus.hbm.xml	2009-09-01 13:08:49 +0000
@@ -3,7 +3,7 @@
 	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 <hibernate-mapping>
-	<class name="org.hisp.dhis.status.DataStatus" table="datastatus">
+	<class name="org.hisp.dhis.vn.status.DataStatus" table="datastatus">
 		<id name="id" column="datastatusid">
 			<generator class="native" />
 		</id>

=== modified file 'local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/vn/report/hibernate/ReportItem.hbm.xml'
--- local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/vn/report/hibernate/ReportItem.hbm.xml	2009-07-13 00:23:50 +0000
+++ local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/vn/report/hibernate/ReportItem.hbm.xml	2009-09-01 13:08:49 +0000
@@ -2,8 +2,8 @@
 <!DOCTYPE hibernate-mapping PUBLIC
 	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping package="org.hisp.dhis.vn.report">
-  <class name="ReportItem" table="reportitem">
+<hibernate-mapping>
+  <class name="org.hisp.dhis.vn.report.ReportItem" table="reportitem">
   	<id name="id" column="reportitemid">
   		<generator class="native"/>
   	</id>

=== added file 'local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/DataStatusStoreTest.java'
--- local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/DataStatusStoreTest.java	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/DataStatusStoreTest.java	2009-09-01 13:08:49 +0000
@@ -0,0 +1,49 @@
+package org.hisp.dhis.vn.report;
+
+import static junit.framework.Assert.assertNotNull;
+
+import org.hisp.dhis.DhisSpringTest;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.period.MonthlyPeriodType;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.vn.status.DataStatus;
+import org.hisp.dhis.vn.status.DataStatusStore;
+import org.junit.Test;
+
+public class DataStatusStoreTest
+    extends DhisSpringTest
+{
+    private DataStatusStore dataStatusStore;
+
+    private PeriodType periodType;
+    
+    private DataSet dataSet;
+    
+    @Override
+    public void setUpTest()
+    {
+        dataStatusStore = (DataStatusStore) getBean( DataStatusStore.ID );
+        
+        dataSetService = (DataSetService) getBean( DataSetService.ID );
+        
+        periodService = (PeriodService) getBean( PeriodService.ID );
+        
+        periodType = periodService.getPeriodTypeByClass( MonthlyPeriodType.class );
+        
+        dataSet = createDataSet( 'A', periodType );
+        
+        dataSetService.addDataSet( dataSet );
+    }
+    
+    @Test
+    public void testAddGet()
+    {
+        DataStatus dataStatus = new DataStatus( dataSet, true, periodType );
+        
+        int id = dataStatusStore.save( dataStatus );
+        
+        assertNotNull( dataStatusStore.get( id ) );
+    }
+}

=== added file 'local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/ReportExcelStoreTest.java'
--- local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/ReportExcelStoreTest.java	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/test/java/org/hisp/dhis/vn/report/ReportExcelStoreTest.java	2009-09-01 13:08:49 +0000
@@ -0,0 +1,28 @@
+package org.hisp.dhis.vn.report;
+
+import static junit.framework.Assert.assertNotNull;
+
+import org.hisp.dhis.DhisSpringTest;
+import org.junit.Test;
+
+public class ReportExcelStoreTest
+    extends DhisSpringTest
+{
+    private ReportExcelStore reportExcelStore;
+    
+    @Override
+    public void setUpTest()
+    {
+        reportExcelStore = (ReportExcelStore) getBean( ReportExcelStore.ID );
+    }
+    
+    @Test
+    public void testAddGet()
+    {
+        ReportExcelInterface report = new ReportExcelNormal( "ReportA", "TemplateA", 1, 1, 1, 1 );
+        
+        int id = reportExcelStore.addReport( report );
+        
+        assertNotNull( reportExcelStore.getReport( id ) );
+    }
+}

