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 2009/05/08 08:44:19 UTC
svn commit: r772861 [1/8] - in /tuscany/java/sca/modules/contribution-new:
./ META-INF/ src/ src/main/ src/main/java/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/apache/tuscany/
src/main/java/org/apache/tuscany/sca/ src/main/java/org...
Author: antelder
Date: Fri May 8 06:44:08 2009
New Revision: 772861
URL: http://svn.apache.org/viewvc?rev=772861&view=rev
Log:
Start the contribution refactoring as discussed on the mailing list. This is the 'contribution (or core-contribution or contribution-runtime) for all the spi/infrastructure type of stuff', right now it has everything so its all in one place and the contribution-metadata can be created by moving bits out of here
Added:
tuscany/java/sca/modules/contribution-new/
tuscany/java/sca/modules/contribution-new/LICENSE
tuscany/java/sca/modules/contribution-new/META-INF/
tuscany/java/sca/modules/contribution-new/META-INF/MANIFEST.MF
tuscany/java/sca/modules/contribution-new/NOTICE
tuscany/java/sca/modules/contribution-new/pom.xml
tuscany/java/sca/modules/contribution-new/src/
tuscany/java/sca/modules/contribution-new/src/main/
tuscany/java/sca/modules/contribution-new/src/main/java/
tuscany/java/sca/modules/contribution-new/src/main/java/org/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Artifact.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Constants.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContentType.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionMetadata.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultContributionFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultExport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultImport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Export.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Import.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/PackageType.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ArtifactImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionFactoryImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionMetadataImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultExportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultImportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/DefaultJavaImportExportFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/JavaExport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/JavaImport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/JavaImportExportFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ContributionHelper.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportFactoryImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/DefaultNamespaceImportExportFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/NamespaceExport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/NamespaceImport.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/NamespaceImportExportFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportExportFactoryImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportImpl.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ContributionException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ContributionReadException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ContributionResolveException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ContributionRuntimeException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ContributionWriteException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultArtifactProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleURLArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/StAXArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/StAXArtifactProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/StAXAttributeProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/StAXAttributeProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/URLArtifactProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/URLArtifactProcessorExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/UnrecognizedElementException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/UnsupportedContentTypeException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/UnsupportedPackageTypeException.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLStreamReader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidationSchemaExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/XMLDocumentStreamReader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/XMLEventsStreamReader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/XMLFragmentStreamReader.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ClassReference.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultDelegatingModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultImportAllModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultImportModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ModelResolverExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ResolverExtension.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/resolver/ResourceReference.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/scanner/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/scanner/ContributionScanner.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/scanner/ContributionScannerExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/scanner/DefaultContributionScannerExtensionPoint.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/xml/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/processor/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/scanner/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/scanner/impl/
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/scanner/impl/DirectoryContributionScanner.java
tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/workspace/scanner/impl/JarContributionScanner.java
tuscany/java/sca/modules/contribution-new/src/main/resources/
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.ContributionFactory
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.java.JavaImportExportFactory
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.namespace.NamespaceImportExportFactory
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ContributionPostProcessorExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.scanner.ContributionScannerExtensionPoint
tuscany/java/sca/modules/contribution-new/src/main/resources/contribution-java-validation-messages.properties
tuscany/java/sca/modules/contribution-new/src/main/resources/contribution-namespace-validation-messages.properties
tuscany/java/sca/modules/contribution-new/src/main/resources/contribution-validation-messages.properties
tuscany/java/sca/modules/contribution-new/src/main/resources/contribution-xml-validation-messages.properties
tuscany/java/sca/modules/contribution-new/src/test/
tuscany/java/sca/modules/contribution-new/src/test/java/
tuscany/java/sca/modules/contribution-new/src/test/java/org/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/impl/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/namespace/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/processor/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/processor/URLartifactProcessorExtensionPointTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/resolver/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/xml/
tuscany/java/sca/modules/contribution-new/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java
tuscany/java/sca/modules/contribution-new/src/test/resources/
tuscany/java/sca/modules/contribution-new/src/test/resources/deployables/
tuscany/java/sca/modules/contribution-new/src/test/resources/deployables/sample-calculator.jar (with props)
tuscany/java/sca/modules/contribution-new/src/test/resources/repository/
tuscany/java/sca/modules/contribution-new/src/test/resources/repository/sample-calculator.jar (with props)
tuscany/java/sca/modules/contribution-new/src/test/resources/test.composite
tuscany/java/sca/modules/contribution-new/src/test/resources/test.ext
Added: tuscany/java/sca/modules/contribution-new/LICENSE
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/LICENSE?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/LICENSE (added)
+++ tuscany/java/sca/modules/contribution-new/LICENSE Fri May 8 06:44:08 2009
@@ -0,0 +1,205 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+
+
Added: tuscany/java/sca/modules/contribution-new/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/META-INF/MANIFEST.MF?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/META-INF/MANIFEST.MF (added)
+++ tuscany/java/sca/modules/contribution-new/META-INF/MANIFEST.MF Fri May 8 06:44:08 2009
@@ -0,0 +1,47 @@
+Manifest-Version: 1.0
+Export-Package: org.apache.tuscany.sca.contribution.scanner;uses:="org
+ .apache.tuscany.sca.contribution.processor,org.apache.tuscany.sca.ext
+ ensibility";version="2.0.0",org.apache.tuscany.sca.contribution.resolve
+ r;uses:="org.apache.tuscany.sca.assembly,org.apache.tuscany.sca.core,
+ org.apache.tuscany.sca.contribution,org.apache.tuscany.sca.extensibil
+ ity";version="2.0.0",org.apache.tuscany.sca.contribution.processor;uses
+ :="org.apache.tuscany.sca.assembly,org.apache.tuscany.sca.core,org.ap
+ ache.tuscany.sca.policy,org.apache.tuscany.sca.monitor,org.apache.tus
+ cany.sca.extensibility,org.xml.sax,javax.xml.namespace,javax.xml.stre
+ am,javax.xml.stream.util,javax.xml.transform,org.apache.tuscany.sca.c
+ ontribution.resolver,javax.xml.transform.stream,javax.xml.validation,
+ org.xml.sax.helpers";version="2.0.0",org.apache.tuscany.sca.contributio
+ n;uses:="org.apache.tuscany.sca.assembly,org.apache.tuscany.sca.contr
+ ibution.resolver";version="2.0.0"
+Private-Package: org.apache.tuscany.sca.contribution.impl;version="1.4
+ "
+Tool: Bnd-0.0.255
+Bundle-Name: Apache Tuscany SCA Contribution Model
+Created-By: 1.6.0_07 (Sun Microsystems Inc.)
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.0
+Bnd-LastModified: 1225397102546
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Apache Tuscany SCA Contribution Model
+Import-Package: javax.xml.namespace,
+ javax.xml.stream,
+ javax.xml.stream.util,
+ javax.xml.transform,
+ javax.xml.transform.stream,
+ javax.xml.validation,
+ org.apache.tuscany.sca.assembly;version="2.0.0",
+ org.apache.tuscany.sca.assembly.impl;version="2.0.0",
+ org.apache.tuscany.sca.contribution;version="2.0.0",
+ org.apache.tuscany.sca.contribution.processor;version="2.0.0",
+ org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
+ org.apache.tuscany.sca.contribution.scanner;version="2.0.0",
+ org.apache.tuscany.sca.core;version="2.0.0",
+ org.apache.tuscany.sca.extensibility;version="2.0.0",
+ org.apache.tuscany.sca.monitor;version="2.0.0",
+ org.apache.tuscany.sca.policy;version="2.0.0",
+ org.xml.sax,
+ org.xml.sax.helpers
+Bundle-SymbolicName: org.apache.tuscany.sca.contribution
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
Added: tuscany/java/sca/modules/contribution-new/NOTICE
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/NOTICE?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/NOTICE (added)
+++ tuscany/java/sca/modules/contribution-new/NOTICE Fri May 8 06:44:08 2009
@@ -0,0 +1,6 @@
+${pom.name}
+Copyright (c) 2005 - 2009 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
Added: tuscany/java/sca/modules/contribution-new/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/pom.xml?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/pom.xml (added)
+++ tuscany/java/sca/modules/contribution-new/pom.xml Fri May 8 06:44:08 2009
@@ -0,0 +1,64 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-modules</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>tuscany-contribution-new</artifactId>
+ <name>Apache Tuscany SCA Contribution New</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-assembly</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-extensibility</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.4</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Artifact.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Artifact.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Artifact.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Artifact.java Fri May 8 06:44:08 2009
@@ -0,0 +1,74 @@
+/*
+ * 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.sca.contribution;
+
+import org.apache.tuscany.sca.assembly.Base;
+
+
+/**
+ * Represents an artifact in an SCA contribution.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public interface Artifact extends Base {
+
+ /**
+ * Returns the URI that unique identifies the artifact inside the contribution.
+ *
+ * @return The artifact URI
+ */
+ String getURI();
+
+ /**
+ * Sets the URI that uniquely identifies the artifact inside the contribution.
+ *
+ * @param uri The artifact URI
+ */
+ void setURI(String uri);
+
+ /**
+ * Returns the location of the artifact.
+ *
+ * @return The artifact location
+ */
+ String getLocation();
+
+ /**
+ * Set the location of the artifact.
+ *
+ * @param location The artifact location
+ */
+ void setLocation(String location);
+
+
+ /**
+ * Returns the in-memory model representing the artifact.
+ *
+ * @return The model object
+ */
+ <T> T getModel();
+
+ /**
+ * Sets the in-memory model representing the artifact.
+ *
+ * @param model The model object
+ */
+ void setModel(Object model);
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Constants.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Constants.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Constants.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Constants.java Fri May 8 06:44:08 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.sca.contribution;
+
+/**
+ * Constants used in SCA contribution.
+ *
+ * @version $Rev: 750765 $ $Date: 2009-03-06 04:36:04 +0000 (Fri, 06 Mar 2009) $
+ */
+public interface Constants {
+ String XMLSCHEMA_NS = "http://www.w3.org/2001/XMLSchema";
+
+ String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200903";
+ String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1";
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContentType.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContentType.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContentType.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContentType.java Fri May 8 06:44:08 2009
@@ -0,0 +1,40 @@
+/*
+ * 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.sca.contribution;
+
+/**
+ * Constants for the main supported contribution package type.
+ *
+ * @version $Rev: 616114 $ $Date: 2008-01-29 00:05:37 +0000 (Tue, 29 Jan 2008) $
+ */
+@Deprecated
+public interface ContentType {
+
+ /**
+ * Java compressed contribution package
+ */
+ String JAR = "application/x-compressed";
+
+ /**
+ * Filesystem folder contribution package
+ */
+ String FOLDER = "application/vnd.tuscany.folder";
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java Fri May 8 06:44:08 2009
@@ -0,0 +1,118 @@
+/*
+ * 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.sca.contribution;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Extensible;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+/**
+ * The representation of an SCA contribution.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public interface Contribution extends Artifact, Extensible {
+
+ /**
+ * Default location of contribution metadata in an SCA contribution.
+ */
+ String SCA_CONTRIBUTION_META = "META-INF/sca-contribution.xml";
+
+ /**
+ * Default location of a generated contribution metadata in an SCA contribution.
+ */
+ String SCA_CONTRIBUTION_GENERATED_META = "META-INF/sca-contribution-generated.xml";
+
+ /**
+ * Returns a list of exports based on the contribution metadata.
+ *
+ * @return The list of exports in this contribution
+ */
+ List<Export> getExports();
+
+ /**
+ * Returns a list of imports based on the contribution metadata.
+ *
+ * @return The list of imports in this contribution
+ */
+ List<Import> getImports();
+
+ /**
+ * Returns the list of deployable composites in the contribution.
+ *
+ * @return The list of deployable composites
+ */
+ List<Composite> getDeployables();
+
+ /**
+ * Returns the list of artifacts in the contribution.
+ *
+ * @return The list of artifacts in the contribution
+ */
+ List<Artifact> getArtifacts();
+
+ /**
+ * Returns the model resolver for the models representing the artifacts
+ * visible in the scope of this contribution.
+ *
+ * @return The model resolver
+ */
+ ModelResolver getModelResolver();
+
+ /**
+ * Sets the model resolver for the models representing the artifacts
+ * visible in the scope of this contribution.
+ *
+ * @param modelResolver The model resolver
+ */
+ void setModelResolver(ModelResolver modelResolver);
+
+ /**
+ * Returns the list of contributions that this contribution depends on.
+ *
+ * @return
+ */
+ List<Contribution> getDependencies();
+
+ /**
+ * Returns the ClassLoader used to load classes and resources from
+ * this contribution
+ *
+ * FIXME Remove this, the base contribution model should not depend
+ * on Java ClassLoaders.
+ *
+ * @return The contribution ClassLoader
+ */
+ ClassLoader getClassLoader();
+
+ /**
+ * Sets the ClassLoader used to load classes and resources from
+ * this contribution
+ *
+ * FIXME Remove this, the base contribution model should not depend
+ * on Java ClassLoaders.
+ *
+ * @param classLoader the contribution class loader
+ */
+ void setClassLoader(ClassLoader classLoader);
+
+}
\ No newline at end of file
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionFactory.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionFactory.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionFactory.java Fri May 8 06:44:08 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.sca.contribution;
+
+
+/**
+ * A factory for the contribution model.
+ *
+ * @version $Rev: 763837 $ $Date: 2009-04-10 01:11:48 +0100 (Fri, 10 Apr 2009) $
+ */
+public interface ContributionFactory {
+
+ /**
+ * Create a contribution model object
+ *
+ * @return The new contribution model object
+ */
+ Contribution createContribution();
+
+ /**
+ * Create a contribution metadata model object
+ *
+ * @return The new contribution metadata model object
+ */
+ ContributionMetadata createContributionMetadata();
+
+ /**
+ * Create an artifact model object
+ *
+ * @return The new artifact model object
+ */
+ Artifact createArtifact();
+
+ /**
+ * Create a default import model object.
+ *
+ * @return the new default import model object
+ */
+ DefaultImport createDefaultImport();
+
+ /**
+ * Create a default export model object.
+ *
+ * @return the new default export model object
+ */
+ DefaultExport createDefaultExport();
+
+}
\ No newline at end of file
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionMetadata.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionMetadata.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionMetadata.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/ContributionMetadata.java Fri May 8 06:44:08 2009
@@ -0,0 +1,56 @@
+/*
+ * 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.sca.contribution;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Base;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Extensible;
+
+/**
+ * The representation of SCA contribution metadata.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public interface ContributionMetadata extends Base, Extensible {
+
+ /**
+ * Returns a list of exports based on the contribution metadata.
+ *
+ * @return The list of exports
+ */
+ List<Export> getExports();
+
+ /**
+ * Returns a list of imports based on the contribution metadata.
+ *
+ * @return The list of imports
+ */
+ List<Import> getImports();
+
+ /**
+ * Returns the list of deployable based on the contribution metadata.
+ *
+ * @return The list of deployable composites
+ */
+ List<Composite> getDeployables();
+
+}
\ No newline at end of file
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultContributionFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultContributionFactory.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultContributionFactory.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultContributionFactory.java Fri May 8 06:44:08 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.sca.contribution;
+
+import org.apache.tuscany.sca.contribution.impl.ContributionFactoryImpl;
+
+
+/**
+ * Default implementation of a contribution model factory.
+ *
+ * @version $Rev: 616114 $ $Date: 2008-01-29 00:05:37 +0000 (Tue, 29 Jan 2008) $
+ */
+public class DefaultContributionFactory extends ContributionFactoryImpl {
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultExport.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultExport.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultExport.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultExport.java Fri May 8 06:44:08 2009
@@ -0,0 +1,30 @@
+/*
+ * 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.sca.contribution;
+
+
+/**
+ * The representation of an export that exports all artifacts in
+ * a contribution.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface DefaultExport extends Export {
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultImport.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultImport.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultImport.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/DefaultImport.java Fri May 8 06:44:08 2009
@@ -0,0 +1,30 @@
+/*
+ * 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.sca.contribution;
+
+
+/**
+ * The representation of a default import that imports artifacts from
+ * all contributions.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface DefaultImport extends Import {
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Export.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Export.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Export.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Export.java Fri May 8 06:44:08 2009
@@ -0,0 +1,48 @@
+/*
+ * 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.sca.contribution;
+
+import org.apache.tuscany.sca.assembly.Extensible;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+/**
+ * The representation of an export.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public interface Export extends Extensible {
+
+ /**
+ * Returns the model resolver for the models representing artifacts
+ * made available by this export.
+ *
+ * @return The model resolver
+ */
+ ModelResolver getModelResolver();
+
+ /**
+ * Sets the model resolver for the models representing artifacts
+ * made available by this export.
+ *
+ * @param modelResolver
+ */
+ void setModelResolver(ModelResolver modelResolver);
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Import.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Import.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Import.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/Import.java Fri May 8 06:44:08 2009
@@ -0,0 +1,57 @@
+/*
+ * 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.sca.contribution;
+
+import org.apache.tuscany.sca.assembly.Extensible;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+
+/**
+ * The representation of an import.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public interface Import extends Extensible {
+
+ /**
+ * Returns the model resolver for the models representing artifacts
+ * made available by this import.
+ *
+ * @return The model resolver
+ */
+ ModelResolver getModelResolver();
+
+ /**
+ * Sets the model resolver for the models representing artifacts
+ * made available by this import.
+ *
+ * @param modelResolver The model resolver
+ */
+ void setModelResolver(ModelResolver modelResolver);
+
+ /**
+ * Verify that a specific export actually exports what is being imported.
+ *
+ * @param export The Exported being verified
+ * @return true/false
+ */
+ boolean match(Export export);
+
+}
\ No newline at end of file
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/PackageType.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/PackageType.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/PackageType.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/PackageType.java Fri May 8 06:44:08 2009
@@ -0,0 +1,57 @@
+/*
+ * 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.sca.contribution;
+
+/**
+ * Constants for the main supported contribution package types.
+ *
+ * @version $Rev: 718858 $ $Date: 2008-11-19 05:27:58 +0000 (Wed, 19 Nov 2008) $
+ */
+public interface PackageType {
+
+ /**
+ * Java compressed contribution package
+ */
+ String JAR = "application/x-compressed";
+
+ /**
+ * Zip archive contribution package
+ */
+ String ZIP = "application/x-compressed";
+
+ /**
+ * Filesystem folder contribution package
+ */
+ String FOLDER = "application/vnd.tuscany.folder";
+
+
+ String BUNDLE = "application/osgi.bundle";
+
+ /**
+ * Java EE Web Application Archive
+ */
+ String WAR = "application/war";
+
+ /**
+ * Java EE Enterprise Application Archive
+ */
+ String EAR = "application/ear";
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ArtifactImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ArtifactImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ArtifactImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ArtifactImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,94 @@
+/*
+ * 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.sca.contribution.impl;
+
+import org.apache.tuscany.sca.contribution.Artifact;
+
+
+/**
+ * The model representing an artifact in a contribution.
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+class ArtifactImpl implements Artifact {
+ private String uri;
+ private String location;
+ private Object model;
+ private boolean unresolved;
+
+ ArtifactImpl() {
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public <T> T getModel() {
+ return (T) model;
+ }
+
+ public void setModel(Object model) {
+ this.model = model;
+ }
+
+ public boolean isUnresolved() {
+ return unresolved;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ this.unresolved = unresolved;
+ }
+
+ @Override
+ public int hashCode() {
+ return uri.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ } else {
+ if (obj instanceof Artifact) {
+ return uri.equals(((Artifact)obj).getURI());
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "Artifact:" + uri + "\n" +
+ "at: " + location;
+ }
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionFactoryImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionFactoryImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionFactoryImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,60 @@
+/*
+ * 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.sca.contribution.impl;
+
+import org.apache.tuscany.sca.contribution.Artifact;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.ContributionFactory;
+import org.apache.tuscany.sca.contribution.ContributionMetadata;
+import org.apache.tuscany.sca.contribution.DefaultExport;
+import org.apache.tuscany.sca.contribution.DefaultImport;
+
+
+/**
+ * Default implementation of a contribution model factory.
+ *
+ * @version $Rev: 763837 $ $Date: 2009-04-10 01:11:48 +0100 (Fri, 10 Apr 2009) $
+ */
+public class ContributionFactoryImpl implements ContributionFactory {
+
+ protected ContributionFactoryImpl() {
+ }
+
+ public Contribution createContribution() {
+ return new ContributionImpl();
+ }
+
+ public ContributionMetadata createContributionMetadata() {
+ return new ContributionMetadataImpl();
+ }
+
+ public Artifact createArtifact() {
+ return new ArtifactImpl();
+ }
+
+ public DefaultExport createDefaultExport() {
+ return new DefaultExportImpl();
+ }
+
+ public DefaultImport createDefaultImport() {
+ return new DefaultImportImpl();
+ }
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,160 @@
+/*
+ * 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.sca.contribution.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.impl.ExtensibleImpl;
+import org.apache.tuscany.sca.contribution.Artifact;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.Export;
+import org.apache.tuscany.sca.contribution.Import;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+/**
+ * The representation of a deployed contribution
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+class ContributionImpl extends ExtensibleImpl implements Contribution {
+ private String uri;
+ private String location;
+ private Object model;
+ private byte[] contents;
+ private boolean unresolved;
+ private List<Export> exports = new ArrayList<Export>();
+ private List<Import> imports = new ArrayList<Import>();
+ private List<Composite> deployables = new ArrayList<Composite>();
+ private List<Artifact> artifacts = new ArrayList<Artifact>();
+ private List<Contribution> dependencies = new ArrayList<Contribution>();
+ private ModelResolver modelResolver;
+
+ // FIXME remove this dependency on Java ClassLoaders
+ private ClassLoader classLoader;
+
+ ContributionImpl() {
+ }
+
+ public String getLocation() {
+ return this.location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ //FIXME Remove dependency on Java ClassLoaders
+ public ClassLoader getClassLoader() {
+ return classLoader;
+ }
+
+ //FIXME Remove dependency on Java ClassLoaders
+ public void setClassLoader(ClassLoader classLoader) {
+ this.classLoader = classLoader;
+ }
+
+
+ public String getURI() {
+ return this.uri;
+ }
+
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public <T> T getModel() {
+ return (T) model;
+ }
+
+ public void setModel(Object model) {
+ this.model = model;
+ }
+
+ public byte[] getContents() {
+ return contents;
+ }
+
+ public void setContents(byte[] contents) {
+ this.contents = contents;
+ }
+
+ public boolean isUnresolved() {
+ return unresolved;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ this.unresolved = unresolved;
+ }
+
+ public ModelResolver getModelResolver() {
+ return modelResolver;
+ }
+
+ public void setModelResolver(ModelResolver modelResolver) {
+ this.modelResolver = modelResolver;
+ }
+
+ public List<Contribution> getDependencies() {
+ return dependencies;
+ }
+
+ public List<Export> getExports() {
+ return exports;
+ }
+
+ public List<Import> getImports() {
+ return imports;
+ }
+
+ public List<Composite> getDeployables() {
+ return deployables;
+ }
+
+ public List<Artifact> getArtifacts() {
+ return artifacts;
+ }
+
+ @Override
+ public int hashCode() {
+ return uri.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ } else {
+ if (obj instanceof Artifact) {
+ return uri.equals(((Artifact)obj).getURI());
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "Contribution : " + uri + " \n" +
+ "from: " + location;
+ }
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionMetadataImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionMetadataImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionMetadataImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionMetadataImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.sca.contribution.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.impl.ExtensibleImpl;
+import org.apache.tuscany.sca.contribution.ContributionMetadata;
+import org.apache.tuscany.sca.contribution.Export;
+import org.apache.tuscany.sca.contribution.Import;
+
+/**
+ * The representation of a deployed contribution
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+class ContributionMetadataImpl extends ExtensibleImpl implements ContributionMetadata {
+ private boolean unresolved;
+ private List<Export> exports = new ArrayList<Export>();
+ private List<Import> imports = new ArrayList<Import>();
+ private List<Composite> deployables = new ArrayList<Composite>();
+
+ ContributionMetadataImpl() {
+ }
+
+ public boolean isUnresolved() {
+ return unresolved;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ this.unresolved = unresolved;
+ }
+
+ public List<Export> getExports() {
+ return exports;
+ }
+
+ public List<Import> getImports() {
+ return imports;
+ }
+
+ public List<Composite> getDeployables() {
+ return deployables;
+ }
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultExportImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultExportImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultExportImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultExportImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,46 @@
+/*
+ * 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.sca.contribution.impl;
+
+import org.apache.tuscany.sca.assembly.impl.ExtensibleImpl;
+import org.apache.tuscany.sca.contribution.DefaultExport;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+/**
+ * The representation of an export for the contribution
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public class DefaultExportImpl extends ExtensibleImpl implements DefaultExport {
+ private ModelResolver modelResolver;
+
+ protected DefaultExportImpl() {
+ super();
+ }
+
+ public ModelResolver getModelResolver() {
+ return modelResolver;
+ }
+
+ public void setModelResolver(ModelResolver modelResolver) {
+ this.modelResolver = modelResolver;
+ }
+
+}
Added: tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultImportImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultImportImpl.java?rev=772861&view=auto
==============================================================================
--- tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultImportImpl.java (added)
+++ tuscany/java/sca/modules/contribution-new/src/main/java/org/apache/tuscany/sca/contribution/impl/DefaultImportImpl.java Fri May 8 06:44:08 2009
@@ -0,0 +1,56 @@
+/*
+ * 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.sca.contribution.impl;
+
+import org.apache.tuscany.sca.assembly.impl.ExtensibleImpl;
+import org.apache.tuscany.sca.contribution.DefaultExport;
+import org.apache.tuscany.sca.contribution.DefaultImport;
+import org.apache.tuscany.sca.contribution.Export;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+
+/**
+ * The representation of an import for the contribution
+ *
+ * @version $Rev: 767701 $ $Date: 2009-04-22 23:49:55 +0100 (Wed, 22 Apr 2009) $
+ */
+public class DefaultImportImpl extends ExtensibleImpl implements DefaultImport {
+ private ModelResolver modelResolver;
+
+ protected DefaultImportImpl() {
+ super();
+ }
+
+ public ModelResolver getModelResolver() {
+ return modelResolver;
+ }
+
+ public void setModelResolver(ModelResolver modelResolver) {
+ this.modelResolver = modelResolver;
+ }
+
+
+ public boolean match(Export export) {
+ if (export instanceof DefaultExport) {
+ return true;
+ }
+ return false;
+ }
+
+}