← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15405: ModuleManager, removed service/maintenance methods

 

------------------------------------------------------------
revno: 15405
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-05-26 12:55:47 +0200
message:
  ModuleManager, removed service/maintenance methods
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalModuleInterceptor.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/ModuleManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.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-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalModuleInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalModuleInterceptor.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/interceptor/XWorkPortalModuleInterceptor.java	2014-05-26 10:55:47 +0000
@@ -48,8 +48,6 @@
      */
     private static final long serialVersionUID = 8996189907119658364L;
 
-    private static final String KEY_MAINTENANCE_MODULES = "maintenanceModules";
-    private static final String KEY_SERVICE_MODULES = "serviceModules";
     private static final String KEY_MENU_MODULES = "menuModules";
 
     // -------------------------------------------------------------------------
@@ -84,8 +82,6 @@
     {
         Map<String, Object> handle = new HashMap<String, Object>( 2 );
 
-        handle.put( KEY_MAINTENANCE_MODULES, moduleManager.getAccessibleMaintenanceModules() );
-        handle.put( KEY_SERVICE_MODULES, moduleManager.getAccessibleServiceModulesAndApps() );
         handle.put( KEY_MENU_MODULES, moduleManager.getAccessibleMenuModulesAndApps() );
 
         actionInvocation.getStack().push( handle );

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2014-05-26 10:55:47 +0000
@@ -64,10 +64,6 @@
 
     private List<Module> menuModules = new ArrayList<Module>();
     
-    private List<Module> maintenanceMenuModules = new ArrayList<Module>();
-    
-    private List<Module> serviceMenuModules = new ArrayList<Module>();
-
     private ThreadLocal<Module> currentModule = new ThreadLocal<Module>();
 
     // -------------------------------------------------------------------------
@@ -97,13 +93,6 @@
     {
         this.defaultActionName = defaultActionName;
     }
-
-    private String maintenanceModuleIdentifier;
-
-    public void setMaintenanceModuleIdentifier( String maintenanceModuleIdentifier )
-    {
-        this.maintenanceModuleIdentifier = maintenanceModuleIdentifier;
-    }
     
     // -------------------------------------------------------------------------
     // ModuleManager
@@ -156,48 +145,6 @@
         return modules;
     }
 
-    public List<Module> getMaintenanceMenuModules()
-    {
-        detectModules();
-        
-        return maintenanceMenuModules;
-    }
-
-    public List<Module> getAccessibleMaintenanceModules()
-    {
-        detectModules();
-        
-        return getAccessibleModules( maintenanceMenuModules );
-    }
-    
-    public List<Module> getServiceMenuModules()
-    {
-        detectModules();
-        
-        return serviceMenuModules;
-    }
-
-    public List<Module> getAccessibleServiceModules()
-    {
-        detectModules();
-        
-        return getAccessibleModules( serviceMenuModules );
-    }
-
-    public List<Module> getAccessibleServiceModulesAndApps()
-    {
-        List<Module> modules = getAccessibleServiceModules();
-
-        List<App> apps = appManager.getApps();
-        
-        for ( App app : apps )
-        {   
-            modules.add( Module.getModule( app ) );
-        }
-        
-        return modules;
-    }
-    
     public Collection<Module> getAllModules()
     {
         detectModules();
@@ -267,15 +214,6 @@
                 menuModules.add( module );
 
                 LOG.debug( "Has default action: " + name );
-                
-                if ( name.toLowerCase().contains( maintenanceModuleIdentifier ) )
-                {
-                    maintenanceMenuModules.add( module );
-                }
-                else
-                {
-                    serviceMenuModules.add( module );
-                }
             }
             else
             {
@@ -284,8 +222,6 @@
         }
 
         Collections.sort( menuModules, moduleComparator );
-        Collections.sort( maintenanceMenuModules, moduleComparator );
-        Collections.sort( serviceMenuModules, moduleComparator );
 
         modulesDetected = true;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/ModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/ModuleManager.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/ModuleManager.java	2014-05-26 10:55:47 +0000
@@ -49,16 +49,6 @@
     
     List<Module> getAccessibleMenuModulesAndApps();
     
-    List<Module> getMaintenanceMenuModules();
-    
-    List<Module> getAccessibleMaintenanceModules();
-    
-    List<Module> getServiceMenuModules();
-
-    List<Module> getAccessibleServiceModules();
-    
-    List<Module> getAccessibleServiceModulesAndApps();
-    
     Collection<Module> getAllModules();
 
     Module getCurrentModule();

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2014-04-30 08:46:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2014-05-26 10:55:47 +0000
@@ -9,7 +9,6 @@
     <property name="actionAccessResolver" ref="org.hisp.dhis.security.ActionAccessResolver" />
     <property name="moduleComparator" ref="org.hisp.dhis.webportal.module.ConfigurableModuleComparator" />
     <property name="defaultActionName" value="index" />
-    <property name="maintenanceModuleIdentifier" value="maintenance" />
   </bean>
 
   <bean id="org.hisp.dhis.webportal.module.ConfigurableModuleComparator"