=== 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 2012-05-30 10:54:11 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java 2012-05-31 17:02:03 +0000 @@ -170,7 +170,6 @@ metaData.setPager( pager ); entityList = new ArrayList( manager.getBetween( getEntityClass(), pager.getOffset(), pager.getPageSize() ) ); - } else { @@ -233,13 +232,16 @@ try { return (T) Class.forName( getEntityName() ).newInstance(); - } catch ( InstantiationException e ) - { - throw new RuntimeException( e ); - } catch ( IllegalAccessException e ) - { - throw new RuntimeException( e ); - } catch ( ClassNotFoundException e ) + } + catch ( InstantiationException e ) + { + throw new RuntimeException( e ); + } + catch ( IllegalAccessException e ) + { + throw new RuntimeException( e ); + } + catch ( ClassNotFoundException e ) { throw new RuntimeException( e ); } === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java 2012-03-22 15:11:32 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java 2012-05-31 17:02:03 +0000 @@ -79,9 +79,9 @@ @Autowired private I18nManager i18nManager; - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // GET - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( method = RequestMethod.GET ) public void getAggregatedValues( === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardContentController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardContentController.java 2012-05-27 21:50:00 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardContentController.java 2012-05-31 17:02:03 +0000 @@ -58,9 +58,9 @@ @Autowired private DashboardService dashboardService; - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // GET - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( method = RequestMethod.GET ) public String getDashboardContents( IdentifiableObjectParams params, Model model, HttpServletRequest request ) @@ -100,9 +100,9 @@ return "dashboardContent"; } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // POST - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( method = RequestMethod.POST, headers = {"Content-Type=application/xml, text/xml"} ) @ResponseStatus( value = HttpStatus.CREATED ) @@ -118,9 +118,9 @@ throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() ); } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // PUT - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, headers = {"Content-Type=application/xml, text/xml"} ) @ResponseStatus( value = HttpStatus.NO_CONTENT ) @@ -136,9 +136,9 @@ throw new HttpRequestMethodNotSupportedException( RequestMethod.PUT.toString() ); } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // DELETE - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/{uid}", method = RequestMethod.DELETE ) @ResponseStatus( value = HttpStatus.NO_CONTENT ) === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/IndexController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/IndexController.java 2012-03-22 15:04:58 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/IndexController.java 2012-05-31 17:02:03 +0000 @@ -38,9 +38,9 @@ @Controller public class IndexController { - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // GET - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/api", method = RequestMethod.GET ) public String getIndex( Model model ) === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MessageConversationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MessageConversationController.java 2012-05-30 10:54:11 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MessageConversationController.java 2012-05-31 17:02:03 +0000 @@ -91,9 +91,9 @@ return entityList; } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // POST for new MessageConversation - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @Override @PreAuthorize( "hasRole('ALL') or hasRole('F_SEND_MESSAGE')" ) @@ -119,9 +119,9 @@ response.setHeader( "Location", MessageConversationController.RESOURCE_PATH + "/" + m.getUid() ); } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // POST for reply on existing MessageConversation - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/{uid}", method = RequestMethod.POST ) public void postMessageConversationReply( @PathVariable( "uid" ) String uid, @RequestBody String body, @@ -134,9 +134,9 @@ messageService.sendReply( messageConversation, body, metaData ); } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // POST for feedback - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/feedback", method = RequestMethod.POST ) public void postMessageConversationFeedback( @RequestParam( "subject" ) String subject, @RequestBody String body, === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-05-28 15:41:40 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-05-31 17:02:03 +0000 @@ -68,9 +68,9 @@ @Autowired private ContextUtils contextUtils; - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // Export - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = MetaDataController.RESOURCE_PATH, method = RequestMethod.GET ) @PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" ) @@ -143,16 +143,15 @@ JacksonUtils.toJsonWithView( gzip, metaData, ExportView.class ); } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // Import - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = MetaDataController.RESOURCE_PATH, method = RequestMethod.POST, headers = {"Content-Type=application/xml, text/*"} ) @PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_IMPORT')" ) public void importXml( ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request ) throws JAXBException, IOException { MetaData metaData = JacksonUtils.fromXml( request.getInputStream(), MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); @@ -165,7 +164,6 @@ public void importJson( ImportOptions importOptions, HttpServletResponse response, HttpServletRequest request ) throws IOException { MetaData metaData = JacksonUtils.fromJson( request.getInputStream(), MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); @@ -181,7 +179,6 @@ zip.getNextEntry(); MetaData metaData = JacksonUtils.fromXml( zip, MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); @@ -197,7 +194,6 @@ zip.getNextEntry(); MetaData metaData = JacksonUtils.fromJson( zip, MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); @@ -213,7 +209,6 @@ GZIPInputStream gzip = new GZIPInputStream( request.getInputStream() ); MetaData metaData = JacksonUtils.fromXml( gzip, MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); @@ -228,7 +223,6 @@ GZIPInputStream gzip = new GZIPInputStream( request.getInputStream() ); MetaData metaData = JacksonUtils.fromJson( gzip, MetaData.class ); - System.err.println( metaData ); ImportSummary summary = importService.importMetaData( metaData, importOptions ); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java 2012-05-28 14:25:12 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java 2012-05-31 17:02:03 +0000 @@ -89,9 +89,9 @@ getReport( uid, organisationUnitUid, period, response, "xls", ContextUtils.CONTENT_TYPE_EXCEL, true ); } - // ------------------------------------------------------------------------------------------------------- + // ------------------------------------------------------------------------- // Supportive methods - // ------------------------------------------------------------------------------------------------------- + // ------------------------------------------------------------------------- private void getReport( String uid, String organisationUnitUid, String period, HttpServletResponse response, String type, String contentType, boolean attachment ) throws Exception === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SmsConfigurationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SmsConfigurationController.java 2012-05-27 21:50:00 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SmsConfigurationController.java 2012-05-31 17:02:03 +0000 @@ -89,9 +89,9 @@ } - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // POST - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( method = RequestMethod.PUT ) public String putSmsConfig( @RequestBody SmsConfiguration smsConfiguration, Model model ) throws Exception === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2012-03-22 10:00:23 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2012-05-31 17:02:03 +0000 @@ -44,9 +44,9 @@ { public static final String RESOURCE_PATH = "/system"; - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- // UID Generator - //------------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------- @RequestMapping( value = "/uid", method = RequestMethod.GET ) public void getUid( HttpServletResponse response ) throws IOException