← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20685: Interpretatio, using enum, removed constants

 

------------------------------------------------------------
revno: 20685
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-10-14 09:25:31 +0200
message:
  Interpretatio, using enum, removed constants
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/interpretation/action/GetInterpretations.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/interpretation/Interpretation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java	2015-10-13 10:18:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java	2015-10-14 07:25:31 +0000
@@ -62,11 +62,6 @@
 public class Interpretation
     extends BaseIdentifiableObject
 {
-    public static final String TYPE_CHART = "chart";
-    public static final String TYPE_MAP = "map";
-    public static final String TYPE_REPORT_TABLE = "reportTable";
-    public static final String TYPE_DATASET_REPORT = "dataSetReport";
-
     private Chart chart;
 
     private Map map;

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/interpretation/action/GetInterpretations.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/interpretation/action/GetInterpretations.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/interpretation/action/GetInterpretations.java	2015-10-14 07:25:31 +0000
@@ -34,6 +34,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.hisp.dhis.analytics.AnalyticsFavoriteType;
 import org.hisp.dhis.interpretation.Interpretation;
 import org.hisp.dhis.interpretation.InterpretationService;
 
@@ -90,7 +91,7 @@
         {
             Interpretation currentInterpretation = i.next();
 
-            if ( currentInterpretation.getType().equals( Interpretation.TYPE_CHART ) )
+            if ( currentInterpretation.getType() == AnalyticsFavoriteType.CHART )
             {
                 finalInterpretations.add( currentInterpretation );
             }