You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/09/29 17:47:26 UTC
svn commit: r1002694 - in
/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration:
ContributionConfiguration.java impl/ContributionConfigurationImpl.java
Author: antelder
Date: Wed Sep 29 15:47:25 2010
New Revision: 1002694
URL: http://svn.apache.org/viewvc?rev=1002694&view=rev
Log:
Add extra contribution attributes. these are currently only supported by the node2 Node, i guess all the config classes could be copied to there instead of changing these here, but ideally node/node2 will get merged into one so node2 will go away.
Modified:
tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java
tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java
Modified: tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java?rev=1002694&r1=1002693&r2=1002694&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java Wed Sep 29 15:47:25 2010
@@ -99,4 +99,43 @@ public interface ContributionConfigurati
* @return
*/
ContributionConfiguration addDeploymentComposite(InputStream content);
+
+ /**
+ * Set if the deployable composites should be started when the contribution is installed
+ * @param startDeployables whether or not deployable composites should be started. The default is false.
+ */
+ void setStartDeployables(boolean startDeployables);
+
+ /**
+ * Tests if the deployable composites should be started when the contribution is installed
+ */
+ boolean isStartDeployables();
+
+ /**
+ * Gets the URIs of any dependent contributions. The dependent contributions are the
+ * contributions that will be used to resolve any imports used by this contribution.
+ * @return the URIs of any dependent contribution
+ */
+ List<String> getDependentContributionURIs();
+
+ /**
+ * Sets the dependent contribution URIs for this contribution. The dependent contributions are the
+ * contributions that will be used to resolve any imports used by this contribution.
+ * @param dependentContributionURIs
+ */
+ void setDependentContributionURIs(List<String> dependentContributionURIs);
+
+ /**
+ * Get the contribution meta data url. This is sca-contribution.xml data that is added to any
+ * existing meta-inf/sca-contribution.xml file within the contribution.
+ * @return the metadata url string
+ */
+ String getMetaDataURL();
+
+ /**
+ * Set the contribution meta data url. This is sca-contribution.xml data that is added to any
+ * existing meta-inf/sca-contribution.xml file within the contribution.
+ * @param metaDataURL the url string to the metadata file.
+ */
+ void setMetaDataURL(String metaDataURL);
}
Modified: tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java?rev=1002694&r1=1002693&r2=1002694&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java Wed Sep 29 15:47:25 2010
@@ -39,6 +39,9 @@ public class ContributionConfigurationIm
private List<DeploymentComposite> deploymentComposites = new ArrayList<DeploymentComposite>();
private String uri;
private String location;
+ private boolean startDeployables;
+ private List<String> dependentContributionURIs;
+ private String metaDataURL;
public ContributionConfigurationImpl() {
super();
@@ -152,4 +155,34 @@ public class ContributionConfigurationIm
composite.setLocation(location.toString());
return addDeploymentComposite(composite);
}
+
+ @Override
+ public void setStartDeployables(boolean startDeployables) {
+ this.startDeployables = startDeployables;
+ }
+
+ @Override
+ public boolean isStartDeployables() {
+ return startDeployables;
+ }
+
+ @Override
+ public List<String> getDependentContributionURIs() {
+ return dependentContributionURIs;
+ }
+
+ @Override
+ public void setDependentContributionURIs(List<String> dependentContributionURIs) {
+ this.dependentContributionURIs = dependentContributionURIs;
+ }
+
+ @Override
+ public String getMetaDataURL() {
+ return metaDataURL;
+ }
+
+ @Override
+ public void setMetaDataURL(String metaDataURL) {
+ this.metaDataURL = metaDataURL;
+ }
}
Re: svn commit: r1002694 - in /tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration: ContributionConfiguration.java impl/ContributionConfigurationImpl.java
Posted by Raymond Feng <en...@gmail.com>.
1) If a contribution doesn't have sca-contribution.xml for the exports, all the artifacts should be private to the contribution (similar as an OSGi bundle that doesn't export any packages). We can only use it by attaching a deployment composite. I don't think we should change the visibility.
2) The SCA spec doesn't allow duplicate component names within the domain. If two contributions both contain deployable composites that have name conflicts. That's an error. Why does Tuscany try to allow that?
Thanks,
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Sep 30, 2010, at 1:14 AM, ant elder wrote:
> I can. Its so we have enough control to easily support all the valid
> usages of contributions and combinations of contributions. Eg, take a
> look at samples/getting-started/scdl-include, theres no doc or readme
> yet but it uses two contributions, helloworld and scdl-include,
> presently you can't easily use that with the Node API because there is
> no way to add the additional sca-contribution.xml metadata to add
> exports to the helloworld contribution, or to stop the helloworld
> contribution deployables from being deployed which will cause
> duplicate component names as it uses the same names as the
> scdl-include contribution.
>
> ...ant
>
> On Wed, Sep 29, 2010 at 5:35 PM, Raymond Feng <en...@gmail.com> wrote:
>> Hi,
>> Can you explain why we need to add these extra configuration parameters?
>> Thanks,
>> Raymond
>> ________________________________________________________________
>> Raymond Feng
>> rfeng@apache.org
>> Apache Tuscany PMC member and committer: tuscany.apache.org
>> Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
>> Personal Web Site: www.enjoyjava.com
>> ________________________________________________________________
>> On Sep 29, 2010, at 8:47 AM, antelder@apache.org wrote:
>>
>> Author: antelder
>> Date: Wed Sep 29 15:47:25 2010
>> New Revision: 1002694
>>
>> URL: http://svn.apache.org/viewvc?rev=1002694&view=rev
>> Log:
>> Add extra contribution attributes. these are currently only supported by the
>> node2 Node, i guess all the config classes could be copied to there instead
>> of changing these here, but ideally node/node2 will get merged into one so
>> node2 will go away.
>>
Re: svn commit: r1002694 - in /tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration:
ContributionConfiguration.java impl/ContributionConfigurationImpl.java
Posted by ant elder <an...@gmail.com>.
I can. Its so we have enough control to easily support all the valid
usages of contributions and combinations of contributions. Eg, take a
look at samples/getting-started/scdl-include, theres no doc or readme
yet but it uses two contributions, helloworld and scdl-include,
presently you can't easily use that with the Node API because there is
no way to add the additional sca-contribution.xml metadata to add
exports to the helloworld contribution, or to stop the helloworld
contribution deployables from being deployed which will cause
duplicate component names as it uses the same names as the
scdl-include contribution.
...ant
On Wed, Sep 29, 2010 at 5:35 PM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
> Can you explain why we need to add these extra configuration parameters?
> Thanks,
> Raymond
> ________________________________________________________________
> Raymond Feng
> rfeng@apache.org
> Apache Tuscany PMC member and committer: tuscany.apache.org
> Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
> Personal Web Site: www.enjoyjava.com
> ________________________________________________________________
> On Sep 29, 2010, at 8:47 AM, antelder@apache.org wrote:
>
> Author: antelder
> Date: Wed Sep 29 15:47:25 2010
> New Revision: 1002694
>
> URL: http://svn.apache.org/viewvc?rev=1002694&view=rev
> Log:
> Add extra contribution attributes. these are currently only supported by the
> node2 Node, i guess all the config classes could be copied to there instead
> of changing these here, but ideally node/node2 will get merged into one so
> node2 will go away.
>
Re: svn commit: r1002694 - in /tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration: ContributionConfiguration.java impl/ContributionConfigurationImpl.java
Posted by Raymond Feng <en...@gmail.com>.
Hi,
Can you explain why we need to add these extra configuration parameters?
Thanks,
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Sep 29, 2010, at 8:47 AM, antelder@apache.org wrote:
> Author: antelder
> Date: Wed Sep 29 15:47:25 2010
> New Revision: 1002694
>
> URL: http://svn.apache.org/viewvc?rev=1002694&view=rev
> Log:
> Add extra contribution attributes. these are currently only supported by the node2 Node, i guess all the config classes could be copied to there instead of changing these here, but ideally node/node2 will get merged into one so node2 will go away.
>
> Modified:
> tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java
> tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java
>
> Modified: tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java
> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java?rev=1002694&r1=1002693&r2=1002694&view=diff
> ==============================================================================
> --- tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java (original)
> +++ tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/ContributionConfiguration.java Wed Sep 29 15:47:25 2010
> @@ -99,4 +99,43 @@ public interface ContributionConfigurati
> * @return
> */
> ContributionConfiguration addDeploymentComposite(InputStream content);
> +
> + /**
> + * Set if the deployable composites should be started when the contribution is installed
> + * @param startDeployables whether or not deployable composites should be started. The default is false.
> + */
> + void setStartDeployables(boolean startDeployables);
> +
> + /**
> + * Tests if the deployable composites should be started when the contribution is installed
> + */
> + boolean isStartDeployables();
> +
> + /**
> + * Gets the URIs of any dependent contributions. The dependent contributions are the
> + * contributions that will be used to resolve any imports used by this contribution.
> + * @return the URIs of any dependent contribution
> + */
> + List<String> getDependentContributionURIs();
> +
> + /**
> + * Sets the dependent contribution URIs for this contribution. The dependent contributions are the
> + * contributions that will be used to resolve any imports used by this contribution.
> + * @param dependentContributionURIs
> + */
> + void setDependentContributionURIs(List<String> dependentContributionURIs);
> +
> + /**
> + * Get the contribution meta data url. This is sca-contribution.xml data that is added to any
> + * existing meta-inf/sca-contribution.xml file within the contribution.
> + * @return the metadata url string
> + */
> + String getMetaDataURL();
> +
> + /**
> + * Set the contribution meta data url. This is sca-contribution.xml data that is added to any
> + * existing meta-inf/sca-contribution.xml file within the contribution.
> + * @param metaDataURL the url string to the metadata file.
> + */
> + void setMetaDataURL(String metaDataURL);
> }
>
> Modified: tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java
> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java?rev=1002694&r1=1002693&r2=1002694&view=diff
> ==============================================================================
> --- tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java (original)
> +++ tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/ContributionConfigurationImpl.java Wed Sep 29 15:47:25 2010
> @@ -39,6 +39,9 @@ public class ContributionConfigurationIm
> private List<DeploymentComposite> deploymentComposites = new ArrayList<DeploymentComposite>();
> private String uri;
> private String location;
> + private boolean startDeployables;
> + private List<String> dependentContributionURIs;
> + private String metaDataURL;
>
> public ContributionConfigurationImpl() {
> super();
> @@ -152,4 +155,34 @@ public class ContributionConfigurationIm
> composite.setLocation(location.toString());
> return addDeploymentComposite(composite);
> }
> +
> + @Override
> + public void setStartDeployables(boolean startDeployables) {
> + this.startDeployables = startDeployables;
> + }
> +
> + @Override
> + public boolean isStartDeployables() {
> + return startDeployables;
> + }
> +
> + @Override
> + public List<String> getDependentContributionURIs() {
> + return dependentContributionURIs;
> + }
> +
> + @Override
> + public void setDependentContributionURIs(List<String> dependentContributionURIs) {
> + this.dependentContributionURIs = dependentContributionURIs;
> + }
> +
> + @Override
> + public String getMetaDataURL() {
> + return metaDataURL;
> + }
> +
> + @Override
> + public void setMetaDataURL(String metaDataURL) {
> + this.metaDataURL = metaDataURL;
> + }
> }
>
>