← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11822: wip, import event ui

 

------------------------------------------------------------
revno: 11822
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-08-28 09:27:01 +0200
message:
  wip, import event ui
added:
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ImportEventAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventImportForm.vm
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js
modified:
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java	2013-08-28 07:27:01 +0000
@@ -28,10 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-
+import com.opensymphony.xwork2.Action;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty;
@@ -47,7 +44,9 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import com.opensymphony.xwork2.Action;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
 
 /**
  * @author Lars Helge Overland
@@ -56,13 +55,13 @@
     implements Action
 {
     private static final Log log = LogFactory.getLog( ImportDataValueAction.class );
-    
+
     @Autowired
     private DataValueSetService dataValueSetService;
 
     @Autowired
     private CurrentUserService currentUserService;
-    
+
     @Autowired
     private Scheduler scheduler;
 
@@ -72,14 +71,14 @@
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
-    
+
     private File upload;
 
     public void setUpload( File upload )
     {
         this.upload = upload;
     }
-    
+
     private boolean dryRun;
 
     public void setDryRun( boolean dryRun )
@@ -102,12 +101,12 @@
     }
 
     private IdentifiableProperty orgUnitIdScheme;
-    
+
     public void setOrgUnitIdScheme( IdentifiableProperty orgUnitIdScheme )
     {
         this.orgUnitIdScheme = orgUnitIdScheme;
     }
-    
+
     private boolean skipExistingCheck;
 
     public void setSkipExistingCheck( boolean skipExistingCheck )
@@ -130,28 +129,28 @@
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
-    
+
     public String execute()
         throws Exception
     {
         strategy = strategy != null ? strategy : ImportStrategy.NEW_AND_UPDATES;
-        dataElementIdScheme = dataElementIdScheme != null ? dataElementIdScheme : IdentifiableProperty.UID;        
+        dataElementIdScheme = dataElementIdScheme != null ? dataElementIdScheme : IdentifiableProperty.UID;
         orgUnitIdScheme = orgUnitIdScheme != null ? orgUnitIdScheme : IdentifiableProperty.UID;
 
         TaskId taskId = new TaskId( TaskCategory.DATAVALUE_IMPORT, currentUserService.getCurrentUser() );
 
         notifier.clear( taskId );
-        
+
         InputStream in = new FileInputStream( upload );
-        
+
         in = StreamUtils.wrapAndCheckCompressionFormat( in );
-        
+
         ImportOptions options = new ImportOptions( dataElementIdScheme, orgUnitIdScheme, dryRun, strategy, skipExistingCheck );
-        
+
         log.info( options );
-        
+
         scheduler.executeTask( new ImportDataValueTask( dataValueSetService, in, options, taskId, importFormat ) );
-        
+
         return SUCCESS;
     }
 }

=== added directory 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event'
=== added file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ImportEventAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ImportEventAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ImportEventAction.java	2013-08-28 07:27:01 +0000
@@ -0,0 +1,73 @@
+package org.hisp.dhis.importexport.action.event;
+
+/*
+ * Copyright (c) 2004-2013, 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 com.opensymphony.xwork2.Action;
+import org.hisp.dhis.dxf2.event.EventService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public class ImportEventAction implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    @Autowired
+    private EventService eventService;
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private File upload;
+
+    public void setUpload( File upload )
+    {
+        this.upload = upload;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public String execute() throws Exception
+    {
+        InputStream in = new FileInputStream( upload );
+
+        return SUCCESS;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml	2013-03-15 15:34:40 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml	2013-08-28 07:27:01 +0000
@@ -1,87 +1,92 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd";>
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd";>
 
   <!-- Data value import -->
 
   <bean id="org.hisp.dhis.importexport.action.datavalue.ImportDataValueAction"
-      class="org.hisp.dhis.importexport.action.datavalue.ImportDataValueAction" />
+    class="org.hisp.dhis.importexport.action.datavalue.ImportDataValueAction" />
 
   <bean id="org.hisp.dhis.importexport.action.GetImportSummaryAction"
-      class="org.hisp.dhis.importexport.action.GetImportSummaryAction">
+    class="org.hisp.dhis.importexport.action.GetImportSummaryAction">
     <property name="category" value="DATAVALUE_IMPORT" />
   </bean>
 
   <!-- Data value export -->
 
   <bean id="org.hisp.dhis.importexport.action.datavalue.ExportDataValueAction"
-      class="org.hisp.dhis.importexport.action.datavalue.ExportDataValueAction" />
+    class="org.hisp.dhis.importexport.action.datavalue.ExportDataValueAction" />
+
+  <!-- Event Import -->
+
+  <bean id="org.hisp.dhis.importexport.action.event.ImportEventAction"
+    class="org.hisp.dhis.importexport.action.event.ImportEventAction" />
 
   <!-- Import -->
 
   <bean id="org.hisp.dhis.importexport.action.imp.ImportAction"
-      class="org.hisp.dhis.importexport.action.imp.ImportAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.ImportAction"
+    scope="prototype">
     <property name="processCoordinator" ref="processCoordinator" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetImportOptionsAction"
-      class="org.hisp.dhis.importexport.action.imp.GetImportOptionsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetImportOptionsAction"
+    scope="prototype">
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetImportStatusAction"
-      class="org.hisp.dhis.importexport.action.imp.GetImportStatusAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetImportStatusAction"
+    scope="prototype">
     <property name="processCoordinator" ref="processCoordinator" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.SetImportTypeAction"
-      class="org.hisp.dhis.importexport.action.imp.SetImportTypeAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.SetImportTypeAction"
+    scope="prototype">
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetImportAnalysisAction"
-      class="org.hisp.dhis.importexport.action.imp.GetImportAnalysisAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetImportAnalysisAction"
+    scope="prototype">
     <property name="processCoordinator" ref="processCoordinator" />
   </bean>
 
   <!-- Object Ajax -->
 
   <bean id="org.hisp.dhis.importexport.action.object.MatchObjectAction"
-      class="org.hisp.dhis.importexport.action.object.MatchObjectAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.object.MatchObjectAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.object.DiscardObjectAction"
-      class="org.hisp.dhis.importexport.action.object.DiscardObjectAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.object.DiscardObjectAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.object.DiscardObjectsOfTypeAction"
-      class="org.hisp.dhis.importexport.action.object.DiscardObjectsOfTypeAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.object.DiscardObjectsOfTypeAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.object.DiscardAllObjectsAction"
-      class="org.hisp.dhis.importexport.action.object.DiscardAllObjectsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.object.DiscardAllObjectsAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.object.ImportAllObjectsAction"
-      class="org.hisp.dhis.importexport.action.object.ImportAllObjectsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.object.ImportAllObjectsAction"
+    scope="prototype">
     <property name="processCoordinator" ref="processCoordinator" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
   </bean>
@@ -89,15 +94,15 @@
   <!-- Preview -->
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetPreviewOptionsAction"
-      class="org.hisp.dhis.importexport.action.imp.GetPreviewOptionsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetPreviewOptionsAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
     <property name="importDataValueService" ref="org.hisp.dhis.importexport.ImportDataValueService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetMatchOptionsAction"
-      class="org.hisp.dhis.importexport.action.imp.GetMatchOptionsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetMatchOptionsAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
     <property name="constantService" ref="org.hisp.dhis.constant.ConstantService" />
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
@@ -113,23 +118,23 @@
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.imp.GetCompareOptionsAction"
-      class="org.hisp.dhis.importexport.action.imp.GetCompareOptionsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.imp.GetCompareOptionsAction"
+    scope="prototype">
     <property name="importObjectService" ref="org.hisp.dhis.importexport.ImportObjectService" />
   </bean>
 
   <!-- Export -->
 
   <bean id="org.hisp.dhis.importexport.action.exp.MetaDataExportAction"
-      class="org.hisp.dhis.importexport.action.exp.MetaDataExportAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.MetaDataExportAction"
+    scope="prototype">
     <property name="serviceProvider" ref="exportServiceProvider" />
     <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.exp.DetailedMetaDataExportAction"
-      class="org.hisp.dhis.importexport.action.exp.DetailedMetaDataExportAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.DetailedMetaDataExportAction"
+    scope="prototype">
     <property name="serviceProvider" ref="exportServiceProvider" />
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
     <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
@@ -139,75 +144,75 @@
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.exp.GetDetailedExportOptionsAction"
-      class="org.hisp.dhis.importexport.action.exp.GetDetailedExportOptionsAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.GetDetailedExportOptionsAction"
+    scope="prototype">
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.exp.GetDataElementListAction"
-      class="org.hisp.dhis.importexport.action.exp.GetDataElementListAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.GetDataElementListAction"
+    scope="prototype">
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
     <property name="dataDictionaryService" ref="org.hisp.dhis.datadictionary.DataDictionaryService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.exp.GetIndicatorListAction"
-      class="org.hisp.dhis.importexport.action.exp.GetIndicatorListAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.GetIndicatorListAction"
+    scope="prototype">
     <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
     <property name="dataDictionaryService" ref="org.hisp.dhis.datadictionary.DataDictionaryService" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.exp.ValidateAggregatedExportAction"
-      class="org.hisp.dhis.importexport.action.exp.ValidateAggregatedExportAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.exp.ValidateAggregatedExportAction"
+    scope="prototype">
     <property name="dataIntegrityService" ref="org.hisp.dhis.dataintegrity.DataIntegrityService" />
   </bean>
 
   <!-- Dhis 1.4 Configuration -->
 
   <bean id="org.hisp.dhis.importexport.action.dhis14.GetDhis14ConfigurationAction"
-      class="org.hisp.dhis.importexport.action.dhis14.GetDhis14ConfigurationAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.dhis14.GetDhis14ConfigurationAction"
+    scope="prototype">
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.dhis14.SetDhis14ConfigurationAction"
-      class="org.hisp.dhis.importexport.action.dhis14.SetDhis14ConfigurationAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.dhis14.SetDhis14ConfigurationAction"
+    scope="prototype">
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.dhis14.ValidateDhis14ConfigurationAction"
-      class="org.hisp.dhis.importexport.action.dhis14.ValidateDhis14ConfigurationAction"
-      scope="prototype">
+    class="org.hisp.dhis.importexport.action.dhis14.ValidateDhis14ConfigurationAction"
+    scope="prototype">
     <property name="configurationManager" ref="org.hisp.dhis.importexport.IbatisConfigurationManager" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.integration.DisplayRoutesAction"
-      class="org.hisp.dhis.importexport.action.integration.DisplayRoutesAction">
+    class="org.hisp.dhis.importexport.action.integration.DisplayRoutesAction">
     <property name="builtinCamelContext" ref="camel-builtin" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.integration.AddRouteAction"
-      class="org.hisp.dhis.importexport.action.integration.AddRouteAction">
+    class="org.hisp.dhis.importexport.action.integration.AddRouteAction">
     <property name="builtinCamelContext" ref="camel-builtin" />
   </bean>
 
   <bean id="org.hisp.dhis.importexport.action.integration.RouteOperationAction"
-      class="org.hisp.dhis.importexport.action.integration.RouteOperationAction">
+    class="org.hisp.dhis.importexport.action.integration.RouteOperationAction">
     <property name="builtinCamelContext" ref="camel-builtin" />
   </bean>
 
   <!-- DXF2 MetaData import/export -->
 
   <bean id="org.hisp.dhis.importexport.action.dxf2.MetaDataExportFormAction"
-      class="org.hisp.dhis.importexport.action.dxf2.MetaDataExportFormAction" />
-  
+    class="org.hisp.dhis.importexport.action.dxf2.MetaDataExportFormAction" />
+
   <bean id="org.hisp.dhis.importexport.action.dxf2.MetaDataImportAction"
-      class="org.hisp.dhis.importexport.action.dxf2.MetaDataImportAction" />
+    class="org.hisp.dhis.importexport.action.dxf2.MetaDataImportAction" />
 
   <bean id="org.hisp.dhis.importexport.action.dxf2.GetImportSummaryAction"
-      class="org.hisp.dhis.importexport.action.dxf2.GetImportSummaryAction" scope="prototype">
+    class="org.hisp.dhis.importexport.action.dxf2.GetImportSummaryAction" scope="prototype">
     <property name="category" value="METADATA_IMPORT" />
   </bean>
 

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2013-08-06 16:33:02 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2013-08-28 07:27:01 +0000
@@ -295,6 +295,7 @@
 xml_data_import=XML Data Import
 csv_data_import=CSV Data Import
 pdf_data_import=PDF Data Import
+event_data_import=Event Data Import
 no_data_values_found=No data values found
 create_new_route=Create new route
 integration=Integration

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2013-03-21 11:09:47 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2013-08-28 07:27:01 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE struts PUBLIC
-    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
-    "http://struts.apache.org/dtds/struts-2.0.dtd";>
+  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+  "http://struts.apache.org/dtds/struts-2.0.dtd";>
 <struts>
 
   <include file="dhis-web-commons.xml" />
@@ -51,6 +51,22 @@
       <param name="requiredAuthorities">F_EXPORT_DATA</param>
     </action>
 
+    <!-- Event Import -->
+
+    <action name="displayEventImportForm" class="org.hisp.dhis.importexport.action.NoAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-importexport/eventImportForm.vm</param>
+      <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
+      <param name="javascripts">javascript/importEventData.js</param>
+      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+    </action>
+
+    <action name="importDataValue" class="org.hisp.dhis.importexport.action.event.ImportEventAction">
+      <result name="success" type="redirect">displayEventImportForm.action</result>
+      <interceptor-ref name="fileUploadStack" />
+      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+    </action>
+
     <!-- Menu -->
 
     <action name="displayExternalImportMenu" class="org.hisp.dhis.importexport.action.NoAction">
@@ -185,7 +201,7 @@
     </action>
 
     <action name="displayDetailedMetaDataExportForm"
-        class="org.hisp.dhis.importexport.action.exp.GetDetailedExportOptionsAction">
+      class="org.hisp.dhis.importexport.action.exp.GetDetailedExportOptionsAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-importexport/exportDetailedMetaDataForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
@@ -224,7 +240,7 @@
     </action>
 
     <action name="validateAggregatedExport"
-        class="org.hisp.dhis.importexport.action.exp.ValidateAggregatedExportAction">
+      class="org.hisp.dhis.importexport.action.exp.ValidateAggregatedExportAction">
       <result name="success" type="velocity-xml">/dhis-web-importexport/responseSuccess.vm</result>
       <result name="error" type="velocity-xml">/dhis-web-importexport/responseError.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
@@ -234,7 +250,7 @@
     <!-- Dhis 1.4 Configuration -->
 
     <action name="displayConfigDhis14Form"
-        class="org.hisp.dhis.importexport.action.dhis14.GetDhis14ConfigurationAction">
+      class="org.hisp.dhis.importexport.action.dhis14.GetDhis14ConfigurationAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-importexport/configDhis14Form.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
@@ -247,7 +263,7 @@
     </action>
 
     <action name="validateConfigDhis14"
-        class="org.hisp.dhis.importexport.action.dhis14.ValidateDhis14ConfigurationAction">
+      class="org.hisp.dhis.importexport.action.dhis14.ValidateDhis14ConfigurationAction">
       <result name="success" type="velocity-xml">/dhis-web-importexport/responseSuccess.vm</result>
       <result name="input" type="velocity-xml">/dhis-web-importexport/responseInput.vm</result>
     </action>

=== added file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventImportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventImportForm.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventImportForm.vm	2013-08-28 07:27:01 +0000
@@ -0,0 +1,41 @@
+
+<h3>$i18n.getString( "event_data_import" )</h3>
+
+<div id="inputCriteria" class="inputCriteria" style="width: 380px">
+<form id="importForm" name="importForm" method="post" enctype="multipart/form-data" action="importEvents.action">
+<table>
+<col width="140">
+<col>
+<tr>
+	<td>$i18n.getString( "file" )</td>
+	<td><input type="file" id="upload" name="upload" style="margin-left:0px"></td>
+</tr>
+<tr>
+	<td>$i18n.getString( "dry_run" )</td>
+	<td><select disabled="disabled" id="dryRun" name="dryRun" style="width:190px">
+		<option value="false">$i18n.getString( "no" )</option>
+		<option value="true">$i18n.getString( "yes" )</option>
+    </select></td>
+</tr>
+<tr>
+	<td>$i18n.getString( "strategy" )</td>
+	<td><select disabled="disabled" id="strategy" name="strategy" style="width:190px">
+		<option value="NEW">$i18n.getString( "new_only" )</option>
+    </select></td>
+</tr>
+<tr>
+	<td></td>
+	<td><input type="button" value="$i18n.getString( 'import' )" style="width:120px" onclick="importEventData()"/></td>
+</tr>
+</table>
+</form>
+</div>
+
+<div id="notificationDiv">
+<table id="notificationTable" class="notificationTable" style="display:none">
+<col width="120">
+<col width="380">
+</table>
+</div>
+
+<div id="importSummaryDiv" class="page formSection" style="display:none; width:80%; padding-bottom:20px;"></div>

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2013-08-16 12:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2013-08-28 07:27:01 +0000
@@ -5,8 +5,9 @@
     #introListImgItem( "displayImportDataValueForm.action?importFormat=xml" "xml_data_import" "import" )
     #introListImgItem( "displayImportDataValueForm.action?importFormat=csv" "csv_data_import" "import" )
     #introListImgItem( "displayImportDataValueForm.action?importFormat=pdf" "pdf_data_import" "import" )
+    #introListImgItem( "displayEventImportForm.action" "event_data_import" "import" )
     #introListImgItem( "displayExternalImportMenu.action" "dhis14_import" "import" )
-    	
+
     #introListImgItem( "dxf2MetaDataExport.action" "metadata_export" "export" )
     #introListImgItem( "displayDataValueExportForm.action" "data_export" "export" )
     #introListImgItem( "displayExternalExportMenu.action" "export_to_other_systems" "export" )

=== added file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js	2013-08-28 07:27:01 +0000
@@ -0,0 +1,12 @@
+
+function importEventData()
+{
+	if ( !$( "#upload" ).val() )
+	{
+		setHeaderDelayMessage( "Please select a file to upload" );
+		return false;
+	}
+
+	$( "#notificationTable" ).empty();
+	$( "#importForm" ).submit();
+}

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm	2013-05-23 04:30:18 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm	2013-08-28 07:27:01 +0000
@@ -6,6 +6,7 @@
   <li><a href="displayImportDataValueForm.action?importFormat=xml">$i18n.getString( "xml_data_import" )&nbsp;</a></li>
   <li><a href="displayImportDataValueForm.action?importFormat=csv">$i18n.getString( "csv_data_import" )&nbsp;</a></li>
   <li><a href="displayImportDataValueForm.action?importFormat=pdf">$i18n.getString( "pdf_data_import" )&nbsp;</a></li>
+  <li><a href="displayEventImportForm.action">$i18n.getString( "event_data_import" )&nbsp;</a></li>
   <li><a href="displayExternalImportMenu.action">$i18n.getString( "dhis14_import" )&nbsp;</a></li>
   <li><a href="setImportFormat.action?importFormat=DXF">$i18n.getString( "gml_import" )&nbsp;</a></li>
 </ul>