dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38807
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19708: Analytics. Added support for parameter skipData for skipping data part of the response
------------------------------------------------------------
revno: 19708
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-08-04 13:09:17 +0200
message:
Analytics. Added support for parameter skipData for skipping data part of the response
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/MockAnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsServiceTest.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AnalyticsController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsService.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsService.java 2015-08-04 11:09:17 +0000
@@ -153,6 +153,7 @@
* @param aggregationType the aggregation type.
* @param measureCriteria the measure criteria.
* @param skipMeta whether to skip the meta data part of the response.
+ * @param skipData whether to skip the data part of the response.
* @param skipRounding whether to skip rounding and provide full precision
* for values.
* @param hierarchyMeta whether to include meta data about the organisation
@@ -172,7 +173,7 @@
* @return a data query parameter object created based on the given URL info.
*/
DataQueryParams getFromUrl( Set<String> dimensionParams, Set<String> filterParams, AggregationType aggregationType, String measureCriteria,
- boolean skipMeta, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit, boolean hideEmptyRows, boolean showHierarchy,
+ boolean skipMeta, boolean skipData, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit, boolean hideEmptyRows, boolean showHierarchy,
DisplayProperty displayProperty, IdentifiableProperty outputIdScheme, String approvalLevel, String userOrgUnit,
String program, String stage, I18nFormat format );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2015-08-04 11:09:17 +0000
@@ -144,6 +144,11 @@
* Indicates if the meta data part of the query response should be omitted.
*/
protected boolean skipMeta;
+
+ /**
+ * Indicates if the data part of the query response should be omitted.
+ */
+ protected boolean skipData;
/**
* Indicates that full precision should be provided for values.
@@ -264,6 +269,7 @@
params.aggregationType = this.aggregationType;
params.measureCriteria = this.measureCriteria;
params.skipMeta = this.skipMeta;
+ params.skipData = this.skipData;
params.skipRounding = this.skipRounding;
params.hierarchyMeta = this.hierarchyMeta;
params.ignoreLimit = this.ignoreLimit;
@@ -1290,6 +1296,16 @@
this.skipMeta = skipMeta;
}
+ public boolean isSkipData()
+ {
+ return skipData;
+ }
+
+ public void setSkipData( boolean skipData )
+ {
+ this.skipData = skipData;
+ }
+
public boolean isSkipRounding()
{
return skipRounding;
@@ -1686,6 +1702,11 @@
return ImmutableList.copyOf( DimensionalObjectUtils.getByDataDimensionType( DataDimensionItemType.PROGRAM_ATTRIBUTE, getDimensionOptions( DATA_X_DIM_ID ) ) );
}
+ public List<NameableObject> getProgramDataElementsAndAttributes()
+ {
+ return ListUtils.union( getProgramDataElements(), getProgramAttributes() );
+ }
+
public void setProgramAttributes( List<? extends NameableObject> programAttributes )
{
setDataDimensionOptions( DataDimensionItemType.PROGRAM_ATTRIBUTE, programAttributes );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2015-08-04 11:09:17 +0000
@@ -274,12 +274,15 @@
*/
private void addHeaders( DataQueryParams params, Grid grid )
{
- for ( DimensionalObject col : params.getDimensions() )
+ if ( !params.isSkipData() )
{
- grid.addHeader( new GridHeader( col.getDimension(), col.getDisplayName(), String.class.getName(), false, true ) );
+ for ( DimensionalObject col : params.getDimensions() )
+ {
+ grid.addHeader( new GridHeader( col.getDimension(), col.getDisplayName(), String.class.getName(), false, true ) );
+ }
+
+ grid.addHeader( new GridHeader( DataQueryParams.VALUE_ID, VALUE_HEADER_NAME, Double.class.getName(), false, false ) );
}
-
- grid.addHeader( new GridHeader( DataQueryParams.VALUE_ID, VALUE_HEADER_NAME, Double.class.getName(), false, false ) );
}
/**
@@ -291,7 +294,7 @@
*/
private void addIndicatorValues( DataQueryParams params, Grid grid )
{
- if ( !params.getIndicators().isEmpty() )
+ if ( !params.getIndicators().isEmpty() && !params.isSkipData() )
{
DataQueryParams dataSourceParams = params.instance();
dataSourceParams.retainDataDimension( DataDimensionItemType.INDICATOR );
@@ -361,7 +364,7 @@
*/
private void addDataElementValues( DataQueryParams params, Grid grid )
{
- if ( !params.getDataElements().isEmpty() )
+ if ( !params.getDataElements().isEmpty() && !params.isSkipData() )
{
DataQueryParams dataSourceParams = params.instance();
dataSourceParams.retainDataDimension( DataDimensionItemType.AGGREGATE_DATA_ELEMENT );
@@ -386,7 +389,7 @@
*/
private void addDataElementOperands( DataQueryParams params, Grid grid )
{
- if ( !params.getDataElementOperands().isEmpty() )
+ if ( !params.getDataElementOperands().isEmpty() && !params.isSkipData() )
{
DataQueryParams dataSourceParams = params.instance();
dataSourceParams.retainDataDimension( DataDimensionItemType.DATA_ELEMENT_OPERAND );
@@ -434,7 +437,7 @@
*/
private void addDataSetValues( DataQueryParams params, Grid grid )
{
- if ( !params.getDataSets().isEmpty() )
+ if ( !params.getDataSets().isEmpty() && !params.isSkipData() )
{
// -----------------------------------------------------------------
// Get complete data set registrations
@@ -512,7 +515,7 @@
*/
private void addProgramIndicatorValues( DataQueryParams params, Grid grid )
{
- if ( !params.getProgramIndicators().isEmpty() )
+ if ( !params.getProgramIndicators().isEmpty() && !params.isSkipData() )
{
// -----------------------------------------------------------------
// Run queries with different filter expression separately
@@ -579,7 +582,7 @@
*/
private void addProgramDataElementAttributeValues( DataQueryParams params, Grid grid )
{
- if ( !params.getProgramDataElements().isEmpty() || !params.getProgramAttributes().isEmpty() )
+ if ( !params.getProgramDataElementsAndAttributes().isEmpty() && !params.isSkipData() )
{
DataQueryParams dataSourceParams = params.instance();
dataSourceParams.retainDataDimensions( DataDimensionItemType.PROGRAM_DATA_ELEMENT, DataDimensionItemType.PROGRAM_ATTRIBUTE );
@@ -602,7 +605,7 @@
*/
private void addDynamicDimensionValues( DataQueryParams params, Grid grid )
{
- if ( params.getDataDimensionAndFilterOptions().isEmpty() )
+ if ( params.getDataDimensionAndFilterOptions().isEmpty() && !params.isSkipData() )
{
Map<String, Double> aggregatedDataMap = getAggregatedDataValueMap( params.instance() );
@@ -971,7 +974,7 @@
@Override
public DataQueryParams getFromUrl( Set<String> dimensionParams, Set<String> filterParams, AggregationType aggregationType,
- String measureCriteria, boolean skipMeta, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit,
+ String measureCriteria, boolean skipMeta, boolean skipData, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit,
boolean hideEmptyRows, boolean showHierarchy, DisplayProperty displayProperty, IdentifiableProperty outputIdScheme,
String approvalLevel, String userOrgUnit, String program, String stage, I18nFormat format )
{
@@ -996,6 +999,7 @@
}
params.setSkipMeta( skipMeta );
+ params.setSkipData( skipData );
params.setSkipRounding( skipRounding );
params.setHierarchyMeta( hierarchyMeta );
params.setHideEmptyRows( hideEmptyRows );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/MockAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/MockAnalyticsService.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/MockAnalyticsService.java 2015-08-04 11:09:17 +0000
@@ -61,13 +61,13 @@
@Override
public Grid getAggregatedDataValues( DataQueryParams params )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
@Override
public Grid getAggregatedDataValues( DataQueryParams params, boolean tableLayout, List<String> columns, List<String> rows )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
@Override
@@ -84,29 +84,29 @@
@Override
public DataQueryParams getFromUrl( Set<String> dimensionParams, Set<String> filterParams, AggregationType aggregationType,
- String measureCriteria, boolean skipMeta, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit, boolean hideEmptyRows,
+ String measureCriteria, boolean skipMeta, boolean skipData, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit, boolean hideEmptyRows,
boolean showHierarchy, DisplayProperty displayProperty, IdentifiableProperty idScheme, String approvalLevel, String userOrgUnit,
String program, String stage, I18nFormat format )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
@Override
public DataQueryParams getFromAnalyticalObject( AnalyticalObject object, I18nFormat format )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
@Override
public List<DimensionalObject> getDimensionalObjects( Set<String> dimensionParams, String userOrgUnit, I18nFormat format )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
@Override
public DimensionalObject getDimension( String dimension, List<String> items, Date relativePeriodDate,
List<OrganisationUnit> userOrgUnits, I18nFormat format, boolean allowNull )
{
- throw new NotImplementedException("");
+ throw new NotImplementedException( "" );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java 2015-06-13 21:26:59 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventAnalyticsService.java 2015-08-04 11:09:17 +0000
@@ -61,7 +61,8 @@
* @param filter the set of filters.
* @param value the value dimension identifier.
* @param aggregationType the aggregation type for the value dimension.
- * @param skipMeta whether to skip meta-data in response.
+ * @param skipMeta whether to skip meta-data in the response.
+ * @param skipData whether to skip data in the response.
* @param skipRounding whether to skip rounding of values in response.
* @param hierarchyMeta whether to include hierarchy meta-data in the response.
* @param showHierarchy whether to include hierarchy meta-data names in the response.
@@ -75,7 +76,7 @@
*/
EventQueryParams getFromUrl( String program, String stage, String startDate, String endDate,
Set<String> dimension, Set<String> filter, String value, AggregationType aggregationType,
- boolean skipMeta, boolean skipRounding, boolean hierarchyMeta, boolean showHierarchy, SortOrder sortOrder, Integer limit,
+ boolean skipMeta, boolean skipData, boolean skipRounding, boolean hierarchyMeta, boolean showHierarchy, SortOrder sortOrder, Integer limit,
EventOutputType outputType, boolean collapseDataDimensions, boolean aggregateData, DisplayProperty displayProperty, I18nFormat format );
/**
@@ -90,7 +91,8 @@
* @param ouMode the organisation unit mode.
* @param asc the dimensions to be sorted ascending.
* @param desc the dimensions to be sorted descending.
- * @param skipMeta whether to skip meta-data in response.
+ * @param skipMeta whether to skip meta-data in the response.
+ * @param skipData whether to skip data in the response.
* @param hierarchyMeta whether to include hierarchy meta-data in the response.
* @param coordinatesOnly whether to only return events which have coordinates.
* @param displayProperty the display property to use for meta-data.
@@ -99,7 +101,7 @@
* @param format the i18n format.
*/
EventQueryParams getFromUrl( String program, String stage, String startDate, String endDate, Set<String> dimension, Set<String> filter,
- String ouMode, Set<String> asc, Set<String> desc, boolean skipMeta, boolean hierarchyMeta, boolean coordinatesOnly,
+ String ouMode, Set<String> asc, Set<String> desc, boolean skipMeta, boolean skipData, boolean hierarchyMeta, boolean coordinatesOnly,
DisplayProperty displayProperty, Integer page, Integer pageSize, I18nFormat format );
EventQueryParams getFromAnalyticalObject( EventAnalyticalObject object, I18nFormat format );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-08-04 11:09:17 +0000
@@ -159,6 +159,7 @@
// EventAnalyticsService implementation
// -------------------------------------------------------------------------
+ // TODO use ValueType for type in grid headers
// TODO order event analytics tables on execution date to avoid default
// TODO sorting in queries
@@ -174,66 +175,71 @@
int maxLimit = queryPlanner.getMaxLimit();
// ---------------------------------------------------------------------
- // Headers
- // ---------------------------------------------------------------------
-
- if ( params.isCollapseDataDimensions() || params.isAggregateData() )
- {
- grid.addHeader( new GridHeader( DimensionalObject.DATA_COLLAPSED_DIM_ID, DataQueryParams.DISPLAY_NAME_DATA_X, String.class.getName(), false, true ) );
- }
- else
- {
- for ( QueryItem item : params.getItems() )
- {
- //TODO use ValueType for type
-
- String legendSet = item.hasLegendSet() ? item.getLegendSet().getUid() : null;
-
- grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.getOptionSetUid(), legendSet ) );
- }
- }
-
- for ( DimensionalObject dimension : params.getDimensions() )
- {
- grid.addHeader( new GridHeader( dimension.getDimension(), dimension.getDisplayName(), String.class.getName(), false, true ) );
- }
-
- grid.addHeader( new GridHeader( "value", "Value", Double.class.getName(), false, false ) );
-
- // ---------------------------------------------------------------------
- // Data
- // ---------------------------------------------------------------------
-
- Timer t = new Timer().start().disablePrint();
-
- List<EventQueryParams> queries = queryPlanner.planAggregateQuery( params );
-
- t.getSplitTime( "Planned event query, got partitions: " + params.getPartitions() );
-
- for ( EventQueryParams query : queries )
- {
- analyticsManager.getAggregatedEventData( query, grid, maxLimit );
- }
-
- t.getTime( "Got aggregated events" );
-
- if ( maxLimit > 0 && grid.getHeight() > maxLimit )
- {
- throw new IllegalQueryException( "Number of rows produced by query is larger than the max limit: " + maxLimit );
- }
-
- // ---------------------------------------------------------------------
- // Limit and sort - done again due to potential multiple partitions
- // ---------------------------------------------------------------------
-
- if ( params.hasSortOrder() )
- {
- grid.sortGrid( 1, params.getSortOrderAsInt() );
- }
-
- if ( params.hasLimit() && grid.getHeight() > params.getLimit() )
- {
- grid.limitGrid( params.getLimit() );
+ // Headers and data
+ // ---------------------------------------------------------------------
+
+ if ( !params.isSkipData() )
+ {
+ // -----------------------------------------------------------------
+ // Headers
+ // -----------------------------------------------------------------
+
+ if ( params.isCollapseDataDimensions() || params.isAggregateData() )
+ {
+ grid.addHeader( new GridHeader( DimensionalObject.DATA_COLLAPSED_DIM_ID, DataQueryParams.DISPLAY_NAME_DATA_X, String.class.getName(), false, true ) );
+ }
+ else
+ {
+ for ( QueryItem item : params.getItems() )
+ {
+ String legendSet = item.hasLegendSet() ? item.getLegendSet().getUid() : null;
+
+ grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.getOptionSetUid(), legendSet ) );
+ }
+ }
+
+ for ( DimensionalObject dimension : params.getDimensions() )
+ {
+ grid.addHeader( new GridHeader( dimension.getDimension(), dimension.getDisplayName(), String.class.getName(), false, true ) );
+ }
+
+ grid.addHeader( new GridHeader( "value", "Value", Double.class.getName(), false, false ) );
+
+ // -----------------------------------------------------------------
+ // Data
+ // -----------------------------------------------------------------
+
+ Timer t = new Timer().start().disablePrint();
+
+ List<EventQueryParams> queries = queryPlanner.planAggregateQuery( params );
+
+ t.getSplitTime( "Planned event query, got partitions: " + params.getPartitions() );
+
+ for ( EventQueryParams query : queries )
+ {
+ analyticsManager.getAggregatedEventData( query, grid, maxLimit );
+ }
+
+ t.getTime( "Got aggregated events" );
+
+ if ( maxLimit > 0 && grid.getHeight() > maxLimit )
+ {
+ throw new IllegalQueryException( "Number of rows produced by query is larger than the max limit: " + maxLimit );
+ }
+
+ // -----------------------------------------------------------------
+ // Limit and sort, done again due to potential multiple partitions
+ // -----------------------------------------------------------------
+
+ if ( params.hasSortOrder() )
+ {
+ grid.sortGrid( 1, params.getSortOrderAsInt() );
+ }
+
+ if ( params.hasLimit() && grid.getHeight() > params.getLimit() )
+ {
+ grid.limitGrid( params.getLimit() );
+ }
}
// ---------------------------------------------------------------------
@@ -369,12 +375,12 @@
@Override
public EventQueryParams getFromUrl( String program, String stage, String startDate, String endDate,
- Set<String> dimension, Set<String> filter, String value, AggregationType aggregationType, boolean skipMeta, boolean skipRounding, boolean hierarchyMeta,
- boolean showHierarchy, SortOrder sortOrder, Integer limit, EventOutputType outputType, boolean collapseDataDimensions,
+ Set<String> dimension, Set<String> filter, String value, AggregationType aggregationType, boolean skipMeta, boolean skipData, boolean skipRounding,
+ boolean hierarchyMeta, boolean showHierarchy, SortOrder sortOrder, Integer limit, EventOutputType outputType, boolean collapseDataDimensions,
boolean aggregateData, DisplayProperty displayProperty, I18nFormat format )
{
EventQueryParams params = getFromUrl( program, stage, startDate, endDate, dimension, filter, null, null, null,
- skipMeta, hierarchyMeta, false, displayProperty, null, null, format );
+ skipMeta, skipData, hierarchyMeta, false, displayProperty, null, null, format );
params.setValue( getValueDimension( value ) );
params.setAggregationType( aggregationType );
@@ -392,7 +398,7 @@
@Override
public EventQueryParams getFromUrl( String program, String stage, String startDate, String endDate,
Set<String> dimension, Set<String> filter, String ouMode, Set<String> asc, Set<String> desc,
- boolean skipMeta, boolean hierarchyMeta, boolean coordinatesOnly, DisplayProperty displayProperty, Integer page, Integer pageSize, I18nFormat format )
+ boolean skipMeta, boolean skipData, boolean hierarchyMeta, boolean coordinatesOnly, DisplayProperty displayProperty, Integer page, Integer pageSize, I18nFormat format )
{
EventQueryParams params = new EventQueryParams();
@@ -486,6 +492,7 @@
params.setEndDate( end );
params.setOrganisationUnitMode( ouMode );
params.setSkipMeta( skipMeta );
+ params.setSkipData( skipData );
params.setHierarchyMeta( hierarchyMeta );
params.setCoordinatesOnly( coordinatesOnly );
params.setDisplayProperty( displayProperty );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java 2015-08-04 11:09:17 +0000
@@ -193,7 +193,7 @@
filterParams.add( "ou:" + ouA.getUid() + ";" + ouB.getUid() + ";" + ouC.getUid() + ";" + ouD.getUid() + ";" + ouE.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 4, params.getDataElements().size() );
assertEquals( 3, params.getPeriods().size() );
@@ -211,7 +211,7 @@
filterParams.add( "ou:" + ouA.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 4, params.getDataElements().size() );
assertEquals( 1, params.getFilterOrganisationUnits().size() );
@@ -227,7 +227,7 @@
filterParams.add( "ou:" + ouA.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 2, params.getDataElements().size() );
assertEquals( 2, params.getProgramDataElements().size() );
@@ -244,7 +244,7 @@
filterParams.add( "ou:" + ouA.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 2, params.getDataElements().size() );
assertEquals( 2, params.getProgramAttributes().size() );
@@ -263,7 +263,7 @@
filterParams.add( "ou:" + ouA.getUid() + ";" + ouB.getUid() + ";" + ouC.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 3, params.getDataElements().size() );
assertEquals( 2, params.getPeriods().size() );
@@ -282,7 +282,7 @@
filterParams.add( "ou:" + ouA.getUid() + ";" + ouB.getUid() );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, filterParams, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 4, params.getDataElements().size() );
assertEquals( 12, params.getPeriods().size() );
@@ -298,7 +298,7 @@
dimensionParams.add( "pe:2011;2012" );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 1, params.getOrganisationUnits().size() );
assertEquals( 2, params.getDataElements().size() );
@@ -314,7 +314,7 @@
dimensionParams.add( "pe:2011;2012" );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 3, params.getOrganisationUnits().size() );
assertEquals( 2, params.getDataElements().size() );
@@ -330,7 +330,7 @@
dimensionParams.add( "pe:2011;2012" );
DataQueryParams params = analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
assertEquals( 2, params.getOrganisationUnits().size() );
assertEquals( 2, params.getDataElements().size() );
@@ -345,7 +345,7 @@
dimensionParams.add( "pe:2012,2012S1,2012S2" );
analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
}
@Test( expected = IllegalQueryException.class )
@@ -356,7 +356,7 @@
dimensionParams.add( "pe" );
analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
}
@Test( expected = IllegalQueryException.class )
@@ -367,7 +367,7 @@
dimensionParams.add( "ou" );
analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
}
@Test( expected = IllegalQueryException.class )
@@ -378,7 +378,7 @@
dimensionParams.add( "yebo:2012,2012S1,2012S2" );
analyticsService.getFromUrl( dimensionParams, null, null, null,
- false, false, false, false, false, false, null, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, null, null, null, null, null, null, null );
}
@Test
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsServiceTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsServiceTest.java 2015-07-14 09:34:46 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/event/data/EventAnalyticsServiceTest.java 2015-08-04 11:09:17 +0000
@@ -181,7 +181,7 @@
filterParams.add( "pe:201401;201402" );
EventQueryParams params = analyticsService.getFromUrl( prA.getUid(), null,
- null, null, dimensionParams, filterParams, null, null, false, false, false, false, null, null, null, false, false, null, null );
+ null, null, dimensionParams, filterParams, null, null, false, false, false, false, false, null, null, null, false, false, null, null );
assertEquals( prA, params.getProgram() );
assertEquals( 1, params.getOrganisationUnits().size() );
@@ -200,7 +200,7 @@
filterParams.add( "pe:201401" );
EventQueryParams params = analyticsService.getFromUrl( prA.getUid(), null,
- null, null, dimensionParams, filterParams, deA.getUid(), AggregationType.AVERAGE, false, false, false, false, null, null, null, false, false, null, null );
+ null, null, dimensionParams, filterParams, deA.getUid(), AggregationType.AVERAGE, false, false, false, false, false, null, null, null, false, false, null, null );
assertEquals( prA, params.getProgram() );
assertEquals( 1, params.getOrganisationUnits().size() );
@@ -339,7 +339,7 @@
filterParams.add( atA.getUid() + ":LE:5" );
EventQueryParams params = analyticsService.getFromUrl( prA.getUid(), null,
- null, null, dimensionParams, filterParams, null, null, false, false, false, false, null, null, null, false, false, null, null );
+ null, null, dimensionParams, filterParams, null, null, false, false, false, false, false, null, null, null, false, false, null, null );
assertEquals( prA, params.getProgram() );
assertEquals( 1, params.getItems().size() );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AnalyticsController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AnalyticsController.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AnalyticsController.java 2015-08-04 11:09:17 +0000
@@ -81,6 +81,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -98,7 +99,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING );
@@ -115,6 +116,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -132,7 +134,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.RESPECT_SYSTEM_SETTING );
@@ -147,6 +149,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -164,7 +167,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING );
@@ -179,6 +182,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -196,7 +200,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING );
@@ -211,6 +215,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -228,7 +233,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_CSV, CacheStrategy.RESPECT_SYSTEM_SETTING, "data.csv", true );
@@ -243,6 +248,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -260,7 +266,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_EXCEL, CacheStrategy.RESPECT_SYSTEM_SETTING, "data.xls", true );
@@ -275,6 +281,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -293,7 +300,7 @@
HttpServletResponse response ) throws Exception
{
DataQueryParams params = analyticsService.getFromUrl( dimension, filter, null, null,
- true, false, false, false, false, false, null, null, null, null, null, null, i18nManager.getI18nFormat() );
+ true, false, false, false, false, false, false, null, null, null, null, null, null, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.RESPECT_SYSTEM_SETTING, "data.jrxml", false );
Grid grid = analyticsService.getAggregatedDataValues( params );
@@ -308,6 +315,7 @@
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) String measureCriteria,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean ignoreLimit,
@@ -325,7 +333,7 @@
Model model,
HttpServletResponse response ) throws Exception
{
- DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipRounding, hierarchyMeta,
+ DataQueryParams params = analyticsService.getFromUrl( dimension, filter, aggregationType, measureCriteria, skipMeta, skipData, skipRounding, hierarchyMeta,
ignoreLimit, hideEmptyRows, showHierarchy, displayProperty, outputIdScheme, approvalLevel, userOrgUnit, program, stage, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_TEXT, CacheStrategy.NO_CACHE, "debug.sql", false );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java 2015-07-21 13:47:18 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EventAnalyticsController.java 2015-08-04 11:09:17 +0000
@@ -86,6 +86,7 @@
@RequestParam( required = false ) String value,
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean showHierarchy,
@@ -99,7 +100,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- value, aggregationType, skipMeta, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+ value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING );
@@ -120,6 +121,7 @@
@RequestParam( required = false ) String value,
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean showHierarchy,
@@ -133,7 +135,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- value, aggregationType, skipMeta, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+ value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.xml", false );
@@ -152,6 +154,7 @@
@RequestParam( required = false ) String value,
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean showHierarchy,
@@ -165,7 +168,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- value, aggregationType, skipMeta, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+ value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_EXCEL, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.xls", true );
@@ -184,6 +187,7 @@
@RequestParam( required = false ) String value,
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean showHierarchy,
@@ -197,7 +201,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- value, aggregationType, skipMeta, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+ value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_CSV, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.csv", true );
@@ -216,6 +220,7 @@
@RequestParam( required = false ) String value,
@RequestParam( required = false ) AggregationType aggregationType,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean skipRounding,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean showHierarchy,
@@ -229,7 +234,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- value, aggregationType, skipMeta, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
+ value, aggregationType, skipMeta, skipData, skipRounding, hierarchyMeta, showHierarchy, sortOrder, limit, outputType,
collapseDataDimensions, aggregateData, displayProperty, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.html", false );
@@ -253,6 +258,7 @@
@RequestParam( required = false ) Set<String> asc,
@RequestParam( required = false ) Set<String> desc,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean coordinatesOnly,
@RequestParam( required = false ) Integer page,
@@ -262,7 +268,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter, ouMode,
- asc, desc, skipMeta, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+ asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING );
Grid grid = analyticsService.getEvents( params );
@@ -283,6 +289,7 @@
@RequestParam( required = false ) Set<String> asc,
@RequestParam( required = false ) Set<String> desc,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean coordinatesOnly,
@RequestParam( required = false ) Integer page,
@@ -292,7 +299,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- ouMode, asc, desc, skipMeta, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+ ouMode, asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.xml", false );
Grid grid = analyticsService.getEvents( params );
@@ -311,6 +318,7 @@
@RequestParam( required = false ) Set<String> asc,
@RequestParam( required = false ) Set<String> desc,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean coordinatesOnly,
@RequestParam( required = false ) Integer page,
@@ -320,7 +328,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- ouMode, asc, desc, skipMeta, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+ ouMode, asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_EXCEL, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.xls", true );
Grid grid = analyticsService.getEvents( params );
@@ -339,6 +347,7 @@
@RequestParam( required = false ) Set<String> asc,
@RequestParam( required = false ) Set<String> desc,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean coordinatesOnly,
@RequestParam( required = false ) Integer page,
@@ -348,7 +357,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- ouMode, asc, desc, skipMeta, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+ ouMode, asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_CSV, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.csv", true );
Grid grid = analyticsService.getEvents( params );
@@ -367,6 +376,7 @@
@RequestParam( required = false ) Set<String> asc,
@RequestParam( required = false ) Set<String> desc,
@RequestParam( required = false ) boolean skipMeta,
+ @RequestParam( required = false ) boolean skipData,
@RequestParam( required = false ) boolean hierarchyMeta,
@RequestParam( required = false ) boolean coordinatesOnly,
@RequestParam( required = false ) Integer page,
@@ -376,7 +386,7 @@
HttpServletResponse response ) throws Exception
{
EventQueryParams params = analyticsService.getFromUrl( program, stage, startDate, endDate, dimension, filter,
- ouMode, asc, desc, skipMeta, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
+ ouMode, asc, desc, skipMeta, skipData, hierarchyMeta, coordinatesOnly, displayProperty, page, pageSize, i18nManager.getI18nFormat() );
contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, "events.html", false );
Grid grid = analyticsService.getEvents( params );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java 2015-08-03 12:01:11 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java 2015-08-04 11:09:17 +0000
@@ -138,7 +138,7 @@
set.add( ou );
DataQueryParams params = analyticsService.getFromUrl( set, null, AggregationType.SUM, null,
- false, false, false, false, false, false, displayProperty, null, null, null, null, null, null );
+ false, false, false, false, false, false, false, displayProperty, null, null, null, null, null, null );
DimensionalObject dim = params.getDimension( DimensionalObject.ORGUNIT_DIM_ID );