← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7300: Fixed issue in datavalue set controller. Added jsonignore on id prop in base identifiable object.

 

------------------------------------------------------------
revno: 7300
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-14 19:36:08 +0200
message:
  Fixed issue in datavalue set controller. Added jsonignore on id prop in base identifiable object.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.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-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2012-06-06 11:53:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2012-06-14 17:36:08 +0000
@@ -27,6 +27,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonView;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
@@ -121,6 +122,7 @@
     // Setters and getters
     // -------------------------------------------------------------------------
 
+    @JsonIgnore
     public int getId()
     {
         return id;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java	2012-06-02 20:53:02 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueSetController.java	2012-06-14 17:36:08 +0000
@@ -67,7 +67,7 @@
     @Autowired
     private IntegrationService integrationService;
     
-    @RequestMapping( method = RequestMethod.GET, headers = {"Accept=text/html"} )
+    @RequestMapping( method = RequestMethod.GET, produces = { "text/html", "text/plain" } )
     public String getDataValueSets( Model model ) throws Exception
     {
         DataValueSets dataValueSets = new DataValueSets();
@@ -78,6 +78,7 @@
         return "dataValueSets";
     }
 
+    @RequestMapping( method = RequestMethod.GET, produces = "application/xml" )
     public void getDataValueSet( @RequestParam String dataSet,
                                  @RequestParam String period,
                                  @RequestParam String orgUnit,