summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-15 06:55:20 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-15 06:55:20 +0000
commit8fd838f28cf83677879eb7e97bf188e590356fc4 (patch)
treee4eddcb8b0046d1e1e824d4e2efe25b4c132259a /sca-java-2.x/trunk/modules/shell/src/main
parent5bbd095ce19fd97cfddd476dff166ad61d91fd39 (diff)
Update the detailed installed contribution command to show more information about the contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103281 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java25
1 files changed, 20 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
index 66156ad4ac..faef5c1937 100644
--- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
+++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
@@ -25,11 +25,9 @@ import static java.lang.System.out;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -46,6 +44,9 @@ import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.common.java.io.IOHelper;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.Export;
+import org.apache.tuscany.sca.contribution.java.JavaExport;
+import org.apache.tuscany.sca.contribution.namespace.NamespaceExport;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.impl.NodeImpl;
import org.apache.tuscany.sca.monitor.ValidationException;
@@ -218,10 +219,24 @@ public class Shell {
if (c == null) {
out.println("Contribution " + curi + " not installed");
} else {
- out.println("Contribution " + curi);
+ out.println(curi);
out.println(" URL: " + c.getLocation());
- // TODO: add full detail view of contribution showing
- // uri, url, dependent contrubutions, deployables, exports
+
+ List<String> es = new ArrayList<String>();
+ for (Export e : c.getExports()) {
+ if (e instanceof JavaExport) {
+ es.add(((JavaExport)e).getPackage());
+ } else if (e instanceof NamespaceExport) {
+ es.add(((NamespaceExport)e).getNamespace());
+ }
+ }
+ out.println(" Exports: " + es);
+
+ List<String> ds = new ArrayList<String>();
+ for (Composite cp : c.getDeployables()) {
+ ds.add(cp.getURI());
+ }
+ out.println(" Deployables: " + ds);
}
} else {
for (String curi : getNode().getInstalledContributionURIs()) {