=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java 2014-06-27 13:15:43 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistration.java 2014-08-12 05:22:04 +0000 @@ -32,7 +32,6 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DxfNamespaces; import org.hisp.dhis.common.ImportableObject; @@ -46,7 +45,7 @@ /** * @author Lars Helge Overland */ -@JacksonXmlRootElement(localName = "completeDataSetRegistration", namespace = DxfNamespaces.DXF_2_0) +@JacksonXmlRootElement( localName = "completeDataSetRegistration", namespace = DxfNamespaces.DXF_2_0 ) public class CompleteDataSetRegistration implements ImportableObject, Serializable { @@ -77,7 +76,7 @@ { } - public CompleteDataSetRegistration( DataSet dataSet, Period period, OrganisationUnit source, + public CompleteDataSetRegistration( DataSet dataSet, Period period, OrganisationUnit source, DataElementCategoryOptionCombo attributeOptionCombo, Date date, String storedBy ) { this.dataSet = dataSet; @@ -99,10 +98,10 @@ int result = 1; - result = prime * result + ( ( dataSet == null ) ? 0 : dataSet.hashCode() ); - result = prime * result + ( ( period == null ) ? 0 : period.hashCode() ); - result = prime * result + ( ( source == null ) ? 0 : source.hashCode() ); - result = prime * result + ( ( attributeOptionCombo == null ) ? 0 : attributeOptionCombo.hashCode() ); + result = prime * result + ((dataSet == null) ? 0 : dataSet.hashCode()); + result = prime * result + ((period == null) ? 0 : period.hashCode()); + result = prime * result + ((source == null) ? 0 : source.hashCode()); + result = prime * result + ((attributeOptionCombo == null) ? 0 : attributeOptionCombo.hashCode()); return result; } @@ -174,16 +173,14 @@ { return false; } - + return true; } @Override public String toString() { - String toString = "[" + dataSet + ", " + period + ", " + source + ", " + attributeOptionCombo + ", " + date + "]"; - - return toString; + return "[" + dataSet + ", " + period + ", " + source + ", " + attributeOptionCombo + ", " + date + "]"; } public String getName() @@ -196,8 +193,8 @@ // ------------------------------------------------------------------------- @JsonProperty - @JsonSerialize(as = BaseIdentifiableObject.class) - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JsonSerialize( as = BaseIdentifiableObject.class ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public DataSet getDataSet() { return dataSet; @@ -209,8 +206,8 @@ } @JsonProperty - @JsonSerialize(as = BaseIdentifiableObject.class) - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JsonSerialize( as = BaseIdentifiableObject.class ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public Period getPeriod() { return period; @@ -221,9 +218,9 @@ this.period = period; } - @JsonProperty(value = "organisationUnit") - @JsonSerialize(as = BaseIdentifiableObject.class) - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JsonProperty( value = "organisationUnit" ) + @JsonSerialize( as = BaseIdentifiableObject.class ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public OrganisationUnit getSource() { return source; @@ -234,8 +231,8 @@ this.source = source; } - @JsonSerialize(as = BaseIdentifiableObject.class) - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JsonSerialize( as = BaseIdentifiableObject.class ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public DataElementCategoryOptionCombo getAttributeOptionCombo() { return attributeOptionCombo; @@ -247,7 +244,7 @@ } @JsonProperty - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public Date getDate() { return date; @@ -259,7 +256,7 @@ } @JsonProperty - @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getStoredBy() { return storedBy; === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2014-03-27 04:44:41 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2014-08-12 05:22:04 +0000 @@ -81,7 +81,7 @@ private String text; @Scanned - private List comments = new ArrayList(); + private List comments = new ArrayList<>(); // ------------------------------------------------------------------------- // Constructors === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DashboardController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DashboardController.java 2014-07-30 09:46:29 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DashboardController.java 2014-08-12 05:22:04 +0000 @@ -59,15 +59,15 @@ * @author Lars Helge Overland */ @Controller -@RequestMapping(value = DashboardSchemaDescriptor.API_ENDPOINT) +@RequestMapping( value = DashboardSchemaDescriptor.API_ENDPOINT ) public class DashboardController extends AbstractCrudController { @Autowired private DashboardService dashboardService; - @RequestMapping(value = "/q/{query}", method = RequestMethod.GET) - public String search( @PathVariable String query, @RequestParam(required = false) Set max, + @RequestMapping( value = "/q/{query}", method = RequestMethod.GET ) + public String search( @PathVariable String query, @RequestParam( required = false ) Set max, Model model, HttpServletResponse response ) throws Exception { DashboardSearchResult result = dashboardService.search( query, max ); @@ -78,7 +78,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 { Dashboard dashboard = JacksonUtils.fromJson( input, Dashboard.class ); @@ -90,9 +90,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 { Dashboard dashboard = dashboardService.getDashboard( uid ); @@ -109,7 +109,7 @@ dashboardService.updateDashboard( dashboard ); } - @RequestMapping(value = "/{uid}/items", method = RequestMethod.POST, consumes = "application/json") + @RequestMapping( value = "/{uid}/items", method = RequestMethod.POST, consumes = "application/json" ) public void postJsonItem( HttpServletResponse response, HttpServletRequest request, InputStream input, @PathVariable String uid ) throws Exception { @@ -132,9 +132,9 @@ ContextUtils.createdResponse( response, "Dashboard item created", item.getUid() ); } - @RequestMapping(value = "/{dashboardUid}/items/content", method = RequestMethod.POST) + @RequestMapping( value = "/{dashboardUid}/items/content", method = RequestMethod.POST ) public void postJsonItemContent( HttpServletResponse response, HttpServletRequest request, - @PathVariable String dashboardUid, @RequestParam String type, @RequestParam("id") String contentUid ) throws Exception + @PathVariable String dashboardUid, @RequestParam String type, @RequestParam( "id" ) String contentUid ) throws Exception { boolean result = dashboardService.addItemContent( dashboardUid, type, contentUid ); @@ -148,7 +148,7 @@ } } - @RequestMapping(value = "/{dashboardUid}/items/{itemUid}/position/{position}", method = RequestMethod.POST) + @RequestMapping( value = "/{dashboardUid}/items/{itemUid}/position/{position}", method = RequestMethod.POST ) public void moveItem( HttpServletResponse response, HttpServletRequest request, @PathVariable String dashboardUid, @PathVariable String itemUid, @PathVariable int position ) throws Exception { @@ -168,7 +168,7 @@ } } - @RequestMapping(value = "/{dashboardUid}/items/{itemUid}", method = RequestMethod.DELETE) + @RequestMapping( value = "/{dashboardUid}/items/{itemUid}", method = RequestMethod.DELETE ) public void deleteItem( HttpServletResponse response, HttpServletRequest request, @PathVariable String dashboardUid, @PathVariable String itemUid ) { @@ -188,7 +188,7 @@ } } - @RequestMapping(value = "/{dashboardUid}/items/{itemUid}/content/{contentUid}", method = RequestMethod.DELETE) + @RequestMapping( value = "/{dashboardUid}/items/{itemUid}/content/{contentUid}", method = RequestMethod.DELETE ) public void deleteItemContent( HttpServletResponse response, HttpServletRequest request, @PathVariable String dashboardUid, @PathVariable String itemUid, @PathVariable String contentUid ) {