diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-15 06:57:24 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-15 06:57:24 +0000 |
commit | 36ce29b623082ca132a1734f017df2a7983af26f (patch) | |
tree | 490fb5bb4a9cef2ada69d126d0cac3c10f188505 /sca-java-2.x/trunk/modules/domain-node/src/main/java/org | |
parent | 8fd838f28cf83677879eb7e97bf188e590356fc4 (diff) |
Rename init to build and remove the getCompositeURI method as thats now done correctlky by the Tuscany runtime
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103282 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java index 4be9387396..e79590d164 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java @@ -28,7 +28,6 @@ import javax.xml.namespace.QName; import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.context.CompositeContext; -import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.core.ExtensionPointRegistry; @@ -41,7 +40,6 @@ import org.apache.tuscany.sca.runtime.EndpointRegistry; public class DeployedComposite { - private String uri; private Composite composite; private Contribution contribution; private List<Contribution> dependedOnContributions; @@ -68,7 +66,7 @@ public class DeployedComposite { this.endpointRegistry = endpointRegistry; this.extensionPointRegistry = extensionPointRegistry; try { - init(); + build(); } catch (ContributionResolveException e) { throw new ActivationException(e); } catch (CompositeBuilderException e) { @@ -76,7 +74,7 @@ public class DeployedComposite { } } - protected void init() throws ValidationException, ActivationException, ContributionResolveException, CompositeBuilderException { + protected void build() throws ValidationException, ActivationException, ContributionResolveException, CompositeBuilderException { List<Contribution> contributions = new ArrayList<Contribution>(); contributions.add(contribution); @@ -94,8 +92,6 @@ public class DeployedComposite { null, // nothing appears to use the domain name in CompositeContext null, // don't need node uri deployer.getSystemDefinitions()); - - this.uri = getCompositeURI(composite, contribution); } public void start() throws ActivationException { @@ -111,25 +107,6 @@ public class DeployedComposite { } public String getURI() { - return uri; - } - - /** - * Deployable composites don't have the uri set so get it from the artifact in the contribution - * // TODO: fix the Tuscany code so this uri is correctly set and this method isn't needed - */ - private static String getCompositeURI(Composite c, Contribution contribution) { - for (Artifact a : contribution.getArtifacts()) { - if (a.getModel() != null) { - if (a.getModel() instanceof Composite) { - Composite cm = a.getModel(); - if (c.getName().equals(cm.getName())) { - return cm.getURI(); - } - } - } - } - // shouldn't ever happen - throw new IllegalStateException("can't determine composte uri"); + return composite.getURI(); } } |