tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r657881 [6/9] - in /incubator/tuscany/java/sca: modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ modules/assembly-xml/src/main/resources/ modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ modules...
Date Mon, 19 May 2008 17:49:08 GMT
Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java Mon May 19 10:49:04 2008
@@ -22,6 +22,7 @@
 import java.io.InputStream;
 
 import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 
 import junit.framework.TestCase;
@@ -51,6 +52,7 @@
 public class ReadTestCase extends TestCase {
 
     private XMLInputFactory inputFactory;
+    private XMLOutputFactory outputFactory;
     private StAXArtifactProcessor<Object> staxProcessor;
     private CompositeBuilder compositeBuilder;
 
@@ -58,8 +60,9 @@
     public void setUp() throws Exception {
         DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         inputFactory = XMLInputFactory.newInstance();
+        outputFactory = XMLOutputFactory.newInstance();
         StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
         
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
         AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);

Modified: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/WriteTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/WriteTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/WriteTestCase.java Mon May 19 10:49:04 2008
@@ -53,7 +53,7 @@
         inputFactory = XMLInputFactory.newInstance();
         outputFactory = XMLOutputFactory.newInstance();
         StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
     }
 
     public void testReadWriteComponentType() throws Exception {

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java Mon May 19 10:49:04 2008
@@ -33,6 +33,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
@@ -41,6 +42,9 @@
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.sca.interfacedef.wsdl.XSDefinition;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
 
 /**
  * An ArtifactProcessor for WSDL documents.
@@ -56,16 +60,34 @@
     private static final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
 
     private WSDLFactory factory;
+    private Monitor monitor;
 
-    public WSDLDocumentProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public WSDLDocumentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
         this.factory = modelFactories.getFactory(WSDLFactory.class);
+        this.monitor = monitor;
     }
+    
+    /**
+     * Report a exception.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+     private void error(String message, Object model, Exception ex) {
+    	 if (monitor != null) {
+    		 Problem problem = new ProblemImpl(this.getClass().getName(), "interface-wsdlxml-validation-messages", Severity.ERROR, model, message, ex);
+    	     monitor.problem(problem);
+    	 }        
+     }
 
     public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
         try {
             return indexRead(artifactURL);
         } catch (Exception e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", artifactURL, ce);
+            throw ce;
         }
     }
 
@@ -98,7 +120,9 @@
                                 resolved = read(null, uri, uri.toURL());
                                 imp.setDefinition(resolved.getDefinition());
                             } catch (Exception e) {
-                                throw new ContributionResolveException(e);
+                            	ContributionResolveException ce = new ContributionResolveException(e);
+                            	error("ContributionResolveException", resolver, ce);
+                                throw ce;
                             }
                         } else {
                             if (location.startsWith("/")) {
@@ -114,7 +138,9 @@
                                     resolved = read(null, locationURI, locationURI.toURL());
                                     imp.setDefinition(resolved.getDefinition());
                                 } catch (Exception e) {
-                                    throw new ContributionResolveException(e);
+                                	ContributionResolveException ce = new ContributionResolveException(e);
+                                	error("ContributionResolveException", resolver, ce);
+                                    throw ce;
                                 }
                             }
                         }

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java Mon May 19 10:49:04 2008
@@ -27,6 +27,7 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
 import org.apache.tuscany.sca.assembly.xml.Constants;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -40,6 +41,9 @@
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
 
 /**
  *
@@ -48,9 +52,39 @@
 public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfaceContract>, WSDLConstants {
 
     private WSDLFactory wsdlFactory;
+    private Monitor monitor;
 
-    public WSDLInterfaceProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public WSDLInterfaceProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
         this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
+        this.monitor = monitor;
+    }
+    
+    /**
+     * Report a error.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    private void error(String message, Object model, Object... messageParameters) {
+        if (monitor != null) {
+            Problem problem = new ProblemImpl(this.getClass().getName(), "interface-wsdlxml-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+                                              monitor.problem(problem);
+        }
+     }
+   
+   /**
+    * Report a exception.
+    * 
+    * @param problems
+    * @param message
+    * @param model
+    */
+    private void error(String message, Object model, Exception ex) {
+        if (monitor != null) {
+            Problem problem = new ProblemImpl(this.getClass().getName(), "interface-wsdlxml-validation-messages", Severity.ERROR, model, message, ex);
+                                              monitor.problem(problem);
+        }        
     }
     
     /**
@@ -67,6 +101,7 @@
         // namespace#wsdl.interface(name)
         int index = uri.indexOf('#');
         if (index == -1) {
+        	error("InvalidWSDLInterfaceAttr", wsdlFactory, uri);
             throw new ContributionReadException("Invalid WSDL interface attribute: " + uri);
         }
         String namespace = uri.substring(0, index);
@@ -162,7 +197,9 @@
                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
                         } catch (InvalidInterfaceException e) {
-                            throw new ContributionResolveException(e);
+                        	ContributionResolveException ce = new ContributionResolveException(e);
+                        	error("ContributionResolveException", wsdlFactory, ce);
+                            throw ce;
                         }
                         resolver.addModel(wsdlInterface);
                     }

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessor.java Mon May 19 10:49:04 2008
@@ -24,6 +24,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
@@ -31,6 +32,9 @@
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
 import org.apache.tuscany.sca.interfacedef.wsdl.XSDefinition;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
 
 /**
  * An ArtifactProcessor for XSD documents.
@@ -40,16 +44,34 @@
 public class XSDDocumentProcessor implements URLArtifactProcessor<XSDefinition> {
 
     private WSDLFactory factory;
+    private Monitor monitor;
 
-    public XSDDocumentProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public XSDDocumentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
         this.factory = modelFactories.getFactory(WSDLFactory.class);
+        this.monitor = monitor;
     }
+    
+    /**
+     * Report a exception.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+     private void error(String message, Object model, Exception ex) {
+    	 if (monitor != null) {
+    		 Problem problem = new ProblemImpl(this.getClass().getName(), "interface-wsdlxml-validation-messages", Severity.ERROR, model, message, ex);
+    	     monitor.problem(problem);
+    	 }        
+     }
 
     public XSDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
         try {
             return indexRead(artifactURL);
         } catch (Exception e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", artifactURL, ce);
+            throw ce;
         }
     }
 

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties?rev=657881&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties Mon May 19 10:49:04 2008
@@ -0,0 +1,23 @@
+#
+#
+#    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.
+#
+#
+ContributionReadException = ContributionReadException occured due to :
+ContributionResolveException = ContributionResolveException occured due to :
+InvalidWSDLInterfaceAttr = Invalid WSDL interface attribute: {0}
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java Mon May 19 10:49:04 2008
@@ -59,7 +59,7 @@
         contribution.setModelResolver(resolver);
         
         URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.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/ReadTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java Mon May 19 10:49:04 2008
@@ -59,7 +59,7 @@
         DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         inputFactory = XMLInputFactory.newInstance();
         StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
         
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
         AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -47,7 +47,7 @@
     public void setUp() throws Exception {
         ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
 
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
         wsdlResolver = new WSDLModelResolver(null, modelFactories);

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -53,7 +53,7 @@
         inputFactory = XMLInputFactory.newInstance();
         outputFactory = XMLOutputFactory.newInstance();
         StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
     }
 
     public void testReadWriteComponentType() throws Exception {

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -54,7 +54,7 @@
     public void setUp() throws Exception {
         ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
         ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
         resolver = new XSDModelResolver(null, modelFactories);
     }

Modified: incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -1,136 +1,137 @@
-/*
- * 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.policy.logging.jdk;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.xml.Constants;
-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.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggingPolicy> {
-    private static final QName JDK_LOGGING_POLICY_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "jdkLogger");
-    private static final String LOG_LEVEL = "logLevel";
-    private static final String RESOURCE_BUNDLE = "resourceBundle";
-    private static final String USE_PARENT_HANDLERS = "useParentHandlers";
-    private static final String TUSACNY_NS = "http://tuscany.apache.org/xmlns/sca/1.0";
-    
-    public QName getArtifactType() {
-        return JDK_LOGGING_POLICY_QNAME;
-    }
-    
-    public JDKLoggingPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
-    }
-
-    
-    public JDKLoggingPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
-        JDKLoggingPolicy policy = new JDKLoggingPolicy();
-        int event = reader.getEventType();
-        QName name = null;
-        
-        
-        while (reader.hasNext()) {
-            event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT : {
-                    name = reader.getName();
-                    if ( name.equals(JDK_LOGGING_POLICY_QNAME) ) {
-                        String loggerName = reader.getAttributeValue(null, Constants.NAME);
-                        policy.setLoggerName(loggerName);
-                    } else if ( LOG_LEVEL.equals(name.getLocalPart()) ) {
-                        policy.setLogLevel(Level.parse(reader.getElementText()));
-                    } else if ( RESOURCE_BUNDLE.equals(name.getLocalPart()) ) {
-                        policy.setResourceBundleName(reader.getElementText());
-                    } else if ( USE_PARENT_HANDLERS.equals(name.getLocalPart()) ) {
-                        policy.setUseParentHandlers(Boolean.getBoolean(reader.getElementText()));
-                    }
-                    break;
-                }
-            }
-            
-            if ( event == END_ELEMENT ) {
-                if ( JDK_LOGGING_POLICY_QNAME.equals(reader.getName()) ) {
-                    break;
-                } 
-            }
-            
-            //Read the next element
-            if (reader.hasNext()) {
-                reader.next();
-            }
-        }
-         
-        return policy;
-    }
-
-    public void write(JDKLoggingPolicy policy, XMLStreamWriter writer) throws ContributionWriteException,
-                                                        XMLStreamException {
-        String prefix = "tuscany";
-        writer.writeStartElement(prefix, 
-                                 JDK_LOGGING_POLICY_QNAME.getLocalPart(),
-                                 JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
-        writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS);
-        
-        if (policy.getLoggerName() != null) {
-            writer.writeAttribute(Constants.NAME, policy.getLoggerName());
-        }
-        if ( policy.getLogLevel() != null ) {
-            writer.writeStartElement(prefix, 
-                                     LOG_LEVEL,
-                                     JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
-            writer.writeCharacters(policy.getLogLevel().getLocalizedName());
-            writer.writeEndElement();
-        }
-        
-        if ( policy.getResourceBundleName() != null ) {
-            writer.writeStartElement(prefix,
-                                     RESOURCE_BUNDLE,
-                                     JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
-            writer.writeCharacters(policy.getResourceBundleName());
-            writer.writeEndElement();
-        }
-        
-        writer.writeEndElement();
-    }
-
-    public Class<JDKLoggingPolicy> getModelType() {
-        return JDKLoggingPolicy.class;
-    }
-
-    public void resolve(JDKLoggingPolicy arg0, ModelResolver arg1) throws ContributionResolveException {
-
-    }
-    
-}
+/*
+ * 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.policy.logging.jdk;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.xml.Constants;
+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.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggingPolicy> {
+    private static final QName JDK_LOGGING_POLICY_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "jdkLogger");
+    private static final String LOG_LEVEL = "logLevel";
+    private static final String RESOURCE_BUNDLE = "resourceBundle";
+    private static final String USE_PARENT_HANDLERS = "useParentHandlers";
+    private static final String TUSACNY_NS = "http://tuscany.apache.org/xmlns/sca/1.0";
+        
+    public QName getArtifactType() {
+        return JDK_LOGGING_POLICY_QNAME;
+    }
+    
+    public JDKLoggingPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+    }
+
+    
+    public JDKLoggingPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+        JDKLoggingPolicy policy = new JDKLoggingPolicy();
+        int event = reader.getEventType();
+        QName name = null;
+        
+        
+        while (reader.hasNext()) {
+            event = reader.getEventType();
+            switch (event) {
+                case START_ELEMENT : {
+                    name = reader.getName();
+                    if ( name.equals(JDK_LOGGING_POLICY_QNAME) ) {
+                        String loggerName = reader.getAttributeValue(null, Constants.NAME);
+                        policy.setLoggerName(loggerName);
+                    } else if ( LOG_LEVEL.equals(name.getLocalPart()) ) {
+                        policy.setLogLevel(Level.parse(reader.getElementText()));
+                    } else if ( RESOURCE_BUNDLE.equals(name.getLocalPart()) ) {
+                        policy.setResourceBundleName(reader.getElementText());
+                    } else if ( USE_PARENT_HANDLERS.equals(name.getLocalPart()) ) {
+                        policy.setUseParentHandlers(Boolean.getBoolean(reader.getElementText()));
+                    }
+                    break;
+                }
+            }
+            
+            if ( event == END_ELEMENT ) {
+                if ( JDK_LOGGING_POLICY_QNAME.equals(reader.getName()) ) {
+                    break;
+                } 
+            }
+            
+            //Read the next element
+            if (reader.hasNext()) {
+                reader.next();
+            }
+        }
+         
+        return policy;
+    }
+
+    public void write(JDKLoggingPolicy policy, XMLStreamWriter writer) throws ContributionWriteException,
+                                                        XMLStreamException {
+        String prefix = "tuscany";
+        writer.writeStartElement(prefix, 
+                                 JDK_LOGGING_POLICY_QNAME.getLocalPart(),
+                                 JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
+        writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS);
+        
+        if (policy.getLoggerName() != null) {
+            writer.writeAttribute(Constants.NAME, policy.getLoggerName());
+        }
+        if ( policy.getLogLevel() != null ) {
+            writer.writeStartElement(prefix, 
+                                     LOG_LEVEL,
+                                     JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
+            writer.writeCharacters(policy.getLogLevel().getLocalizedName());
+            writer.writeEndElement();
+        }
+        
+        if ( policy.getResourceBundleName() != null ) {
+            writer.writeStartElement(prefix,
+                                     RESOURCE_BUNDLE,
+                                     JDK_LOGGING_POLICY_QNAME.getNamespaceURI());
+            writer.writeCharacters(policy.getResourceBundleName());
+            writer.writeEndElement();
+        }
+        
+        writer.writeEndElement();
+    }
+
+    public Class<JDKLoggingPolicy> getModelType() {
+        return JDKLoggingPolicy.class;
+    }
+
+    public void resolve(JDKLoggingPolicy arg0, ModelResolver arg1) throws ContributionResolveException {
+
+    }
+    
+}

Modified: incubator/tuscany/java/sca/modules/policy-logging/src/test/java/org/apache/tuscany/sca/policy/logging/jdk/PolicyReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-logging/src/test/java/org/apache/tuscany/sca/policy/logging/jdk/PolicyReadTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-logging/src/test/java/org/apache/tuscany/sca/policy/logging/jdk/PolicyReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/policy-logging/src/test/java/org/apache/tuscany/sca/policy/logging/jdk/PolicyReadTestCase.java Mon May 19 10:49:04 2008
@@ -1,91 +1,91 @@
-/*
- * 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.policy.logging.jdk;
-
-
-import java.io.InputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.logging.Level;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import junit.framework.TestCase;
-
-/**
- * Test the reading of ws config params policy.
- *
- * @version $Rev$ $Date$
- */
-public class PolicyReadTestCase extends TestCase {
-
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
-    public void testPolicyReading() throws Exception { 
-        JDKLoggingPolicyProcessor processor = new JDKLoggingPolicyProcessor(null);
-        
-        URL url = getClass().getResource("mock_policies.xml");
-        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-        
-        InputStream urlStream = url.openStream();
-        XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
-        
-        
-        JDKLoggingPolicy policy = processor.read(reader);
-        assertEquals(policy.getLoggerName(), "test.logger");
-        assertEquals(policy.getLogLevel(), Level.INFO );
-        assertEquals(policy.getResourceBundleName(), "Trace_Messages.properties");
-    }
-    
-    public void testPolicyWriting() throws Exception {
-        JDKLoggingPolicyProcessor processor = new JDKLoggingPolicyProcessor(null);
-        
-        JDKLoggingPolicy policy = new JDKLoggingPolicy();
-        policy.setLoggerName("test.logger");
-        policy.setLogLevel(Level.INFO);
-        policy.setResourceBundleName("Trace_Messages.properties");
-        
-        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
-        StringWriter sw = new StringWriter();
-        XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
-        processor.write(policy, writer);
-        writer.close();
-        
-        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-        StringReader sr = new StringReader(sw.toString());
-        XMLStreamReader reader = inputFactory.createXMLStreamReader(sr);
-        
-        policy = processor.read(reader);
-        assertEquals(policy.getLoggerName(), "test.logger");
-        assertEquals(policy.getLogLevel(), Level.INFO );
-        assertEquals(policy.getResourceBundleName(), "Trace_Messages.properties");
-        
-    }
-
-}
+/*
+ * 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.policy.logging.jdk;
+
+
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.logging.Level;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * Test the reading of ws config params policy.
+ *
+ * @version $Rev$ $Date$
+ */
+public class PolicyReadTestCase extends TestCase {
+
+    @Override
+    public void setUp() throws Exception {
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+    }
+
+    public void testPolicyReading() throws Exception { 
+        JDKLoggingPolicyProcessor processor = new JDKLoggingPolicyProcessor(null, null);
+        
+        URL url = getClass().getResource("mock_policies.xml");
+        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+        
+        InputStream urlStream = url.openStream();
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
+        
+        
+        JDKLoggingPolicy policy = processor.read(reader);
+        assertEquals(policy.getLoggerName(), "test.logger");
+        assertEquals(policy.getLogLevel(), Level.INFO );
+        assertEquals(policy.getResourceBundleName(), "Trace_Messages.properties");
+    }
+    
+    public void testPolicyWriting() throws Exception {
+        JDKLoggingPolicyProcessor processor = new JDKLoggingPolicyProcessor(null, null);
+        
+        JDKLoggingPolicy policy = new JDKLoggingPolicy();
+        policy.setLoggerName("test.logger");
+        policy.setLogLevel(Level.INFO);
+        policy.setResourceBundleName("Trace_Messages.properties");
+        
+        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+        StringWriter sw = new StringWriter();
+        XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
+        processor.write(policy, writer);
+        writer.close();
+        
+        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+        StringReader sr = new StringReader(sw.toString());
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(sr);
+        
+        policy = processor.read(reader);
+        assertEquals(policy.getLoggerName(), "test.logger");
+        assertEquals(policy.getLogLevel(), Level.INFO );
+        assertEquals(policy.getResourceBundleName(), "Trace_Messages.properties");
+        
+    }
+
+}

Modified: incubator/tuscany/java/sca/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -37,6 +37,7 @@
 import org.apache.tuscany.sca.contribution.service.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
 
 /**
  *
@@ -49,7 +50,7 @@
         return AXIS2_CONFIG_PARAM_POLICY_QNAME;
     }
     
-    public Axis2ConfigParamPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public Axis2ConfigParamPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
     }
 
     public Axis2ConfigParamPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -16,44 +16,44 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.tuscany.sca.policy.security.ws;
-
-
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
+package org.apache.tuscany.sca.policy.security.ws;
+
+
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
 
 import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
 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;
-
-/**
- * 
- * Test the reading of ws config params policy.
+
+import junit.framework.TestCase;
+
+/**
+ * 
+ * Test the reading of ws config params policy.
  *
  * @version $Rev$ $Date$
- */
-public class PolicyReadTestCase extends TestCase {
-
+ */
+public class PolicyReadTestCase extends TestCase {
+
     public void testPolicyReading() throws Exception {
         ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-        StAXArtifactProcessor<Object> staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
-        
-        URL url = getClass().getResource("mock_policies.xml");
-        
-        InputStream urlStream = url.openStream();
-        XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
-        
-        Axis2ConfigParamPolicy policy = (Axis2ConfigParamPolicy)staxProcessor.read(reader);
-        assertEquals(policy.getParamElements().size(), 2);
-    }
-
-}
+        StAXArtifactProcessor<Object> staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
+        
+        URL url = getClass().getResource("mock_policies.xml");
+        
+        InputStream urlStream = url.openStream();
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
+        
+        Axis2ConfigParamPolicy policy = (Axis2ConfigParamPolicy)staxProcessor.read(reader);
+        assertEquals(policy.getParamElements().size(), 2);
+    }
+
+}

