← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10946: Appstore, code style

 

------------------------------------------------------------
revno: 10946
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-05-23 08:17:02 +0200
message:
  Appstore, code style
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManagerService.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/NoAction.java


--
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-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManagerService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManagerService.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManagerService.java	2013-05-23 06:17:02 +0000
@@ -37,19 +37,16 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.hisp.dhis.appmanager.AppManagerService.KEY_APP_FOLDER_PATH;
 import org.hisp.dhis.datavalue.DefaultDataValueService;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id$
  */
 public class DefaultAppManagerService
     implements AppManagerService
 {
-
     private static final Log log = LogFactory.getLog( DefaultDataValueService.class );
 
     private HashMap<App, String> appFolderNames;
@@ -105,6 +102,7 @@
                 }
             }
         }
+        
         return appList;
     }
 
@@ -123,6 +121,7 @@
         {
             log.error( ex.getLocalizedMessage(), ex );
         }
+        
         appSettingManager.saveSystemSetting( KEY_APP_FOLDER_PATH, appFolderPath );
     }
 
@@ -139,6 +138,7 @@
         {
             getInstalledApps();
         }
+        
         return appFolderNames.get( app );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java	2013-05-23 06:17:02 +0000
@@ -42,7 +42,6 @@
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id$
  */
 public class AddAppAction
     implements Action
@@ -50,6 +49,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
+    
     @Autowired
     private AppManagerService appManagerService;
 
@@ -114,6 +114,7 @@
                 boolean manifestFound = false;
                 ZipInputStream zis = new ZipInputStream( new FileInputStream( file ) );
                 ZipEntry ze;
+                
                 while ( (ze = zis.getNextEntry()) != null )
                 {
                     if ( ze.getName().equals( "manifest.webapp" ) )
@@ -129,7 +130,9 @@
                         message = i18n.getString( "appmanager_install_success" );
                     }
                 }
+                
                 zis.close();
+                
                 if ( !manifestFound )
                 {
                     message = i18n.getString( "appmanager_invalid_package" );
@@ -140,6 +143,7 @@
                 message = i18n.getString( "appmanager_not_zip" );
             }
         }
+        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2013-05-23 06:17:02 +0000
@@ -36,7 +36,6 @@
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id
  */
 public class AppListAction
     implements Action
@@ -75,11 +74,14 @@
         throws Exception
     {
         appList = appManagerService.getInstalledApps();
+        
         appFolderNames = new ArrayList<String>();
+        
         for ( App app : appList )
         {
             appFolderNames.add( appManagerService.getAppFolderName( app ) );
         }
+        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java	2013-05-23 06:17:02 +0000
@@ -36,7 +36,6 @@
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id$
  */
 public class AppSettingsAction
     implements Action
@@ -59,11 +58,13 @@
     public String getAppFolderPath()
     {
         appFolderPath = appManagerService.getAppFolderPath();
+        
         if ( null == appFolderPath || appFolderPath.isEmpty() )
         {
             appFolderPath = ServletActionContext.getServletContext().getRealPath( "/" ) + File.separatorChar + "apps";
             appManagerService.setAppFolderPath( appFolderPath );
         }
+        
         return appFolderPath;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java	2013-05-23 06:17:02 +0000
@@ -28,13 +28,11 @@
  */
 
 import com.opensymphony.xwork2.Action;
-import static com.opensymphony.xwork2.Action.SUCCESS;
 import org.hisp.dhis.appmanager.AppManagerService;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id
  */
 public class AppStoreAction
     implements Action
@@ -52,7 +50,8 @@
 
     private String appStoreUrl;
 
-    public String getAppStoreUrl() {
+    public String getAppStoreUrl()
+    {
         return appManagerService.getAppStoreUrl();
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/NoAction.java	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/NoAction.java	2013-05-23 06:17:02 +0000
@@ -31,7 +31,6 @@
 
 /**
  * @author Saptarshi Purkayastha
- * @version $Id
  */
 public class NoAction
     implements Action