=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java 2014-06-11 20:02:58 +0000 @@ -28,8 +28,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import org.hisp.dhis.setting.SystemSettingManager; import org.hisp.dhis.webapi.utils.ContextUtils; -import org.hisp.dhis.setting.SystemSettingManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; @@ -48,18 +48,18 @@ * @author Lars Helge Overland */ @Controller -@RequestMapping("/systemSettings") +@RequestMapping( "/systemSettings" ) public class SystemSettingController { @Autowired private SystemSettingManager systemSettingManager; - @RequestMapping(value = "/{key}", method = RequestMethod.POST, consumes = { ContextUtils.CONTENT_TYPE_TEXT, ContextUtils.CONTENT_TYPE_HTML }) - @PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')") + @RequestMapping( value = "/{key}", method = RequestMethod.POST, consumes = { ContextUtils.CONTENT_TYPE_TEXT, ContextUtils.CONTENT_TYPE_HTML } ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" ) public void setSystemSetting( @PathVariable String key, - @RequestParam(required = false) String value, - @RequestBody(required = false) String valuePayload, HttpServletResponse response ) + @RequestParam( required = false ) String value, + @RequestBody( required = false ) String valuePayload, HttpServletResponse response ) { if ( key == null ) { @@ -80,8 +80,8 @@ } @RequestMapping( method = RequestMethod.POST, consumes = { ContextUtils.CONTENT_TYPE_JSON } ) - @PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')") - public void setSystemSetting( @RequestBody Map settings, HttpServletResponse response ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" ) + public void setSystemSetting( @RequestBody Map settings, HttpServletResponse response ) { for ( String key : settings.keySet() ) { @@ -91,23 +91,23 @@ ContextUtils.okResponse( response, "System settings imported" ); } - @RequestMapping(value = "/{key}", method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_TEXT) - public @ResponseBody String getSystemSetting( @PathVariable("key") String key ) + @RequestMapping( value = "/{key}", method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_TEXT ) + public @ResponseBody String getSystemSetting( @PathVariable( "key" ) String key ) { Serializable setting = systemSettingManager.getSystemSetting( key ); return setting != null ? String.valueOf( setting ) : null; } - @RequestMapping(method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_JSON) + @RequestMapping( method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_JSON ) public @ResponseBody Map getSystemSetting() { return systemSettingManager.getSystemSettingsAsMap(); } - @RequestMapping(value = "/{key}", method = RequestMethod.DELETE) - @PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')") - public void removeSystemSetting( @PathVariable("key") String key ) + @RequestMapping( value = "/{key}", method = RequestMethod.DELETE ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" ) + public void removeSystemSetting( @PathVariable( "key" ) String key ) { systemSettingManager.deleteSystemSetting( key ); } === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/WebMetaData.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/WebMetaData.java 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/WebMetaData.java 2014-06-11 20:02:58 +0000 @@ -46,7 +46,7 @@ private LinkableObject linkableObject; @JsonProperty - @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public Pager getPager() { return pager; @@ -58,7 +58,7 @@ } @JsonProperty - @JacksonXmlProperty( isAttribute = true, namespace = DxfNamespaces.DXF_2_0) + @JacksonXmlProperty( isAttribute = true, namespace = DxfNamespaces.DXF_2_0 ) public String getLink() { if ( linkableObject == null )