dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24927
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12265: Renamed AppManagerService to just AppManager
------------------------------------------------------------
revno: 12265
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-09-26 19:20:47 +0200
message:
Renamed AppManagerService to just AppManager
renamed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManagerService.java => dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java
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/DefaultAppManager.java
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/DefaultAppManagerServiceTest.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/DeleteAppAction.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.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
=== renamed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManagerService.java' => 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManagerService.java 2013-09-26 16:53:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java 2013-09-26 17:20:47 +0000
@@ -35,10 +35,9 @@
/**
* @author Saptarshi Purkayastha
*/
-public interface AppManagerService
+public interface AppManager
{
-
- String ID = AppManagerService.class.getName();
+ final String ID = AppManager.class.getName();
final String KEY_APP_FOLDER_PATH = "appFolderPath";
=== renamed 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/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManagerService.java 2013-09-26 17:11:40 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java 2013-09-26 17:20:47 +0000
@@ -53,8 +53,8 @@
/**
* @author Saptarshi Purkayastha
*/
-public class DefaultAppManagerService
- implements AppManagerService
+public class DefaultAppManager
+ implements AppManager
{
private static final Log log = LogFactory.getLog( DefaultDataValueService.class );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-09-19 09:34:43 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-09-26 17:20:47 +0000
@@ -702,7 +702,7 @@
<bean id="org.hisp.dhis.common.DimensionService" class="org.hisp.dhis.common.DefaultDimensionService" />
- <bean id="org.hisp.dhis.appmanager.AppManagerService" class="org.hisp.dhis.appmanager.DefaultAppManagerService" />
+ <bean id="org.hisp.dhis.appmanager.AppManager" class="org.hisp.dhis.appmanager.DefaultAppManager" />
<bean id="org.hisp.dhis.system.SystemService" class="org.hisp.dhis.system.DefaultSystemService" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/DefaultAppManagerServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/DefaultAppManagerServiceTest.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/appmanager/DefaultAppManagerServiceTest.java 2013-09-26 17:20:47 +0000
@@ -27,14 +27,17 @@
* (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.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
import java.util.List;
+
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
-import static org.junit.Assert.*;
-import org.junit.Ignore;
/**
*
@@ -75,7 +78,7 @@
public void testGetAppFolderPath()
{
System.out.println( "getAppFolderPath" );
- DefaultAppManagerService instance = new DefaultAppManagerService();
+ DefaultAppManager instance = new DefaultAppManager();
String expResult = "";
String result = instance.getAppFolderPath();
assertEquals( expResult, result );
@@ -91,7 +94,7 @@
public void testGetAppStoreUrl()
{
System.out.println( "getAppStoreUrl" );
- DefaultAppManagerService instance = new DefaultAppManagerService();
+ DefaultAppManager instance = new DefaultAppManager();
String expResult = "";
String result = instance.getAppStoreUrl();
assertEquals( expResult, result );
@@ -107,7 +110,7 @@
public void testGetInstalledApps()
{
System.out.println( "getInstalledApps" );
- DefaultAppManagerService instance = new DefaultAppManagerService();
+ DefaultAppManager instance = new DefaultAppManager();
List<App> expResult = null;
List<App> result = instance.getInstalledApps();
assertEquals( expResult, result );
@@ -124,7 +127,7 @@
{
System.out.println( "setAppFolderPath" );
String appFolderPath = "";
- DefaultAppManagerService instance = new DefaultAppManagerService();
+ DefaultAppManager instance = new DefaultAppManager();
instance.setAppFolderPath( appFolderPath );
// TODO review the generated test code and remove the default call to fail.
fail( "The test case is a prototype." );
@@ -139,26 +142,9 @@
{
System.out.println( "setAppStoreUrl" );
String appStoreUrl = "";
- DefaultAppManagerService instance = new DefaultAppManagerService();
+ DefaultAppManager instance = new DefaultAppManager();
instance.setAppStoreUrl( appStoreUrl );
// TODO review the generated test code and remove the default call to fail.
fail( "The test case is a prototype." );
}
-
- /**
- * Test of getAppFolderName method, of class DefaultAppManagerService.
- */
- @Test
- @Ignore
- public void testGetAppFolderName()
- {
- System.out.println( "getAppFolderName" );
- App app = null;
- DefaultAppManagerService instance = new DefaultAppManagerService();
- String expResult = "";
- String result = instance.getAppFolderName( app );
- assertEquals( expResult, result );
- // TODO review the generated test code and remove the default call to fail.
- fail( "The test case is a prototype." );
- }
}
\ No newline at end of file
=== 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-09-26 16:34:42 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java 2013-09-26 17:20:47 +0000
@@ -39,7 +39,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.appmanager.AppManagerService;
+import org.hisp.dhis.appmanager.AppManager;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.system.util.StreamUtils;
import org.hisp.dhis.util.ContextUtils;
@@ -63,7 +63,7 @@
// -------------------------------------------------------------------------
@Autowired
- private AppManagerService appManagerService;
+ private AppManager appManager;
// -------------------------------------------------------------------------
// Input & Output
@@ -139,7 +139,7 @@
try
{
- appManagerService.installApp( file, fileName, getRootPath() );
+ appManager.installApp( file, fileName, getRootPath() );
message = i18n.getString( "appmanager_install_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-09-26 16:53:50 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java 2013-09-26 17:20:47 +0000
@@ -32,7 +32,7 @@
import java.util.List;
import org.hisp.dhis.appmanager.App;
-import org.hisp.dhis.appmanager.AppManagerService;
+import org.hisp.dhis.appmanager.AppManager;
import org.springframework.beans.factory.annotation.Autowired;
import com.opensymphony.xwork2.Action;
@@ -48,7 +48,7 @@
// -------------------------------------------------------------------------
@Autowired
- private AppManagerService appManagerService;
+ private AppManager appManager;
// -------------------------------------------------------------------------
// Input & Output
@@ -79,9 +79,9 @@
public String execute()
throws Exception
{
- appList = appManagerService.getInstalledApps();
+ appList = appManager.getInstalledApps();
- appsRootUrl = appManagerService.getAppBaseUrl();
+ appsRootUrl = appManager.getAppBaseUrl();
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-09-26 15:20:53 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java 2013-09-26 17:20:47 +0000
@@ -35,7 +35,7 @@
import org.apache.struts2.ServletActionContext;
import org.hisp.dhis.appmanager.App;
-import org.hisp.dhis.appmanager.AppManagerService;
+import org.hisp.dhis.appmanager.AppManager;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.util.ContextUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,7 +55,7 @@
// -------------------------------------------------------------------------
@Autowired
- private AppManagerService appManagerService;
+ private AppManager appManager;
// -------------------------------------------------------------------------
// Input & Output
@@ -65,7 +65,7 @@
public String getAppFolderPath()
{
- appFolderPath = appManagerService.getAppFolderPath();
+ appFolderPath = appManager.getAppFolderPath();
if ( null == appFolderPath || appFolderPath.isEmpty() )
{
@@ -79,7 +79,7 @@
appFolderPath = realPath + File.separatorChar + "apps";
}
- appManagerService.setAppFolderPath( appFolderPath );
+ appManager.setAppFolderPath( appFolderPath );
}
return appFolderPath;
@@ -88,20 +88,20 @@
public void setAppFolderPath( String appFolderPath )
{
isSaved = true;
- appManagerService.setAppFolderPath( appFolderPath );
+ appManager.setAppFolderPath( appFolderPath );
}
private String appBaseUrl;
public String getAppBaseUrl()
{
- appBaseUrl = appManagerService.getAppBaseUrl();
+ appBaseUrl = appManager.getAppBaseUrl();
if ( null == appBaseUrl || appBaseUrl.isEmpty() )
{
HttpServletRequest request = ServletActionContext.getRequest();
String realPath = ServletActionContext.getServletContext().getRealPath( "/" );
- String appsPath = appManagerService.getAppFolderPath();
+ String appsPath = appManager.getAppFolderPath();
String baseUrl = ContextUtils.getBaseUrl( request );
String contextPath = request.getContextPath();
@@ -116,7 +116,7 @@
+ ((appsPath.replace( "//", "/" )).replace( realPath, "" )).replace( '\\', '/' );
}
- appManagerService.setAppBaseUrl( appBaseUrl );
+ appManager.setAppBaseUrl( appBaseUrl );
}
return appBaseUrl;
@@ -124,26 +124,26 @@
public void setAppBaseUrl( String appBaseUrl )
{
- appManagerService.setAppBaseUrl( appBaseUrl );
+ appManager.setAppBaseUrl( appBaseUrl );
}
private String appStoreUrl;
public String getAppStoreUrl()
{
- return appManagerService.getAppStoreUrl();
+ return appManager.getAppStoreUrl();
}
public void setAppStoreUrl( String appStoreUrl )
{
- appManagerService.setAppStoreUrl( appStoreUrl );
+ appManager.setAppStoreUrl( appStoreUrl );
}
private List<App> appList;
public List<App> getAppList()
{
- return appManagerService.getInstalledApps();
+ return appManager.getInstalledApps();
}
private I18n i18n;
=== 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-09-26 15:20:53 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java 2013-09-26 17:20:47 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.appmanager.AppManagerService;
+import org.hisp.dhis.appmanager.AppManager;
import org.springframework.beans.factory.annotation.Autowired;
import com.opensymphony.xwork2.Action;
@@ -44,7 +44,7 @@
// -------------------------------------------------------------------------
@Autowired
- private AppManagerService appManagerService;
+ private AppManager appManager;
// -------------------------------------------------------------------------
// Input & Output
@@ -65,7 +65,7 @@
public String execute()
throws Exception
{
- appStoreUrl = appManagerService.getAppStoreUrl();
+ appStoreUrl = appManager.getAppStoreUrl();
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/DeleteAppAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/DeleteAppAction.java 2013-09-26 15:30:50 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/DeleteAppAction.java 2013-09-26 17:20:47 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.appmanager.AppManagerService;
+import org.hisp.dhis.appmanager.AppManager;
import org.hisp.dhis.i18n.I18n;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,7 +45,7 @@
// -------------------------------------------------------------------------
@Autowired
- private AppManagerService appManagerService;
+ private AppManager appManager;
// -------------------------------------------------------------------------
// Input & Output
@@ -80,7 +80,7 @@
public String execute()
throws Exception
{
- if ( appName != null && appManagerService.deleteApp( appName ) )
+ if ( appName != null && appManager.deleteApp( appName ) )
{
message = i18n.getString( "appmanager_delete_success" );
}