You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/03/22 02:21:35 UTC

svn commit: r521069 - in /incubator/tuscany/sandbox/sebastien/java/sca/modules: ./ assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/

Author: jsdelfino
Date: Wed Mar 21 18:21:34 2007
New Revision: 521069

URL: http://svn.apache.org/viewvc?view=rev&rev=521069
Log:
Added a pom for modules. Changed writers to use scdl constants.

Added:
    incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml   (with props)
Modified:
    incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ComponentTypeWriter.java
    incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/CompositeWriter.java
    incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ConstrainingTypeWriter.java

Modified: incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ComponentTypeWriter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ComponentTypeWriter.java?view=diff&rev=521069&r1=521068&r2=521069
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ComponentTypeWriter.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ComponentTypeWriter.java Wed Mar 21 18:21:34 2007
@@ -23,6 +23,7 @@
 import org.apache.tuscany.assembly.model.Property;
 import org.apache.tuscany.assembly.model.Reference;
 import org.apache.tuscany.assembly.model.Service;
+import org.apache.tuscany.scdl.Constants;
 import org.apache.tuscany.scdl.writer.util.Attr;
 import org.apache.tuscany.scdl.writer.util.BaseWriter;
 import org.xml.sax.SAXException;
@@ -42,36 +43,36 @@
     
     protected void write() throws SAXException {
     	
-    	start("componentType", new Attr("constrainingType", getConstrainingType(componentType)));
+    	start(Constants.COMPONENT_TYPE, new Attr(Constants.CONSTRAINING_TYPE, getConstrainingType(componentType)));
     	
     	for (Service service: componentType.getServices()) {
-    		start("service", new Attr("name", service.getName()));
+    		start(Constants.SERVICE, new Attr(Constants.NAME, service.getName()));
     		if (service.getCallback() != null) {
-    			start("callback");
-    			end("callback");
+    			start(Constants.CALLBACK);
+    			end(Constants.CALLBACK);
     		}
-    		end("service");
+    		end(Constants.SERVICE);
     	}
     	
     	for (Reference reference: componentType.getReferences()) {
     		//TODO handle multivalued target attribute
     		String target = reference.getTargets().isEmpty()? null: reference.getTargets().get(0).getName();
-    		start("reference", 
-    			new Attr("name", reference.getName()),
-    			new Attr("target", target));
+    		start(Constants.REFERENCE, 
+    			new Attr(Constants.NAME, reference.getName()),
+    			new Attr(Constants.TARGET, target));
     		if (reference.getCallback() != null) {
-    			start("callback");
-    			end("callback");
+    			start(Constants.CALLBACK);
+    			end(Constants.CALLBACK);
     		}
-    		end("reference");
+    		end(Constants.REFERENCE);
     	}
     	
     	for (Property property: componentType.getProperties()) {
-    		start("property", new Attr("name", property.getName()));
-    		end("property");
+    		start(Constants.PROPERTY, new Attr(Constants.NAME, property.getName()));
+    		end(Constants.PROPERTY);
     	}
     	
-    	end("componentType");
+    	end(Constants.COMPONENT_TYPE);
     }
     
 }

Modified: incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/CompositeWriter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/CompositeWriter.java?view=diff&rev=521069&r1=521068&r2=521069
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/CompositeWriter.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/CompositeWriter.java Wed Mar 21 18:21:34 2007
@@ -29,6 +29,7 @@
 import org.apache.tuscany.assembly.model.Property;
 import org.apache.tuscany.assembly.model.Reference;
 import org.apache.tuscany.assembly.model.Service;
+import org.apache.tuscany.scdl.Constants;
 import org.apache.tuscany.scdl.writer.util.Attr;
 import org.apache.tuscany.scdl.writer.util.BaseWriter;
 import org.xml.sax.SAXException;
