tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r652985 - in /incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager: DistributeAndRunComponents.java DistributeComponents.java ListComponents.java ListDependencies.java ListDeployables.java WireComponents.java
Date Sat, 03 May 2008 02:57:25 GMT
Author: jsdelfino
Date: Fri May  2 19:57:24 2008
New Revision: 652985

URL: http://svn.apache.org/viewvc?rev=652985&view=rev
Log:
Starting to simplify the setup of the domain management samples, as the artifact processors
are now all registered automatically and can just be obtained from the artifact processor
extension point.

Modified:
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListComponents.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDependencies.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDeployables.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
Fri May  2 19:57:24 2008
@@ -49,15 +49,8 @@
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeProcessor;
 import org.apache.tuscany.sca.binding.atom.AtomBindingFactory;
 import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
@@ -68,9 +61,6 @@
 import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ModuleActivator;
@@ -85,7 +75,6 @@
 import org.apache.tuscany.sca.node.SCANode2;
 import org.apache.tuscany.sca.node.launcher.NodeLauncher;
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.workspace.Workspace;
 import org.apache.tuscany.sca.workspace.WorkspaceFactory;
 import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
@@ -137,10 +126,8 @@
         outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
         
         // Get contribution, workspace, assembly and policy model factories
-        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
         workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); 
         assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
         nodeFactory = modelFactories.getFactory(NodeImplementationFactory.class);
         atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class);
         
@@ -150,22 +137,6 @@
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> urlExtensionProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extensions for sca-contribution XML
and
-        // SCDL <composite>, <componentType> and <constrainingType>
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new CompositeProcessor(contributionFactory,
assemblyFactory, policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ConstrainingTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        
-        // Create and register document processor extensions for sca-contribution.xml, 
-        // sca-contribution-generated.xml, .composite, .componentType and
-        // .constrainingType documents 
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new CompositeDocumentProcessor(xmlProcessor,
inputFactory, null));
-        docProcessorExtensions.addArtifactProcessor(new ComponentTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution content processor
         modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionContentProcessor = new ContributionContentProcessor(modelFactories, modelResolvers,
urlExtensionProcessor);

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java
Fri May  2 19:57:24 2008
@@ -46,12 +46,6 @@
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeProcessor;
 import org.apache.tuscany.sca.binding.atom.AtomBindingFactory;
 import org.apache.tuscany.sca.contribution.Contribution;
 import org.apache.tuscany.sca.contribution.ContributionFactory;
@@ -65,9 +59,6 @@
 import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ModuleActivator;
@@ -166,22 +157,6 @@
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> urlExtensionProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extensions for sca-contribution XML
and
-        // SCDL <composite>, <componentType> and <constrainingType>
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new CompositeProcessor(contributionFactory,
assemblyFactory, policyFactory, xmlProcessor, monitor));
-        xmlProcessorExtensions.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ConstrainingTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        
-        // Create and register document processor extensions for sca-contribution.xml, 
-        // sca-contribution-generated.xml, .composite, .componentType and
-        // .constrainingType documents 
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new CompositeDocumentProcessor(xmlProcessor,
inputFactory, null));
-        docProcessorExtensions.addArtifactProcessor(new ComponentTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution content processor
         modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionContentProcessor = new ContributionContentProcessor(modelFactories, modelResolvers,
urlExtensionProcessor);

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListComponents.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListComponents.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListComponents.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListComponents.java
Fri May  2 19:57:24 2008
@@ -24,36 +24,19 @@
 import java.net.URL;
 import java.util.List;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.assembly.Component;
 import org.apache.tuscany.sca.assembly.ComponentService;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.Implementation;
 import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeProcessor;
 import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ModuleActivator;
@@ -62,7 +45,6 @@
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.workspace.Workspace;
 import org.apache.tuscany.sca.workspace.WorkspaceFactory;
 import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
@@ -106,37 +88,14 @@
 
         // Get XML input/output factories
         modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
-        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
-        XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
         
         // Get contribution, workspace, assembly and policy model factories
-        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
         workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); 
-        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
         
         // Create XML and document artifact processors
