summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-java-1.x/itest/workspace-manager/pom.xml2
-rw-r--r--branches/sca-java-1.x/itest/workspace-manager/src/main/java/org/apache/tuscany/sca/launcher/TestLauncher.java23
2 files changed, 6 insertions, 19 deletions
diff --git a/branches/sca-java-1.x/itest/workspace-manager/pom.xml b/branches/sca-java-1.x/itest/workspace-manager/pom.xml
index 63c8aea340..500db282a8 100644
--- a/branches/sca-java-1.x/itest/workspace-manager/pom.xml
+++ b/branches/sca-java-1.x/itest/workspace-manager/pom.xml
@@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-workspace-impl</artifactId>
+ <artifactId>tuscany-workspace-manager</artifactId>
<version>1.6-SNAPSHOT</version>
</dependency>
diff --git a/branches/sca-java-1.x/itest/workspace-manager/src/main/java/org/apache/tuscany/sca/launcher/TestLauncher.java b/branches/sca-java-1.x/itest/workspace-manager/src/main/java/org/apache/tuscany/sca/launcher/TestLauncher.java
index 91dc3a9520..3e4cd41924 100644
--- a/branches/sca-java-1.x/itest/workspace-manager/src/main/java/org/apache/tuscany/sca/launcher/TestLauncher.java
+++ b/branches/sca-java-1.x/itest/workspace-manager/src/main/java/org/apache/tuscany/sca/launcher/TestLauncher.java
@@ -38,15 +38,13 @@ import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.manager.WorkspaceManager;
-import org.apache.tuscany.sca.workspace.manager.WorkspaceManagerFactory;
import org.osoa.sca.ServiceRuntimeException;
public class TestLauncher {
public final static void main(String[] args) {
- WorkspaceManagerFactory workspaceManagerFactory = WorkspaceManagerFactory.newInstance();
- WorkspaceManager workspaceManager = workspaceManagerFactory.createWorkspaceManager();
+ WorkspaceManager workspaceManager = WorkspaceManager.newInstance();
addExtensions(workspaceManager);
workspaceManager.start();
@@ -56,7 +54,7 @@ public class TestLauncher {
private static void addExtensions(WorkspaceManager workspaceManager) {
try {
- System.out.println("Adding extensions");
+ System.out.println("Add extensions");
ExtensionPointRegistry registry = workspaceManager.getRegistry();
// get monitor
@@ -93,24 +91,13 @@ public class TestLauncher {
private static void processContributions(WorkspaceManager workspaceManager){
try {
System.out.println("Process contribution");
- ExtensionPointRegistry registry = workspaceManager.getRegistry();
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
-
- Workspace workspace = workspaceManager.createWorkspace();
-
- Contribution contribution = contributionFactory.createContribution();
- contribution.setURI("contrib1");
- contribution.setLocation("./target/classes/contrib1");
- contribution.setUnresolved(true);
- contribution = workspaceManager.addContributionToWorkspace(workspace, contribution);
-
+ Workspace workspace = workspaceManager.createWorkspace();
+ Contribution contribution = workspaceManager.readContribution("contrib1", "./target/classes/contrib1");
+ workspaceManager.addContributionToWorkspace(workspace, contribution);
workspaceManager.resolveWorkspace(workspace);
// do whatever you need to do with workspace and its resolved contributions
-
- workspaceManager.removeContributionFromWorkspace(workspace, contribution);
} catch (Exception ex) {
ex.printStackTrace();