From 21a5dac39be4c3f786a9f9146a46d383939ec171 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Fri, 26 Sep 2008 18:06:02 +0000 Subject: [PATCH] Start introducing the interfaces git-svn-id: https://svn.argeo.org/slc/trunk@1644 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- org.argeo.slc.autoui.launcher/pom.xml | 16 +++------------- .../java/org/argeo/slc/autoui/launcher/Main.java | 14 +++++--------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/org.argeo.slc.autoui.launcher/pom.xml b/org.argeo.slc.autoui.launcher/pom.xml index 1785af187..69e3f1df4 100644 --- a/org.argeo.slc.autoui.launcher/pom.xml +++ b/org.argeo.slc.autoui.launcher/pom.xml @@ -38,25 +38,15 @@ org.apache.felix.main - - org.springframework - spring-core - 2.0.8 - org.springframework spring-context 2.0.8 + - org.springframework - spring-beans - 2.0.8 + xerces + xercesImpl - - - xerces - xercesImpl - \ No newline at end of file diff --git a/org.argeo.slc.autoui.launcher/src/main/java/org/argeo/slc/autoui/launcher/Main.java b/org.argeo.slc.autoui.launcher/src/main/java/org/argeo/slc/autoui/launcher/Main.java index e7bba09c8..0aa79afa3 100644 --- a/org.argeo.slc.autoui.launcher/src/main/java/org/argeo/slc/autoui/launcher/Main.java +++ b/org.argeo.slc.autoui.launcher/src/main/java/org/argeo/slc/autoui/launcher/Main.java @@ -14,7 +14,7 @@ import org.apache.felix.framework.Felix; import org.apache.felix.framework.cache.BundleCache; import org.apache.felix.main.AutoActivator; import org.argeo.slc.autoui.AutoUiActivator; -import org.argeo.slc.autoui.AutoUiApplication; +import org.argeo.slc.autoui.DetachedStep; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; @@ -24,7 +24,7 @@ public class Main { try { // Load properties Properties config = prepareConfig(); - + // Start UI (in main class loader) startUi(config); @@ -110,22 +110,18 @@ public class Main { // mainArgs[0] = Class.forName("[Ljava.lang.String;"); Method mainMethod = clss.getMethod("main", mainArgsClasses); mainMethod.invoke(null, mainArgs); - - // ClassReference classReference = new ClassReference(className); - // classReference.startApplication(uiArgs); } protected static void automateUi(BundleContext bundleContext) throws Exception { // Retrieve service and execute it ServiceReference ref = bundleContext - .getServiceReference("org.argeo.slc.autoui.AutoUiApplication"); + .getServiceReference("org.argeo.slc.autoui.DetachedStep"); Object service = bundleContext.getService(ref); - // Object service = applicationContext.getBean("jemmyTest"); AutoUiActivator.stdOut("service.class=" + service.getClass()); - AutoUiApplication app = (AutoUiApplication) service; - app.execute(null); + DetachedStep app = (DetachedStep) service; + app.execute(null, null); } /* UTILITIES */ -- 2.39.2