dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30620
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15557: [mobile] update org unit controller for J2ME tracker
------------------------------------------------------------
revno: 15557
committer: Hong Em <em.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-06-05 14:16:25 +0700
message:
[mobile] update org unit controller for J2ME tracker
modified:
dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java
--
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-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java 2014-06-04 10:34:54 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java 2014-06-05 07:16:25 +0000
@@ -672,4 +672,44 @@
return activityReportingService.sendMessage( message );
}
+ @RequestMapping( method = RequestMethod.GET, value = "{clientVersion}/LWUIT/orgUnits/{id}/downloadMessageConversation" )
+ @ResponseBody
+ public Conversation downloadConversationTracker( String clientVersion )
+ throws NotAllowedException
+ {
+
+ Conversation conversation = new Conversation();
+ conversation.setClientVersion( clientVersion );
+ conversation.setConversations( activityReportingService.downloadMessageConversation() );
+
+ return conversation;
+
+ }
+
+ @RequestMapping( method = RequestMethod.GET, value = "{clientVersion}/LWUIT/orgUnits/{id}/getMessage" )
+ @ResponseBody
+ public Conversation getMessageTracker( String clientVersion, @PathVariable
+ int id, @RequestHeader( "id" )
+ String conversationId )
+ throws NotAllowedException
+ {
+
+ Conversation conversation = new Conversation();
+ conversation.setMessages( activityReportingService.getMessage( conversationId ) );
+
+ return conversation;
+
+ }
+
+ @RequestMapping( method = RequestMethod.POST, value = "{clientVersion}/LWUIT/orgUnits/{id}/replyMessage" )
+ @ResponseBody
+ public String replyMessageTracker( @PathVariable
+ int id, @RequestBody
+ Message message )
+ throws NotAllowedException
+ {
+ return activityReportingService.replyMessage( message );
+
+ }
+
}