← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10201: allow save and update of report-tables for any user

 

------------------------------------------------------------
revno: 10201
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-14 15:04:13 +0700
message:
  allow save and update of report-tables for any user
modified:
  dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java
  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/ReportTableController.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-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java	2013-03-14 04:50:21 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java	2013-03-14 08:04:13 +0000
@@ -184,7 +184,7 @@
      * @param expressions the Criterions for the Criteria.
      * @return an object of the implementation Class type.
      */
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     protected final T getObject( Criterion... expressions )
     {
         return (T) getCriteria( expressions ).uniqueResult();
@@ -196,7 +196,7 @@
      * @param expressions the Criterions for the Criteria.
      * @return a List with objects of the implementation Class type.
      */
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     protected final List<T> getList( Criterion... expressions )
     {
         return getCriteria( expressions ).list();
@@ -262,7 +262,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public final T get( int id )
     {
         T object = (T) sessionFactory.getCurrentSession().get( getClazz(), id );
@@ -278,7 +278,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public final T load( int id )
     {
         T object = (T) sessionFactory.getCurrentSession().load( getClazz(), id );
@@ -369,7 +369,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public final List<T> getAll()
     {
         Query query = sharingEnabled() ? getQueryAllACL() : getQueryAll();
@@ -396,7 +396,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllEqName( String name )
     {
         Query query = sharingEnabled() ? getQueryAllEqNameACL( name ) : getQueryAllEqName( name );
@@ -428,7 +428,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllEqNameIgnoreCase( String name )
     {
         Query query = sharingEnabled() ? getQueryAllEqNameACLIgnoreCase( name ) : getQueryAllEqNameIgnoreCase( name );
@@ -460,7 +460,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllEqShortName( String shortName )
     {
         Query query = sharingEnabled() ? getQueryAllEqShortNameACL( shortName ) : getQueryAllEqShortName( shortName );
@@ -492,7 +492,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllEqShortNameIgnoreCase( String shortName )
     {
         Query query = sharingEnabled() ? getQueryAllEqShortNameACLIgnoreCase( shortName ) : getQueryAllEqShortNameIgnoreCase( shortName );
@@ -524,7 +524,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllLikeName( String name )
     {
         Query query = sharingEnabled() ? getQueryAllLikeNameACL( name ) : getQueryAllLikeName( name );
@@ -556,7 +556,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public final List<T> getAllOrderedName()
     {
         Query query = sharingEnabled() ? getQueryAllOrderedNameACL() : getQueryAllOrderedName();
@@ -584,7 +584,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllOrderedName( int first, int max )
     {
         Query query = sharingEnabled() ? getQueryAllOrderedNameACL() : getQueryAllOrderedName();
@@ -596,7 +596,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllOrderedLastUpdated( int first, int max )
     {
         Query query = sharingEnabled() ? getQueryAllOrderedLastUpdatedACL() : getQueryAllOrderedLastUpdated();
@@ -627,7 +627,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllLikeNameOrderedName( String name, int first, int max )
     {
         Query query = sharingEnabled() ? getQueryAllLikeNameOrderedNameACL( name ) : getQueryAllLikeNameOrderedName( name );
@@ -750,7 +750,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllGeLastUpdated( Date lastUpdated )
     {
         Query query = sharingEnabled() ? getQueryAllGeLastUpdatedACL( lastUpdated ) : getQueryAllGeLastUpdated( lastUpdated );
@@ -782,7 +782,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllGeCreated( Date created )
     {
         Query query = sharingEnabled() ? getQueryAllGeCreatedACL( created ) : getQueryAllGeCreated( created );
@@ -814,7 +814,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getAllGeLastUpdatedOrderedName( Date lastUpdated )
     {
         Query query = sharingEnabled() ? getQueryAllGeLastUpdatedOrderedNameACL( lastUpdated ) : getQueryAllGeLastUpdatedOrderedName( lastUpdated );
@@ -846,7 +846,7 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public List<T> getByUser( User user )
     {
         Query query = getQuery( "from " + clazz.getName() + " c where user = :user" );

=== 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	2013-02-25 12:33:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2013-03-14 08:04:13 +0000
@@ -173,14 +173,12 @@
     //--------------------------------------------------------------------------
 
     @RequestMapping( method = RequestMethod.POST, consumes = { "application/xml", "text/xml" } )
-    @PreAuthorize( "hasRole('ALL')" )
     public void postXmlObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception
     {
         throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
     }
 
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
-    @PreAuthorize( "hasRole('ALL')" )
     public void postJsonObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception
     {
         throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
@@ -192,7 +190,6 @@
 
     @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = { "application/xml", "text/xml" } )
     @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL')" )
     public void putXmlObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
     {
         throw new HttpRequestMethodNotSupportedException( RequestMethod.PUT.toString() );
@@ -200,7 +197,6 @@
 
     @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = "application/json" )
     @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL')" )
     public void putJsonObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
     {
         throw new HttpRequestMethodNotSupportedException( RequestMethod.PUT.toString() );
@@ -212,7 +208,6 @@
 
     @RequestMapping( value = "/{uid}", method = RequestMethod.DELETE )
     @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL')" )
     public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid ) throws Exception
     {
         throw new HttpRequestMethodNotSupportedException( RequestMethod.DELETE.toString() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2013-03-14 06:44:33 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2013-03-14 08:04:13 +0000
@@ -77,7 +77,7 @@
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping(value = ReportTableController.RESOURCE_PATH)
+@RequestMapping( value = ReportTableController.RESOURCE_PATH )
 public class ReportTableController
     extends AbstractCrudController<ReportTable>
 {
@@ -120,7 +120,7 @@
     //--------------------------------------------------------------------------
 
     @Override
-    @RequestMapping(method = RequestMethod.POST, consumes = "application/json")
+    @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
     public void postJsonObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception
     {
         ReportTable reportTable = JacksonUtils.fromJson( input, ReportTable.class );
@@ -135,9 +135,9 @@
     }
 
     @Override
-    @RequestMapping(value = "/{uid}", method = RequestMethod.PUT, consumes = "application/json")
-    @ResponseStatus(value = HttpStatus.NO_CONTENT)
-    public void putJsonObject( HttpServletResponse response, HttpServletRequest request, @PathVariable("uid") String uid, InputStream input ) throws Exception
+    @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = "application/json" )
+    @ResponseStatus( value = HttpStatus.NO_CONTENT )
+    public void putJsonObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
     {
         ReportTable reportTable = reportTableService.getReportTable( uid );
 
@@ -159,9 +159,9 @@
     }
 
     @Override
-    @RequestMapping(value = "/{uid}", method = RequestMethod.DELETE)
-    @ResponseStatus(value = HttpStatus.NO_CONTENT)
-    public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable("uid") String uid ) throws Exception
+    @RequestMapping( value = "/{uid}", method = RequestMethod.DELETE )
+    @ResponseStatus( value = HttpStatus.NO_CONTENT )
+    public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid ) throws Exception
     {
         ReportTable reportTable = reportTableService.getReportTable( uid );
 
@@ -199,14 +199,14 @@
     // GET - Dynamic data
     //--------------------------------------------------------------------------
 
-    @RequestMapping(value = "/data", method = RequestMethod.GET) // For json, jsonp
-    public String getReportTableDynamicData( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data", method = RequestMethod.GET ) // For json, jsonp
+    public String getReportTableDynamicData( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         Model model,
         HttpServletResponse response ) throws Exception
@@ -221,14 +221,14 @@
         return grid != null ? "reportTableData" : null;
     }
 
-    @RequestMapping(value = "/data.html", method = RequestMethod.GET)
-    public void getReportTableDynamicDataHtml( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data.html", method = RequestMethod.GET )
+    public void getReportTableDynamicDataHtml( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         HttpServletResponse response ) throws Exception
     {
@@ -241,14 +241,14 @@
         GridUtils.toHtml( grid, response.getWriter() );
     }
 
-    @RequestMapping(value = "/data.xml", method = RequestMethod.GET)
-    public void getReportTableDynamicDataXml( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data.xml", method = RequestMethod.GET )
+    public void getReportTableDynamicDataXml( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         HttpServletResponse response ) throws Exception
     {
@@ -261,14 +261,14 @@
         GridUtils.toXml( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/data.pdf", method = RequestMethod.GET)
-    public void getReportTableDynamicDataPdf( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data.pdf", method = RequestMethod.GET )
+    public void getReportTableDynamicDataPdf( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         HttpServletResponse response ) throws Exception
     {
@@ -281,14 +281,14 @@
         GridUtils.toPdf( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/data.xls", method = RequestMethod.GET)
-    public void getReportTableDynamicDataXls( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data.xls", method = RequestMethod.GET )
+    public void getReportTableDynamicDataXls( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         HttpServletResponse response ) throws Exception
     {
@@ -301,14 +301,14 @@
         GridUtils.toXls( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/data.csv", method = RequestMethod.GET)
-    public void getReportTableDynamicDataCsv( @RequestParam(required = false, value = "in") List<String> indicators,
-        @RequestParam(required = false, value = "de") List<String> dataElements,
-        @RequestParam(required = false, value = "ds") List<String> dataSets,
-        @RequestParam(value = "ou") List<String> orgUnits,
-        @RequestParam(required = false, value = "crosstab") List<String> crossTab,
-        @RequestParam(required = false) boolean orgUnitIsParent,
-        @RequestParam(required = false) boolean minimal,
+    @RequestMapping( value = "/data.csv", method = RequestMethod.GET )
+    public void getReportTableDynamicDataCsv( @RequestParam( required = false, value = "in" ) List<String> indicators,
+        @RequestParam( required = false, value = "de" ) List<String> dataElements,
+        @RequestParam( required = false, value = "ds" ) List<String> dataSets,
+        @RequestParam( value = "ou" ) List<String> orgUnits,
+        @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
+        @RequestParam( required = false ) boolean orgUnitIsParent,
+        @RequestParam( required = false ) boolean minimal,
         RelativePeriods relatives,
         HttpServletResponse response ) throws Exception
     {
@@ -372,10 +372,10 @@
     // GET - Report table data
     //--------------------------------------------------------------------------
 
-    @RequestMapping(value = "/{uid}/data", method = RequestMethod.GET) // For json, jsonp
-    public String getReportTableData( @PathVariable("uid") String uid, Model model,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data", method = RequestMethod.GET ) // For json, jsonp
+    public String getReportTableData( @PathVariable( "uid" ) String uid, Model model,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         model.addAttribute( "model", getReportTableGrid( uid, organisationUnitUid, period ) );
@@ -384,10 +384,10 @@
         return "grid";
     }
 
-    @RequestMapping(value = "/{uid}/data.html", method = RequestMethod.GET)
-    public void getReportTableHtml( @PathVariable("uid") String uid,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data.html", method = RequestMethod.GET )
+    public void getReportTableHtml( @PathVariable( "uid" ) String uid,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         Grid grid = getReportTableGrid( uid, organisationUnitUid, period );
@@ -398,10 +398,10 @@
         GridUtils.toHtml( grid, response.getWriter() );
     }
 
-    @RequestMapping(value = "/{uid}/data.xml", method = RequestMethod.GET)
-    public void getReportTableXml( @PathVariable("uid") String uid,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data.xml", method = RequestMethod.GET )
+    public void getReportTableXml( @PathVariable( "uid" ) String uid,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         Grid grid = getReportTableGrid( uid, organisationUnitUid, period );
@@ -412,10 +412,10 @@
         GridUtils.toXml( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/{uid}/data.pdf", method = RequestMethod.GET)
-    public void getReportTablePdf( @PathVariable("uid") String uid,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data.pdf", method = RequestMethod.GET )
+    public void getReportTablePdf( @PathVariable( "uid" ) String uid,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         Grid grid = getReportTableGrid( uid, organisationUnitUid, period );
@@ -426,10 +426,10 @@
         GridUtils.toPdf( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/{uid}/data.xls", method = RequestMethod.GET)
-    public void getReportTableXls( @PathVariable("uid") String uid,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data.xls", method = RequestMethod.GET )
+    public void getReportTableXls( @PathVariable( "uid" ) String uid,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         Grid grid = getReportTableGrid( uid, organisationUnitUid, period );
@@ -440,10 +440,10 @@
         GridUtils.toXls( grid, response.getOutputStream() );
     }
 
-    @RequestMapping(value = "/{uid}/data.csv", method = RequestMethod.GET)
-    public void getReportTableCsv( @PathVariable("uid") String uid,
-        @RequestParam(value = "ou", required = false) String organisationUnitUid,
-        @RequestParam(value = "pe", required = false) String period,
+    @RequestMapping( value = "/{uid}/data.csv", method = RequestMethod.GET )
+    public void getReportTableCsv( @PathVariable( "uid" ) String uid,
+        @RequestParam( value = "ou", required = false ) String organisationUnitUid,
+        @RequestParam( value = "pe", required = false ) String period,
         HttpServletResponse response ) throws Exception
     {
         Grid grid = getReportTableGrid( uid, organisationUnitUid, period );