@@ -48,55 +49,55 @@
     
     protected void write() throws SAXException {
     	
-    	start("composite", new Attr("constrainingType", getConstrainingType(composite)));
+    	start(Constants.COMPOSITE, new Attr(Constants.CONSTRAINING_TYPE, getConstrainingType(composite)));
     	
     	for (Service service: composite.getServices()) {
     		CompositeService compositeService = (CompositeService)service;
     		ComponentService promotedService = compositeService.getPromotedService();
     		String promote = promotedService != null? promotedService.getName():null;
-    		start("service",
-    			new Attr("name", service.getName()),
-    			new Attr("promote", promote));
+    		start(Constants.SERVICE,
+    			new Attr(Constants.NAME, service.getName()),
+    			new Attr(Constants.PROMOTE, promote));
     		if (service.getCallback() != null) {
-    			start("callback");
-    			end("callback");
+    			start(Constants.CALLBACK);
+    			end(Constants.CALLBACK);
     		}
-    		end("service");
+    		end(Constants.SERVICE);
     	}
     	
     	for (Component component: composite.getComponents()) {
-    		start("component",
-    			new Attr("name", component.getName()));
+    		start(Constants.COMPONENT,
+    			new Attr(Constants.NAME, component.getName()));
 
     		for (ComponentService service: component.getServices()) {
-        		start("service",
-        			new Attr("name", service.getName()));
-        		end("service");
+        		start(Constants.SERVICE,
+        			new Attr(Constants.NAME, service.getName()));
+        		end(Constants.SERVICE);
         		if (service.getCallback() != null) {
-        			start("callback");
-        			end("callback");
+        			start(Constants.CALLBACK);
+        			end(Constants.CALLBACK);
         		}
         	}
     		
         	for (ComponentReference reference: component.getReferences()) {
         		//TODO handle multivalued target attribute
         		String target = reference.getTargets().isEmpty()? null: reference.getTargets().get(0).getName();
-        		start("reference", 
-        			new Attr("name", reference.getName()),
-        			new Attr("target", target));
+        		start(Constants.REFERENCE, 
+        			new Attr(Constants.NAME, reference.getName()),
+        			new Attr(Constants.TARGET, target));
         		if (reference.getCallback() != null) {
-        			start("callback");
-        			end("callback");
+        			start(Constants.CALLBACK);
+        			end(Constants.CALLBACK);
         		}
-        		end("reference");
+        		end(Constants.REFERENCE);
         	}
         	
         	for (ComponentProperty property: component.getProperties()) {
-        		start("property", new Attr("name", property.getName()));
-        		end("property");
+        		start(Constants.PROPERTY, new Attr(Constants.NAME, property.getName()));
+        		end(Constants.PROPERTY);
         	}
         	
-    		end("component");
+    		end(Constants.COMPONENT);
     	}
     	
     	for (Reference reference: composite.getReferences()) {
@@ -107,22 +108,22 @@
         		promote = compositeReference.getPromotedReferences().get(0).getName();
     		else
     			promote = null;
-    		start("reference", 
-    			new Attr("name", reference.getName()),
-    			new Attr("promote", promote));
+    		start(Constants.REFERENCE, 
+    			new Attr(Constants.NAME, reference.getName()),
+    			new Attr(Constants.PROMOTE, promote));
     		if (reference.getCallback() != null) {
-    			start("callback");
-    			end("callback");
+    			start(Constants.CALLBACK);
+    			end(Constants.CALLBACK);
     		}
-    		end("reference");
+    		end(Constants.REFERENCE);
     	}
     	
     	for (Property property: composite.getProperties()) {
-    		start("property", new Attr("name", property.getName()));
-    		end("property");
+    		start(Constants.PROPERTY, new Attr(Constants.NAME, property.getName()));
+    		end(Constants.PROPERTY);
     	}
     	
-    	end("composite");
+    	end(Constants.COMPOSITE);
     }
     
 }

Modified: incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ConstrainingTypeWriter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ConstrainingTypeWriter.java?view=diff&rev=521069&r1=521068&r2=521069
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ConstrainingTypeWriter.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca/modules/assembly-scdl/src/main/java/org/apache/tuscany/scdl/writer/ConstrainingTypeWriter.java Wed Mar 21 18:21:34 2007
@@ -23,6 +23,7 @@
 import org.apache.tuscany.assembly.model.AbstractReference;
 import org.apache.tuscany.assembly.model.AbstractService;
 import org.apache.tuscany.assembly.model.ConstrainingType;
+import org.apache.tuscany.scdl.Constants;
 import org.apache.tuscany.scdl.writer.util.Attr;
 import org.apache.tuscany.scdl.writer.util.BaseWriter;
 import org.xml.sax.SAXException;
@@ -42,25 +43,25 @@
     
     protected void write() throws SAXException {
     	
-    	start("constrainingType");
+    	start(Constants.CONSTRAINING_TYPE);
     	
     	for (AbstractService service: constrainingType.getServices()) {
-    		start("service", new Attr("name", service.getName()));
-    		end("service");
+    		start(Constants.SERVICE, new Attr(Constants.NAME, service.getName()));
+    		end(Constants.SERVICE);
     	}
     	
     	for (AbstractReference reference: constrainingType.getReferences()) {
     		//TODO handle multivalued target attribute
-    		start("reference", new Attr("name", reference.getName()));
-    		end("reference");
+    		start(Constants.REFERENCE, new Attr(Constants.NAME, reference.getName()));
+    		end(Constants.REFERENCE);
     	}
     	
     	for (AbstractProperty property: constrainingType.getProperties()) {
-    		start("property", new Attr("name", property.getName()));
-    		end("property");
+    		start(Constants.PROPERTY, new Attr(Constants.NAME, property.getName()));
+    		end(Constants.PROPERTY);
     	}
     	
-    	end("constrainingType");
+    	end(Constants.CONSTRAINING_TYPE);
     }
     
 }

Added: incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml?view=auto&rev=521069
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml Wed Mar 21 18:21:34 2007
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<project>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>parent</artifactId>
+        <version>0.1-sandbox-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.tuscany.sca.modules</groupId>
+    <artifactId>parent</artifactId>
+    <packaging>pom</packaging>
+    <name>Apache Tuscany SCA Modules</name>
+
+    <profiles>
+        <profile>
+            <id>stable</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>policy</module>
+                <module>assembly</module>
+                <module>assembly-scdl</module>
+                <module>assembly-builder</module>
+                <module>http-jetty</module>
+                <module>http-tomcat</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>integration</id>
+            <modules>
+                <module>policy</module>
+                <module>assembly</module>
+                <module>assembly-scdl</module>
+                <module>assembly-builder</module>
+                <module>http-jetty</module>
+                <module>http-tomcat</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>unstable</id>
+            <modules>
+                <module>policy</module>
+                <module>assembly</module>
+                <module>assembly-scdl</module>
+                <module>assembly-builder</module>
+                <module>http-jetty</module>
+                <module>http-tomcat</module>
+            </modules>
+        </profile>
+
+    </profiles>
+    <modules>
+    </modules>
+</project>

Propchange: incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/sebastien/java/sca/modules/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org