You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/02/14 08:55:56 UTC
svn commit: r507430 - in
/incubator/tuscany/branches/sca-java-integration/sca/kernel: core/
core/src/main/java/org/apache/tuscany/core/services/deployment/
core/src/main/java/org/apache/tuscany/core/util/
core/src/test/java/org/apache/tuscany/core/serv...
Author: rfeng
Date: Tue Feb 13 23:55:55 2007
New Revision: 507430
URL: http://svn.apache.org/viewvc?view=rev&rev=507430
Log:
[sca-integration-branch] Merge deployment code from trunk to the branch
Added:
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
- copied unchanged from r507428, incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolverRegistry.java
- copied unchanged from r507428, incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolverRegistry.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Contribution.java
- copied unchanged from r504321, incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Contribution.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ContributionImport.java
- copied unchanged from r504321, incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ContributionImport.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/DeployedArtifact.java
- copied unchanged from r504321, incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/DeployedArtifact.java
Removed:
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/util/IOUtils.java
Modified:
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/pom.xml
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryImpl.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessorRegistry.java
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/pom.xml?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/pom.xml Tue Feb 13 23:55:55 2007
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
-->
<project>
<parent>
@@ -60,13 +60,13 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
- <version>1.0.1</version>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3</version>
</dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3</version>
- </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryImpl.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryImpl.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryImpl.java Tue Feb 13 23:55:55 2007
@@ -19,11 +19,13 @@
package org.apache.tuscany.core.services.deployment;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
@@ -31,146 +33,66 @@
import java.util.Map;
import org.apache.commons.io.FileUtils;
-import org.apache.tuscany.core.util.IOUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
import org.apache.tuscany.spi.deployer.ContributionRepository;
+import org.osoa.sca.annotations.Property;
public class ContributionRepositoryImpl implements ContributionRepository {
protected final File rootFile;
protected final Map<URI, URL> reposirotyContent = new HashMap<URI, URL>();
/**
- * Constructor with repository root URI
+ * Constructor with repository root
*
- * @param root
+ * @param repository
*/
- public ContributionRepositoryImpl(URI root) {
- this.rootFile = resolveRoot(root);
- }
-
- /**
- * Constructor with repository root directory
- *
- * @param rootFile
- */
- public ContributionRepositoryImpl(File rootFile) {
- if (rootFile == null)
- throw new NullPointerException("root is null");
-
- if (!rootFile.exists() || !rootFile.isDirectory() || !rootFile.canRead()) {
- throw new IllegalStateException("FileSystemRepository must have a root that's a valid readable directory (not "
- + rootFile.getAbsolutePath() + ")");
- }
-
- this.rootFile = rootFile;
- }
-
- /**
- * Constructor with repository root directory
- *
- * @param rootFile
- */
- public ContributionRepositoryImpl(File rootFile, boolean forceCreation) {
- if (rootFile == null)
- throw new NullPointerException("root is null");
-
- if (!rootFile.exists() && forceCreation) {
- // force creation of the repository
- rootFile.mkdirs();
- }
-
+ public ContributionRepositoryImpl(@Property(name = "repository") String repository) throws IOException {
+ this.rootFile = new File(repository);
+ FileUtils.forceMkdir(rootFile);
if (!rootFile.exists() || !rootFile.isDirectory() || !rootFile.canRead()) {
- throw new IllegalStateException("FileSystemRepository must have a root that's a valid readable directory (not "
- + rootFile.getAbsolutePath() + ")");
+ throw new IOException("The root is not a directory: " + repository);
}
-
- this.rootFile = rootFile;
}
/**
- * Resolve root URI to a directory on the fileSystem
- *
- * @param root
- * @return
- */
- private static File resolveRoot(URI root) {
- if (root == null)
- throw new NullPointerException("root is null");
-
- if (!root.toString().endsWith("/")) {
- try {
- root = new URI(root.toString() + "/");
- } catch (URISyntaxException e) {
- throw new RuntimeException("Invalid repository root (does not end with / ) and can't add myself", e);
- }
- }
-
- URI resolvedUri = root;
-
- if (!resolvedUri.getScheme().equals("file")) {
- throw new IllegalStateException("FileSystemRepository must have a root that's a local directory (not " + resolvedUri + ")");
- }
-
- File rootFile = new File(resolvedUri);
- return rootFile;
- }
-
- /**
- * Helper method to get a filename from a URL
+ * Resolve contribution location in the repository -> root repository /
+ * contribution file -> contribution group id / artifact id / version
*
* @param contribution
* @return
*/
- private String getUrlFilename(URL contribution) {
- String contributionFileName = contribution.getPath();
- int indexSlash = contributionFileName.lastIndexOf("/");
-
- return contributionFileName.substring(indexSlash + 1);
+ private File mapToFile(URI contribution) {
+ // FIXME: Map the contribution URI to a file?
+ return new File(rootFile, FilenameUtils.getName(contribution.toString()));
}
/**
- * Resolve contribution location in the repository -> root repository / contribution file -> contribution group id / artifact id / version
+ * Write a specific source inputstream to a file on disk
*
- * @param contribution
- * @return
+ * @param source contents of the file to be written to disk
+ * @param target file to be written
+ * @throws IOException
*/
- private File resolveContributionLocation(URL contribution) {
- String resolvedContributionLocation = rootFile.getPath() + File.separatorChar + getUrlFilename(contribution);
-
- return new File(resolvedContributionLocation);
- }
+ public static void copy(InputStream source, File target) throws IOException {
+ BufferedOutputStream out = null;
+ BufferedInputStream in = null;
- /**
- * Check if an specific contribution is available on the repository
- *
- * @param artifact
- * @return
- */
- public boolean contains(URL contribution) {
- File location = resolveContributionLocation(contribution);
- return location.canRead() && location.isFile();
+ try {
+ out = new BufferedOutputStream(new FileOutputStream(target));
+ in = new BufferedInputStream(source);
+ IOUtils.copy(in, out);
+ } finally {
+ IOUtils.closeQuietly(out);
+ IOUtils.closeQuietly(in);
+ }
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.tuscany.spi.deployer.contribution.ContributionRepository#copyToRepository(java.net.URL, java.io.InputStream)
- */
public URL store(URI contribution, InputStream contributionStream) throws IOException {
- // is this a writable repository
- if (!rootFile.canWrite()) {
- throw new IllegalStateException("This repository is not writable: " + rootFile.getAbsolutePath() + ")");
- }
-
// where the file should be stored in the repository
- File location = resolveContributionLocation(contribution.toURL());
+ File location = mapToFile(contribution);
- // assure that there isn't already a contribution on the resolved location
- if (location.exists()) {
- throw new IllegalArgumentException("Destination " + location.getAbsolutePath() + " already exists!");
- }
-
- IOUtils.write(contributionStream, location);
+ copy(contributionStream, location);
// add contribution to repositoryContent
URL contributionURL = location.toURL();
@@ -179,45 +101,28 @@
return contributionURL;
}
- /* (non-Javadoc)
- * @see org.apache.tuscany.spi.deployer.ContributionRepository#find(java.net.URI)
- */
public URL find(URI contribution) {
- if(contribution == null){
- throw new IllegalArgumentException("Invalid contribution URI : null");
+ if (contribution == null) {
+ return null;
}
-
return this.reposirotyContent.get(contribution);
}
-
- /* (non-Javadoc)
- * @see org.apache.tuscany.spi.deployer.ContributionRepository#remove(java.net.URI)
- */
- public void remove(URI contribution){
+
+ public void remove(URI contribution) {
URL contributionURL = this.find(contribution);
- if(contributionURL != null){
- //remove
- try{
+ if (contributionURL != null) {
+ // remove
+ try {
FileUtils.forceDelete(FileUtils.toFile(contributionURL));
this.reposirotyContent.remove(contribution);
- }catch(IOException ioe){
- //handle file could not be removed
+ } catch (IOException ioe) {
+ // handle file could not be removed
}
}
}
-
- /* (non-Javadoc)
- * @see org.apache.tuscany.spi.deployer.ContributionRepository#list()
- */
- public List<URI> list(){
- List<URI> reposirotyList = new ArrayList<URI>(this.reposirotyContent.size());
-
- for(URI contributionURI : this.reposirotyContent.keySet()){
- reposirotyList.add(contributionURI);
- }
- return reposirotyList;
-
+ public List<URI> list() {
+ return new ArrayList<URI>(reposirotyContent.keySet());
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java Tue Feb 13 23:55:55 2007
@@ -43,6 +43,10 @@
registry.put(processor.getContentType(), processor);
}
+ public void unregister(String contentType) {
+ registry.remove(contentType);
+ }
+
public URI contribute(URL contribution) throws DeploymentException, IOException {
if (contribution == null) {
throw new IllegalArgumentException("contribution is null");
@@ -85,6 +89,20 @@
throw new UnsupportedContentTypeException(contentType, source.toString());
}
+ return null;
+ }
+
+ public void remove(URI contribution) throws DeploymentException {
+ // TODO Auto-generated method stub
+ }
+
+ public <T> T resolve(URI contribution, Class<T> definitionType, String namespace, String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public URL resolve(URI contribution, String namespace, URI uri, URI baseURI) {
+ // TODO Auto-generated method stub
return null;
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryTestCase.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/deployment/ContributionRepositoryTestCase.java Tue Feb 13 23:55:55 2007
@@ -19,59 +19,49 @@
package org.apache.tuscany.core.services.deployment;
-import java.io.File;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import junit.framework.TestCase;
-import org.apache.commons.io.FileUtils;
-
public class ContributionRepositoryTestCase extends TestCase {
protected ContributionRepositoryImpl repository;
- protected File rootRepositoryDir;
protected void setUp() throws Exception {
super.setUp();
- this.rootRepositoryDir = new File("target/repository");
-
- //clean repository
- FileUtils.deleteDirectory(rootRepositoryDir);
+ // create repository (this should re-create the root directory)
+ this.repository = new ContributionRepositoryImpl("target/repository");
- //create repository (this should re-create the root directory)
- this.repository = new ContributionRepositoryImpl(rootRepositoryDir, true);
-
}
- public void testStore() throws Exception{
+ public void testStore() throws Exception {
String resourceLocation = "/repository/sample-calculator.jar";
URI contribution = getClass().getResource(resourceLocation).toURI();
InputStream contributionStream = getClass().getResourceAsStream(resourceLocation);
- repository.store(contribution,contributionStream);
-
+ repository.store(contribution, contributionStream);
+
URL contributionURL = repository.find(contribution);
assertNotNull(contributionURL);
}
-
+
public void testRemove() throws Exception {
String resourceLocation = "/repository/sample-calculator.jar";
URI contribution = getClass().getResource(resourceLocation).toURI();
InputStream contributionStream = getClass().getResourceAsStream(resourceLocation);
- repository.store(contribution,contributionStream);
-
+ repository.store(contribution, contributionStream);
+
repository.remove(contribution);
URL contributionURL = repository.find(contribution);
assertNull(contributionURL);
}
-
-
- public void testList() throws Exception{
+
+ public void testList() throws Exception {
String resourceLocation = "/repository/sample-calculator.jar";
URI contribution = getClass().getResource(resourceLocation).toURI();
InputStream contributionStream = getClass().getResourceAsStream(resourceLocation);
- repository.store(contribution,contributionStream);
-
- assertEquals(1, repository.list().size());
+ repository.store(contribution, contributionStream);
+
+ assertEquals(1, repository.list().size());
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java Tue Feb 13 23:55:55 2007
@@ -54,4 +54,41 @@
* @throws IOException if there was a problem reading the stream
*/
URI contribute(URI source, InputStream contribution, String contentType) throws DeploymentException, IOException;
+
+ /**
+ * Remove a contribution from the SCA domain
+ * @param contribution The URI of the contribution
+ * @throws DeploymentException
+ */
+ void remove(URI contribution) throws DeploymentException;
+
+ /**
+ * Resolve an artifact by QName within the contribution
+ *
+ * @param <T> The java type of the artifact such as javax.wsdl.Definition
+ * @param contribution The URI of the contribution
+ * @param definitionType The java type of the artifact
+ * @param namespace The namespace of the artifact
+ * @param name The name of the artifact
+ * @return The resolved artifact
+ */
+ <T> T resolve(URI contribution, Class<T> definitionType, String namespace, String name);
+
+ /**
+ * Resolve the reference to an artifact by the location URI within the given contribution.
+ * Some typical use cases are:
+ * <ul>
+ * <li>Reference a XML schema using
+ * {http://www.w3.org/2001/XMLSchema-instance}schemaLocation or
+ * <li>Reference a list of WSDLs using
+ * {http://www.w3.org/2004/08/wsdl-instance}wsdlLocation
+ * </ul>
+ * @param contribution The URI of the contribution
+ * @param namespace The namespace of the artifact. This is for validation purpose. If the namespace is null,
+ * then no check will be performed.
+ * @param uri The location URI
+ * @param baseURI The URI of the base artifact where the reference is declared
+ * @return The URL of the resolved artifact
+ */
+ URL resolve(URI contribution, String namespace, URI uri, URI baseURI);
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java Tue Feb 13 23:55:55 2007
@@ -18,16 +18,56 @@
*/
package org.apache.tuscany.spi.deployer;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+import org.apache.tuscany.host.deployment.DeploymentException;
+import org.apache.tuscany.spi.model.Contribution;
+
/**
* Interface for services that can process contributions.
- *
+ *
* @version $Rev$ $Date$
*/
public interface ContributionProcessor {
/**
* Returns the content type that this implementation can handle.
- *
+ *
* @return the content type that this implementation can handle
*/
String getContentType();
+
+ /**
+ * Process a contribution or an artifact in the contribution from the input
+ * stream. The processor might add artifacts or model objects to the
+ * contribution object.
+ *
+ * @param contribution The contribution model that will be used to hold the
+ * results from the processing
+ * @param inputStream The input stream for the contribution. The stream will
+ * not be closed but the read position after the call is
+ * undefined
+ * @param source The URI for the contribution/artifact
+ * @throws DeploymentException if there was a problem with the contribution
+ * @throws IOException if there was a problem reading the stream
+ */
+ void processContent(Contribution contribution, URI source, InputStream inputStream) throws DeploymentException,
+ IOException;
+
+ /**
+ * Process a contribution from another model object. It will be used for the
+ * case that one artifact has other inline artifacts, for example, the WSDL
+ * with inline schemas. The schema contribution processor should be able to
+ * load the schema model from the WSDL definition.
+ *
+ * @param contribution The contribution model that will be used to hold the
+ * results from the processing
+ * @param source The URI for the contribution/artifact
+ * @param modelObject A model object for further processing by the processor
+ * @throws DeploymentException
+ * @throws IOException
+ */
+ void processModel(Contribution contribution, URI source, Object modelObject) throws DeploymentException,
+ IOException;
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessorRegistry.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessorRegistry.java?view=diff&rev=507430&r1=507429&r2=507430
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessorRegistry.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessorRegistry.java Tue Feb 13 23:55:55 2007
@@ -22,5 +22,15 @@
* @version $Rev$ $Date$
*/
public interface ContributionProcessorRegistry {
+ /**
+ * Register a ContributionProcessor using the content type as the key
+ * @param processor
+ */
void register(ContributionProcessor processor);
+
+ /**
+ * Unregister a ContributionProcessor by content type
+ * @param contentType
+ */
+ void unregister(String contentType);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org