Modified: incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -28,12 +28,16 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
 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.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
 
 /**
  *
@@ -41,13 +45,29 @@
  */
 public class AuthorizationPolicyProcessor implements StAXArtifactProcessor<AuthorizationPolicy> {
     private static final String ROLES = "roles";
+    private Monitor monitor;
 
     public QName getArtifactType() {
         return AuthorizationPolicy.NAME;
     }
 
-    public AuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public AuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+        this.monitor = monitor;
     }
+    
+    /**
+     * Report a error.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    private void error(String message, Object model, Object... messageParameters) {
+        if (monitor != null) {
+            Problem problem = new ProblemImpl(this.getClass().getName(), "policy-security-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+                                              monitor.problem(problem);
+        }        
+    }    
 
     public AuthorizationPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
         AuthorizationPolicy policy = new AuthorizationPolicy();
@@ -61,6 +81,7 @@
                         policy.setAccessControl(AuthorizationPolicy.AcessControl.allow);
                         String roleNames = reader.getAttributeValue(null, ROLES);
                         if (roleNames == null) {
+                        	error("RequiredAttributeRolesMissing", reader);
                             throw new IllegalArgumentException("Required attribute 'roles' is missing.");
                         }
                         StringTokenizer st = new StringTokenizer(roleNames);

Modified: incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -26,12 +26,16 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
 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.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
 
 /**
  *
@@ -39,13 +43,29 @@
  */
 public class SecurityIdentityPolicyProcessor implements StAXArtifactProcessor<SecurityIdentityPolicy> {
     private static final String ROLE = "role";
+    private Monitor monitor;
 
     public QName getArtifactType() {
         return SecurityIdentityPolicy.NAME;
     }
 
-    public SecurityIdentityPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public SecurityIdentityPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+        this.monitor = monitor;
     }
