summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment')
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/AssemblyService.java105
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContentTypes.java35
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionProcessorException.java76
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java120
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/DeploymentException.java51
-rw-r--r--branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/UnsupportedContentTypeException.java48
6 files changed, 0 insertions, 435 deletions
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/AssemblyService.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/AssemblyService.java
deleted file mode 100644
index a8c15aa5d8..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/AssemblyService.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-/**
- * Service interface for managing the logical assembly for a Tuscany runtime.
- *
- * @version $Rev$ $Date$
- */
-public interface AssemblyService {
-
- /**
- * Add the composite identified by a supplied URI to the Domain Level
- * Composite. The supplied composite is added to the domain composite with
- * semantics that correspond to the domain-level composite having an
- * <include> statement that references the supplied composite. All of
- * the composite’s components become top-level components and the services
- * become externally visible services.
- *
- * @param contribution The URI of the contribution
- * @param composite The URI of the composite
- * @return The added composite
- * @throws DeploymentException
- */
- Object addCompositeToDomain(URI contribution, URI composite, String artifactName) throws DeploymentException;
-
- /**
- * Remove from the Domain Level composite the elements corresponding to the
- * composite identified by a supplied composite URI. This means that the
- * removal of the components, wires, services and references originally
- * added to the domain level composite by the identified composite.
- *
- * @param contribution
- * @param composite
- * @throws DeploymentException
- */
- void removeCompositeFromDomain(URI contribution, URI composite) throws DeploymentException;
-
- /**
- * Returns a <composite> definition that has an <include> line
- * for each composite that had been added to the domain level composite.
- *
- * @return The composite representing the SCA domain
- */
- Object getDomainComposite();
-
- /**
- * Get the definitions for named artifacts in the included composites.
- *
- * @param <T> The type of the definition
- * @param contribution The URI of an installed contribution
- * @param type The java type of the symbol space such as
- * javax.wsdl.Definition
- * @param namespace The namespace of the artifact
- * @param name The name of the artifact
- * @return A single definition, in whatever form is appropriate for that
- * definition type.
- */
- <T> T getDefinition(URI contribution, Class<T> type, String namespace, String name);
-
- /**
- * Apply a set of changes to the SCA Domain's logical assembly.
- *
- * @param changeSet the location of a resource containing a set of changes
- * @throws DeploymentException if there was a problem making the changes
- * @throws IOException if there was a problem accessing the resource
- */
- void applyChanges(URL changeSet) throws DeploymentException, IOException;
-
- /**
- * Apply a set of changes to the SCA Domain's logical assembly.
- *
- * @param changeSet a stream for reading a resource containing a set of
- * changes; the stream will not be closed but no guarantee is
- * made on the position the stream is left in
- * @param contentType the type of changeSet on the stream; must be a valid
- * Content-Type value as specified by <a
- * href="http://www.ietf.org/rfc/rfc2045.txt">RFC2045</a> and
- * must not be null
- * @throws DeploymentException if there was a problem making the changes
- * @throws IOException if there was a problem reading the stream
- */
- void applyChanges(InputStream changeSet, String contentType) throws DeploymentException, IOException;
-}
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContentTypes.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContentTypes.java
deleted file mode 100644
index a1f0b26b40..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContentTypes.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-/**
- * Definitions of common Content-Type values.
- *
- * @version $Rev$ $Date$
- */
-public final class ContentTypes {
- /**
- * An Assembly changeSet represented as XML.
- */
- public static final String CHANGESET_XML = "application/x-apache.tuscany.changeSet+xml";
-
- private ContentTypes() {
- }
-
-}
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionProcessorException.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionProcessorException.java
deleted file mode 100644
index 1068acfcca..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionProcessorException.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-/**
- * Exception thrown to indicate that a Content-Type is not supported by this SCA Domain.
- * The Content-Type value supplied will be returned as the message text for this exception.
- *
- * @version $Rev: 490357 $ $Date: 2006-12-26 11:06:27 -0800 (Tue, 26 Dec 2006) $
- */
-public class ContributionProcessorException extends DeploymentException {
-
- /**
- *
- */
- private static final long serialVersionUID = -5187793020502900879L;
-
- /**
- * @param message the exception message
- */
- public ContributionProcessorException(String message) {
- super(message);
- }
-
- /**
- *
- * @param message the exception message
- * @param identifier an identifier for this exception
- */
- public ContributionProcessorException(String message, String identifier) {
- super(message, identifier);
- }
-
- /**
- * @param message the exception message
- * @param cause a cause for the exception
- */
- public ContributionProcessorException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param message
- * @param identifier
- * @param cause
- */
- public ContributionProcessorException(String message, String identifier, Throwable cause) {
- super(message, identifier, cause);
- }
-
- /**
- * @param cause
- */
- public ContributionProcessorException(Throwable cause) {
- super(cause);
- }
-
-
-
-}
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java
deleted file mode 100644
index 307d6e36dc..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/ContributionService.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-/**
- * Service interface that manages artifacts contributed to a Tuscany runtime.
- *
- * @version $Rev$ $Date$
- */
-public interface ContributionService {
- /**
- * Contribute an artifact to the SCA Domain. The type of the contribution is
- * determined by the Content-Type of the resource or, if that is undefined,
- * by some implementation-specific means (such as mapping an extension in
- * the URL's path).
- *
- * @param contributionURI The URI that is used as the contribution unique ID.
- * @param sourceURL the location of the resource containing the artifact
- * @param storeInRepository flag that identifies if you want to copy the
- * contribution to the repository
- * @throws DeploymentException if there was a problem with the contribution
- * @throws IOException if there was a problem reading the resource
- */
- void contribute(URI contributionURI, URL sourceURL, boolean storeInRepository) throws DeploymentException,
- IOException;
-
- /**
- * Contribute an artifact to the SCA Domain.
- *
- * @param contributionURI The URI that is used as the contribution unique ID.
- * @param contributionContent a stream containing the resource being
- * contributed; the stream will not be closed but the read
- * position after the call is undefined
- * @throws DeploymentException if there was a problem with the contribution
- * @throws IOException if there was a problem reading the stream
- */
- void contribute(URI contributionURI, InputStream contributionContent)
- throws DeploymentException, IOException;
-
- /**
- * Get the model for an installed contribution
- *
- * @param contribution The URI of an installed contribution
- * @return The model for the contribution or null if there is no such
- * contribution
- */
- Object getContribution(URI contribution);
-
- /**
- * Adds or updates a deployment composite using a supplied composite
- * ("composite by value" – a data structure, not an existing resource in the
- * domain) to the contribution identified by a supplied contribution URI.
- * The added or updated deployment composite is given a relative URI that
- * matches the "name" attribute of the composite, with a ".composite"
- * suffix.
- */
- void addDeploymentComposite(URI contribution, Object composite);
-
- /**
- * 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);
-}
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/DeploymentException.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/DeploymentException.java
deleted file mode 100644
index 95ebb50b5c..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/DeploymentException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-import org.apache.tuscany.api.TuscanyException;
-
-/**
- * Base class for exceptions raised during deployment.
- *
- * @version $Rev$ $Date$
- */
-public abstract class DeploymentException extends TuscanyException {
- protected DeploymentException() {
- }
-
- protected DeploymentException(String message) {
- super(message);
- }
-
- protected DeploymentException(String message, String identifier) {
- super(message, identifier);
- }
-
- protected DeploymentException(String message, Throwable cause) {
- super(message, cause);
- }
-
- protected DeploymentException(String message, String identifier, Throwable cause) {
- super(message, identifier, cause);
- }
-
- protected DeploymentException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/UnsupportedContentTypeException.java b/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/UnsupportedContentTypeException.java
deleted file mode 100644
index d79fe3258a..0000000000
--- a/branches/sca-java-integration/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/deployment/UnsupportedContentTypeException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tuscany.host.deployment;
-
-/**
- * Exception thrown to indicate that a Content-Type is not supported by this SCA Domain.
- * The Content-Type value supplied will be returned as the message text for this exception.
- *
- * @version $Rev$ $Date$
- */
-public class UnsupportedContentTypeException extends DeploymentException {
-
- /**
- * Constructor specifying the Content-Type value that is not supported.
- *
- * @param contentType the type that is not supported
- */
- public UnsupportedContentTypeException(String contentType) {
- super(contentType);
- }
-
- /**
- * Constructor specifying the Content-Type value that is not supported
- * and an identifier to use with this exception (typically the resource being processed).
- *
- * @param contentType the type that is not supported
- * @param identifier an identifier for this exception
- */
- public UnsupportedContentTypeException(String contentType, String identifier) {
- super(contentType, identifier);
- }
-}