tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1103640 - /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
Date Mon, 16 May 2011 07:50:25 GMT
Author: antelder
Date: Mon May 16 07:50:25 2011
New Revision: 1103640

URL: http://svn.apache.org/viewvc?rev=1103640&view=rev
Log:
Simplify to use the loadDocument method on Deployer

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java?rev=1103640&r1=1103639&r2=1103640&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl2.java
Mon May 16 07:50:25 2011
@@ -196,7 +196,7 @@ public class NodeImpl2 {
         InstalledContribution ic = getInstalledContribution(contributionURI);
         
         // load it to check its valid composite XML
-        Composite composite = compositeFromXML(compositeXML);
+        Composite composite = deployer.loadXMLDocument(compositeXML);
         
         return addDeploymentComposite(ic, composite);
     }
@@ -312,7 +312,7 @@ public class NodeImpl2 {
                     String compositeXML = ic.getAdditionalDeployables().get(uri);
                     Composite composite;
                     try {
-                        composite = compositeFromXML(new StringReader(compositeXML));
+                        composite = deployer.loadXMLDocument(new StringReader(compositeXML));
                     } catch (XMLStreamException e) {
                         throw new ContributionReadException(e);
                     }
@@ -384,11 +384,4 @@ public class NodeImpl2 {
             throw new RuntimeException(e);
         }
     }
-    
-    protected Composite compositeFromXML(Reader compositeXML) throws XMLStreamException,
ContributionReadException, ValidationException {
-        Monitor monitor = deployer.createMonitor();
-        Composite composite = deployer.loadXMLDocument(compositeXML, monitor);
-        monitor.analyzeProblems();
-        return composite;
-    }
 }



Mime
View raw message