What is DeploymentContext used for?
--
Jeremy

On Feb 6, 2007, at 3:32 PM, [EMAIL PROTECTED] wrote:

Author: rfeng
Date: Tue Feb  6 15:32:03 2007
New Revision: 504366

URL: http://svn.apache.org/viewvc?view=rev&rev=504366
Log:
Add the ArtifactResolver SPI

Added:
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java (with props)

Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/ apache/tuscany/spi/deployer/ArtifactResolver.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/ spi/src/main/java/org/apache/tuscany/spi/deployer/ ArtifactResolver.java?view=auto&rev=504366 ====================================================================== ======== --- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java (added) +++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ tuscany/spi/deployer/ArtifactResolver.java Tue Feb 6 15:32:03 2007
@@ -0,0 +1,82 @@
+/*
+ * 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.spi.deployer;
+
+import java.net.URI;
+import java.util.Map;
+
+
+/**
+ * SCA Assemblies reference many artifacts of a wide variety of types. These
+ * include:
+ * <ul>
+ * <li> Reference from one SCA composite to another SCA composite
+ * <li> Reference to PolicySet files
+ * <li> Reference to interface definition files, either WSDL or Java interfaces
+ * <li> Reference to XSD files
+ * <li> Reference to any of a wide variety of implementation artifact files, + * including Java classes, BPEL scripts, C++ DLLs and classes, PHP scripts
+ * </ul>
+ * In the SCA assemblies, these various artifacts are referenced using either + * QNames or URIs that do not point to a specific entity. Resolution of these + * references to concrete artifacts is necessary as part of the operation of the
+ * SCA domain.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ArtifactResolver {
+    /**
+     * Resolve an artifact by the qualified name
+     *
+     * @param contribution the URI of the contribution
+     * @param modelClass The java type of the artifact
+     * @param namespace The namespace of the artifact
+     * @param name The name of the artifact
+ * @param attributes Additional attributes that can be used to constrain the
+     *            resolution
+     * @param context The deployment context
+     * @return The resolved artifact
+     */
+    <T> T resolve(URI contribution,
+                  Class<T> modelClass,
+                  String namespace,
+                  String name,
+                  Map attributes,
+                  DeploymentContext context);
+
+    /**
+     * Resolve an artifact by the URI. 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 targetNamespace The target namespace of the referenced artifact, + * if the targetNamespace is null, then it's not specified + * @param location The URI of the referenced artifact, it can be absolute or
+     *            relative
+     * @param baseURI The URI of the owning artifact
+     * @return The URI of the resolved artifact
+     */
+ URI resolve(URI contribution, String targetNamespace, String location, String baseURI, DeploymentContext context);
+
+}

Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/ apache/tuscany/spi/deployer/ArtifactResolver.java ---------------------------------------------------------------------- --------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/ apache/tuscany/spi/deployer/ArtifactResolver.java ---------------------------------------------------------------------- --------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to