← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14614: Another minor

 

------------------------------------------------------------
revno: 14614
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-04-02 16:08:06 +0200
message:
  Another minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.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/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-04-02 13:21:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-04-02 14:08:06 +0000
@@ -153,18 +153,7 @@
     {
         return dimensionName != null ? dimensionName : uid;
     }
-    
-    /**
-     * Override from IdentifiableObject for DimensionalView.
-     */
-    @Override
-    @JsonView( {DimensionalView.class} )
-    @JsonProperty
-    public String getDisplayName()
-    {
-        return super.getDisplayName();
-    }
-    
+        
     //--------------------------------------------------------------------------
     // Getters and setters
     //--------------------------------------------------------------------------

=== 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	2014-03-27 04:44:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2014-04-02 14:08:06 +0000
@@ -37,6 +37,7 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.apache.commons.lang.Validate;
 import org.hisp.dhis.common.annotation.Description;
+import org.hisp.dhis.common.view.DimensionalView;
 import org.hisp.dhis.common.view.SharingBasicView;
 import org.hisp.dhis.common.view.SharingDetailedView;
 import org.hisp.dhis.common.view.SharingExportView;
@@ -325,12 +326,16 @@
     {
         this.access = access;
     }
-
+    
+    @Override
+    @JsonView( { DimensionalView.class } )
+    @JsonProperty
     public String getDisplayName()
     {
         return displayName != null && !displayName.trim().isEmpty() ? displayName : getName();
     }
-
+    
+    @JsonIgnore
     public void setDisplayName( String displayName )
     {
         this.displayName = displayName;