dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28931
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14534: support sharing in include/exclude filter
------------------------------------------------------------
revno: 14534
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-03-30 14:54:54 +0700
message:
support sharing in include/exclude filter
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java 2014-03-27 11:55:28 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java 2014-03-30 07:54:54 +0000
@@ -176,6 +176,19 @@
response.setContentType( MediaType.APPLICATION_JSON_VALUE + "; charset=UTF-8" );
+ ReflectionUtils.invokeSetterMethod( ExchangeClasses.getAllExportMap().get( getEntityClass() ), metaData, entityList );
+
+ String viewClass = options.getViewClass( "basic" );
+
+ if ( viewClass.equals( "basic" ) )
+ {
+ handleLinksAndAccess( options, metaData, entityList, false );
+ }
+ else
+ {
+ handleLinksAndAccess( options, metaData, entityList, true );
+ }
+
// enable property filter
if ( include != null || exclude != null )
{
@@ -200,19 +213,6 @@
}
else
{
- ReflectionUtils.invokeSetterMethod( ExchangeClasses.getAllExportMap().get( getEntityClass() ), metaData, entityList );
-
- String viewClass = options.getViewClass( "basic" );
-
- if ( viewClass.equals( "basic" ) )
- {
- handleLinksAndAccess( options, metaData, entityList, false );
- }
- else
- {
- handleLinksAndAccess( options, metaData, entityList, true );
- }
-
renderService.toJson( response.getOutputStream(), metaData, JacksonUtils.getViewClass( viewClass ) );
}
}