dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27416
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13657: Minor
------------------------------------------------------------
revno: 13657
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-01-08 13:27:55 +0100
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AppController.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/AppController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AppController.java 2014-01-08 12:07:41 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AppController.java 2014-01-08 12:27:55 +0000
@@ -71,7 +71,7 @@
private ResourceLoader resourceLoader = new DefaultResourceLoader();
- @RequestMapping(value = RESOURCE_PATH, method = RequestMethod.GET)
+ @RequestMapping( value = RESOURCE_PATH, method = RequestMethod.GET )
public String getApps( Model model )
{
List<App> apps = appManager.getApps();
@@ -81,10 +81,10 @@
return "apps";
}
- @RequestMapping(value = RESOURCE_PATH, method = RequestMethod.POST)
- @ResponseStatus(HttpStatus.NO_CONTENT)
- @PreAuthorize("hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')")
- public void installApp( @RequestParam("file") MultipartFile file, HttpServletRequest request ) throws IOException
+ @RequestMapping( value = RESOURCE_PATH, method = RequestMethod.POST )
+ @ResponseStatus( HttpStatus.NO_CONTENT )
+ @PreAuthorize( "hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')" )
+ public void installApp( @RequestParam( "file" ) MultipartFile file, HttpServletRequest request ) throws IOException
{
File tempFile = File.createTempFile( "IMPORT_", "_ZIP" );
file.transferTo( tempFile );
@@ -92,17 +92,17 @@
appManager.installApp( tempFile, file.getOriginalFilename(), getBaseUrl( request ) );
}
- @RequestMapping(value = RESOURCE_PATH, method = RequestMethod.PUT)
- @ResponseStatus(HttpStatus.NO_CONTENT)
- @PreAuthorize("hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')")
+ @RequestMapping( value = RESOURCE_PATH, method = RequestMethod.PUT )
+ @ResponseStatus( HttpStatus.NO_CONTENT )
+ @PreAuthorize( "hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')" )
public void reloadApps()
{
appManager.reloadApps();
}
- @RequestMapping(value = "/apps/{app}/**", method = RequestMethod.GET)
- @PreAuthorize("hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')")
- public void renderApp( @PathVariable("app") String app, HttpServletRequest request, HttpServletResponse response ) throws IOException
+ @RequestMapping( value = "/apps/{app}/**", method = RequestMethod.GET )
+ @PreAuthorize( "hasRole('ALL') or hasRole('M_dhis-web-maintenance-appmanager')" )
+ public void renderApp( @PathVariable( "app" ) String app, HttpServletRequest request, HttpServletResponse response ) throws IOException
{
Iterable<Resource> locations = Lists.newArrayList(
resourceLoader.getResource( "file:" + appManager.getAppFolderPath() + "/" + app + "/" ),
@@ -146,7 +146,7 @@
if ( new ServletWebRequest( request ).checkNotModified( resource.lastModified() ) )
{
- response.setStatus( HttpStatus.NOT_MODIFIED.value() );
+ response.setStatus( HttpServletResponse.SC_NOT_MODIFIED );
return;
}