=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/pivottable/PivotTableService.java 2011-03-14 20:44:04 +0000 @@ -37,12 +37,12 @@ /** * Returns a PivotTable object. * - * @param indicatorGroupId the identifier of the IndicatorGroup. + * @param groupId the identifier of the IndicatorGroup. * @param periodTypeName the identifier of the PeriodType. * @param startDate the start date string. * @param endDate the end date string. * @param level the OrganisationUnit level. * @return a PivotTable object. */ - PivotTable getPivotTable( int indicatorGroupId, String periodTypeName, String startDate, String endDate, int level ); + PivotTable getPivotTable( int groupId, String periodTypeName, String startDate, String endDate, int level ); } === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java 2011-03-14 19:34:32 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pivottable/impl/DefaultPivotTableService.java 2011-03-14 20:44:04 +0000 @@ -99,7 +99,7 @@ // PivotTableService implementation // ------------------------------------------------------------------------- - public PivotTable getPivotTable( int indicatorGroupId, String periodTypeName, String startDate, String endDate, int organisationUnitId ) + public PivotTable getPivotTable( int groupId, String periodTypeName, String startDate, String endDate, int organisationUnitId ) { PeriodType periodType = PeriodType.getPeriodTypeByName( periodTypeName ); @@ -109,10 +109,10 @@ List organisationUnits = new ArrayList( organisationUnitService.getOrganisationUnit( organisationUnitId ).getChildren() ); - List indicators = null; + List indicators = null; Collection indicatorValues = null; - if ( indicatorGroupId == -1 ) // -1 -> All + if ( groupId == -1 ) // -1 -> All { indicators = new ArrayList( indicatorService.getAllIndicators() ); @@ -122,7 +122,7 @@ } else { - indicators = new ArrayList( indicatorService.getIndicatorGroup( indicatorGroupId ).getMembers() ); + indicators = new ArrayList( indicatorService.getIndicatorGroup( groupId ).getMembers() ); indicatorValues = aggregatedDataValueService.getAggregatedIndicatorValues( ConversionUtils.getIdentifiers( Indicator.class, indicators ), === removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetIndicatorGroupsAction.java 1970-01-01 00:00:00 +0000 @@ -1,81 +0,0 @@ -package org.hisp.dhis.reporting.pivottable.action; - -/* - * Copyright (c) 2004-2010, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorService; -import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetIndicatorGroupsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List indicatorGroups; - - public List getIndicatorGroups() - { - return indicatorGroups; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - indicatorGroups = new ArrayList( indicatorService.getAllIndicatorGroups() ); - - Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetOrganisationUnitLevelsAction.java 1970-01-01 00:00:00 +0000 @@ -1,76 +0,0 @@ -package org.hisp.dhis.reporting.pivottable.action; - -/* - * Copyright (c) 2004-2010, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.List; - -import org.hisp.dhis.organisationunit.OrganisationUnitLevel; -import org.hisp.dhis.organisationunit.OrganisationUnitService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetOrganisationUnitLevelsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List levels; - - public List getLevels() - { - return levels; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - levels = organisationUnitService.getOrganisationUnitLevels(); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/pivottable/action/GetPeriodTypesAction.java 1970-01-01 00:00:00 +0000 @@ -1,76 +0,0 @@ -package org.hisp.dhis.reporting.pivottable.action; - -/* - * Copyright (c) 2004-2010, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.List; - -import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.period.PeriodType; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetPeriodTypesAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private PeriodService periodService; - - public void setPeriodService( PeriodService periodService ) - { - this.periodService = periodService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private List periodTypes; - - public List getPeriodTypes() - { - return periodTypes; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - periodTypes = periodService.getAllPeriodTypes(); - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-03-11 12:35:11 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2011-03-14 20:51:30 +0000 @@ -346,27 +346,6 @@ - - - - - - - - - - - - === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-03-11 12:35:11 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-03-14 20:51:30 +0000 @@ -252,22 +252,7 @@ /dhis-web-reporting/responsePivotTable.vm plainTextError - - - /dhis-web-reporting/responseOrganisationUnitLevel.vm - plainTextError - - - - /dhis-web-reporting/responsePeriodType.vm - plainTextError - - - - /dhis-web-reporting/responseIndicatorGroup.vm - plainTextError - - +