dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35698
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18270: enable display(ShortName, Description, FormName)
------------------------------------------------------------
revno: 18270
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-02-16 11:03:32 +0700
message:
enable display(ShortName, Description, FormName)
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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/BaseNameableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2015-02-05 06:53:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2015-02-16 04:03:32 +0000
@@ -33,6 +33,7 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.DimensionalView;
import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.common.view.ShortNameView;
import org.hisp.dhis.schema.annotation.PropertyRange;
@@ -191,6 +192,9 @@
}
@Override
+ @JsonView( { DetailedView.class, DimensionalView.class } )
+ @JsonProperty
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getDisplayShortName()
{
return displayShortName != null && !displayShortName.trim().isEmpty() ? displayShortName : getShortName();
@@ -202,6 +206,9 @@
}
@Override
+ @JsonView( { DetailedView.class, DimensionalView.class } )
+ @JsonProperty
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getDisplayDescription()
{
return displayDescription != null && !displayDescription.trim().isEmpty() ? displayDescription : getDescription();
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-02-05 06:53:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-02-16 04:03:32 +0000
@@ -41,6 +41,7 @@
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.MergeStrategy;
import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.DimensionalView;
import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.comparator.DataSetFrequencyComparator;
@@ -463,6 +464,9 @@
return formName != null && !formName.isEmpty() ? getDisplayFormName() : getDisplayName();
}
+ @JsonView( { DetailedView.class, DimensionalView.class } )
+ @JsonProperty
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getDisplayFormName()
{
return displayFormName != null && !displayFormName.trim().isEmpty() ? displayFormName : formName;