← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14077: Category option group/set, removed pointless actions

 

------------------------------------------------------------
revno: 14077
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-02-19 20:22:14 +0100
message:
  Category option group/set, removed pointless actions
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowAddCategoryOptionGroupAction.java
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/GetCategoryOptionGroupListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowUpdateCategoryOptionGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroupset/ShowUpdateCategoryOptionGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/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
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java	2014-02-19 10:28:50 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/organisationunit/OrganisationUnitController.java	2014-02-19 19:22:14 +0000
@@ -273,7 +273,6 @@
         return StringUtils.uncapitalize( getEntitySimpleName() );
     }
     
-    
     @RequestMapping(value = "/withinRange", method = RequestMethod.GET, produces = { "*/*", "application/json" })
     public void getEntitiesWithinRange( @RequestParam Double longitude, @RequestParam Double latitude, 
         @RequestParam Double distance, @RequestParam(required = false) String orgUnitGroupSetId,

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/GetCategoryOptionGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/GetCategoryOptionGroupListAction.java	2014-02-13 14:24:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/GetCategoryOptionGroupListAction.java	2014-02-19 19:22:14 +0000
@@ -71,7 +71,7 @@
         this.key = key;
     }
 
-    private List<CategoryOptionGroup> categoryOptionGroups = new ArrayList<CategoryOptionGroup>();;
+    private List<CategoryOptionGroup> categoryOptionGroups = new ArrayList<CategoryOptionGroup>();
 
     public List<CategoryOptionGroup> getCategoryOptionGroups()
     {

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowAddCategoryOptionGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowAddCategoryOptionGroupAction.java	2014-02-13 12:09:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowAddCategoryOptionGroupAction.java	1970-01-01 00:00:00 +0000
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-
-package org.hisp.dhis.dd.action.categoryoptiongroup;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElementCategoryOption;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version $ ShowAddCategoryOptionGroupAction.java Feb 12, 2014 11:20:01 PM $
- */
-public class ShowAddCategoryOptionGroupAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    @Autowired
-    private DataElementCategoryService dataElementCategoryService;
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private List<DataElementCategoryOption> categoryOptions;
-
-    public List<DataElementCategoryOption> getCategoryOptions()
-    {
-        return categoryOptions;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        categoryOptions = new ArrayList<DataElementCategoryOption>(
-            dataElementCategoryService.getAllDataElementCategoryOptions() );
-
-        return SUCCESS;
-    }
-
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowUpdateCategoryOptionGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowUpdateCategoryOptionGroupAction.java	2014-02-13 14:24:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroup/ShowUpdateCategoryOptionGroupAction.java	2014-02-19 19:22:14 +0000
@@ -97,9 +97,6 @@
 
         groupMembers = new ArrayList<DataElementCategoryOption>( categoryOptionGroup.getMembers() );
 
-        categoryOptions = new ArrayList<DataElementCategoryOption>(
-            dataElementCategoryService.getAllDataElementCategoryOptions() );
-
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroupset/ShowUpdateCategoryOptionGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroupset/ShowUpdateCategoryOptionGroupSetAction.java	2014-02-13 14:24:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categoryoptiongroupset/ShowUpdateCategoryOptionGroupSetAction.java	2014-02-19 19:22:14 +0000
@@ -39,9 +39,6 @@
 
 /**
  * @author Chau Thu Tran
- * 
- * @version $ ShowUpdateCategoryOptionGroupSetAction.java Feb 12, 2014 11:20:01
- *          PM $
  */
 public class ShowUpdateCategoryOptionGroupSetAction
     implements Action
@@ -97,10 +94,6 @@
 
         groupMembers = new ArrayList<CategoryOptionGroup>( categoryOptionGroupSet.getMembers() );
 
-        categoryOptionGroups = new ArrayList<CategoryOptionGroup>(
-            dataElementCategoryService.getAllCategoryOptionGroups() );
-
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2014-02-13 12:09:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml	2014-02-19 19:22:14 +0000
@@ -518,10 +518,6 @@
     scope="prototype">
   </bean>
   
-  <bean id="org.hisp.dhis.dd.action.categoryoptiongroup.ShowAddCategoryOptionGroupAction" class="org.hisp.dhis.dd.action.categoryoptiongroup.ShowAddCategoryOptionGroupAction"
-    scope="prototype">
-  </bean>
-  
   <bean id="org.hisp.dhis.dd.action.categoryoptiongroup.ShowUpdateCategoryOptionGroupAction" class="org.hisp.dhis.dd.action.categoryoptiongroup.ShowUpdateCategoryOptionGroupAction"
     scope="prototype">
   </bean>
@@ -551,11 +547,7 @@
   <bean id="org.hisp.dhis.dd.action.categoryoptiongroupset.RemoveCategoryOptionGroupSetAction" class="org.hisp.dhis.dd.action.categoryoptiongroupset.RemoveCategoryOptionGroupSetAction"
     scope="prototype">
   </bean>
-  
-  <bean id="org.hisp.dhis.dd.action.categoryoptiongroupset.ShowAddCategoryOptionGroupSetAction" class="org.hisp.dhis.dd.action.categoryoptiongroupset.ShowAddCategoryOptionGroupSetAction"
-    scope="prototype">
-  </bean>
-  
+    
   <bean id="org.hisp.dhis.dd.action.categoryoptiongroupset.ShowUpdateCategoryOptionGroupSetAction" class="org.hisp.dhis.dd.action.categoryoptiongroupset.ShowUpdateCategoryOptionGroupSetAction"
     scope="prototype">
   </bean>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2014-02-17 14:36:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml	2014-02-19 19:22:14 +0000
@@ -712,7 +712,7 @@
       <param name="anyAuthorities">F_CATEGORY_OPTION_GROUP_PUBLIC_ADD, F_CATEGORY_OPTION_GROUP_PRIVATE_ADD</param>
     </action>
 
-    <action name="showAddCategoryOptionGroupForm" class="org.hisp.dhis.dd.action.categoryoptiongroup.ShowAddCategoryOptionGroupAction">
+    <action name="showAddCategoryOptionGroupForm" class="org.hisp.dhis.dd.action.NoAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-datadictionary/addCategoryOptionGroupForm.vm</param>
       <param name="javascripts">javascript/categoryOptionGroup.js</param>
@@ -777,7 +777,7 @@
     </action>
 
     <action name="showAddCategoryOptionGroupSetForm"
-      class="org.hisp.dhis.dd.action.categoryoptiongroupset.ShowAddCategoryOptionGroupSetAction">
+      class="org.hisp.dhis.dd.action.NoAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-datadictionary/addCategoryOptionGroupSetForm.vm</param>
       <param name="javascripts">javascript/categoryOptionGroupSet.js</param>