felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r553639 - in /felix/sandbox/donsez/upnp.devicegen: ./ doc/ generation/ src/main/java/org/apache/felix/upnp/devicegen/holder/ src/main/java/org/apache/felix/upnp/devicegen/util/
Date Thu, 05 Jul 2007 21:26:12 GMT
Author: donsez
Date: Thu Jul  5 14:26:11 2007
New Revision: 553639

URL: http://svn.apache.org/viewvc?view=rev&rev=553639
Log:
add R4 UPnPException
add the generation of a proxy class for control point development

Removed:
    felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/holder/
    felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/util/
Modified:
    felix/sandbox/donsez/upnp.devicegen/doc/readme.html
    felix/sandbox/donsez/upnp.devicegen/generation/build.device.xml
    felix/sandbox/donsez/upnp.devicegen/generation/device2build.xsl
    felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelimpl.xsl
    felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelitf.xsl
    felix/sandbox/donsez/upnp.devicegen/pom.xml

Modified: felix/sandbox/donsez/upnp.devicegen/doc/readme.html
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/doc/readme.html?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/doc/readme.html (original)
+++ felix/sandbox/donsez/upnp.devicegen/doc/readme.html Thu Jul  5 14:26:11 2007
@@ -1,16 +1,16 @@
 <html>
 <head>
-<title>UPnP Device Bundle Generator</title>
+<title>UPnP Device Generator</title>
 </head>
 <body>
 
 <!-- Start of Felix Bundle Documentation -->
 <hr width="100%" size="2">
-<h1><i><a name="upnpgendevice"></a><font color="#0000aa">UPnP
Device Bundle Generator</font></i></h1>
+<h1><i><a name="upnp.devicegen"></a><font color="#0000aa">UPnP
Device Generator</font></i></h1>
 
 <p>
 <b>Description</b><br>
-This bundle generates and packages UPnPDevice services following the OSGi UPnP Device Driver
+This bundle generates UPnPDevice services and associated control points following the OSGi
UPnP Device Driver 1.1.0. The generated classes are packaged in a bundle. 
 <br>The generation is based on XSLT stylesheet from this description generation/res/deviceroot.xml
and associated SCDP (XML) files.
 <br>For more details on how to use this bundle, refer to the /doc/readme.html file
embedded in the bundle jarfile.<br>
 </p>
@@ -18,7 +18,7 @@
 <p>
 <b>Contributors</b><br>
 <ul>
-<li>Author:Didier Donsez (Felix Team)</a></li>
+<li>Author: Felix Project Team</a></li>
 </ul>
 </p>
 
@@ -42,7 +42,7 @@
 </p>
 
 <p><b>Requirements</b><br>
-<li>org.osgi.service.upnp;specification-version="1.0.0"<li>
+<li>org.osgi.service.upnp;specification-version="1.1.0"<li>
 </p>
 
 <!-- End of Felix Bundle Documentation -->
@@ -65,7 +65,7 @@
 <ol>
 <li>configure the descriptor generation/res/deviceroot.xml and associated SCDP (XML)
files</li>
 <li>ant -f generation\build.xml</li>
-<li>ant</li>
+<li>mvn clean install</li>
 </ol>
 </p>
 
@@ -87,7 +87,7 @@
 <p id="gateways">
 <b>Tested gateways</b><br>
 <ul>
-<li><a href="http//oscar.objectweb.org/">OSCAR</a> (done)</li>
+<li>Oscar (done for 0.1.0)</li>
 <li>Felix (done)</li>
 <li>Equinox (to do)</li>
 <li><a href="http://www.knopflerfish.org">Knopflerfish OSGi</a> (to do)</li>
@@ -99,6 +99,8 @@
 <b>Versions history</b><br>
 <ul>
 <li>0.1.0, February 17, 2005</li>
+<li>0.2.0, July 4, 2007 : add R4 UPnPException</li>
+<li>0.2.1, July 5, 2007 : add the generation of a proxy class for control point development</li>
 </ul>
 </p>
 
@@ -109,7 +111,7 @@
 <li>Test Generation for ServiceControlSyntaxTestCases XML document</li>
 <li>UI Generation from device/service (XML SCDP)</li>
 <li>SCDP Generation from XDocLet in a legacy java class/interface</li>
-<li>ADD in templates the R4 changes (UPnP Exception, ...)</li>
+<li>ADD in templates the R4 changes (UPnPLocalStateVariable)</li>
 <li>BUG:...</li>
 </ul>
 </p>

Modified: felix/sandbox/donsez/upnp.devicegen/generation/build.device.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/generation/build.device.xml?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/generation/build.device.xml (original)
+++ felix/sandbox/donsez/upnp.devicegen/generation/build.device.xml Thu Jul  5 14:26:11 2007
@@ -9,7 +9,7 @@
 		<tstamp>
 			<format property="date" pattern="d-MMMM-yyyy" locale="en"/>
 		</tstamp>
