dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19827
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8809: Changed MapView.opacity from int to double
------------------------------------------------------------
revno: 8809
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-11-01 08:33:34 +0300
message:
Changed MapView.opacity from int to double
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/mapping/MappingServiceTest.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/mapping/MapView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java 2012-11-01 05:08:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java 2012-11-01 05:33:34 +0000
@@ -108,7 +108,7 @@
private Integer radiusHigh;
- private Integer opacity;
+ private Double opacity;
private OrganisationUnitGroupSet organisationUnitGroupSet;
@@ -124,7 +124,7 @@
DataElementGroup dataElementGroup, DataElement dataElement,
Period period, OrganisationUnit parentOrganisationUnit, OrganisationUnitLevel organisationUnitLevel,
String legendType, Integer method, Integer classes, String colorLow, String colorHigh,
- MapLegendSet legendSet, Integer radiusLow, Integer radiusHigh, int opacity )
+ MapLegendSet legendSet, Integer radiusLow, Integer radiusHigh, Double opacity )
{
this.layer = layer;
this.name = name;
@@ -399,12 +399,12 @@
@JsonProperty
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
- public Integer getOpacity()
+ public Double getOpacity()
{
return opacity;
}
- public void setOpacity( Integer opacity )
+ public void setOpacity( Double opacity )
{
this.opacity = opacity;
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java 2012-10-26 12:27:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java 2012-11-01 05:33:34 +0000
@@ -480,7 +480,7 @@
addMapView( new MapView( MapView.LAYER_THEMATIC1, name, mapValueType, indicatorGroup, indicator, dataElementGroup, dataElement,
period, parent, level, mapLegendType, method, classes, colorLow, colorHigh,
- mapLegendSet, radiusLow, radiusHigh, 1 ) );
+ mapLegendSet, radiusLow, radiusHigh, 1.0 ) );
}
public void updateMapView( MapView mapView )
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-10-26 17:22:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-11-01 05:33:34 +0000
@@ -145,6 +145,7 @@
executeSql( "ALTER TABLE mapview RENAME COLUMN maplegendtype TO legendtype" );
executeSql( "ALTER TABLE mapview RENAME COLUMN maplegendsetid TO legendsetid" );
executeSql( "ALTER TABLE maplegend DROP CONSTRAINT maplegend_name_key" );
+ executeSql( "ALTER TABLE mapview ALTER COLUMN opacity TYPE double precision" );
executeSql( "UPDATE mapview SET layer = 'thematic1' WHERE layer IS NULL" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/mapping/MappingServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/mapping/MappingServiceTest.java 2012-10-26 07:31:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/mapping/MappingServiceTest.java 2012-11-01 05:33:34 +0000
@@ -269,7 +269,7 @@
MapView mapView = new MapView( LAYER_THEMATIC1, "MapViewA", VALUE_TYPE_INDICATOR, indicatorGroup,
indicator, dataElementGroup, dataElement, period,
organisationUnit, organisationUnitLevel, LEGEND_TYPE_AUTOMATIC, 1, 1, "A", "B",
- mapLegendSet, 5, 20, 1 );
+ mapLegendSet, 5, 20, 1.0 );
int idA = mappingService.addMapView( mapView );
@@ -285,12 +285,12 @@
MapView mapView1 = new MapView( LAYER_THEMATIC1, "MapViewA", VALUE_TYPE_INDICATOR, indicatorGroup,
indicator, dataElementGroup, dataElement, period,
organisationUnit, organisationUnitLevel, LEGEND_TYPE_AUTOMATIC, 1, 1, "A", "B",
- mapLegendSet, 5, 20, 1 );
+ mapLegendSet, 5, 20, 1.0 );
MapView mapView2 = new MapView( LAYER_THEMATIC1, "MapViewB", VALUE_TYPE_INDICATOR, indicatorGroup,
indicator, dataElementGroup, dataElement, period,
organisationUnit, organisationUnitLevel, LEGEND_TYPE_AUTOMATIC, 1, 1, "A", "B",
- mapLegendSet, 5, 20, 1 );
+ mapLegendSet, 5, 20, 1.0 );
mappingService.addMapView( mapView1 );
mappingService.addMapView( mapView2 );