tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r652983 [5/5] - in /incubator/tuscany/java/sca/modules: assembly-java-dsl/src/test/java/org/apache/tuscany/sca/assembly/dsl/ assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/main/resources/META-INF/services/ ...
Date Sat, 03 May 2008 02:52:41 GMT
Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
Fri May  2 19:52:39 2008
@@ -58,12 +58,12 @@
     public void testWSDL() throws Exception {
        
         URL url = getClass().getResource("/wsdl/helloworld-service.wsdl");
-        WSDLDefinition definition = processor.read(null, URI.create("wsdl/helloworld-service.wsdl"),
url);
+        WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, URI.create("wsdl/helloworld-service.wsdl"),
url);
         
         Assert.assertNull(definition.getDefinition());
         Assert.assertEquals("http://helloworld", definition.getNamespace());
         URL url1 = getClass().getResource("/wsdl/helloworld-interface.wsdl");
-        WSDLDefinition definition1 = processor.read(null, URI.create("wsdl/helloworld-interface.wsdl"),
url1);
+        WSDLDefinition definition1 = (WSDLDefinition)documentProcessor.read(null, URI.create("wsdl/helloworld-interface.wsdl"),
url1);
         Assert.assertNull(definition1.getDefinition());
         Assert.assertEquals("http://helloworld", definition1.getNamespace());
 

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
Fri May  2 19:52:39 2008
@@ -30,6 +30,8 @@
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
@@ -47,7 +49,8 @@
 
     @Override
     public void setUp() throws Exception {
-        documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints);
         documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
 
         WSDLFactory wsdlFactory = new DefaultWSDLFactory();

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java
Fri May  2 19:52:39 2008
@@ -27,23 +27,14 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.ComponentType;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
-import org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor;
-import org.apache.tuscany.sca.assembly.xml.CompositeProcessor;
-import org.apache.tuscany.sca.assembly.xml.ConstrainingTypeProcessor;
-import org.apache.tuscany.sca.contribution.DefaultContributionFactory;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
-import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
-import org.apache.tuscany.sca.policy.DefaultPolicyFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 
 /**
  * Test reading/write WSDL interfaces.
@@ -52,51 +43,41 @@
  */
 public class WriteTestCase extends TestCase {
 
-    private DefaultStAXArtifactProcessorExtensionPoint staxProcessors;
-    private ExtensibleStAXArtifactProcessor staxProcessor;
-    private AssemblyFactory factory;
-    private PolicyFactory policyFactory;
+    private XMLInputFactory inputFactory;
+    private XMLOutputFactory outputFactory;
+    private StAXArtifactProcessor<Object> staxProcessor;
 
     @Override
     public void setUp() throws Exception {
-        ModelFactoryExtensionPoint modelFactories = new DefaultModelFactoryExtensionPoint();
-        factory = new DefaultAssemblyFactory();
-        policyFactory = new DefaultPolicyFactory();
-        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(modelFactories);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(),
XMLOutputFactory.newInstance());
-
-        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(),
factory, policyFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(factory, policyFactory,
staxProcessor));
-        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(factory, policyFactory,
staxProcessor));
-
-        WSDLFactory wsdlFactory = new DefaultWSDLFactory();
-        modelFactories.addFactory(wsdlFactory);
-        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor(modelFactories);
-        staxProcessors.addArtifactProcessor(wsdlProcessor);
+        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        inputFactory = XMLInputFactory.newInstance();
+        outputFactory = XMLOutputFactory.newInstance();
+        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory,
outputFactory);
     }
 
     public void testReadWriteComponentType() throws Exception {
         InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType");
-        ComponentType componentType = staxProcessor.read(is, ComponentType.class);
+        ComponentType componentType = (ComponentType)staxProcessor.read(inputFactory.createXMLStreamReader(is));
         assertNotNull(componentType);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        staxProcessor.write(componentType, bos);
+        staxProcessor.write(componentType, outputFactory.createXMLStreamWriter(bos));
     }
 
     public void testReadWriteConstrainingType() throws Exception {
         InputStream is = getClass().getResourceAsStream("CalculatorComponent.constrainingType");
-        ConstrainingType constrainingType = staxProcessor.read(is, ConstrainingType.class);
+        ConstrainingType constrainingType = (ConstrainingType)staxProcessor.read(inputFactory.createXMLStreamReader(is));
         assertNotNull(constrainingType);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        staxProcessor.write(constrainingType, bos);
+        staxProcessor.write(constrainingType, outputFactory.createXMLStreamWriter(bos));
     }
 
     public void testReadWriteComposite() throws Exception {
         InputStream is = getClass().getResourceAsStream("Calculator.composite");
-        Composite composite = staxProcessor.read(is, Composite.class);
+        Composite composite = (Composite)staxProcessor.read(inputFactory.createXMLStreamReader(is));
         assertNotNull(composite);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        staxProcessor.write(composite, bos);
+        staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos));
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessorTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessorTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessorTestCase.java
Fri May  2 19:52:39 2008
@@ -26,15 +26,17 @@
 
 import junit.framework.Assert;
 
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.wsdl.XSDefinition;
 import org.apache.ws.commons.schema.XmlSchemaInclude;
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaType;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -42,40 +44,31 @@
  * @version $Rev$ $Date$
  */
 public class XSDDocumentProcessorTestCase {
-    private XSDDocumentProcessor processor;
-    private WSDLFactory wsdlFactory;
+    private URLArtifactProcessor<Object> documentProcessor;
+    private ModelResolver resolver;
 
     /**
      * @throws java.lang.Exception
      */
     @Before
     public void setUp() throws Exception {
-        ModelFactoryExtensionPoint modelFactories = new DefaultModelFactoryExtensionPoint();
-        wsdlFactory = new DefaultWSDLFactory();
-        modelFactories.addFactory(wsdlFactory);
-        processor = new XSDDocumentProcessor(modelFactories);
-    }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    @After
-    public void tearDown() throws Exception {
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
+        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+        resolver = new XSDModelResolver(null, modelFactories);
     }
 
     @Test
     public void testXSD() throws Exception {
         URL url = getClass().getResource("/xsd/greeting.xsd");
-        XSDefinition definition = processor.read(null, URI.create("xsd/greeting.xsd"), url);
+        XSDefinition definition = (XSDefinition)documentProcessor.read(null, URI.create("xsd/greeting.xsd"),
url);
         Assert.assertNull(definition.getSchema());
         Assert.assertEquals("http://greeting", definition.getNamespace());
         URL url1 = getClass().getResource("/xsd/name.xsd");
-        XSDefinition definition1 = processor.read(null, URI.create("xsd/name.xsd"), url1);
+        XSDefinition definition1 = (XSDefinition)documentProcessor.read(null, URI.create("xsd/name.xsd"),
url1);
         Assert.assertNull(definition1.getSchema());
         Assert.assertEquals("http://greeting", definition1.getNamespace());
-        ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
-        factories.addFactory(wsdlFactory);
-        XSDModelResolver resolver = new XSDModelResolver(null, factories);
         resolver.addModel(definition);
         XSDefinition resolved = resolver.resolveModel(XSDefinition.class, definition);
         XmlSchemaObjectCollection collection = resolved.getSchema().getIncludes();

Modified: incubator/tuscany/java/sca/modules/interface/src/test/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface/src/test/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface/src/test/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/interface/src/test/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractTestCase.java
Fri May  2 19:52:39 2008
@@ -56,13 +56,6 @@
         Assert.assertEquals(contract, copy);
     }
 
-    /**
-     * @throws java.lang.Exception
-     */
-    @After
-    public void tearDown() throws Exception {
-    }
-    
     private static class MockInterfaceContract extends InterfaceContractImpl implements InterfaceContract
{
     }
 

Modified: incubator/tuscany/java/sca/modules/policy-security-ws/src/test/java/org/apache/tuscany/sca/policy/security/ws/PolicyReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security-ws/src/test/java/org/apache/tuscany/sca/policy/security/ws/PolicyReadTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security-ws/src/test/java/org/apache/tuscany/sca/policy/security/ws/PolicyReadTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-security-ws/src/test/java/org/apache/tuscany/sca/policy/security/ws/PolicyReadTestCase.java
Fri May  2 19:52:39 2008
@@ -24,6 +24,11 @@
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 
 import junit.framework.TestCase;
 
@@ -41,8 +46,10 @@
     public void tearDown() throws Exception {
     }
 
-    public void testPolicyReading() throws Exception { 
-        Axis2ConfigParamPolicyProcessor processor = new Axis2ConfigParamPolicyProcessor(null);
+    public void testPolicyReading() throws Exception {
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+        StAXArtifactProcessor<Axis2ConfigParamPolicy>processor = staxProcessors.getProcessor(Axis2ConfigParamPolicy.class);
         
         URL url = getClass().getResource("mock_policies.xml");
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();
@@ -50,7 +57,6 @@
         InputStream urlStream = url.openStream();
         XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
         
-        
         Axis2ConfigParamPolicy policy = processor.read(reader);
         assertEquals(policy.getParamElements().size(), 2);
     }

Modified: incubator/tuscany/java/sca/modules/policy-transaction/src/test/java/org/apache/tuscany/sca/policy/transaction/PolicyReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-transaction/src/test/java/org/apache/tuscany/sca/policy/transaction/PolicyReadTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-transaction/src/test/java/org/apache/tuscany/sca/policy/transaction/PolicyReadTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-transaction/src/test/java/org/apache/tuscany/sca/policy/transaction/PolicyReadTestCase.java
Fri May  2 19:52:39 2008
@@ -36,10 +36,6 @@
     public void setUp() throws Exception {
     }
 
-    @Override
-    public void tearDown() throws Exception {
-    }
-
     public void testPolicyReading() throws Exception {
 
         TransactionPolicyProcessor processor = new TransactionPolicyProcessor(null);

Modified: incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/WSPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/WSPolicyProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/WSPolicyProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/WSPolicyProcessor.java
Fri May  2 19:52:39 2008
@@ -19,7 +19,6 @@
 
 package org.apache.tuscany.sca.policy.xml;
 
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
 import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
 
 import javax.xml.namespace.QName;
@@ -52,11 +51,9 @@
     public final static QName WS_POLICY_QNAME =new QName(WS_POLICY_NS, WS_POLICY);
 
     public WSPolicyProcessor() {
-    	System.out.println(">>>Initializing WSPolicyProcessor");
     }
     
     public WSPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
-    	System.out.println(">>>Initializing WSPolicyProcessor");
     }
     
     public QName getArtifactType() {

Copied: incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
(from r651678, incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java?p2=incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java&p1=incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java&r1=651678&r2=652983&rev=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
Fri May  2 19:52:39 2008
@@ -34,7 +34,7 @@
  * @author administrator
  *
  */
-public class MockPolicyProcessor implements StAXArtifactProcessor<Policy> {
+public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> {
 
     public QName getArtifactType() {
         return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment");

Propchange: incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/policy-xml-ws/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
Fri May  2 19:52:39 2008
@@ -21,6 +21,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
@@ -39,10 +40,15 @@
         super(policyFactory, intentAttachPointTypeFactory, extensionProcessor);
     }
 
+    public BindingTypeProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object>
extensionProcessor) {
+        super(modelFactories.getFactory(PolicyFactory.class),
+              modelFactories.getFactory(IntentAttachPointTypeFactory.class), extensionProcessor);
+    }
+
     public QName getArtifactType() {
         return BINDING_TYPE_QNAME;
     }
-
+    
     @Override
     protected IntentAttachPointType resolveExtensionType(IntentAttachPointType extnType,
ModelResolver resolver) throws ContributionResolveException {
         if ( extnType instanceof BindingTypeImpl ) {

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
Fri May  2 19:52:39 2008
@@ -21,6 +21,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
@@ -39,6 +40,11 @@
         super(policyFactory, intentAttachPointTypeFactory, extensionProcessor);
     }
 
+    public ImplementationTypeProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object>
extensionProcessor) {
+        super(modelFactories.getFactory(PolicyFactory.class),
+              modelFactories.getFactory(IntentAttachPointTypeFactory.class), extensionProcessor);
+    }
+
     public QName getArtifactType() {
         return IMPLEMENTATION_TYPE_QNAME;
     }

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentAttachPointTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentAttachPointTypeProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentAttachPointTypeProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentAttachPointTypeProcessor.java
Fri May  2 19:52:39 2008
@@ -45,7 +45,7 @@
 /**
  * Processor for handling XML models of ExtensionType meta data definitions
  */
-public abstract class IntentAttachPointTypeProcessor extends BaseStAXArtifactProcessor implements
StAXArtifactProcessor<IntentAttachPointType>, PolicyConstants {
+abstract class IntentAttachPointTypeProcessor extends BaseStAXArtifactProcessor implements
StAXArtifactProcessor<IntentAttachPointType>, PolicyConstants {
 
     private IntentAttachPointTypeFactory attachPointTypeFactory;
     private PolicyFactory policyFactory; 

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
Fri May  2 19:52:39 2008
@@ -47,7 +47,7 @@
  * Processor for handling XML models of PolicyIntent definitions
  */
 
-public abstract class PolicyIntentProcessor<T extends Intent> extends BaseStAXArtifactProcessor
implements StAXArtifactProcessor<T>, PolicyConstants {
+abstract class PolicyIntentProcessor<T extends Intent> extends BaseStAXArtifactProcessor
implements StAXArtifactProcessor<T>, PolicyConstants {
 
     private PolicyFactory policyFactory;
 
@@ -55,7 +55,7 @@
         this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
     }
     
-    public PolicyIntentProcessor(PolicyFactory policyFactory, StAXArtifactProcessor<Object>
extensionProcessor) {
+    public PolicyIntentProcessor(PolicyFactory policyFactory) {
         this.policyFactory = policyFactory;
     }
 

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
Fri May  2 19:52:39 2008
@@ -57,8 +57,9 @@
     private StAXArtifactProcessor<Object> extensionProcessor;
     private XPathFactory xpathFactory = XPathFactory.newInstance();
     
-    public PolicySetProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public PolicySetProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object>
extensionProcessor) {
         this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
+        this.extensionProcessor = extensionProcessor;
     }
     
     public PolicySetProcessor(PolicyFactory policyFactory, StAXArtifactProcessor<Object>
extensionProcessor) {

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
Fri May  2 19:52:39 2008
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.policy.xml;
 
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.policy.ProfileIntent;
 
@@ -28,8 +28,12 @@
  */
 public class ProfileIntentProcessor extends PolicyIntentProcessor<ProfileIntent> {
 
-    public ProfileIntentProcessor(PolicyFactory policyFactory, StAXArtifactProcessor<Object>
extensionProcessor) {
-        super(policyFactory, extensionProcessor);
+    public ProfileIntentProcessor(PolicyFactory policyFactory) {
+        super(policyFactory);
+    }
+    
+    public ProfileIntentProcessor(ModelFactoryExtensionPoint modelFactories) {
+        super(modelFactories);
     }
 
     public Class<ProfileIntent> getModelType() {

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
Fri May  2 19:52:39 2008
@@ -20,7 +20,6 @@
 package org.apache.tuscany.sca.policy.xml;
 
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.policy.QualifiedIntent;
 
@@ -30,11 +29,11 @@
 public class QualifiedIntentProcessor extends PolicyIntentProcessor<QualifiedIntent>
{
 
     public QualifiedIntentProcessor(ModelFactoryExtensionPoint modelFactories) {
-        super(modelFactories.getFactory(PolicyFactory.class), null);
+        super(modelFactories);
     }
     
-    public QualifiedIntentProcessor(PolicyFactory policyFactory, StAXArtifactProcessor<Object>
extensionProcessor) {
-        super(policyFactory, extensionProcessor);
+    public QualifiedIntentProcessor(PolicyFactory policyFactory) {
+        super(policyFactory);
     }
 
     public Class<QualifiedIntent> getModelType() {

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
Fri May  2 19:52:39 2008
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.policy.xml;
 
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.policy.Intent;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 
@@ -28,8 +28,12 @@
  */
 public class SimpleIntentProcessor extends PolicyIntentProcessor<Intent> {
 
-    public SimpleIntentProcessor(PolicyFactory policyFactory, StAXArtifactProcessor<Object>
extensionProcessor) {
-        super(policyFactory, extensionProcessor);
+    public SimpleIntentProcessor(PolicyFactory policyFactory) {
+        super(policyFactory);
+    }
+
+    public SimpleIntentProcessor(ModelFactoryExtensionPoint modelFactories) {
+        super(modelFactories);
     }
 
     public Class<Intent> getModelType() {

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
Fri May  2 19:52:39 2008
@@ -16,7 +16,9 @@
 # under the License. 
 
 # Implementation class for the artifact processor extension
-#org.apache.tuscany.sca.policy.xml.SimpleIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.Intent
-#org.apache.tuscany.sca.policy.xml.PolicySetProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#policySet,model=org.apache.tuscany.sca.policy.PolicySet
-#org.apache.tuscany.sca.policy.xml.ProfileIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.ProfileIntent
-#org.apache.tuscany.sca.policy.xml.QualifiedIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.QualifiedIntent
+org.apache.tuscany.sca.policy.xml.BindingTypeProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#bindingType,model=org.apache.tuscany.sca.policy.IntentAttachPointType
+org.apache.tuscany.sca.policy.xml.ImplementationTypeProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#implementationType,model=org.apache.tuscany.sca.policy.IntentAttachPointType
+org.apache.tuscany.sca.policy.xml.SimpleIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.Intent
+org.apache.tuscany.sca.policy.xml.PolicySetProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#policySet,model=org.apache.tuscany.sca.policy.PolicySet
+org.apache.tuscany.sca.policy.xml.ProfileIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.ProfileIntent
+org.apache.tuscany.sca.policy.xml.QualifiedIntentProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#intent,model=org.apache.tuscany.sca.policy.QualifiedIntent

Modified: incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
Fri May  2 19:52:39 2008
@@ -28,20 +28,18 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
-import org.apache.tuscany.sca.policy.DefaultIntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.DefaultPolicyFactory;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.policy.Intent;
 import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.policy.PolicySet;
 import org.apache.tuscany.sca.policy.ProfileIntent;
 import org.apache.tuscany.sca.policy.QualifiedIntent;
@@ -55,18 +53,16 @@
  */
 public class ReadDocumentTestCase extends TestCase {
 
-    //private ModelResolver resolver;
-    PolicySetProcessor policySetProcessor;
-    TestModelResolver resolver = null;
-    ExtensibleStAXArtifactProcessor staxProcessor = null;
+    private ModelResolver resolver;
+    private StAXArtifactProcessor<Object> staxProcessor;
     
         
-    Map<QName, Intent> intentTable = new Hashtable<QName, Intent>();
-    Map<QName, PolicySet> policySetTable = new Hashtable<QName, PolicySet>();
-    Map<QName, IntentAttachPointType> bindingTypesTable = new Hashtable<QName, IntentAttachPointType>();
-    Map<QName, IntentAttachPointType> implTypesTable = new Hashtable<QName, IntentAttachPointType>();
-    public static final String scaNamespace = "http://www.osoa.org/xmlns/sca/1.0";
-    public static final String namespace = "http://test";
+    private Map<QName, Intent> intentTable = new Hashtable<QName, Intent>();
+    private Map<QName, PolicySet> policySetTable = new Hashtable<QName, PolicySet>();
+    private Map<QName, IntentAttachPointType> bindingTypesTable = new Hashtable<QName,
IntentAttachPointType>();
+    private Map<QName, IntentAttachPointType> implTypesTable = new Hashtable<QName,
IntentAttachPointType>();
+    private static final String scaNamespace = "http://www.osoa.org/xmlns/sca/1.0";
+    private static final String namespace = "http://test";
     
     private static final QName confidentiality = new QName(namespace, "confidentiality");
     private static final QName integrity = new QName(namespace, "integrity");
@@ -83,25 +79,16 @@
 
     @Override
     public void setUp() throws Exception {
-        resolver = new TestModelResolver();
+        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        resolver = new DefaultModelResolver();
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-        PolicyFactory policyFactory = new DefaultPolicyFactory();
-        IntentAttachPointTypeFactory intentAttachPointFactory = new DefaultIntentAttachPointTypeFactory();
-        DefaultStAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new
DefaultModelFactoryExtensionPoint());
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(),
XMLOutputFactory.newInstance());
-        
-        staxProcessors.addArtifactProcessor(new SimpleIntentProcessor(policyFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new ProfileIntentProcessor(policyFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new QualifiedIntentProcessor(policyFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new PolicySetProcessor(policyFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new ImplementationTypeProcessor(policyFactory,
intentAttachPointFactory, staxProcessor));
-        staxProcessors.addArtifactProcessor(new BindingTypeProcessor(policyFactory, intentAttachPointFactory,
staxProcessor));
-        staxProcessors.addArtifactProcessor(new MockPolicyProcessor());
+        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory,
null);
+        staxProcessors.addArtifactProcessor(new TestPolicyProcessor());
         
         URL url = getClass().getResource("test_definitions.xml");
         InputStream urlStream = url.openStream();
         XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
-        QName name = null;
         reader.next();
         while ( true ) {
             int event = reader.getEventType();

Copied: incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
(from r651678, incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java?p2=incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java&p1=incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java&r1=651678&r2=652983&rev=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/MockPolicyProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
Fri May  2 19:52:39 2008
@@ -30,7 +30,7 @@
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
 import org.apache.tuscany.sca.policy.Policy;
 
-public class MockPolicyProcessor implements StAXArtifactProcessor<Policy> {
+public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> {
 
     public QName getArtifactType() {
         return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment");

Propchange: incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/TestPolicyProcessor.java
------------------------------------------------------------------------------
    eol-style = native

Modified: incubator/tuscany/java/sca/modules/policy/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/policy/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java
Fri May  2 19:52:39 2008
@@ -36,11 +36,6 @@
         factory = new DefaultPolicyFactory();
     }
 
-    @Override
-    public void tearDown() throws Exception {
-        factory = null;
-    }
-
     public void testCreateIntent() {
         Intent intent = factory.createIntent();
         intent.setName(new QName("http://test", "reliability"));

Modified: incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java?rev=652983&r1=652982&r2=652983&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
Fri May  2 19:52:39 2008
@@ -31,6 +31,7 @@
 
 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.BaseStAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
@@ -58,6 +59,7 @@
     
     /**
      * Constructs a new contribution workspace processor.
+     * 
      * @param contributionFactory
      * @param extensionProcessor
      */
@@ -65,6 +67,17 @@
         this.workspaceFactory = workspaceFactory;
         this.contributionFactory = contributionFactory;
     }
+
+    /**
+     * Constructs a new contribution workspace processor.
+     * 
+     * @param modelFactories
+     * @param extensionProcessor
+     */
+    public WorkspaceProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object>
extensionProcessor) {
+        this.workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class);
+        this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
+    }
     
     public Workspace read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException
{
         

Added: incubator/tuscany/java/sca/modules/workspace-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=652983&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/workspace-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
(added)
+++ incubator/tuscany/java/sca/modules/workspace-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
Fri May  2 19:52:39 2008
@@ -0,0 +1,19 @@
+# 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. 
+
+# Implementation class for the artifact processor extension
+org.apache.tuscany.sca.workspace.xml.WorkspaceProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#workspace,model=org.apache.tuscany.sca.workspace.Workspace



Mime
View raw message