=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-02-13 03:57:52 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-02-26 17:45:20 +0000 @@ -219,7 +219,7 @@ * The list of OrganisationUnits the ReportTable contains. */ @Scanned - private List units = new ArrayList(); + private List organisationUnits = new ArrayList(); /** * The list of OrganisationUnitGroups the ReportTable contains. @@ -370,26 +370,23 @@ /** * Default constructor. * - * @param name the name. - * @param dataElements the data elements. - * @param indicators the indicators. - * @param dataSets the datasets. - * @param periods the periods. These periods cannot have the name property - * set. + * @param name the name. + * @param dataElements the data elements. + * @param indicators the indicators. + * @param dataSets the data sets. + * @param periods the periods. Cannot have the name property set. * @param relativePeriods the relative periods. These periods must have the * name property set. Not persisted. - * @param units the organisation units. - * @param relativeUnits the organisation units. Not persisted. - * @param doIndicators indicating whether indicators should be - * crosstabulated. - * @param doPeriods indicating whether periods should be crosstabulated. - * @param doUnits indicating whether organisation units should be - * crosstabulated. - * @param relatives the relative periods. - * @param i18nFormat the i18n format. Not persisted. + * @param organisationUnits the organisation units. + * @param relativeUnits the organisation units. Not persisted. + * @param doIndicators indicating whether indicators should be crosstabulated. + * @param doPeriods indicating whether periods should be crosstabulated. + * @param doUnits indicating whether organisation units should be crosstabulated. + * @param relatives the relative periods. + * @param i18nFormat the i18n format. Not persisted. */ public ReportTable( String name, List dataElements, List indicators, - List dataSets, List periods, List relativePeriods, List units, + List dataSets, List periods, List relativePeriods, List organisationUnits, List relativeUnits, List organisationUnitGroups, DataElementCategoryCombo categoryCombo, boolean doIndicators, boolean doPeriods, boolean doUnits, RelativePeriods relatives, ReportParams reportParams, @@ -401,7 +398,7 @@ this.dataSets = dataSets; this.periods = periods; this.relativePeriods = relativePeriods; - this.units = units; + this.organisationUnits = organisationUnits; this.relativeUnits = relativeUnits; this.organisationUnitGroups = organisationUnitGroups; this.categoryCombo = categoryCombo; @@ -423,7 +420,7 @@ verify( nonEmptyLists( dataElements, indicators, dataSets ) > 0, "Must contain dataelements, indicators or datasets" ); verify( nonEmptyLists( periods, relativePeriods ) > 0, "Must contain periods or relative periods" ); - verify( nonEmptyLists( units, relativeUnits, organisationUnitGroups ) > 0, + verify( nonEmptyLists( organisationUnits, relativeUnits, organisationUnitGroups ) > 0, "Must contain organisation units, relative organisation units or organisation unit groups" ); verify( !(doTotal() && regression), "Cannot have regression columns with total columns" ); verify( i18nFormat != null, "I18n format must be set" ); @@ -459,7 +456,7 @@ } else { - allUnits.addAll( units ); + allUnits.addAll( organisationUnits ); allUnits.addAll( relativeUnits ); allUnits = removeDuplicates( allUnits ); } @@ -776,7 +773,7 @@ public void removeAllOrganisationUnits() { - units.clear(); + organisationUnits.clear(); } public void removeAllOrganisationUnitGroups() @@ -1053,14 +1050,14 @@ @JsonView( {DetailedView.class, ExportView.class} ) @JacksonXmlElementWrapper( localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0) @JacksonXmlProperty( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0) - public List getUnits() + public List getOrganisationUnits() { - return units; + return organisationUnits; } - public void setUnits( List units ) + public void setOrganisationUnits( List units ) { - this.units = units; + this.organisationUnits = units; } @JsonProperty @@ -1333,7 +1330,7 @@ organisationUnitGroups.addAll( reportTable.getOrganisationUnitGroups() ); removeAllOrganisationUnits(); - units.addAll( reportTable.getUnits() ); + organisationUnits.addAll( reportTable.getOrganisationUnits() ); removeAllPeriods(); periods.addAll( reportTable.getPeriods() ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2013-02-25 12:33:35 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2013-02-26 17:45:20 +0000 @@ -27,13 +27,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + import org.apache.commons.collections.CollectionUtils; import org.hisp.dhis.attribute.AttributeValue; import org.hisp.dhis.common.BaseIdentifiableObject; @@ -45,10 +43,12 @@ import org.hisp.dhis.common.view.ExportView; import org.hisp.dhis.organisationunit.OrganisationUnit; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.Set; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** * @author Nguyen Hong Duc === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java 2013-02-26 17:45:20 +0000 @@ -125,7 +125,7 @@ { for ( ReportTable reportTable : reportTableService.getAllReportTables() ) { - if ( reportTable.getUnits().remove( unit ) ) + if ( reportTable.getOrganisationUnits().remove( unit ) ) { reportTableService.updateReportTable( reportTable ); } === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml' --- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2013-02-08 07:18:39 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2013-02-26 17:45:20 +0000 @@ -57,7 +57,7 @@ foreign-key="fk_reporttable_periods_periodid" /> - + === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java' --- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java 2012-11-20 17:04:08 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java 2013-02-26 17:45:20 +0000 @@ -203,7 +203,7 @@ assertEquals( indicators, reportTableA.getIndicators() ); assertEquals( periods, reportTableA.getPeriods() ); assertEquals( relativePeriods, reportTableA.getRelativePeriods() ); - assertEquals( units, reportTableA.getUnits() ); + assertEquals( units, reportTableA.getOrganisationUnits() ); assertEquals( true, reportTableA.isDoIndicators() ); assertEquals( true, reportTableA.isDoPeriods() ); assertEquals( false, reportTableA.isDoUnits() ); @@ -213,7 +213,7 @@ assertEquals( dataElements, reportTableB.getDataElements() ); assertEquals( periods, reportTableB.getPeriods() ); assertEquals( relativePeriods, reportTableB.getRelativePeriods() ); - assertEquals( units, reportTableB.getUnits() ); + assertEquals( units, reportTableB.getOrganisationUnits() ); assertEquals( false, reportTableB.isDoIndicators() ); assertEquals( false, reportTableB.isDoPeriods() ); assertEquals( true, reportTableB.isDoUnits() ); @@ -223,7 +223,7 @@ assertEquals( dataSets, reportTableC.getDataSets() ); assertEquals( periods, reportTableC.getPeriods() ); assertEquals( relativePeriods, reportTableC.getRelativePeriods() ); - assertEquals( units, reportTableC.getUnits() ); + assertEquals( units, reportTableC.getOrganisationUnits() ); assertEquals( false, reportTableC.isDoIndicators() ); assertEquals( false, reportTableC.isDoPeriods() ); assertEquals( true, reportTableC.isDoUnits() ); === 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-01-07 14:31:20 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java 2013-02-26 17:45:20 +0000 @@ -257,7 +257,7 @@ table.setIndicators( indicators_ ); table.setDataElements( dataElements_ ); - table.setUnits( organisationUnits ); + table.setOrganisationUnits( organisationUnits ); table.setDoIndicators( crossTab != null && crossTab.contains( "data" ) ); table.setDoPeriods( crossTab != null && crossTab.contains( "periods" ) ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java 2012-09-23 14:24:14 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java 2013-02-26 17:45:20 +0000 @@ -391,7 +391,7 @@ selectedOrganisationUnitGroups = reportTable.getOrganisationUnitGroups(); - selectionTreeManager.setSelectedOrganisationUnits( reportTable.getUnits() ); + selectionTreeManager.setSelectedOrganisationUnits( reportTable.getOrganisationUnits() ); } return SUCCESS; === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2012-11-07 13:38:42 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2013-02-26 17:45:20 +0000 @@ -334,7 +334,7 @@ reportTable.setIndicators( indicators ); reportTable.setDataSets( dataSets ); reportTable.setPeriods( periods ); - reportTable.setUnits( units ); + reportTable.setOrganisationUnits( units ); reportTable.setOrganisationUnitGroups( organisationUnitGroups ); reportTable.setCategoryCombo( categoryCombo ); reportTable.setDoIndicators( doIndicators );