-        StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        StAXArtifactProcessor<Object> xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions,
inputFactory, outputFactory);
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> urlExtensionProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extensions for sca-contribution XML
and
-        // SCDL <composite>, <componentType> and <constrainingType>
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new CompositeProcessor(contributionFactory,
assemblyFactory, policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ConstrainingTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        
-        // Create and register document processor extensions for sca-contribution.xml, 
-        // sca-contribution-generated.xml, .composite, .componentType and
-        // .constrainingType documents 
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new CompositeDocumentProcessor(xmlProcessor,
inputFactory, null));
-        docProcessorExtensions.addArtifactProcessor(new ComponentTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution content processor
         modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionContentProcessor = new ContributionContentProcessor(modelFactories, modelResolvers,
urlExtensionProcessor);

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDependencies.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDependencies.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDependencies.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDependencies.java
Fri May  2 19:57:24 2008
@@ -23,23 +23,12 @@
 import java.net.URI;
 import java.net.URL;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -76,28 +65,14 @@
         
         // Get XML input/output factories
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
-        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
-        XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
         
         // Get contribution, workspace and assembly model factories
-        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
         workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); 
-        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
         
         // Create XML and document artifact processors
-        StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        StAXArtifactProcessor<Object> xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions,
inputFactory, outputFactory);
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> docProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extension for sca-contribution XML
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-
-        // Create and register document processors for sca-contribution.xml and
-        // sca-contribution-generated.xml documents
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution info processor
         ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionInfoProcessor = new ContributionInfoProcessor(modelFactories, modelResolvers,
docProcessor);

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDeployables.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDeployables.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDeployables.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/ListDeployables.java
Fri May  2 19:57:24 2008
@@ -23,24 +23,13 @@
 import java.net.URI;
 import java.net.URL;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.workspace.processor.impl.ContributionInfoProcessor;
@@ -64,30 +53,12 @@
         
         // Create extension point registry 
         ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
-        
-        // Get XML input/output factories
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
-        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
-        XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
-        
-        // Get contribution and assembly model factories
-        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
-        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
         
         // Create XML and document artifact processors
-        StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        StAXArtifactProcessor<Object> xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions,
inputFactory, outputFactory);
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> docProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extension for sca-contribution XML
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-
-        // Create and register document processor extensions for sca-contribution.xml and
-        // sca-contribution-generated.xml documents
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution info processor
         ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionInfoProcessor = new ContributionInfoProcessor(modelFactories, modelResolvers,
docProcessor);

Modified: incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java?rev=652985&r1=652984&r2=652985&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java
Fri May  2 19:57:24 2008
@@ -40,14 +40,7 @@
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeDocumentProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeProcessor;
 import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
@@ -57,9 +50,6 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.contribution.xml.ContributionGeneratedMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
-import org.apache.tuscany.sca.contribution.xml.ContributionMetadataProcessor;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ModuleActivator;
@@ -69,7 +59,6 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.workspace.Workspace;
 import org.apache.tuscany.sca.workspace.WorkspaceFactory;
 import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
@@ -126,10 +115,8 @@
         outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
         
         // Get contribution, workspace, assembly and policy model factories
-        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
         workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); 
         assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
         
         // Create XML and document artifact processors
         StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
@@ -137,22 +124,6 @@
         URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
         URLArtifactProcessor<Object> urlExtensionProcessor = new ExtensibleURLArtifactProcessor(docProcessorExtensions);
         
-        // Create and register XML artifact processor extensions for sca-contribution XML
and
-        // SCDL <composite>, <componentType> and <constrainingType>
-        xmlProcessorExtensions.addArtifactProcessor(new ContributionMetadataProcessor(assemblyFactory,
contributionFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new CompositeProcessor(contributionFactory,
assemblyFactory, policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        xmlProcessorExtensions.addArtifactProcessor(new ConstrainingTypeProcessor(assemblyFactory,
policyFactory, xmlProcessor));
-        
-        // Create and register document processor extensions for sca-contribution.xml, 
-        // sca-contribution-generated.xml, .composite, .componentType and
-        // .constrainingType documents 
-        docProcessorExtensions.addArtifactProcessor(new ContributionMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ContributionGeneratedMetadataDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new CompositeDocumentProcessor(xmlProcessor,
inputFactory, null));
-        docProcessorExtensions.addArtifactProcessor(new ComponentTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        docProcessorExtensions.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(xmlProcessor,
inputFactory));
-        
         // Create contribution content processor
         modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
         contributionContentProcessor = new ContributionContentProcessor(modelFactories, modelResolvers,
urlExtensionProcessor);



Mime
View raw message