=== removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLayerAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLayerAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLayerAction.java 1970-01-01 00:00:00 +0000 @@ -1,129 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class AddOrUpdateMapLayerAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private String type; - - public void setType( String type ) - { - this.type = type; - } - - private String url; - - public void setUrl( String url ) - { - this.url = url; - } - - private String layers; - - public void setLayers( String layers ) - { - this.layers = layers; - } - - private String time; - - public void setTime( String time ) - { - this.time = time; - } - - private String fillColor; - - public void setFillColor( String fillColor ) - { - this.fillColor = fillColor; - } - - private double fillOpacity; - - public void setFillOpacity( double fillOpacity ) - { - this.fillOpacity = fillOpacity; - } - - private String strokeColor; - - public void setStrokeColor( String strokeColor ) - { - this.strokeColor = strokeColor; - } - - private int strokeWidth; - - public void setStrokeWidth( int strokeWidth ) - { - this.strokeWidth = strokeWidth; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - mappingService.addOrUpdateMapLayer( name, type, url, layers, time, fillColor, fillOpacity, strokeColor, strokeWidth ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendAction.java 1970-01-01 00:00:00 +0000 @@ -1,102 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class AddOrUpdateMapLegendAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private String startValue; - - public void setStartValue( String startValue ) - { - this.startValue = startValue; - } - - private String endValue; - - public void setEndValue( String endValue ) - { - this.endValue = endValue; - } - - private String color; - - public void setColor( String color ) - { - this.color = color; - } - - private String image; - - public void setImage( String image ) - { - this.image = image; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - this.mappingService.addOrUpdateMapLegend( name, Double.parseDouble( startValue ), - Double.parseDouble( endValue ), color, image ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendSetAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,109 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.hisp.dhis.mapping.MapLegend; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class AddOrUpdateMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private String type; - - public void setType( String type ) - { - this.type = type; - } - - private String symbolizer; - - public void setSymbolizer( String symbolizer ) - { - this.symbolizer = symbolizer; - } - - private Collection mapLegends; - - public void setMapLegends( Collection mapLegends ) - { - this.mapLegends = mapLegends; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - Set legends = new HashSet(); - - if ( mapLegends != null ) - { - for ( String legend : mapLegends ) - { - legends.add( mappingService.getMapLegend( Integer.parseInt( legend ) ) ); - } - } - - mappingService.addOrUpdateMapLegendSet( name, type, symbolizer, legends ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignDataElementsToMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignDataElementsToMapLegendSetAction.java 2012-10-25 08:23:30 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignDataElementsToMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,68 +0,0 @@ -package org.hisp.dhis.mapping.action; - -import java.util.Collection; - -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.mapping.MapLegendSet; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -public class AssignDataElementsToMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private Collection dataElements; - - public void setDataElements( Collection dataElements ) - { - this.dataElements = dataElements; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapLegendSet mapLegendSet = mappingService.getMapLegendSet( id ); - - for ( String dataElement : dataElements ) - { - DataElement element = dataElementService.getDataElement( Integer.parseInt( dataElement ) ); - element.setLegendSet( mapLegendSet ); - dataElementService.updateDataElement( element ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignIndicatorsToMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignIndicatorsToMapLegendSetAction.java 2012-10-25 08:23:30 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AssignIndicatorsToMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,70 +0,0 @@ -package org.hisp.dhis.mapping.action; - -import java.util.Collection; - -import org.hisp.dhis.indicator.Indicator; -import org.hisp.dhis.indicator.IndicatorService; -import org.hisp.dhis.mapping.MapLegendSet; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -public class AssignIndicatorsToMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private Collection indicators; - - public void setIndicators( Collection indicators ) - { - this.indicators = indicators; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapLegendSet mapLegendSet = mappingService.getMapLegendSet( id ); - - for ( String indicator : indicators ) - { - Indicator i = indicatorService.getIndicator( Integer.parseInt( indicator ) ); - i.setLegendSet( mapLegendSet ); - indicatorService.updateIndicator( i ); - } - - mappingService.updateMapLegendSet( mapLegendSet ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLayerAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLayerAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLayerAction.java 1970-01-01 00:00:00 +0000 @@ -1,79 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MapLayer; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class DeleteMapLayerAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapLayer mapLayer = mappingService.getMapLayer( id ); - - if ( mapLayer != null ) - { - mappingService.deleteMapLayer( mapLayer ); - } - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendAction.java 2012-04-20 09:52:17 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendAction.java 1970-01-01 00:00:00 +0000 @@ -1,48 +0,0 @@ -package org.hisp.dhis.mapping.action; - -import org.hisp.dhis.mapping.MapLegend; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -public class DeleteMapLegendAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapLegend mapLegend = mappingService.getMapLegend( id.intValue() ); - - if ( mapLegend != null ) - { - mappingService.deleteMapLegend( mapLegend ); - } - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendSetAction.java 2012-10-19 15:15:44 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,79 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MapLegendSet; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class DeleteMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String id; - - public void setId( String id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapLegendSet legendSet = mappingService.getMapLegendSet( id ); - - if ( legendSet != null ) - { - mappingService.deleteMapLegendSet( legendSet ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapSystemSettingsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapSystemSettingsAction.java 2012-02-02 20:01:36 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapSystemSettingsAction.java 1970-01-01 00:00:00 +0000 @@ -1,77 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.setting.SystemSettingManager; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class DeleteMapSystemSettingsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private SystemSettingManager systemSettingManager; - - public void setSystemSettingManager( SystemSettingManager systemSettingManager ) - { - this.systemSettingManager = systemSettingManager; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Boolean googleKey; - - public void setGoogleKey( Boolean googleKey ) - { - this.googleKey = googleKey; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - if ( googleKey == true ) - { - systemSettingManager.deleteSystemSetting( SystemSettingManager.KEY_GOOGLE_MAPS_API_KEY ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapViewAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapViewAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/DeleteMapViewAction.java 1970-01-01 00:00:00 +0000 @@ -1,79 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MapView; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class DeleteMapViewAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - MapView mapView = mappingService.getMapView( id ); - - if ( mapView != null ) - { - mappingService.deleteMapView( mapView ); - } - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupSetsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupSetsAction.java 2012-01-25 17:11:43 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupSetsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.dataelement.DataElementGroupSet; -import org.hisp.dhis.dataelement.DataElementService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllDataElementGroupSetsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( dataElementService.getAllDataElementGroupSets() ); - - Collections.sort( object, IdentifiableObjectNameComparator.INSTANCE ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupsAction.java 2012-01-25 17:11:43 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementGroupsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.dataelement.DataElementGroup; -import org.hisp.dhis.dataelement.DataElementService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllDataElementGroupsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( dataElementService.getAllDataElementGroups() ); - - Collections.sort( object, IdentifiableObjectNameComparator.INSTANCE ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java 2012-01-20 10:38:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllDataElementsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( dataElementService.getAllDataElements() ); - - Collections.sort( object, new IdentifiableObjectNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorGroupsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorGroupsAction.java 2012-01-25 17:11:43 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorGroupsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetAllIndicatorGroupsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( indicatorService.getAllIndicatorGroups() ); - - Collections.sort( object, IdentifiableObjectNameComparator.INSTANCE ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java 2012-01-20 10:38:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.indicator.Indicator; -import org.hisp.dhis.indicator.IndicatorService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllIndicatorsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( indicatorService.getAllIndicators() ); - - Collections.sort( object, new IdentifiableObjectNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLayersAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLayersAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLayersAction.java 1970-01-01 00:00:00 +0000 @@ -1,81 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.mapping.MapLayer; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.mapping.comparator.MapLayerNameComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllMapLayersAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - object = new ArrayList( mappingService.getAllMapLayers() ); - - Collections.sort( object, new MapLayerNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendSetsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendSetsAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendSetsAction.java 1970-01-01 00:00:00 +0000 @@ -1,77 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.List; - -import org.hisp.dhis.mapping.MapLegendSet; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetAllMapLegendSetsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - object = new ArrayList( mappingService.getAllMapLegendSets() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendsAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapLegendsAction.java 1970-01-01 00:00:00 +0000 @@ -1,82 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.mapping.MapLegend; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.mapping.comparator.MapLegendComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllMapLegendsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return this.object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - this.object = new ArrayList( this.mappingService.getAllMapLegends() ); - - Collections.sort( this.object, new MapLegendComparator() ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapViewsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapViewsAction.java 2012-11-06 07:01:56 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllMapViewsAction.java 1970-01-01 00:00:00 +0000 @@ -1,81 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.mapping.MapView; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetAllMapViewsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - object = new ArrayList( mappingService.getAllMapViews() ); - - Collections.sort( object, IdentifiableObjectNameComparator.INSTANCE ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllOrganisationUnitLevelsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllOrganisationUnitLevelsAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllOrganisationUnitLevelsAction.java 1970-01-01 00:00:00 +0000 @@ -1,77 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 GetAllOrganisationUnitLevelsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = organisationUnitService.getOrganisationUnitLevels(); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementMapValuesAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementMapValuesAction.java 2012-04-20 09:52:17 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementMapValuesAction.java 1970-01-01 00:00:00 +0000 @@ -1,123 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 static org.hisp.dhis.api.utils.ContextUtils.CONTENT_TYPE_JSON; - -import java.util.Collection; - -import org.apache.struts2.ServletActionContext; -import org.hisp.dhis.aggregation.AggregatedMapValue; -import org.hisp.dhis.api.utils.ContextUtils; -import org.hisp.dhis.api.utils.ContextUtils.CacheStrategy; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetDataElementMapValuesAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - private ContextUtils contextUtils; - - public void setContextUtils( ContextUtils contextUtils ) - { - this.contextUtils = contextUtils; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private Integer periodId; - - public void setPeriodId( Integer periodId ) - { - this.periodId = periodId; - } - - private Integer parentId; - - public void setParentId( Integer parentId ) - { - this.parentId = parentId; - } - - private Integer level; - - public void setLevel( Integer level ) - { - this.level = level; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Collection object; - - public Collection getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = mappingService.getDataElementMapValues( id, periodId, parentId, level ); - - contextUtils.configureResponse( ServletActionContext.getResponse(), CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING, null, false ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java 2012-04-22 19:36:58 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java 1970-01-01 00:00:00 +0000 @@ -1,98 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementGroup; -import org.hisp.dhis.dataelement.DataElementService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - */ -public class GetDataElementsByDataElementGroupAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer dataElementGroupId; - - public void setDataElementGroupId( Integer dataElementGroupId ) - { - this.dataElementGroupId = dataElementGroupId; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - DataElementGroup group = dataElementService.getDataElementGroup( dataElementGroupId ); - - if ( group != null ) - { - object = new ArrayList( group.getMembers() ); - - Collections.sort( object, new IdentifiableObjectNameComparator() ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonWithValuesAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonWithValuesAction.java 2012-04-22 19:36:58 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonWithValuesAction.java 1970-01-01 00:00:00 +0000 @@ -1,179 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.Collection; - -import org.hisp.dhis.aggregation.AggregatedMapValue; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.system.filter.OrganisationUnitWithValidCoordinatesFilter; -import org.hisp.dhis.system.util.FilterUtils; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetGeoJsonWithValuesAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer indicatorId; - - public void setIndicatorId( Integer indicatorId ) - { - this.indicatorId = indicatorId; - } - - private Integer dataElementId; - - public void setDataElementId( Integer dataElementId ) - { - this.dataElementId = dataElementId; - } - - private Integer periodId; - - public void setPeriodId( Integer periodId ) - { - this.periodId = periodId; - } - - private Integer parentId; - - public void setParentId( Integer id ) - { - this.parentId = id; - } - - private Integer level; - - public void setLevel( Integer level ) - { - this.level = level; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private Collection object; - - public Collection getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - OrganisationUnit parent = organisationUnitService.getOrganisationUnit( parentId ); - - level = level == null ? organisationUnitService.getLevelOfOrganisationUnit( parent.getId() ) : level; - - Collection organisationUnits = organisationUnitService.getOrganisationUnitsAtLevel( level, - parent ); - - FilterUtils.filter( organisationUnits, new OrganisationUnitWithValidCoordinatesFilter() ); - - object = new ArrayList(); - - for ( OrganisationUnit unit : organisationUnits ) - { - if ( !unit.getFeatureType().equals( OrganisationUnit.FEATURETYPE_POINT ) ) - { - object.add( unit ); - } - } - - for ( OrganisationUnit unit : organisationUnits ) - { - if ( unit.getFeatureType().equals( OrganisationUnit.FEATURETYPE_POINT ) ) - { - object.add( unit ); - } - } - - Collection values = new ArrayList(); - - if ( indicatorId != null ) - { - values = mappingService.getIndicatorMapValues( indicatorId, periodId, object ); - } - - else if ( dataElementId != null ) - { - values = mappingService.getDataElementMapValues( dataElementId, periodId, object ); - } - - if ( values != null ) - { - for ( OrganisationUnit unit : object ) - { - for ( AggregatedMapValue value : values ) - { - if ( unit.getId() == value.getOrganisationUnitId() ) - { - unit.setValue( value.getValue() ); - } - } - } - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorMapValuesAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorMapValuesAction.java 2012-09-12 18:01:24 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorMapValuesAction.java 1970-01-01 00:00:00 +0000 @@ -1,123 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 static org.hisp.dhis.api.utils.ContextUtils.CONTENT_TYPE_JSON; - -import java.util.Collection; - -import org.apache.struts2.ServletActionContext; -import org.hisp.dhis.aggregation.AggregatedMapValue; -import org.hisp.dhis.api.utils.ContextUtils; -import org.hisp.dhis.api.utils.ContextUtils.CacheStrategy; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetIndicatorMapValuesAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - private ContextUtils contextUtils; - - public void setContextUtils( ContextUtils contextUtils ) - { - this.contextUtils = contextUtils; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private Integer periodId; - - public void setPeriodId( Integer periodId ) - { - this.periodId = periodId; - } - - private Integer parentId; - - public void setParentId( Integer parentId ) - { - this.parentId = parentId; - } - - private Integer level; - - public void setLevel( Integer level ) - { - this.level = level; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private Collection object; - - public Collection getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = mappingService.getIndicatorMapValues( id, periodId, parentId, level ); - - contextUtils.configureResponse( ServletActionContext.getResponse(), CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING, null, false ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java 2012-01-20 10:38:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java 1970-01-01 00:00:00 +0000 @@ -1,104 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.indicator.Indicator; -import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetIndicatorsByIndicatorGroupAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer indicatorGroupId; - - public void setIndicatorGroupId( Integer indicatorGroupId ) - { - this.indicatorGroupId = indicatorGroupId; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - if ( indicatorGroupId != null ) - { - IndicatorGroup group = indicatorService.getIndicatorGroup( indicatorGroupId ); - - if ( group != null ) - { - object = new ArrayList( group.getMembers() ); - - Collections.sort( object, new IdentifiableObjectNameComparator() ); - - return SUCCESS; - } - } - - return NONE; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java 1970-01-01 00:00:00 +0000 @@ -1,95 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.Collection; - -import org.hisp.dhis.aggregation.AggregatedMapValue; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetInfrastructuralDataElementMapValuesAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer periodId; - - public void setPeriodId( Integer periodId ) - { - this.periodId = periodId; - } - - private Integer organisationUnitId; - - public void setOrganisationUnitId( Integer organisationUnitId ) - { - this.organisationUnitId = organisationUnitId; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private Collection object; - - public Collection getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = mappingService.getInfrastructuralDataElementMapValues( periodId, organisationUnitId ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLayersByTypeAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLayersByTypeAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLayersByTypeAction.java 1970-01-01 00:00:00 +0000 @@ -1,92 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.mapping.MapLayer; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.mapping.comparator.MapLayerNameComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetMapLayersByTypeAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String type; - - public void setType( String type ) - { - this.type = type; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - object = new ArrayList( mappingService.getMapLayersByType( type ) ); - - Collections.sort( object, new MapLayerNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendSetAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,86 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MapLegendSet; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private int id; - - public void setId( int id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private MapLegendSet object; - - public MapLegendSet getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = mappingService.getMapLegendSet( id ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendsByMapLegendSetAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendsByMapLegendSetAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapLegendsByMapLegendSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,94 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.mapping.MapLegend; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.mapping.comparator.MapLegendComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetMapLegendsByMapLegendSetAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private int mapLegendSetId; - - public void setMapLegendSetId( int mapLegendSetId ) - { - this.mapLegendSetId = mapLegendSetId; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return this.object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - this.object = new ArrayList( this.mappingService.getMapLegendSet( this.mapLegendSetId ) - .getMapLegends() ); - - Collections.sort( this.object, new MapLegendComparator() ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java 1970-01-01 00:00:00 +0000 @@ -1,78 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 static org.hisp.dhis.mapping.MappingService.KEY_MAP_DATE_TYPE; -import static org.hisp.dhis.mapping.MappingService.MAP_DATE_TYPE_FIXED; - -import org.hisp.dhis.user.UserSettingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetMapUserSettingsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private UserSettingService userSettingService; - - public void setUserSettingService( UserSettingService userSettingService ) - { - this.userSettingService = userSettingService; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private String mapDateType; - - public String getMapDateType() - { - return mapDateType; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - - public String execute() - throws Exception - { - mapDateType = (String) userSettingService.getUserSetting( KEY_MAP_DATE_TYPE, MAP_DATE_TYPE_FIXED ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapViewAction.java 1970-01-01 00:00:00 +0000 @@ -1,86 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 org.hisp.dhis.mapping.MapView; -import org.hisp.dhis.mapping.MappingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetMapViewAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private MapView object; - - public MapView getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = mappingService.getMapView( id ); - - return SUCCESS; - } -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java 1970-01-01 00:00:00 +0000 @@ -1,100 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.Arrays; -import java.util.List; - -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitLevel; -import org.hisp.dhis.organisationunit.OrganisationUnitService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class GetOrganisationUnitLevelsByFeatureTypeAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String featureType; - - public void setFeatureType( String featureType ) - { - this.featureType = featureType; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = organisationUnitService.getOrganisationUnitLevels(); - - if ( featureType.equals( OrganisationUnit.FEATURETYPE_MULTIPOLYGON ) ) - { - object.remove( object.size() - 1 ); - } - - else if ( featureType.equals( OrganisationUnit.FEATURETYPE_POINT ) ) - { - object = Arrays.asList( object.get( object.size() - 1 ) ); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java 2012-01-20 10:38:11 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java 1970-01-01 00:00:00 +0000 @@ -1,93 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class GetOrganisationUnitsAtLevelAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private OrganisationUnitService organisationUnitService; - - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer level; - - public void setLevel( Integer level ) - { - this.level = level; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List object; - - public List getObject() - { - return object; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - object = new ArrayList( organisationUnitService.getOrganisationUnitsAtLevel( level ) ); - - Collections.sort( object, new IdentifiableObjectNameComparator() ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/SetMapUserSettingsAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/SetMapUserSettingsAction.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/SetMapUserSettingsAction.java 1970-01-01 00:00:00 +0000 @@ -1,79 +0,0 @@ -package org.hisp.dhis.mapping.action; - -/* - * Copyright (c) 2004-2012, 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 static org.hisp.dhis.mapping.MappingService.KEY_MAP_DATE_TYPE; - -import org.hisp.dhis.user.UserSettingService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Jan Henrik Overland - * @version $Id$ - */ -public class SetMapUserSettingsAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private UserSettingService userSettingService; - - public void setUserSettingService( UserSettingService userSettingService ) - { - this.userSettingService = userSettingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String mapDateType; - - public void setMapDateType( String mapDateType ) - { - this.mapDateType = mapDateType; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - if ( mapDateType != null ) - { - userSettingService.saveUserSetting( KEY_MAP_DATE_TYPE, mapDateType ); - } - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2012-12-14 13:46:47 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2013-05-24 13:32:24 +0000 @@ -20,42 +20,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -294,15 +84,6 @@ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> - - - - - === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml 2013-03-13 13:59:41 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml 2013-05-24 14:04:12 +0000 @@ -14,6 +14,13 @@ app/index.html + + + + + /dhis-web-mapping/void.vm + F_GIS_ADMIN + @@ -21,36 +28,8 @@ /dhis-web-mapping/jsonInitialize.vm - - - - /dhis-web-mapping/jsonUserSettings.vm - - - - /dhis-web-mapping/void.vm - - - - - - /dhis-web-mapping/void.vm - - - - /dhis-web-mapping/jsonOrganisationUnitLevels.vm - - - - /dhis-web-mapping/jsonOrganisationUnitLevels.vm - - - - /dhis-web-mapping/jsonminOrganisationUnits.vm - - /dhis-web-mapping/jsonOrganisationUnitChildren.vm @@ -59,33 +38,22 @@ /dhis-web-mapping/void.vm - - /dhis-web-mapping/jsonminFacilityInfo.vm - + + /dhis-web-mapping/jsonminFacilityInfo.vm + /dhis-web-mapping/jsonminOrganisationUnitGroups.vm - - - - /dhis-web-mapping/jsonOrganisationUnitLevels.vm - - - - - - /dhis-web-mapping/jsonminAggregatedMapValues.vm - - - - - /dhis-web-mapping/jsonminAggregatedMapValues.vm - - - + + + + /dhis-web-mapping/void.vm + + + + @@ -93,200 +61,6 @@ - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - - /dhis-web-mapping/jsonMapLegends.vm - - - - - - /dhis-web-mapping/jsonMapLegends.vm - - - - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - - /dhis-web-mapping/jsonminMapLegendSets.vm - - - - - - /dhis-web-mapping/jsonMapLegendSet.vm - - - - - /dhis-web-mapping/void.vm - - - - - /dhis-web-mapping/void.vm - - - - - - - /dhis-web-mapping/void.vm - - - - - - /dhis-web-mapping/void.vm - - - - /dhis-web-mapping/jsonMapView.vm - - - - - /dhis-web-mapping/jsonMapViews.vm - - - - - - /dhis-web-mapping/jsonminMapViews.vm - - - - - /dhis-web-mapping/void.vm - - - - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - /dhis-web-mapping/void.vm - - F_GIS_ADMIN - - - - - /dhis-web-mapping/jsonMapLayers.vm - - - - - - /dhis-web-mapping/jsonMapLayers.vm - - - - - - - - /dhis-web-mapping/jsonIndicatorGroups.vm - - - - - - /dhis-web-mapping/jsonminIndicators.vm - - - /dhis-web-mapping/void.vm - - - - - - /dhis-web-mapping/jsonminIndicators.vm - - - - - - - - /dhis-web-mapping/jsonDataElementGroupSets.vm - - - - - - /dhis-web-mapping/jsonDataElementGroups.vm - - - - - - /dhis-web-mapping/jsonminDataElements.vm - - - - - - /dhis-web-mapping/jsonminDataElements.vm - - - /dhis-web-mapping/geojsonmin.vm - - /dhis-web-mapping/geojsonminValues.vm - - /dhis-web-mapping/geojsonFacilities.vm === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-05-16 09:32:16 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-05-24 12:34:17 +0000 @@ -14,21 +14,47 @@ type_vector: 'vector' }, dimension: { + data: { + id: 'data', + value: 'data', + param: 'dx', + dimensionName: 'dx', + objectName: 'dx' + }, indicator: { id: 'indicator', - param: 'in' + value: 'indicators', + param: 'in', + dimensionName: 'dx', + objectName: 'in' }, dataElement: { id: 'dataElement', - param: 'de' + value: 'dataElement', + param: 'de', + dimensionName: 'dx', + objectName: 'de' }, period: { id: 'period', - param: 'pe' + value: 'period', + param: 'pe', + dimensionName: 'pe', + objectName: 'pe' }, organisationUnit: { id: 'organisationUnit', - param: 'ou' + value: 'organisationUnit', + param: 'ou', + dimensionName: 'ou', + objectName: 'ou' + }, + value: { + id: 'value', + value: 'value', + param: 'value', + dimensionName: 'value', + objectName: 'value' } }, widget: { @@ -1295,52 +1321,69 @@ features = features || layer.features.slice(0); var type = view.valueType, - dataUrl = 'mapValues/' + gis.conf.finals.dimension[type].param + '.jsonp', + dimConf = gis.conf.finals.dimension, + paramString = '?', indicator = gis.conf.finals.dimension.indicator, dataElement = gis.conf.finals.dimension.dataElement, period = gis.conf.finals.dimension.period, - organisationUnit = gis.conf.finals.dimension.organisationUnit, - params = {}; - - params[type === indicator.id ? indicator.param : dataElement.param] = view[type].id; - params[period.param] = view.period.id; - params[organisationUnit.param] = view.parentOrganisationUnit.id; - params.le = view.organisationUnitLevel.id; - - Ext.data.JsonP.request({ - url: gis.baseUrl + gis.conf.url.path_api + dataUrl, - params: params, + organisationUnit = gis.conf.finals.dimension.organisationUnit; + + paramString += 'dimension=ou:LEVEL-' + view.organisationUnitLevel.level + '-' + view.parentOrganisationUnit.id; + paramString += '&dimension=dx:' + view[type].id; + paramString += '&filter=pe:' + view.period.id; + + Ext.Ajax.request({ + url: gis.baseUrl + '/api/analytics.json' + paramString, disableCaching: false, scope: this, success: function(r) { - var values = r, + //var values = r, + var response = Ext.decode(r.responseText), + dimConf = gis.conf.finals.dimension, featureMap = {}, valueMap = {}, + ouIndex, + dxIndex, + valueIndex, newFeatures = []; - if (values.length === 0) { - alert(GIS.i18n.no_aggregated_data_found); + if (!(Ext.isObject(response) && Ext.isArray(response.rows) && response.rows.length)) { + alert(GIS.i18n.current_selection_no_data); olmap.mask.hide(); return; } - for (var i = 0; i < features.length; i++) { - var iid = features[i].attributes.internalId; - featureMap[iid] = true; - } - for (var i = 0; i < values.length; i++) { - var iid = values[i].organisationUnitId, - value = values[i].value; - valueMap[iid] = value; + // ou index, value index + for (var i = 0; i < response.headers.length; i++) { + if (response.headers[i].name === dimConf.organisationUnit.dimensionName) { + ouIndex = i; + } + else if (response.headers[i].name === dimConf.data.dimensionName) { + dxIndex = i; + } + else if (response.headers[i].name === dimConf.value.dimensionName) { + valueIndex = i; + } + } + + // Feature map + for (var i = 0, id; i < features.length; i++) { + var id = features[i].attributes.id; + featureMap[id] = true; + } + + // Value map + for (var i = 0; i < response.rows.length; i++) { + var id = response.rows[i][ouIndex], + value = parseFloat(response.rows[i][valueIndex]); + valueMap[id] = value; } for (var i = 0; i < features.length; i++) { var feature = features[i], - iid = feature.attributes.internalId; - if (featureMap.hasOwnProperty(iid) && valueMap.hasOwnProperty(iid)) { - feature.attributes.value = valueMap[iid]; - //var m = Math.random(); - //feature.attributes.value = m < 0.3 ? -5 : m < 0.6 ? null : 1; + id = feature.attributes.id; + if (featureMap.hasOwnProperty(id) && valueMap.hasOwnProperty(id)) { + feature.attributes.value = valueMap[id]; feature.attributes.label = feature.attributes.name + ' (' + feature.attributes.value + ')'; newFeatures.push(feature); }