summaryrefslogtreecommitdiffstats
path: root/java/sca/tools/runtime-inspector
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-08-19 00:08:11 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-08-19 00:08:11 +0000
commit994c753d4c4f224e7b93fa8dc6ae807367317678 (patch)
treeea4ce5ea2cdb66ffc4d60b1bf1d7786eb8c731f5 /java/sca/tools/runtime-inspector
parent400713c5c4c89dfcc7e77f502003af63e1098c15 (diff)
Add SCANodeFactory/SCANode and rename the artifact ids from node2-xxx to node-xxx
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686901 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/tools/runtime-inspector')
-rw-r--r--java/sca/tools/runtime-inspector/pom.xml2
-rw-r--r--java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/AssemblyInspector.java23
-rw-r--r--java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RegistryInspector.java5
-rw-r--r--java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RuntimeInspector.java4
-rw-r--r--java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java6
-rw-r--r--java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java8
6 files changed, 14 insertions, 34 deletions
diff --git a/java/sca/tools/runtime-inspector/pom.xml b/java/sca/tools/runtime-inspector/pom.xml
index 49807b209f..6c5e314e15 100644
--- a/java/sca/tools/runtime-inspector/pom.xml
+++ b/java/sca/tools/runtime-inspector/pom.xml
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
diff --git a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/AssemblyInspector.java b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/AssemblyInspector.java
index 55f83f65b3..ff32d1b48f 100644
--- a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/AssemblyInspector.java
+++ b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/AssemblyInspector.java
@@ -18,35 +18,16 @@
*/
package org.apache.tuscany.sca.tools.inspector;
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.impl.NodeImpl;
-import org.w3c.dom.Node;
/**
@@ -55,7 +36,7 @@ import org.w3c.dom.Node;
public class AssemblyInspector {
- public String assemblyAsString(SCANode2 node) {
+ public String assemblyAsString(SCANode node) {
StringBuffer assemblyString = new StringBuffer();
// get at the node internals
diff --git a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RegistryInspector.java b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RegistryInspector.java
index 823322daeb..283d5e3df9 100644
--- a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RegistryInspector.java
+++ b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RegistryInspector.java
@@ -23,8 +23,7 @@ import java.util.Map;
import java.util.Set;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.impl.NodeImpl;
@@ -33,7 +32,7 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
*/
public class RegistryInspector {
- public String registryAsString(SCANode2 node) {
+ public String registryAsString(SCANode node) {
StringBuffer extensionPointRegistryString = new StringBuffer("Extension Point Registry \n");
// Get the interesting extension points out of the registry and print them out
diff --git a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RuntimeInspector.java b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RuntimeInspector.java
index a405264a0d..26080b2e12 100644
--- a/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RuntimeInspector.java
+++ b/java/sca/tools/runtime-inspector/src/main/java/org/apache/tuscany/sca/tools/inspector/RuntimeInspector.java
@@ -35,7 +35,7 @@ import java.util.List;
import java.util.Set;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.w3c.dom.Node;
@@ -56,7 +56,7 @@ public class RuntimeInspector {
}
}
- public String runtimeAsString(SCANode2 node) {
+ public String runtimeAsString(SCANode node) {
StringBuffer assemblyString = new StringBuffer();
this.out = new PrintWriter(new OutputStreamWriter(System.out), true);
diff --git a/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java b/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
index 614b56d489..8001ab7818 100644
--- a/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
+++ b/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
@@ -20,8 +20,8 @@
package calculator;
import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
/**
* This client program shows how to create an SCA runtime, start it,
@@ -30,7 +30,7 @@ import org.apache.tuscany.sca.node.SCANode2Factory;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
+ SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
node.start();
CalculatorService calculatorService =
diff --git a/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java b/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
index a8db7f73f3..0710b670cd 100644
--- a/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
+++ b/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
@@ -24,8 +24,8 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
import calculator.CalculatorService;
@@ -35,11 +35,11 @@ import calculator.CalculatorService;
public class RegistryInspectorTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode2 node;
+ private SCANode node;
@Override
protected void setUp() throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
node = nodeFactory.createSCANode(new File("src/test/resources/Calculator.composite").toURL().toString(),
new SCAContribution("TestContribution",
new File("src/test/resources").toURL().toString()));