+    
+    /**
+     * Report a error.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    private void error(String message, Object model, Object... messageParameters) {
+        if (monitor != null) {
+            Problem problem = new ProblemImpl(this.getClass().getName(), "policy-security-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+                                              monitor.problem(problem);
+        }        
+    }    
 
     public SecurityIdentityPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
         SecurityIdentityPolicy policy = new SecurityIdentityPolicy();
@@ -58,6 +78,7 @@
                     if ("runAs".equals(ac)) {
                         String roleName = reader.getAttributeValue(null, ROLE);
                         if (roleName == null) {
+                        	error("RequiredAttributeRolesMissing", reader);
                             throw new IllegalArgumentException("Required attribute 'roles' is missing.");
                         }
                         policy.setRunAsRole(roleName);

Modified: incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -1,128 +1,149 @@
-/*
- * 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.policy.security.jaas;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ClassReference;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-
-/**
- *
- * @version $Rev$ $Date$
- */
-public class JaasAuthenticationPolicyProcessor implements StAXArtifactProcessor<JaasAuthenticationPolicy> {
-    private static final QName JAAS_AUTHENTICATION_POLICY_QNAME = JaasAuthenticationPolicy.NAME;
-    private static final String callbackHandler = "callbackHandler";
-    public static final QName CALLBACK_HANDLER_QNAME = new QName(Constants.SCA10_TUSCANY_NS,
-                                                               callbackHandler);
-    public static final QName CONFIGURATION_QNAME = new QName(Constants.SCA10_TUSCANY_NS,
-                                                                 "configurationName");
-    public QName getArtifactType() {
-        return JAAS_AUTHENTICATION_POLICY_QNAME;
-    }
-    
-    public JaasAuthenticationPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
-    }
-
-    
-    public JaasAuthenticationPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
-        JaasAuthenticationPolicy policy = new JaasAuthenticationPolicy();
-        int event = reader.getEventType();
-        QName name = null;
-        
-        while (reader.hasNext()) {
-            event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT : {
-                    name = reader.getName();
-                    if (name.equals(CALLBACK_HANDLER_QNAME)) {
-                        String callbackHandlerClassName = reader.getElementText();
-                        if (callbackHandlerClassName != null) {
-                            policy.setCallbackHandlerClassName(callbackHandlerClassName.trim());
-                        }
-                    }
-                    if (name.equals(CONFIGURATION_QNAME)) {
-                        String configurationName = reader.getElementText();
-                        if (configurationName != null) {
-                            policy.setConfigurationName(configurationName.trim());
-                        }
-                    } 
-
-                    break;
-                }
-            }
-            
-            if ( event == END_ELEMENT ) {
-                if ( JAAS_AUTHENTICATION_POLICY_QNAME.equals(reader.getName()) ) {
-                    break;
-                } 
-            }
-            
-            //Read the next element
-            if (reader.hasNext()) {
-                reader.next();
-            }
-        }
-         
-        return policy;
-    }
-
-    public void write(JaasAuthenticationPolicy policy, XMLStreamWriter writer) throws ContributionWriteException,
-                                                        XMLStreamException {
-        String prefix = "tuscany";
-        writer.writeStartElement(prefix, 
-                                 JAAS_AUTHENTICATION_POLICY_QNAME.getLocalPart(),
-                                 JAAS_AUTHENTICATION_POLICY_QNAME.getNamespaceURI());
-        writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS);
-        
-       
-        writer.writeEndElement();
-    }
-
-    public Class<JaasAuthenticationPolicy> getModelType() {
-        return JaasAuthenticationPolicy.class;
-    }
-
-    public void resolve(JaasAuthenticationPolicy policy, ModelResolver resolver) throws ContributionResolveException {
-
-         if (policy.getCallbackHandlerClassName() != null) {
-             ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName());
-             classReference = resolver.resolveModel(ClassReference.class, classReference);
-             Class callbackClass = classReference.getJavaClass();
-             if (callbackClass == null) {
-                 throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName()));
-             }
-             policy.setCallbackHandlerClass(callbackClass);
-         }
-    }
-    
-}
+/*
+ * 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.policy.security.jaas;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl;
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ClassReference;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class JaasAuthenticationPolicyProcessor implements StAXArtifactProcessor<JaasAuthenticationPolicy> {
+    private static final QName JAAS_AUTHENTICATION_POLICY_QNAME = JaasAuthenticationPolicy.NAME;
+    private static final String callbackHandler = "callbackHandler";
+    public static final QName CALLBACK_HANDLER_QNAME = new QName(Constants.SCA10_TUSCANY_NS,
+                                                               callbackHandler);
+    public static final QName CONFIGURATION_QNAME = new QName(Constants.SCA10_TUSCANY_NS,
+                                                                 "configurationName");
+    private Monitor monitor;
+    
+    public QName getArtifactType() {
+        return JAAS_AUTHENTICATION_POLICY_QNAME;
+    }
+    
+    public JaasAuthenticationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+    	this.monitor = monitor;
+    }
+    
+    /**
+     * Report a error.
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    private void error(String message, Object model, Object... messageParameters) {
+    	 if (monitor != null) {
+    		 Problem problem = new ProblemImpl(this.getClass().getName(), "policy-security-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+    	     monitor.problem(problem);
+    	 }        
+    }
+    
+    public JaasAuthenticationPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+        JaasAuthenticationPolicy policy = new JaasAuthenticationPolicy();
+        int event = reader.getEventType();
+        QName name = null;
+        
+        while (reader.hasNext()) {
+            event = reader.getEventType();
+            switch (event) {
+                case START_ELEMENT : {
+                    name = reader.getName();
+                    if (name.equals(CALLBACK_HANDLER_QNAME)) {
+                        String callbackHandlerClassName = reader.getElementText();
+                        if (callbackHandlerClassName != null) {
+                            policy.setCallbackHandlerClassName(callbackHandlerClassName.trim());
+                        }
+                    }
+                    if (name.equals(CONFIGURATION_QNAME)) {
+                        String configurationName = reader.getElementText();
+                        if (configurationName != null) {
+                            policy.setConfigurationName(configurationName.trim());
+                        }
+                    } 
+
+                    break;
+                }
+            }
+            
+            if ( event == END_ELEMENT ) {
+                if ( JAAS_AUTHENTICATION_POLICY_QNAME.equals(reader.getName()) ) {
+                    break;
+                } 
+            }
+            
+            //Read the next element
+            if (reader.hasNext()) {
+                reader.next();
+            }
+        }
+         
+        return policy;
+    }
+
+    public void write(JaasAuthenticationPolicy policy, XMLStreamWriter writer) throws ContributionWriteException,
+                                                        XMLStreamException {
+        String prefix = "tuscany";
+        writer.writeStartElement(prefix, 
+                                 JAAS_AUTHENTICATION_POLICY_QNAME.getLocalPart(),
+                                 JAAS_AUTHENTICATION_POLICY_QNAME.getNamespaceURI());
+        writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS);
+        
+       
+        writer.writeEndElement();
+    }
+
+    public Class<JaasAuthenticationPolicy> getModelType() {
+        return JaasAuthenticationPolicy.class;
+    }
+
+    public void resolve(JaasAuthenticationPolicy policy, ModelResolver resolver) throws ContributionResolveException {
+
+         if (policy.getCallbackHandlerClassName() != null) {
+             ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName());
+             classReference = resolver.resolveModel(ClassReference.class, classReference);
+             Class callbackClass = classReference.getJavaClass();
+             if (callbackClass == null) {
+            	 error("ClassNotFoundException", resolver, policy.getCallbackHandlerClassName());
+                 throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName()));
+             }
+             policy.setCallbackHandlerClass(callbackClass);
+         }
+    }
+    
+}

Added: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties?rev=657881&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties (added)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties Mon May 19 10:49:04 2008
@@ -0,0 +1,22 @@
+#
+#
+#    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.
+#
+#
+RequiredAttributeRolesMissing = Required attribute 'roles' is missing.
+ClassNotFoundException = Class Not Found Exception: {0}
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -32,6 +32,7 @@
 import org.apache.tuscany.sca.contribution.service.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
 
 /**
  * @version $Rev$ $Date$
@@ -39,12 +40,12 @@
 public class TransactionPolicyProcessor implements StAXArtifactProcessor<TransactionPolicy> {
     public static final String TIMEOUT = "transactionTimeout";
     public static final String ACTION = "action";
-
+    
     public QName getArtifactType() {
         return TransactionPolicy.NAME;
     }
 
-    public TransactionPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public TransactionPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
     }
 
     public TransactionPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -39,7 +39,7 @@
 
     public void testPolicyReading() throws Exception {
 
-        TransactionPolicyProcessor processor = new TransactionPolicyProcessor(null);
+        TransactionPolicyProcessor processor = new TransactionPolicyProcessor(null, null);
 
         URL url = getClass().getResource("/org/apache/tuscany/sca/policy/transaction/tuscany_definitions.xml");
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();

Modified: incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/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/ws/WSPolicyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java Mon May 19 10:49:04 2008
@@ -40,6 +40,7 @@
 import org.apache.tuscany.sca.contribution.service.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.policy.xml.PolicyConstants;
 
 
@@ -58,7 +59,7 @@
     	System.out.println(">>>Initializing WSPolicyProcessor");
     }
     
-    public WSPolicyProcessor(ModelFactoryExtensionPoint modelFactories) {
+    public WSPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
     	System.out.println(">>>Initializing WSPolicyProcessor");
     }
     

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -1,64 +1,68 @@
-/*
- * 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.policy.xml;
-
-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;
-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.impl.BindingTypeImpl;
-
-
-/**
- * Processor for handling XML models of BindingType meta data definitions
- *
- * @version $Rev$ $Date$
- */
-public class BindingTypeProcessor extends IntentAttachPointTypeProcessor {
-
-    public BindingTypeProcessor(PolicyFactory policyFactory, IntentAttachPointTypeFactory intentAttachPointTypeFactory, StAXArtifactProcessor<Object> extensionProcessor) {
-        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 ) {
-            BindingTypeImpl bindingType = (BindingTypeImpl)extnType;
-            return resolver.resolveModel(BindingTypeImpl.class, bindingType);
-        } else {
-            return extnType;
-        }
-        
-    }
-}
+/*
+ * 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.policy.xml;
+
+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;
+import org.apache.tuscany.sca.monitor.Monitor;
+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.impl.BindingTypeImpl;
+
+
+/**
+ * Processor for handling XML models of BindingType meta data definitions
+ *
+ * @version $Rev$ $Date$
+ */
+public class BindingTypeProcessor extends IntentAttachPointTypeProcessor {
+
+    public BindingTypeProcessor(PolicyFactory policyFactory, IntentAttachPointTypeFactory intentAttachPointTypeFactory, 
+    		                    StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
+        super(policyFactory, intentAttachPointTypeFactory, extensionProcessor, monitor);
+    }
+
+    public BindingTypeProcessor(ModelFactoryExtensionPoint modelFactories, 
+    		                    StAXArtifactProcessor<Object> extensionProcessor,
+    		                    Monitor monitor) {
+        super(modelFactories.getFactory(PolicyFactory.class),
+              modelFactories.getFactory(IntentAttachPointTypeFactory.class), extensionProcessor, monitor);
+    }
+
+    public QName getArtifactType() {
+        return BINDING_TYPE_QNAME;
+    }
+    
+    @Override
+    protected IntentAttachPointType resolveExtensionType(IntentAttachPointType extnType, ModelResolver resolver) throws ContributionResolveException {
+        if ( extnType instanceof BindingTypeImpl ) {
+            BindingTypeImpl bindingType = (BindingTypeImpl)extnType;
+            return resolver.resolveModel(BindingTypeImpl.class, bindingType);
+        } else {
+            return extnType;
+        }
+        
+    }
+}

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=657881&r1=657880&r2=657881&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 Mon May 19 10:49:04 2008
@@ -1,64 +1,68 @@
-/*
- * 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.policy.xml;
-
-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;
-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.impl.ImplementationTypeImpl;
-
-
-/**
- * Processor for handling XML models of ImplementationType meta data definitions
- *
- * @version $Rev$ $Date$
- */
-public class ImplementationTypeProcessor extends IntentAttachPointTypeProcessor {
-
-    public ImplementationTypeProcessor(PolicyFactory policyFactory, IntentAttachPointTypeFactory intentAttachPointTypeFactory, StAXArtifactProcessor<Object> extensionProcessor) {
-        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;
-    }
-    
-    @Override
-    protected IntentAttachPointType resolveExtensionType(IntentAttachPointType extnType, ModelResolver resolver) throws ContributionResolveException {
-        if ( extnType instanceof ImplementationTypeImpl ) {
-            ImplementationTypeImpl implType = (ImplementationTypeImpl)extnType;
-            return resolver.resolveModel(ImplementationTypeImpl.class, implType);
-        } else {
-            return extnType;
-        }
-        
-    }
-}
+/*
+ * 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.policy.xml;
+
+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;
+import org.apache.tuscany.sca.monitor.Monitor;
+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.impl.ImplementationTypeImpl;
+
+
+/**
+ * Processor for handling XML models of ImplementationType meta data definitions
+ *
+ * @version $Rev$ $Date$
+ */
+public class ImplementationTypeProcessor extends IntentAttachPointTypeProcessor {
+	
+    public ImplementationTypeProcessor(PolicyFactory policyFactory, IntentAttachPointTypeFactory intentAttachPointTypeFactory, 
+    		                           StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
+        super(policyFactory, intentAttachPointTypeFactory, extensionProcessor, monitor);
+    }
+
+    public ImplementationTypeProcessor(ModelFactoryExtensionPoint modelFactories, 
+    								   StAXArtifactProcessor<Object> extensionProcessor,
+    								   Monitor monitor) {
+        super(modelFactories.getFactory(PolicyFactory.class),
+              modelFactories.getFactory(IntentAttachPointTypeFactory.class), extensionProcessor, monitor);
+    }
+
+    public QName getArtifactType() {
+        return IMPLEMENTATION_TYPE_QNAME;
+    }
+    
+    @Override
+    protected IntentAttachPointType resolveExtensionType(IntentAttachPointType extnType, ModelResolver resolver) throws ContributionResolveException {
+        if ( extnType instanceof ImplementationTypeImpl ) {
+            ImplementationTypeImpl implType = (ImplementationTypeImpl)extnType;
+            return resolver.resolveModel(ImplementationTypeImpl.class, implType);
+        } else {
+            return extnType;
+        }
+        
+    }
+}



Mime
View raw message