-		<property name="author" value="Didier DONSEZ"/>
+		<property name="author" value="Felix Project Team"/>
 		<javac destdir=".">
    		 	<src path="."/>
     		<include name="*.java"/>

Modified: felix/sandbox/donsez/upnp.devicegen/generation/device2build.xsl
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/generation/device2build.xsl?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/generation/device2build.xsl (original)
+++ felix/sandbox/donsez/upnp.devicegen/generation/device2build.xsl Thu Jul  5 14:26:11 2007
@@ -61,6 +61,7 @@
 		<mkdir dir="${{generation.dir}}/src/{$path}/service"/>
 		<mkdir dir="${{generation.dir}}/src/{$path}/impl"/>
 		<mkdir dir="${{generation.dir}}/src/{$path}/model"/>
+		<mkdir dir="${{generation.dir}}/src/{$path}/controlpoint"/>
 
 		<xslt 	in="{$descriptionfilename}"
 			out="${{generation.dir}}/src/{$path}/device/{$classname}.java"
@@ -130,6 +131,21 @@
 			<outputproperty name="encoding" value="ISO-8859-1"/>
 			<outputproperty name="indent" value="yes"/>
 		</xslt>
+
+		<xslt 	in="res/service/{$serviceTypeVersion}.xml"
+			out="${{generation.dir}}/src/{$path}/controlpoint/{$classname}ProxyImpl.java"
+			style="scdp2proxyimpl.xsl" 
+			classpath="."
+		>
+			<param name="date" expression="${{date}}"/>
+			<param name="author" expression="${{author}}"/>
+			<param name="package" expression="{$package}"/>
+			<param name="classname" expression="{$classname}"/>
+			<outputproperty name="method" value="text"/>
+			<outputproperty name="encoding" value="ISO-8859-1"/>
+			<outputproperty name="indent" value="yes"/>
+		</xslt>
+
 
 </xsl:template>
 

Modified: felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelimpl.xsl
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelimpl.xsl?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelimpl.xsl (original)
+++ felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelimpl.xsl Thu Jul  5 14:26:11
2007
@@ -21,6 +21,7 @@
 package <xsl:value-of select="$package"/>.impl;
 
 import org.apache.felix.upnp.devicegen.holder.*;
+import org.osgi.service.upnp.UPnPException;
 import <xsl:value-of select="$package"/>.model.*;
 
 	<xsl:apply-templates select="*"/>
@@ -72,9 +73,9 @@
 	 */
 	public void <xsl:value-of select="$actionName"/>(
 		<xsl:apply-templates select="argumentList" mode="param"/>
-	) {
+	) throws UPnPException {
 		// TODO
-	
+		throw new UPnPException(UPnPException.DEVICE_INTERNAL_ERROR,"Not implemented");
 	}
 
 </xsl:template>

Modified: felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelitf.xsl
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelitf.xsl?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelitf.xsl (original)
+++ felix/sandbox/donsez/upnp.devicegen/generation/scdp2modelitf.xsl Thu Jul  5 14:26:11 2007
@@ -21,6 +21,7 @@
 package <xsl:value-of select="$package"/>.model;
 
 import org.apache.felix.upnp.devicegen.holder.*;
+import org.osgi.service.upnp.UPnPException;
 
 	<xsl:apply-templates select="*"/>
 </xsl:template>
@@ -68,7 +69,7 @@
 	 */
 	public void <xsl:value-of select="$actionName"/>(
 		<xsl:apply-templates select="argumentList" mode="param"/>
-	);
+	) throws UPnPException;
 	// TODO return the type of the return argument when specified
 
 </xsl:template>

Modified: felix/sandbox/donsez/upnp.devicegen/pom.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/upnp.devicegen/pom.xml?view=diff&rev=553639&r1=553638&r2=553639
==============================================================================
--- felix/sandbox/donsez/upnp.devicegen/pom.xml (original)
+++ felix/sandbox/donsez/upnp.devicegen/pom.xml Thu Jul  5 14:26:11 2007
@@ -44,6 +44,11 @@
       <artifactId>org.osgi.compendium</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>org.apache.felix.upnp.devicegen.util</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
@@ -59,7 +64,6 @@
             <Export-Service>org.osgi.service.upnp.UPnPDevice</Export-Service>
 
             <Private-Package>org.apache.felix.upnp.devicegen.*</Private-Package>
-            <Export-Package>org.apache.felix.upnp.devicegen.holder,org.apache.felix.upnp.devicegen.util</Export-Package>
             <Import-Package>*</Import-Package>
             <Bundle-Activator>${pom.artifactId}.activator.impl.Activator</Bundle-Activator>
 



Mime
View raw message