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/07 00:32:04 UTC
svn commit: r504366 -
/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
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: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org
Re: svn commit: r504366 - /incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I was thinking of getting some context from the DeploymentContext, such as
the classloader, to help resolve the artifacts.
Thanks,
Raymond
----- Original Message -----
From: "Jeremy Boynes" <jb...@apache.org>
To: <tu...@ws.apache.org>
Sent: Tuesday, February 06, 2007 3:50 PM
Subject: Re: svn commit: r504366 -
/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
> What is DeploymentContext used for?
> --
> Jeremy
>
> On Feb 6, 2007, at 3:32 PM, rfeng@apache.org 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: tuscany-commits-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-commits-help@ws.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: svn commit: r504366 - /incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ArtifactResolver.java
Posted by Jeremy Boynes <jb...@apache.org>.
What is DeploymentContext used for?
--
Jeremy
On Feb 6, 2007, at 3:32 PM, rfeng@apache.org 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: tuscany-commits-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-commits-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org