You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/17 15:58:26 UTC
svn commit: r508766 - in /incubator/tuscany/java/sca/kernel:
core/src/main/java/org/apache/tuscany/core/deployer/
spi/src/main/java/org/apache/tuscany/spi/deployer/
Author: jboynes
Date: Sat Feb 17 06:58:25 2007
New Revision: 508766
URL: http://svn.apache.org/viewvc?view=rev&rev=508766
Log:
refactor DeploymentContext implementations to handle componentId
renamed getCompositeURI to getComponentId
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/AbstractDeploymentContext.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/ChildDeploymentContext.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/RootDeploymentContext.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/DeploymentContext.java
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/AbstractDeploymentContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/AbstractDeploymentContext.java?view=diff&rev=508766&r1=508765&r2=508766
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/AbstractDeploymentContext.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/AbstractDeploymentContext.java Sat Feb 17 06:58:25 2007
@@ -33,16 +33,23 @@
* @version $Rev$ $Date$
*/
public abstract class AbstractDeploymentContext implements DeploymentContext {
- private final URI compositeURI;
+ private final URI componentId;
private final ClassLoader classLoader;
private final URL scdlLocation;
private final Map<String, Object> properties = new HashMap<String, Object>();
private List<String> pathNames = new ArrayList<String>();
- protected AbstractDeploymentContext(ClassLoader classLoader, URL scdlLocation) {
+ /**
+ * Constructor defining properties of this context.
+ *
+ * @param classLoader the classloader for loading application resources
+ * @param scdlLocation the location of the SCDL defining this composite
+ * @param componentId the id of the component being deployed
+ */
+ protected AbstractDeploymentContext(ClassLoader classLoader, URL scdlLocation, URI componentId) {
this.classLoader = classLoader;
this.scdlLocation = scdlLocation;
- this.compositeURI = null;
+ this.componentId = componentId;
}
public ClassLoader getClassLoader() {
@@ -69,7 +76,7 @@
}
}
- public URI getCompositeURI() {
- return compositeURI;
+ public URI getComponentId() {
+ return componentId;
}
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/ChildDeploymentContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/ChildDeploymentContext.java?view=diff&rev=508766&r1=508765&r2=508766
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/ChildDeploymentContext.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/ChildDeploymentContext.java Sat Feb 17 06:58:25 2007
@@ -18,6 +18,7 @@
*/
package org.apache.tuscany.core.deployer;
+import java.net.URI;
import java.net.URL;
import javax.xml.stream.XMLInputFactory;
@@ -36,12 +37,28 @@
/**
* Constructor specifying the loader for application resources.
*
- * @param parent the parent of this context
- * @param classLoader the loader for application resources
+ * @param parent the parent of this context
+ * @param classLoader the loader for application resources
* @param scdlLocation the location of the SCDL being deployed
*/
+ @Deprecated
public ChildDeploymentContext(DeploymentContext parent, ClassLoader classLoader, URL scdlLocation) {
- super(classLoader, scdlLocation);
+ this(parent, classLoader, scdlLocation, null);
+ }
+
+ /**
+ * Constructor defining properties of this context.
+ *
+ * @param parent the parent of this context
+ * @param classLoader the classloader for loading application resources
+ * @param scdlLocation the location of the SCDL defining this composite
+ * @param componentId the id of the component being deployed
+ */
+ public ChildDeploymentContext(DeploymentContext parent,
+ ClassLoader classLoader,
+ URL scdlLocation,
+ URI componentId) {
+ super(classLoader, scdlLocation, componentId);
assert parent != null;
this.parent = parent;
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/RootDeploymentContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/RootDeploymentContext.java?view=diff&rev=508766&r1=508765&r2=508766
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/RootDeploymentContext.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/deployer/RootDeploymentContext.java Sat Feb 17 06:58:25 2007
@@ -19,6 +19,7 @@
package org.apache.tuscany.core.deployer;
import java.net.URL;
+import java.net.URI;
import javax.xml.stream.XMLInputFactory;
import org.apache.tuscany.spi.component.ScopeContainer;
@@ -38,15 +39,31 @@
* Constructor specifying the loader for application resources.
*
* @param classLoader the loader for application resources
- * @param xmlFactory a factory that can be used to obtain an StAX XMLStreamReader
- * @param scopeContainer the scope context representing this deployment's COMPOSITE scope
* @param scdlLocation the location of the SCDL being deployed
*/
+ @Deprecated
public RootDeploymentContext(ClassLoader classLoader,
XMLInputFactory xmlFactory,
ScopeContainer scopeContainer,
URL scdlLocation) {
- super(classLoader, scdlLocation);
+ this(classLoader, scdlLocation, null, xmlFactory, scopeContainer);
+ }
+
+ /**
+ * Constructor defining properties of this context.
+ *
+ * @param classLoader the classloader for loading application resources
+ * @param scdlLocation the location of the SCDL defining this composite
+ * @param componentId the id of the component being deployed
+ * @param xmlFactory a factory that can be used to obtain an StAX XMLStreamReader
+ * @param scopeContainer the scope context representing this deployment's COMPOSITE scope
+ */
+ public RootDeploymentContext(ClassLoader classLoader,
+ URL scdlLocation,
+ URI componentId,
+ XMLInputFactory xmlFactory,
+ ScopeContainer scopeContainer) {
+ super(classLoader, scdlLocation, componentId);
this.xmlFactory = xmlFactory;
this.scopeContainer = scopeContainer;
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/DeploymentContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/DeploymentContext.java?view=diff&rev=508766&r1=508765&r2=508766
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/DeploymentContext.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/DeploymentContext.java Sat Feb 17 06:58:25 2007
@@ -72,7 +72,7 @@
*
* @return the URI of the composite component currently being deployed
*/
- URI getCompositeURI();
+ URI getComponentId();
/**
* Return the extension property with the supplied name.
@@ -92,7 +92,7 @@
/**
* Returns and ordered list of path names representing the current component hierarchy as an assembly is loaded.
- * Deprecated in favour of {@link #getCompositeURI}
+ * Deprecated in favour of {@link #getComponentId}
*
* @return the ordered list of path names representing the current component hierarchy
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org