← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4738: (mobil) Final refactor. Added SectionFormUtils. Added validation for SaveSectionform.

 

------------------------------------------------------------
revno: 4738
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-28 12:34:08 +0200
message:
  (mobil) Final refactor. Added SectionFormUtils. Added validation for SaveSectionform.
removed:
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetChartAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportParamsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/ProvideContentAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetDataSetsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetOrganisationUnitsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetPeriodsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetSectionFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/SaveSectionFormAction.java
added:
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetChartAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportParamsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/ProvideContentAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetOrganisationUnitsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-light/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
=== removed directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard'
=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetChartAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetChartAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetChartAction.java	1970-01-01 00:00:00 +0000
@@ -1,124 +0,0 @@
-package org.hisp.dhis.light.action.dashboard;
-
-/*
- * 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.
- */
-
-import org.hisp.dhis.chart.ChartService;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.jfree.chart.JFreeChart;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetChartAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ChartService chartService;
-
-    public void setChartService( ChartService chartService )
-    {
-        this.chartService = chartService;
-    }
-    
-    private I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private JFreeChart chart;
-
-    public JFreeChart getChart()
-    {
-        return chart;
-    }
-    
-    private int height;
-
-    public int getHeight()
-    {
-        return height;
-    }
-
-    public void setHeight( int height )
-    {
-        this.height = height;
-    }
-
-    private int width;
-
-    public int getWidth()
-    {
-        return width;
-    }
-
-    public void setWidth( int width )
-    {
-        this.width = width;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implemenation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        if ( id != null )
-        {
-            chart = chartService.getJFreeChart( id, format );
-            
-            height = 280;
-            
-            width = 400;
-        }
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportAction.java	1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-package org.hisp.dhis.light.action.dashboard;
-
-/*
- * 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.
- */
-
-import org.hisp.dhis.common.Grid;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.reporttable.ReportTableService;
-
-import com.opensymphony.xwork2.Action;
-
-public class GetReportAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ReportTableService reportTableService;
-
-    public void setReportTableService( ReportTableService reportTableService )
-    {
-        this.reportTableService = reportTableService;
-    }
-    
-    private I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-    
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    private Integer reportingPeriod;
-
-    public void setReportingPeriod( Integer reportingPeriod )
-    {
-        this.reportingPeriod = reportingPeriod;
-    }
-
-    private Integer organisationUnitId;
-
-    public void setOrganisationUnitId( Integer organisationUnitId )
-    {
-        this.organisationUnitId = organisationUnitId;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private Grid grid;
-
-    public Grid getGrid()
-    {
-        return grid;
-    }
-
-    // -------------------------------------------------------------------------
-    // Result implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        grid = reportTableService.getReportTableGrid( id, format, reportingPeriod, organisationUnitId );
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportParamsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportParamsAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/GetReportParamsAction.java	1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
-package org.hisp.dhis.light.action.dashboard;
-
-/*
- * 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.
- */
-
-import java.util.Calendar;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.period.MonthlyPeriodType;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.report.Report;
-import org.hisp.dhis.reporttable.ReportParams;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.reporttable.ReportTableService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- */
-public class GetReportParamsAction
-    implements Action
-{
-    private static final int AVAILABLE_REPORTING_MONTHS = 24;
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ReportTableService reportTableService;
-
-    public void setReportTableService( ReportTableService reportTableService )
-    {
-        this.reportTableService = reportTableService;
-    }
-    
-    private SelectionTreeManager selectionTreeManager;
-
-    public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
-    {
-        this.selectionTreeManager = selectionTreeManager;
-    }
-
-    private I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    public Integer getId()
-    {
-        return id;
-    }
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-        
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private ReportParams reportParams;
-
-    public ReportParams getReportParams()
-    {
-        return reportParams;
-    }
-        
-    private SortedMap<Integer, String> reportingPeriods = new TreeMap<Integer, String>();
-
-    public SortedMap<Integer, String> getReportingPeriods()
-    {
-        return reportingPeriods;
-    }
-    
-    private Report report;
-
-    public Report getReport()
-    {
-        return report;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        selectionTreeManager.setCurrentUserOrganisationUnitAsSelected();
-        
-        if ( id != null )
-        {
-            ReportTable reportTable = reportTableService.getReportTable( id, ReportTableService.MODE_REPORT_TABLE );
-            
-            if ( reportTable != null )
-            {
-                reportParams = reportTable.getReportParams();
-                                
-                if ( reportParams.isParamReportingMonth() )
-                {
-                    MonthlyPeriodType periodType = new MonthlyPeriodType();
-                    
-                    Calendar cal = PeriodType.createCalendarInstance();
-                    
-                    for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ )
-                    {
-                        int month = i + 1;    
-                        cal.add( Calendar.MONTH, -1 );                    
-                        Period period = periodType.createPeriod( cal.getTime() );                    
-                        String periodName = format.formatPeriod( period );
-                        
-                        reportingPeriods.put( month, periodName );
-                    }                
-                }
-            }
-        }
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/ProvideContentAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/ProvideContentAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dashboard/ProvideContentAction.java	1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
-package org.hisp.dhis.light.action.dashboard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dashboard.DashboardConfiguration;
-import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardManager;
-import org.hisp.dhis.dashboard.DashboardService;
-import org.hisp.dhis.document.Document;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-import com.opensymphony.xwork2.Action;
-
-public class ProvideContentAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DashboardService dashboardService;
-
-    public void setDashboardService( DashboardService dashboardService )
-    {
-        this.dashboardService = dashboardService;
-    }
-
-    private DashboardManager dashboardManager;
-
-    public void setDashboardManager( DashboardManager dashboardManager )
-    {
-        this.dashboardManager = dashboardManager;
-    }
-
-    private CurrentUserService currentUserService;
-
-    public void setCurrentUserService( CurrentUserService currentUserService )
-    {
-        this.currentUserService = currentUserService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private List<ReportTable> reportTables;
-
-    public List<ReportTable> getReportTables()
-    {
-        return reportTables;
-    }
-
-    private List<Document> documents;
-
-    public List<Document> getDocuments()
-    {
-        return documents;
-    }
-
-    private List<String> charts = new ArrayList<String>();
-
-    public List<String> getCharts()
-    {
-        return charts;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        DashboardConfiguration config = dashboardManager.getConfiguration();
-
-        for ( int i = 0; i < 8; i++ )
-        {
-            String id = config.getAreaItems().get( DashboardManager.CHART_AREA_PREFIX + (i + 1) );
-
-            if ( id != null )
-            {
-                charts.add( id );
-            }
-        }
-
-        User user = currentUserService.getCurrentUser();
-
-        DashboardContent content = dashboardService.getDashboardContent( user );
-
-        reportTables = content.getReportTables();
-
-        documents = content.getDocuments();
-
-        return SUCCESS;
-    }
-}

=== removed directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry'
=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetDataSetsAction.java	2011-09-27 12:25:21 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetDataSetsAction.java	1970-01-01 00:00:00 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.light.action.dataentry;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.system.filter.DataSetTypeFilter;
-import org.hisp.dhis.system.util.FilterUtils;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author mortenoh
- */
-public class GetDataSetsAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input & Output
-    // -------------------------------------------------------------------------
-
-    private Integer organisationUnitId;
-
-    public void setOrganisationUnitId( Integer organisationUnitId )
-    {
-        this.organisationUnitId = organisationUnitId;
-    }
-
-    public Integer getOrganisationUnitId()
-    {
-        return organisationUnitId;
-    }
-
-    private List<DataSet> dataSets = new ArrayList<DataSet>();
-
-    public List<DataSet> getDataSets()
-    {
-        return dataSets;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action Implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-    {
-        if ( organisationUnitId != null )
-        {
-            OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
-            FilterUtils.filter( dataSets, new DataSetTypeFilter( DataSet.TYPE_SECTION ) );
-        }
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetOrganisationUnitsAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetOrganisationUnitsAction.java	1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.light.action.dataentry;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author mortenoh
- */
-public class GetOrganisationUnitsAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CurrentUserService currentUserService;
-
-    public void setCurrentUserService( CurrentUserService currentUserService )
-    {
-        this.currentUserService = currentUserService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input & Output
-    // -------------------------------------------------------------------------
-
-    private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
-
-    public List<OrganisationUnit> getOrganisationUnits()
-    {
-        return organisationUnits;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action Implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-    {
-        User user = currentUserService.getCurrentUser();
-
-        if ( user != null )
-        {
-            organisationUnits = new ArrayList<OrganisationUnit>( user.getOrganisationUnits() );
-            Collections.sort( organisationUnits, new OrganisationUnitNameComparator() );
-        }
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetPeriodsAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetPeriodsAction.java	1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.light.action.dataentry;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-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.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.CalendarPeriodType;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.system.filter.PastAndCurrentPeriodFilter;
-import org.hisp.dhis.system.util.FilterUtils;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author mortenoh
- */
-public class GetPeriodsAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    private CompleteDataSetRegistrationService registrationService;
-
-    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
-    {
-        this.registrationService = registrationService;
-    }
-
-    private I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input & Output
-    // -------------------------------------------------------------------------
-
-    private Integer organisationUnitId;
-
-    public void setOrganisationUnitId( Integer organisationUnitId )
-    {
-        this.organisationUnitId = organisationUnitId;
-    }
-
-    public Integer getOrganisationUnitId()
-    {
-        return organisationUnitId;
-    }
-
-    private Integer dataSetId;
-
-    public void setDataSetId( Integer dataSetId )
-    {
-        this.dataSetId = dataSetId;
-    }
-
-    public Integer getDataSetId()
-    {
-        return dataSetId;
-    }
-
-    private Map<Period, Boolean> periodCompletedMap = new HashMap<Period, Boolean>();
-
-    public Map<Period, Boolean> getPeriodCompletedMap()
-    {
-        return periodCompletedMap;
-    }
-
-    private List<Period> periods = new ArrayList<Period>();
-
-    public List<Period> getPeriods()
-    {
-        return periods;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action Implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-    {
-        if ( dataSetId != null )
-        {
-            OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-            DataSet dataSet = dataSetService.getDataSet( dataSetId );
-            CalendarPeriodType periodType = (CalendarPeriodType) dataSet.getPeriodType();
-            periods = periodType.generatePeriods( new Date() );
-            FilterUtils.filter( periods, new PastAndCurrentPeriodFilter() );
-
-            for ( Period period : periods )
-            {
-                period.setName( format.formatPeriod( period ) );
-
-                CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet,
-                    period, organisationUnit );
-
-                periodCompletedMap.put( period, registration != null ? true : false );
-            }
-        }
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetSectionFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetSectionFormAction.java	2011-09-28 09:35:12 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/GetSectionFormAction.java	1970-01-01 00:00:00 +0000
@@ -1,286 +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.light.action.dataentry;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.hisp.dhis.dataanalysis.DataAnalysisService;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-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.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.datavalue.DeflatedDataValue;
-import org.hisp.dhis.minmax.MinMaxDataElement;
-import org.hisp.dhis.minmax.MinMaxDataElementService;
-import org.hisp.dhis.minmax.validation.MinMaxValuesGenerationService;
-import org.hisp.dhis.options.SystemSettingManager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.system.util.ListUtils;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author mortenoh
- */
-public class GetSectionFormAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    private DataValueService dataValueService;
-
-    public void setDataValueService( DataValueService dataValueService )
-    {
-        this.dataValueService = dataValueService;
-    }
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    private CompleteDataSetRegistrationService registrationService;
-
-    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
-    {
-        this.registrationService = registrationService;
-    }
-
-    private PeriodService periodService;
-
-    public void setPeriodService( PeriodService periodService )
-    {
-        this.periodService = periodService;
-    }
-
-    private DataAnalysisService stdDevOutlierAnalysisService;
-
-    public void setStdDevOutlierAnalysisService( DataAnalysisService stdDevOutlierAnalysisService )
-    {
-        this.stdDevOutlierAnalysisService = stdDevOutlierAnalysisService;
-    }
-
-    private DataAnalysisService minMaxOutlierAnalysisService;
-
-    public void setMinMaxOutlierAnalysisService( DataAnalysisService minMaxOutlierAnalysisService )
-    {
-        this.minMaxOutlierAnalysisService = minMaxOutlierAnalysisService;
-    }
-
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
-    private MinMaxValuesGenerationService minMaxValuesGenerationService;
-
-    public void setMinMaxValuesGenerationService( MinMaxValuesGenerationService minMaxValuesGenerationService )
-    {
-        this.minMaxValuesGenerationService = minMaxValuesGenerationService;
-    }
-
-    private MinMaxDataElementService minMaxDataElementService;
-
-    public void setMinMaxDataElementService( MinMaxDataElementService minMaxDataElementService )
-    {
-        this.minMaxDataElementService = minMaxDataElementService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input & Output
-    // -------------------------------------------------------------------------
-
-    private Integer organisationUnitId;
-
-    public void setOrganisationUnitId( Integer organisationUnitId )
-    {
-        this.organisationUnitId = organisationUnitId;
-    }
-
-    public Integer getOrganisationUnitId()
-    {
-        return organisationUnitId;
-    }
-
-    private String periodId;
-
-    public void setPeriodId( String periodId )
-    {
-        this.periodId = periodId;
-    }
-
-    public String getPeriodId()
-    {
-        return periodId;
-    }
-
-    private Integer dataSetId;
-
-    public void setDataSetId( Integer dataSetId )
-    {
-        this.dataSetId = dataSetId;
-    }
-
-    public Integer getDataSetId()
-    {
-        return dataSetId;
-    }
-
-    private DataSet dataSet;
-
-    public DataSet getDataSet()
-    {
-        return dataSet;
-    }
-
-    private Map<String, String> dataValues = new HashMap<String, String>();
-
-    public Map<String, String> getDataValues()
-    {
-        return dataValues;
-    }
-
-    private Map<String, DeflatedDataValue> validationErrors = new HashMap<String, DeflatedDataValue>();
-
-    public Map<String, DeflatedDataValue> getValidationErrors()
-    {
-        return validationErrors;
-    }
-
-    private Boolean complete = false;
-
-    public void setComplete( Boolean complete )
-    {
-        this.complete = complete;
-    }
-
-    public Boolean getComplete()
-    {
-        return complete;
-    }
-
-    private String page;
-
-    public String getPage()
-    {
-        return page;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action Implementation
-    // -------------------------------------------------------------------------
-
-    @SuppressWarnings( "unchecked" )
-    @Override
-    public String execute()
-    {
-        OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-
-        Period period = periodService.getPeriodByExternalId( periodId );
-
-        dataSet = dataSetService.getDataSet( dataSetId );
-
-        List<DataValue> values = new ArrayList<DataValue>( dataValueService.getDataValues( organisationUnit, period,
-            dataSet.getDataElements() ) );
-
-        for ( DataValue dataValue : values )
-        {
-            DataElement dataElement = dataValue.getDataElement();
-            DataElementCategoryOptionCombo optionCombo = dataValue.getOptionCombo();
-
-            String key = String.format( "DE%dOC%d", dataElement.getId(), optionCombo.getId() );
-            String value = dataValue.getValue();
-
-            dataValues.put( key, value );
-        }
-
-        Collection<MinMaxDataElement> minmaxs = minMaxDataElementService.getMinMaxDataElements( organisationUnit,
-            dataSet.getDataElements() );
-
-        Collection<DeflatedDataValue> deflatedDataValues = new HashSet<DeflatedDataValue>();
-
-        if ( minmaxs == null )
-        {
-            Double factor = (Double) systemSettingManager.getSystemSetting(
-                SystemSettingManager.KEY_FACTOR_OF_DEVIATION, 2.0 );
-
-            Collection<DeflatedDataValue> stdDevs = stdDevOutlierAnalysisService.analyse( organisationUnit,
-                dataSet.getDataElements(), ListUtils.getCollection( period ), factor );
-
-            Collection<DeflatedDataValue> minMaxs = minMaxOutlierAnalysisService.analyse( organisationUnit,
-                dataSet.getDataElements(), ListUtils.getCollection( period ), null );
-
-            deflatedDataValues = CollectionUtils.union( stdDevs, minMaxs );
-        }
-        else
-        {
-            deflatedDataValues = minMaxValuesGenerationService.findOutliers( organisationUnit,
-                ListUtils.getCollection( period ), minmaxs );
-        }
-
-        for ( DeflatedDataValue deflatedDataValue : deflatedDataValues )
-        {
-            String key = String.format( "DE%dOC%d", deflatedDataValue.getDataElementId(),
-                deflatedDataValue.getCategoryOptionComboId() );
-            validationErrors.put( key, deflatedDataValue );
-        }
-
-        CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet, period,
-            organisationUnit );
-
-        complete = registration != null ? true : false;
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/SaveSectionFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/SaveSectionFormAction.java	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/dataentry/SaveSectionFormAction.java	1970-01-01 00:00:00 +0000
@@ -1,305 +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.light.action.dataentry;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementService;
-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.dataset.Section;
-import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.util.ContextUtils;
-
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionContext;
-
-/**
- * @author mortenoh
- */
-public class SaveSectionFormAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CurrentUserService currentUserService;
-
-    public void setCurrentUserService( CurrentUserService currentUserService )
-    {
-        this.currentUserService = currentUserService;
-    }
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    private DataElementCategoryService categoryService;
-
-    public void setCategoryService( DataElementCategoryService categoryService )
-    {
-        this.categoryService = categoryService;
-    }
-
-    private DataValueService dataValueService;
-
-    public void setDataValueService( DataValueService dataValueService )
-    {
-        this.dataValueService = dataValueService;
-    }
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    private CompleteDataSetRegistrationService registrationService;
-
-    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
-    {
-        this.registrationService = registrationService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input & Output
-    // -------------------------------------------------------------------------
-
-    private Integer organisationUnitId;
-
-    public void setOrganisationUnitId( Integer organisationUnitId )
-    {
-        this.organisationUnitId = organisationUnitId;
-    }
-
-    public Integer getOrganisationUnitId()
-    {
-        return organisationUnitId;
-    }
-
-    private String periodId;
-
-    public void setPeriodId( String periodId )
-    {
-        this.periodId = periodId;
-    }
-
-    public String getPeriodId()
-    {
-        return periodId;
-    }
-
-    private Integer dataSetId;
-
-    public void setDataSetId( Integer dataSetId )
-    {
-        this.dataSetId = dataSetId;
-    }
-
-    public Integer getDataSetId()
-    {
-        return dataSetId;
-    }
-
-    private DataSet dataSet;
-
-    public DataSet getDataSet()
-    {
-        return dataSet;
-    }
-
-    private Map<String, String> dataValues = new HashMap<String, String>();
-
-    public Map<String, String> getDataValues()
-    {
-        return dataValues;
-    }
-
-    private Boolean complete = false;
-
-    public void setComplete( Boolean complete )
-    {
-        this.complete = complete;
-    }
-
-    public Boolean getComplete()
-    {
-        return complete;
-    }
-
-    private Boolean validated;
-
-    public void setValidated( Boolean validated )
-    {
-        this.validated = validated;
-    }
-
-    public Boolean getValidated()
-    {
-        return validated;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action Implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-    {
-        OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-
-        Period period = PeriodType.createPeriodExternalId( periodId );
-
-        String storedBy = currentUserService.getCurrentUsername();
-
-        dataSet = dataSetService.getDataSet( dataSetId );
-
-        if ( storedBy == null )
-        {
-            storedBy = "[unknown]";
-        }
-
-        HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(
-            ServletActionContext.HTTP_REQUEST );
-        Map<String, String> parameterMap = ContextUtils.getParameterMap( request );
-
-        for ( String key : parameterMap.keySet() )
-        {
-            if ( key.startsWith( "DE" ) && key.indexOf( "OC" ) != -1 )
-            {
-                String[] splitKey = key.split( "OC" );
-                Integer dataElementId = Integer.parseInt( splitKey[0].substring( 2 ) );
-                Integer optionComboId = Integer.parseInt( splitKey[1] );
-                String value = parameterMap.get( key );
-
-                DataElement dataElement = dataElementService.getDataElement( dataElementId );
-                DataElementCategoryOptionCombo optionCombo = categoryService
-                    .getDataElementCategoryOptionCombo( optionComboId );
-
-                DataValue dataValue = dataValueService
-                    .getDataValue( organisationUnit, dataElement, period, optionCombo );
-
-                value = value.trim();
-
-                if ( dataValue == null )
-                {
-                    if ( value != null && value.length() != 0 )
-                    {
-                        dataValue = new DataValue( dataElement, period, organisationUnit, value, storedBy, new Date(),
-                            null, optionCombo );
-                        dataValueService.addDataValue( dataValue );
-                    }
-                }
-                else
-                {
-                    dataValue.setValue( value );
-                    dataValue.setTimestamp( new Date() );
-                    dataValue.setStoredBy( storedBy );
-
-                    dataValueService.updateDataValue( dataValue );
-                }
-            }
-        }
-
-        for ( Section section : dataSet.getSections() )
-        {
-            for ( DataElement dataElement : section.getDataElements() )
-            {
-                for ( DataElementCategoryOptionCombo optionCombo : dataElement.getCategoryCombo().getOptionCombos() )
-                {
-                    DataValue dataValue = dataValueService.getDataValue( organisationUnit, dataElement, period,
-                        optionCombo );
-
-                    String key = String.format( "DE%dOC%d", dataElement.getId(), optionCombo.getId() );
-                    String value = "";
-
-                    if ( dataValue != null )
-                    {
-                        value = dataValue.getValue();
-                    }
-
-                    dataValues.put( key, value );
-                }
-            }
-        }
-
-        CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet, period,
-            organisationUnit );
-
-        if ( registration == null && complete )
-        {
-            registration = new CompleteDataSetRegistration();
-            registration.setDataSet( dataSet );
-            registration.setPeriod( period );
-            registration.setSource( organisationUnit );
-            registration.setDate( new Date() );
-
-            registrationService.saveCompleteDataSetRegistration( registration );
-        }
-        else if ( registration != null && !complete )
-        {
-            registrationService.deleteCompleteDataSetRegistration( registration );
-        }
-
-        if ( validated == null || !validated )
-        {
-            validated = true;
-            return ERROR;
-        }
-
-        return SUCCESS;
-    }
-}

=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard'
=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action'
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetChartAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetChartAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetChartAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,124 @@
+package org.hisp.dhis.light.dashboard.action;
+
+/*
+ * 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.
+ */
+
+import org.hisp.dhis.chart.ChartService;
+import org.hisp.dhis.i18n.I18nFormat;
+import org.jfree.chart.JFreeChart;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class GetChartAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ChartService chartService;
+
+    public void setChartService( ChartService chartService )
+    {
+        this.chartService = chartService;
+    }
+    
+    private I18nFormat format;
+
+    public void setFormat( I18nFormat format )
+    {
+        this.format = format;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private JFreeChart chart;
+
+    public JFreeChart getChart()
+    {
+        return chart;
+    }
+    
+    private int height;
+
+    public int getHeight()
+    {
+        return height;
+    }
+
+    public void setHeight( int height )
+    {
+        this.height = height;
+    }
+
+    private int width;
+
+    public int getWidth()
+    {
+        return width;
+    }
+
+    public void setWidth( int width )
+    {
+        this.width = width;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implemenation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        if ( id != null )
+        {
+            chart = chartService.getJFreeChart( id, format );
+            
+            height = 280;
+            
+            width = 400;
+        }
+        
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,105 @@
+package org.hisp.dhis.light.dashboard.action;
+
+/*
+ * 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.
+ */
+
+import org.hisp.dhis.common.Grid;
+import org.hisp.dhis.i18n.I18nFormat;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+public class GetReportAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+    
+    private I18nFormat format;
+
+    public void setFormat( I18nFormat format )
+    {
+        this.format = format;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+    
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private Integer reportingPeriod;
+
+    public void setReportingPeriod( Integer reportingPeriod )
+    {
+        this.reportingPeriod = reportingPeriod;
+    }
+
+    private Integer organisationUnitId;
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private Grid grid;
+
+    public Grid getGrid()
+    {
+        return grid;
+    }
+
+    // -------------------------------------------------------------------------
+    // Result implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+        grid = reportTableService.getReportTableGrid( id, format, reportingPeriod, organisationUnitId );
+        
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportParamsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportParamsAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/GetReportParamsAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,157 @@
+package org.hisp.dhis.light.dashboard.action;
+
+/*
+ * 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.
+ */
+
+import java.util.Calendar;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import org.hisp.dhis.i18n.I18nFormat;
+import org.hisp.dhis.oust.manager.SelectionTreeManager;
+import org.hisp.dhis.period.MonthlyPeriodType;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.reporttable.ReportParams;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class GetReportParamsAction
+    implements Action
+{
+    private static final int AVAILABLE_REPORTING_MONTHS = 24;
+    
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+    
+    private SelectionTreeManager selectionTreeManager;
+
+    public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
+    {
+        this.selectionTreeManager = selectionTreeManager;
+    }
+
+    private I18nFormat format;
+
+    public void setFormat( I18nFormat format )
+    {
+        this.format = format;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public Integer getId()
+    {
+        return id;
+    }
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+        
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private ReportParams reportParams;
+
+    public ReportParams getReportParams()
+    {
+        return reportParams;
+    }
+        
+    private SortedMap<Integer, String> reportingPeriods = new TreeMap<Integer, String>();
+
+    public SortedMap<Integer, String> getReportingPeriods()
+    {
+        return reportingPeriods;
+    }
+    
+    private Report report;
+
+    public Report getReport()
+    {
+        return report;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        selectionTreeManager.setCurrentUserOrganisationUnitAsSelected();
+        
+        if ( id != null )
+        {
+            ReportTable reportTable = reportTableService.getReportTable( id, ReportTableService.MODE_REPORT_TABLE );
+            
+            if ( reportTable != null )
+            {
+                reportParams = reportTable.getReportParams();
+                                
+                if ( reportParams.isParamReportingMonth() )
+                {
+                    MonthlyPeriodType periodType = new MonthlyPeriodType();
+                    
+                    Calendar cal = PeriodType.createCalendarInstance();
+                    
+                    for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ )
+                    {
+                        int month = i + 1;    
+                        cal.add( Calendar.MONTH, -1 );                    
+                        Period period = periodType.createPeriod( cal.getTime() );                    
+                        String periodName = format.formatPeriod( period );
+                        
+                        reportingPeriods.put( month, periodName );
+                    }                
+                }
+            }
+        }
+        
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/ProvideContentAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/ProvideContentAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dashboard/action/ProvideContentAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,99 @@
+package org.hisp.dhis.light.dashboard.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dashboard.DashboardConfiguration;
+import org.hisp.dhis.dashboard.DashboardContent;
+import org.hisp.dhis.dashboard.DashboardManager;
+import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+
+import com.opensymphony.xwork2.Action;
+
+public class ProvideContentAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DashboardService dashboardService;
+
+    public void setDashboardService( DashboardService dashboardService )
+    {
+        this.dashboardService = dashboardService;
+    }
+
+    private DashboardManager dashboardManager;
+
+    public void setDashboardManager( DashboardManager dashboardManager )
+    {
+        this.dashboardManager = dashboardManager;
+    }
+
+    private CurrentUserService currentUserService;
+
+    public void setCurrentUserService( CurrentUserService currentUserService )
+    {
+        this.currentUserService = currentUserService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private List<ReportTable> reportTables;
+
+    public List<ReportTable> getReportTables()
+    {
+        return reportTables;
+    }
+
+    private List<Document> documents;
+
+    public List<Document> getDocuments()
+    {
+        return documents;
+    }
+
+    private List<String> charts = new ArrayList<String>();
+
+    public List<String> getCharts()
+    {
+        return charts;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+        DashboardConfiguration config = dashboardManager.getConfiguration();
+
+        for ( int i = 0; i < 8; i++ )
+        {
+            String id = config.getAreaItems().get( DashboardManager.CHART_AREA_PREFIX + (i + 1) );
+
+            if ( id != null )
+            {
+                charts.add( id );
+            }
+        }
+
+        User user = currentUserService.getCurrentUser();
+
+        DashboardContent content = dashboardService.getDashboardContent( user );
+
+        reportTables = content.getReportTables();
+
+        documents = content.getDocuments();
+
+        return SUCCESS;
+    }
+}

=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry'
=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action'
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2004-2011, 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.light.dataentry.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.system.filter.DataSetTypeFilter;
+import org.hisp.dhis.system.util.FilterUtils;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetDataSetsAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private Integer organisationUnitId;
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
+    private List<DataSet> dataSets = new ArrayList<DataSet>();
+
+    public List<DataSet> getDataSets()
+    {
+        return dataSets;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+    {
+        if ( organisationUnitId != null )
+        {
+            OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+            dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
+            FilterUtils.filter( dataSets, new DataSetTypeFilter( DataSet.TYPE_SECTION ) );
+        }
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetOrganisationUnitsAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetOrganisationUnitsAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2004-2011, 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.light.dataentry.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetOrganisationUnitsAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private CurrentUserService currentUserService;
+
+    public void setCurrentUserService( CurrentUserService currentUserService )
+    {
+        this.currentUserService = currentUserService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
+
+    public List<OrganisationUnit> getOrganisationUnits()
+    {
+        return organisationUnits;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+    {
+        User user = currentUserService.getCurrentUser();
+
+        if ( user != null )
+        {
+            organisationUnits = new ArrayList<OrganisationUnit>( user.getOrganisationUnits() );
+            Collections.sort( organisationUnits, new OrganisationUnitNameComparator() );
+        }
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2004-2011, 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.light.dataentry.action;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+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.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.period.CalendarPeriodType;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.system.filter.PastAndCurrentPeriodFilter;
+import org.hisp.dhis.system.util.FilterUtils;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetPeriodsAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    private CompleteDataSetRegistrationService registrationService;
+
+    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
+    {
+        this.registrationService = registrationService;
+    }
+
+    private I18nFormat format;
+
+    public void setFormat( I18nFormat format )
+    {
+        this.format = format;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private Integer organisationUnitId;
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
+    private Integer dataSetId;
+
+    public void setDataSetId( Integer dataSetId )
+    {
+        this.dataSetId = dataSetId;
+    }
+
+    public Integer getDataSetId()
+    {
+        return dataSetId;
+    }
+
+    private Map<Period, Boolean> periodCompletedMap = new HashMap<Period, Boolean>();
+
+    public Map<Period, Boolean> getPeriodCompletedMap()
+    {
+        return periodCompletedMap;
+    }
+
+    private List<Period> periods = new ArrayList<Period>();
+
+    public List<Period> getPeriods()
+    {
+        return periods;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+    {
+        if ( dataSetId != null )
+        {
+            OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+            DataSet dataSet = dataSetService.getDataSet( dataSetId );
+            CalendarPeriodType periodType = (CalendarPeriodType) dataSet.getPeriodType();
+            periods = periodType.generatePeriods( new Date() );
+            FilterUtils.filter( periods, new PastAndCurrentPeriodFilter() );
+
+            for ( Period period : periods )
+            {
+                period.setName( format.formatPeriod( period ) );
+
+                CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet,
+                    period, organisationUnit );
+
+                periodCompletedMap.put( period, registration != null ? true : false );
+            }
+        }
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,195 @@
+/*
+ * 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.light.dataentry.action;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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.datavalue.DeflatedDataValue;
+import org.hisp.dhis.light.dataentry.utils.SectionFormUtils;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetSectionFormAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    private CompleteDataSetRegistrationService registrationService;
+
+    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
+    {
+        this.registrationService = registrationService;
+    }
+
+    private PeriodService periodService;
+
+    public void setPeriodService( PeriodService periodService )
+    {
+        this.periodService = periodService;
+    }
+
+    private SectionFormUtils sectionFormUtils;
+
+    public void setSectionFormUtils( SectionFormUtils sectionFormUtils )
+    {
+        this.sectionFormUtils = sectionFormUtils;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private Integer organisationUnitId;
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
+    private String periodId;
+
+    public void setPeriodId( String periodId )
+    {
+        this.periodId = periodId;
+    }
+
+    public String getPeriodId()
+    {
+        return periodId;
+    }
+
+    private Integer dataSetId;
+
+    public void setDataSetId( Integer dataSetId )
+    {
+        this.dataSetId = dataSetId;
+    }
+
+    public Integer getDataSetId()
+    {
+        return dataSetId;
+    }
+
+    private DataSet dataSet;
+
+    public DataSet getDataSet()
+    {
+        return dataSet;
+    }
+
+    private Map<String, String> dataValues = new HashMap<String, String>();
+
+    public Map<String, String> getDataValues()
+    {
+        return dataValues;
+    }
+
+    private Map<String, DeflatedDataValue> validationErrors = new HashMap<String, DeflatedDataValue>();
+
+    public Map<String, DeflatedDataValue> getValidationErrors()
+    {
+        return validationErrors;
+    }
+
+    private Boolean complete = false;
+
+    public void setComplete( Boolean complete )
+    {
+        this.complete = complete;
+    }
+
+    public Boolean getComplete()
+    {
+        return complete;
+    }
+
+    private String page;
+
+    public String getPage()
+    {
+        return page;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+    {
+        OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+
+        Period period = periodService.getPeriodByExternalId( periodId );
+
+        dataSet = dataSetService.getDataSet( dataSetId );
+
+        dataValues = sectionFormUtils.getDataValueMap( organisationUnit, dataSet, period );
+
+        validationErrors = sectionFormUtils.getValidationErrorMap( organisationUnit, dataSet, period );
+
+        CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet, period,
+            organisationUnit );
+
+        complete = registration != null ? true : false;
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,309 @@
+/*
+ * 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.light.dataentry.action;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.struts2.ServletActionContext;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
+import org.hisp.dhis.dataelement.DataElementCategoryService;
+import org.hisp.dhis.dataelement.DataElementService;
+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.datavalue.DataValue;
+import org.hisp.dhis.datavalue.DataValueService;
+import org.hisp.dhis.datavalue.DeflatedDataValue;
+import org.hisp.dhis.light.dataentry.utils.SectionFormUtils;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.util.ContextUtils;
+
+import com.opensymphony.xwork2.Action;
+import com.opensymphony.xwork2.ActionContext;
+
+/**
+ * @author mortenoh
+ */
+public class SaveSectionFormAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private CurrentUserService currentUserService;
+
+    public void setCurrentUserService( CurrentUserService currentUserService )
+    {
+        this.currentUserService = currentUserService;
+    }
+
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    private DataElementService dataElementService;
+
+    public void setDataElementService( DataElementService dataElementService )
+    {
+        this.dataElementService = dataElementService;
+    }
+
+    private DataElementCategoryService categoryService;
+
+    public void setCategoryService( DataElementCategoryService categoryService )
+    {
+        this.categoryService = categoryService;
+    }
+
+    private DataValueService dataValueService;
+
+    public void setDataValueService( DataValueService dataValueService )
+    {
+        this.dataValueService = dataValueService;
+    }
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    private CompleteDataSetRegistrationService registrationService;
+
+    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
+    {
+        this.registrationService = registrationService;
+    }
+
+    private PeriodService periodService;
+
+    public void setPeriodService( PeriodService periodService )
+    {
+        this.periodService = periodService;
+    }
+    
+    private SectionFormUtils sectionFormUtils;
+
+    public void setSectionFormUtils( SectionFormUtils sectionFormUtils )
+    {
+        this.sectionFormUtils = sectionFormUtils;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private Integer organisationUnitId;
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
+    private String periodId;
+
+    public void setPeriodId( String periodId )
+    {
+        this.periodId = periodId;
+    }
+
+    public String getPeriodId()
+    {
+        return periodId;
+    }
+
+    private Integer dataSetId;
+
+    public void setDataSetId( Integer dataSetId )
+    {
+        this.dataSetId = dataSetId;
+    }
+
+    public Integer getDataSetId()
+    {
+        return dataSetId;
+    }
+
+    private DataSet dataSet;
+
+    public DataSet getDataSet()
+    {
+        return dataSet;
+    }
+
+    private Map<String, String> dataValues = new HashMap<String, String>();
+
+    public Map<String, String> getDataValues()
+    {
+        return dataValues;
+    }
+
+    private Map<String, DeflatedDataValue> validationErrors = new HashMap<String, DeflatedDataValue>();
+
+    public Map<String, DeflatedDataValue> getValidationErrors()
+    {
+        return validationErrors;
+    }
+
+    private Boolean complete = false;
+
+    public void setComplete( Boolean complete )
+    {
+        this.complete = complete;
+    }
+
+    public Boolean getComplete()
+    {
+        return complete;
+    }
+
+    private Boolean validated;
+
+    public void setValidated( Boolean validated )
+    {
+        this.validated = validated;
+    }
+
+    public Boolean getValidated()
+    {
+        return validated;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute()
+    {
+        OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+
+        Period period = periodService.getPeriodByExternalId( periodId );
+
+        String storedBy = currentUserService.getCurrentUsername();
+
+        dataSet = dataSetService.getDataSet( dataSetId );
+
+        if ( storedBy == null )
+        {
+            storedBy = "[unknown]";
+        }
+
+        HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(
+            ServletActionContext.HTTP_REQUEST );
+        Map<String, String> parameterMap = ContextUtils.getParameterMap( request );
+
+        for ( String key : parameterMap.keySet() )
+        {
+            if ( key.startsWith( "DE" ) && key.indexOf( "OC" ) != -1 )
+            {
+                String[] splitKey = key.split( "OC" );
+                Integer dataElementId = Integer.parseInt( splitKey[0].substring( 2 ) );
+                Integer optionComboId = Integer.parseInt( splitKey[1] );
+                String value = parameterMap.get( key );
+
+                DataElement dataElement = dataElementService.getDataElement( dataElementId );
+                DataElementCategoryOptionCombo optionCombo = categoryService
+                    .getDataElementCategoryOptionCombo( optionComboId );
+
+                DataValue dataValue = dataValueService
+                    .getDataValue( organisationUnit, dataElement, period, optionCombo );
+
+                value = value.trim();
+
+                if ( dataValue == null )
+                {
+                    if ( value != null && value.length() != 0 )
+                    {
+                        dataValue = new DataValue( dataElement, period, organisationUnit, value, storedBy, new Date(),
+                            null, optionCombo );
+                        dataValueService.addDataValue( dataValue );
+                    }
+                }
+                else
+                {
+                    dataValue.setValue( value );
+                    dataValue.setTimestamp( new Date() );
+                    dataValue.setStoredBy( storedBy );
+
+                    dataValueService.updateDataValue( dataValue );
+                }
+            }
+        }
+
+        CompleteDataSetRegistration registration = registrationService.getCompleteDataSetRegistration( dataSet, period,
+            organisationUnit );
+
+        if ( registration == null && complete )
+        {
+            registration = new CompleteDataSetRegistration();
+            registration.setDataSet( dataSet );
+            registration.setPeriod( period );
+            registration.setSource( organisationUnit );
+            registration.setDate( new Date() );
+
+            registrationService.saveCompleteDataSetRegistration( registration );
+        }
+        else if ( registration != null && !complete )
+        {
+            registrationService.deleteCompleteDataSetRegistration( registration );
+        }
+
+        dataValues = sectionFormUtils.getDataValueMap( organisationUnit, dataSet, period );
+
+        validationErrors = sectionFormUtils.getValidationErrorMap( organisationUnit, dataSet, period );
+
+        if ( validated == null || !validated )
+        {
+            validated = true;
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+}

=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils'
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java	2011-09-28 10:34:08 +0000
@@ -0,0 +1,167 @@
+/*
+ * 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.light.dataentry.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.hisp.dhis.dataanalysis.DataAnalysisService;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.datavalue.DataValue;
+import org.hisp.dhis.datavalue.DataValueService;
+import org.hisp.dhis.datavalue.DeflatedDataValue;
+import org.hisp.dhis.minmax.MinMaxDataElement;
+import org.hisp.dhis.minmax.MinMaxDataElementService;
+import org.hisp.dhis.minmax.validation.MinMaxValuesGenerationService;
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.system.util.ListUtils;
+
+/**
+ * @author mortenoh
+ */
+public class SectionFormUtils
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DataValueService dataValueService;
+
+    public void setDataValueService( DataValueService dataValueService )
+    {
+        this.dataValueService = dataValueService;
+    }
+
+    private DataAnalysisService stdDevOutlierAnalysisService;
+
+    public void setStdDevOutlierAnalysisService( DataAnalysisService stdDevOutlierAnalysisService )
+    {
+        this.stdDevOutlierAnalysisService = stdDevOutlierAnalysisService;
+    }
+
+    private DataAnalysisService minMaxOutlierAnalysisService;
+
+    public void setMinMaxOutlierAnalysisService( DataAnalysisService minMaxOutlierAnalysisService )
+    {
+        this.minMaxOutlierAnalysisService = minMaxOutlierAnalysisService;
+    }
+
+    private SystemSettingManager systemSettingManager;
+
+    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+    {
+        this.systemSettingManager = systemSettingManager;
+    }
+
+    private MinMaxValuesGenerationService minMaxValuesGenerationService;
+
+    public void setMinMaxValuesGenerationService( MinMaxValuesGenerationService minMaxValuesGenerationService )
+    {
+        this.minMaxValuesGenerationService = minMaxValuesGenerationService;
+    }
+
+    private MinMaxDataElementService minMaxDataElementService;
+
+    public void setMinMaxDataElementService( MinMaxDataElementService minMaxDataElementService )
+    {
+        this.minMaxDataElementService = minMaxDataElementService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Utils
+    // -------------------------------------------------------------------------
+
+    @SuppressWarnings( "unchecked" )
+    public Map<String, DeflatedDataValue> getValidationErrorMap( OrganisationUnit organisationUnit, DataSet dataSet,
+        Period period )
+    {
+        Map<String, DeflatedDataValue> validationErrorMap = new HashMap<String, DeflatedDataValue>();
+
+        Collection<MinMaxDataElement> minmaxs = minMaxDataElementService.getMinMaxDataElements( organisationUnit,
+            dataSet.getDataElements() );
+
+        Collection<DeflatedDataValue> deflatedDataValues = new HashSet<DeflatedDataValue>();
+
+        if ( minmaxs == null )
+        {
+            Double factor = (Double) systemSettingManager.getSystemSetting(
+                SystemSettingManager.KEY_FACTOR_OF_DEVIATION, 2.0 );
+
+            Collection<DeflatedDataValue> stdDevs = stdDevOutlierAnalysisService.analyse( organisationUnit,
+                dataSet.getDataElements(), ListUtils.getCollection( period ), factor );
+
+            Collection<DeflatedDataValue> minMaxs = minMaxOutlierAnalysisService.analyse( organisationUnit,
+                dataSet.getDataElements(), ListUtils.getCollection( period ), null );
+
+            deflatedDataValues = CollectionUtils.union( stdDevs, minMaxs );
+        }
+        else
+        {
+            deflatedDataValues = minMaxValuesGenerationService.findOutliers( organisationUnit,
+                ListUtils.getCollection( period ), minmaxs );
+        }
+
+        for ( DeflatedDataValue deflatedDataValue : deflatedDataValues )
+        {
+            String key = String.format( "DE%dOC%d", deflatedDataValue.getDataElementId(),
+                deflatedDataValue.getCategoryOptionComboId() );
+            validationErrorMap.put( key, deflatedDataValue );
+        }
+
+        return validationErrorMap;
+    }
+
+    public Map<String, String> getDataValueMap( OrganisationUnit organisationUnit, DataSet dataSet, Period period )
+    {
+        Map<String, String> dataValueMap = new HashMap<String, String>();
+        List<DataValue> values = new ArrayList<DataValue>( dataValueService.getDataValues( organisationUnit, period,
+            dataSet.getDataElements() ) );
+
+        for ( DataValue dataValue : values )
+        {
+            DataElement dataElement = dataValue.getDataElement();
+            DataElementCategoryOptionCombo optionCombo = dataValue.getOptionCombo();
+
+            String key = String.format( "DE%dOC%d", dataElement.getId(), optionCombo.getId() );
+            String value = dataValue.getValue();
+
+            dataValueMap.put( key, value );
+        }
+
+        return dataValueMap;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2011-09-28 10:34:08 +0000
@@ -7,27 +7,8 @@
 
   <!-- data entry -->
 
-  <bean id="org.hisp.dhis.light.action.dataentry.GetOrganisationUnitsAction" class="org.hisp.dhis.light.action.dataentry.GetOrganisationUnitsAction">
-    <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.light.action.dataentry.GetDataSetsAction" class="org.hisp.dhis.light.action.dataentry.GetDataSetsAction">
-    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.light.action.dataentry.GetPeriodsAction" class="org.hisp.dhis.light.action.dataentry.GetPeriodsAction">
-    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-    <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.light.action.dataentry.GetSectionFormAction" class="org.hisp.dhis.light.action.dataentry.GetSectionFormAction">
-    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+  <bean name="org.hisp.dhis.light.dataentry.utils.SectionFormUtils" class="org.hisp.dhis.light.dataentry.utils.SectionFormUtils">
     <property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
-    <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
-    <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
-
     <property name="stdDevOutlierAnalysisService" ref="org.hisp.dhis.dataanalysis.StdDevOutlierAnalysisService" />
     <property name="minMaxOutlierAnalysisService" ref="org.hisp.dhis.dataanalysis.MinMaxOutlierAnalysisService" />
     <property name="minMaxValuesGenerationService" ref="org.hisp.dhis.minmax.validation.MinMaxValuesGenerationService" />
@@ -35,7 +16,29 @@
     <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
   </bean>
 
-  <bean id="org.hisp.dhis.light.action.dataentry.SaveSectionFormAction" class="org.hisp.dhis.light.action.dataentry.SaveSectionFormAction"
+  <bean id="org.hisp.dhis.light.dataentry.action.GetOrganisationUnitsAction" class="org.hisp.dhis.light.dataentry.action.GetOrganisationUnitsAction">
+    <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+  </bean>
+
+  <bean id="org.hisp.dhis.light.dataentry.action.GetDataSetsAction" class="org.hisp.dhis.light.dataentry.action.GetDataSetsAction">
+    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+  </bean>
+
+  <bean id="org.hisp.dhis.light.dataentry.action.GetPeriodsAction" class="org.hisp.dhis.light.dataentry.action.GetPeriodsAction">
+    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+    <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
+  </bean>
+
+  <bean id="org.hisp.dhis.light.dataentry.action.GetSectionFormAction" class="org.hisp.dhis.light.dataentry.action.GetSectionFormAction">
+    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+    <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
+    <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+    <property name="sectionFormUtils" ref="org.hisp.dhis.light.dataentry.utils.SectionFormUtils" />
+  </bean>
+
+  <bean id="org.hisp.dhis.light.dataentry.action.SaveSectionFormAction" class="org.hisp.dhis.light.dataentry.action.SaveSectionFormAction"
     scope="prototype">
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
     <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
@@ -44,28 +47,30 @@
     <property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
     <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
     <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
+    <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+    <property name="sectionFormUtils" ref="org.hisp.dhis.light.dataentry.utils.SectionFormUtils" />
   </bean>
 
   <!-- dashboard -->
 
-  <bean id="org.hisp.dhis.light.action.dashboard.ProvideContentAction" class="org.hisp.dhis.light.action.dashboard.ProvideContentAction"
+  <bean id="org.hisp.dhis.light.dashboard.action.ProvideContentAction" class="org.hisp.dhis.light.dashboard.action.ProvideContentAction"
     scope="prototype">
     <property name="dashboardManager" ref="org.hisp.dhis.dashboard.DashboardManager" />
     <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
   </bean>
 
-  <bean id="org.hisp.dhis.light.action.dashboard.GetReportAction" class="org.hisp.dhis.light.action.dashboard.GetReportAction"
+  <bean id="org.hisp.dhis.light.dashboard.action.GetReportAction" class="org.hisp.dhis.light.dashboard.action.GetReportAction"
     scope="prototype">
     <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
   </bean>
 
-  <bean id="org.hisp.dhis.light.action.dashboard.GetChartAction" class="org.hisp.dhis.light.action.dashboard.GetChartAction"
+  <bean id="org.hisp.dhis.light.dashboard.action.GetChartAction" class="org.hisp.dhis.light.dashboard.action.GetChartAction"
     scope="prototype">
     <property name="chartService" ref="org.hisp.dhis.chart.ChartService" />
   </bean>
 
-  <bean id="org.hisp.dhis.light.action.dashboard.GetReportParamsAction" class="org.hisp.dhis.light.action.dashboard.GetReportParamsAction"
+  <bean id="org.hisp.dhis.light.dashboard.action.GetReportParamsAction" class="org.hisp.dhis.light.dashboard.action.GetReportParamsAction"
     scope="prototype">
     <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
     <property name="selectionTreeManager" ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2011-09-27 12:03:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2011-09-28 10:34:08 +0000
@@ -14,27 +14,27 @@
 
     <!-- data entry -->
 
-    <action name="selectOrganisationUnit" class="org.hisp.dhis.light.action.dataentry.GetOrganisationUnitsAction">
+    <action name="selectOrganisationUnit" class="org.hisp.dhis.light.dataentry.action.GetOrganisationUnitsAction">
       <result name="success" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/selectOrganisationUnit.vm</param>
     </action>
 
-    <action name="selectDataSet" class="org.hisp.dhis.light.action.dataentry.GetDataSetsAction">
+    <action name="selectDataSet" class="org.hisp.dhis.light.dataentry.action.GetDataSetsAction">
       <result name="success" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/selectDataSet.vm</param>
     </action>
 
-    <action name="selectPeriod" class="org.hisp.dhis.light.action.dataentry.GetPeriodsAction">
+    <action name="selectPeriod" class="org.hisp.dhis.light.dataentry.action.GetPeriodsAction">
       <result name="success" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/selectPeriod.vm</param>
     </action>
 
-    <action name="dataEntry" class="org.hisp.dhis.light.action.dataentry.GetSectionFormAction">
+    <action name="dataEntry" class="org.hisp.dhis.light.dataentry.action.GetSectionFormAction">
       <result name="success" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/dataEntry.vm</param>
     </action>
 
-    <action name="saveSectionForm" class="org.hisp.dhis.light.action.dataentry.SaveSectionFormAction">
+    <action name="saveSectionForm" class="org.hisp.dhis.light.dataentry.action.SaveSectionFormAction">
       <result name="success" type="redirect">/dhis-web-light/index.action</result>
       <result name="error" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/dataEntry.vm</param>
@@ -42,22 +42,22 @@
 
     <!-- dashboard -->
 
-    <action name="dashboard" class="org.hisp.dhis.light.action.dashboard.ProvideContentAction">
+    <action name="dashboard" class="org.hisp.dhis.light.dashboard.action.ProvideContentAction">
       <result name="success" type="velocity">/dhis-web-light/dashboard_page.vm</result>
       <param name="page">/dhis-web-light/dashboard.vm</param>
     </action>
 
-    <action name="getReport" class="org.hisp.dhis.light.action.dashboard.GetReportAction">
+    <action name="getReport" class="org.hisp.dhis.light.dashboard.action.GetReportAction">
       <result name="success" type="velocity">/dhis-web-light/dashboard_page.vm</result>
       <param name="page">/dhis-web-commons/ajax/htmlGrid.vm</param>
     </action>
 
-    <action name="getReportParams" class="org.hisp.dhis.light.action.dashboard.GetReportParamsAction">
+    <action name="getReportParams" class="org.hisp.dhis.light.dashboard.action.GetReportParamsAction">
       <result name="success" type="velocity">/dhis-web-light/dashboard_page.vm</result>
       <param name="page">/dhis-web-light/inputReportParamsForm.vm</param>
     </action>
 
-    <action name="getChart" class="org.hisp.dhis.light.action.dashboard.GetChartAction">
+    <action name="getChart" class="org.hisp.dhis.light.dashboard.action.GetChartAction">
       <result name="success" type="chart">
         <param name="width">480</param>
         <param name="height">800</param>