← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10372: local/in : mobile updates

 

------------------------------------------------------------
revno: 10372
committer: Harsh Atal <harsh.atal@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-21 13:13:31 +0530
message:
  local/in : mobile updates
added:
  local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/TestSMSDataAction.java
  local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/testPage.vm
modified:
  local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/DraftPageAction.java
  local/in/dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/DraftPageAction.java'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/DraftPageAction.java	2011-04-15 11:41:30 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/DraftPageAction.java	2013-03-21 07:43:31 +0000
@@ -88,6 +88,7 @@
             pendingMsgList.addAll( sendSMSService.getAllSendSMS() );
         }
         
+        System.out.println(pendingMsgList.size());
         return SUCCESS;
     }
 

=== added file 'local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/TestSMSDataAction.java'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/TestSMSDataAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/TestSMSDataAction.java	2013-03-21 07:43:31 +0000
@@ -0,0 +1,50 @@
+package org.hisp.dhis.mobile.action;
+
+import java.util.Date;
+
+import org.hisp.dhis.mobile.api.MobileImportService;
+
+import com.opensymphony.xwork2.Action;
+
+public class TestSMSDataAction implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+    
+    private MobileImportService mobileImportService;
+
+    public void setMobileImportService( MobileImportService mobileImportService )
+    {
+        this.mobileImportService = mobileImportService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Parameters
+    // -------------------------------------------------------------------------
+    
+    private String smsdata;
+    
+    public void setSmsdata( String smsdata )
+    {
+        this.smsdata = smsdata;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    public String execute() throws Exception
+    {
+    	if (smsdata.startsWith("SN")){
+        mobileImportService.registerPatientData( smsdata, "+9999888811", new Date() );
+    	}
+    	else{
+    		mobileImportService.registerDataByUID(smsdata,  "+9999888811", new Date());
+    	}
+    	
+    	
+        return SUCCESS;
+    }
+
+}

=== modified file 'local/in/dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2013-03-14 08:01:14 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2013-03-21 07:43:31 +0000
@@ -79,11 +79,11 @@
           scope="prototype">
         <property name="smsService" ref="org.hisp.dhis.mobile.SmsService" />
     </bean>
-<!--
+
 	<bean id="org.hisp.dhis.mobile.action.TestSMSDataAction"
           class="org.hisp.dhis.mobile.action.TestSMSDataAction"
           scope="prototype">
         <property name="mobileImportService" ref="org.hisp.dhis.mobile.api.MobileImportService"/>
     </bean>
--->	
+
 </beans>

=== added file 'local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/testPage.vm'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/testPage.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/testPage.vm	2013-03-21 07:43:31 +0000
@@ -0,0 +1,5 @@
+
+<form action="testSMSData.action" >
+	<input type="text" id="smsdata" name="smsdata" />
+	<input type="submit" value="send" />
+</form>
\ No newline at end of file