dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19857
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8836: Dashboard, updated map search
------------------------------------------------------------
revno: 8836
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-11-02 14:03:33 +0300
message:
Dashboard, updated map search
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.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/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.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/MappingService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java 2012-10-31 18:29:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java 2012-11-02 11:03:33 +0000
@@ -32,6 +32,7 @@
import org.hisp.dhis.user.User;
import java.util.Collection;
+import java.util.List;
import java.util.Set;
/**
@@ -132,6 +133,8 @@
Collection<Map> getSystemAndUserMaps();
+ List<Map> getAccessibleMapsBetweenLikeName( String name, int first, int max );
+
// -------------------------------------------------------------------------
// MapView
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java 2012-10-24 13:47:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java 2012-11-02 11:03:33 +0000
@@ -180,7 +180,6 @@
this.symbol = symbol;
}
-
@JsonProperty( value = "organisationUnits" )
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JsonView( { DetailedView.class, ExportView.class } )
=== 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-11-01 08:22:08 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java 2012-11-02 11:03:33 +0000
@@ -29,6 +29,7 @@
import java.util.Collection;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import org.hisp.dhis.aggregation.AggregatedDataValueService;
@@ -37,9 +38,7 @@
import org.hisp.dhis.configuration.ConfigurationService;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementGroup;
-import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.IndicatorGroup;
import org.hisp.dhis.indicator.IndicatorService;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
@@ -113,13 +112,6 @@
this.indicatorService = indicatorService;
}
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
private PeriodService periodService;
public void setPeriodService( PeriodService periodService )
@@ -435,6 +427,13 @@
return mapStore.getAccessibleByUser( user );
}
+
+ public List<Map> getAccessibleMapsBetweenLikeName( String name, int first, int max )
+ {
+ User user = currentUserService.getCurrentUser();
+
+ return mapStore.getAccessibleBetweenLikeName( user, name, first, max );
+ }
// -------------------------------------------------------------------------
// MapView
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-10-25 12:38:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-11-02 11:03:33 +0000
@@ -543,7 +543,6 @@
<property name="mapLegendSetStore" ref="org.hisp.dhis.mapping.MapLegendSetStore" />
<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java 2012-10-10 14:09:38 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/impl/DefaultDashboardService.java 2012-11-02 11:03:33 +0000
@@ -125,7 +125,7 @@
objects.addAll( userService.getAllUsersBetweenByName( query, 0, MAX_PER_OBJECT ) );
objects.addAll( chartService.getChartsBetweenByName( query, 0, MAX_PER_OBJECT ) );
- objects.addAll( mappingService.getMapViewsBetweenByName( query, 0, MAX_PER_OBJECT ) );
+ objects.addAll( mappingService.getAccessibleMapsBetweenLikeName( query, 0, MAX_PER_OBJECT ) );
remaining = MAX_OBJECTS - objects.size();