← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13387: Pivot table module, removed all action classes and beans.xml. First step in appification of dhis.

 

------------------------------------------------------------
revno: 13387
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-12-22 15:15:38 +0100
message:
  Pivot table module, removed all action classes and beans.xml. First step in appification of dhis.
removed:
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/GetOrganisationUnitChildrenAction.java
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/NoAction.java
  dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/
  dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis/
  dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis/beans.xml
modified:
  dhis-2/dhis-web/dhis-web-pivot/src/main/resources/struts.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org'
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp'
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis'
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot'
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action'
=== removed file 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/GetOrganisationUnitChildrenAction.java'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/GetOrganisationUnitChildrenAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/GetOrganisationUnitChildrenAction.java	1970-01-01 00:00:00 +0000
@@ -1,106 +0,0 @@
-package org.hisp.dhis.pivot.action;
-
-/*
- * Copyright (c) 2004-2013, 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 Jan Henrik Overland
- */
-public class GetOrganisationUnitChildrenAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private String node;
-    
-    public void setNode( String node )
-    {
-        this.node = node;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private List<OrganisationUnit> units = new ArrayList<OrganisationUnit>();
-    
-    public List<OrganisationUnit> getUnits()
-    {
-        return units;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        OrganisationUnit unit = organisationUnitService.getOrganisationUnit( node );
-        
-        if ( unit != null )
-        {
-            int level = organisationUnitService.getLevelOfOrganisationUnit( unit.getId() ) + 1;
-            
-            units = new ArrayList<OrganisationUnit>( unit.getChildren() );
-            
-            for ( OrganisationUnit organisationUnit : units )
-            {
-                organisationUnit.setLevel( level );
-            }
-
-            Collections.sort( units, new IdentifiableObjectNameComparator() );
-        }
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java	2013-08-28 09:58:08 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java	1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
-package org.hisp.dhis.pivot.action;
-
-/*
- * Copyright (c) 2004-2013, 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.apache.struts2.ServletActionContext;
-import org.hisp.dhis.api.utils.ContextUtils;
-import org.hisp.dhis.common.DimensionService;
-import org.hisp.dhis.common.DimensionalObject;
-import org.hisp.dhis.mapping.MapLegendSet;
-import org.hisp.dhis.mapping.MappingService;
-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 InitializeAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-    
-    private DimensionService dimensionService;
-
-    public void setDimensionService( DimensionService dimensionService )
-    {
-        this.dimensionService = dimensionService;
-    }
-    
-    private MappingService mappingService;
-
-    public void setMappingService( MappingService mappingService )
-    {
-        this.mappingService = mappingService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-    
-    private String callback;
-    
-    public void setCallback( String callback )
-    {
-        this.callback = callback;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-    
-    public String getCallback()
-    {
-        return callback;
-    }
-
-    private String contextPath;
-
-    public String getContextPath()
-    {
-        return contextPath;
-    }
-
-    private Collection<OrganisationUnit> rootNodes;
-
-    public Collection<OrganisationUnit> getRootNodes()
-    {
-        return rootNodes;
-    }
-    
-    private Collection<DimensionalObject> dimensions;
-
-    public Collection<DimensionalObject> getDimensions()
-    {
-        return dimensions;
-    }
-
-    private Collection<MapLegendSet> legendSets;
-
-    public Collection<MapLegendSet> getLegendSets()
-    {
-        return legendSets;
-    }
-    
-    private Collection<OrganisationUnitLevel> levels;
-
-    public Collection<OrganisationUnitLevel> getLevels()
-    {
-        return levels;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        contextPath = ContextUtils.getContextPath( ServletActionContext.getRequest() );
-        
-        rootNodes = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitsAtLevel( 1 ) );
-
-        if ( rootNodes.size() < 1 )
-        {
-            rootNodes.add( new OrganisationUnit() );
-        }
-        
-        dimensions = dimensionService.getAllDimensions();
-        
-        legendSets = mappingService.getAllMapLegendSets();
-        
-        levels = organisationUnitService.getOrganisationUnitLevels();
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/NoAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/NoAction.java	1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-package org.hisp.dhis.pivot.action;
-
-/*
- * Copyright (c) 2004-2013, 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 com.opensymphony.xwork2.Action;
-
-/**
- * @author Jan Henrik Overland
- * @version $Id$
- */
-public class NoAction
-    implements Action
-{
-    public String execute()
-    {
-        return SUCCESS;
-    }
-}

=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF'
=== removed directory 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis'
=== removed file 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis/beans.xml	2013-08-21 16:32:15 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/resources/META-INF/dhis/beans.xml	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd";>
-
-  <!-- No -->
-
-  <bean id="org.hisp.dhis.pivot.action.NoAction"
-    class="org.hisp.dhis.pivot.action.NoAction" scope="prototype" />
-
-  <!-- Initialize -->
-
-  <bean id="org.hisp.dhis.pivot.action.InitializeAction"
-    class="org.hisp.dhis.pivot.action.InitializeAction"
-    scope="prototype">
-    <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-    <property name="dimensionService" ref="org.hisp.dhis.common.DimensionService" />
-    <property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
-  </bean>
-
-  <!-- OrganisationUnit -->
-
-  <bean id="org.hisp.dhis.pivot.action.GetOrganisationUnitChildrenAction"
-    class="org.hisp.dhis.pivot.action.GetOrganisationUnitChildrenAction"
-    scope="prototype">
-    <property name="organisationUnitService"
-      ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-  </bean>
-
-</beans>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/resources/struts.xml	2013-10-29 15:09:45 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/resources/struts.xml	2013-12-22 14:15:38 +0000
@@ -8,32 +8,9 @@
 
 	<package name="dhis-web-pivot" extends="dhis-web-commons" namespace="/dhis-web-pivot">
 
-		<!-- Default -->
-
-		<action name="index" class="org.hisp.dhis.pivot.action.NoAction">
+		<action name="index" class="org.hisp.dhis.commons.action.NoAction">
 			<result name="success" type="redirect">app/index.html</result>
 		</action>
 
-		<!-- Initialize -->
-
-        <action name="initialize" class="org.hisp.dhis.pivot.action.InitializeAction">
-            <result name="success" type="velocity-json">/dhis-web-pivot/jsonInitialize.vm</result>
-        </action>
-
-        <!-- OrganisationUnit -->
-
-		<action name="getOrganisationUnitChildren"
-			class="org.hisp.dhis.pivot.action.GetOrganisationUnitChildrenAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-pivot/jsonminOrganisationUnitChildren.vm</result>
-		</action>
-	
-	    <!-- i18n -->
-	
-	    <action name="i18n" class="org.hisp.dhis.pivot.action.NoAction">
-			<result name="success" type="velocity-javascript">/dhis-web-pivot/i18n.vm</result>
-      		<interceptor-ref name="cacheStack" />
-	    </action>
-	
 		</package>
 </struts>