add types for sender/reciever roles and settlement

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/8d9c1f38
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/8d9c1f38
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/8d9c1f38

Branch: refs/heads/master
Commit: 8d9c1f3883f361951cb5bad38ea5fd8dffacbb5e
Parents: 39fc8b9
Author: Robert Gemmell <[email protected]>
Authored: Tue Oct 28 18:30:41 2014 +0000
Committer: Robert Gemmell <[email protected]>
Committed: Tue Oct 28 18:30:41 2014 +0000

----------------------------------------------------------------------
 .../testpeer/basictypes/ReceiverSettleMode.java | 39 +++++++++++++++++++
 .../qpid/jms/test/testpeer/basictypes/Role.java | 37 ++++++++++++++++++
 .../testpeer/basictypes/SenderSettleMode.java   | 40 ++++++++++++++++++++
 .../test/testpeer/basictypes/generate-types.xsl |  5 ++-
 4 files changed, 119 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/8d9c1f38/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/ReceiverSettleMode.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/ReceiverSettleMode.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/ReceiverSettleMode.java
new file mode 100644
index 0000000..852b6b2
--- /dev/null
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/ReceiverSettleMode.java
@@ -0,0 +1,39 @@
+/*
+ * 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.qpid.jms.test.testpeer.basictypes;
+
+
+import org.apache.qpid.proton.amqp.UnsignedByte;
+
+
+/**
+ * Generated by generate-types.xsl, which resides in this package.
+ */
+public class ReceiverSettleMode {
+
+    public static final UnsignedByte FIRST = UnsignedByte.valueOf((byte) 0);
+    public static final UnsignedByte SECOND = UnsignedByte.valueOf((byte) 1);
+
+    private ReceiverSettleMode() {
+      //No instances
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/8d9c1f38/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/Role.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/Role.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/Role.java
new file mode 100644
index 0000000..a92869a
--- /dev/null
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/Role.java
@@ -0,0 +1,37 @@
+/*
+ * 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.qpid.jms.test.testpeer.basictypes;
+
+
+
+/**
+ * Generated by generate-types.xsl, which resides in this package.
+ */
+public class Role {
+
+    public static final boolean SENDER = false;
+    public static final boolean RECEIVER = true;
+
+    private Role() {
+      //No instances
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/8d9c1f38/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/SenderSettleMode.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/SenderSettleMode.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/SenderSettleMode.java
new file mode 100644
index 0000000..e81e6a9
--- /dev/null
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/SenderSettleMode.java
@@ -0,0 +1,40 @@
+/*
+ * 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.qpid.jms.test.testpeer.basictypes;
+
+
+import org.apache.qpid.proton.amqp.UnsignedByte;
+
+
+/**
+ * Generated by generate-types.xsl, which resides in this package.
+ */
+public class SenderSettleMode {
+
+    public static final UnsignedByte UNSETTLED = UnsignedByte.valueOf((byte) 
0);
+    public static final UnsignedByte SETTLED = UnsignedByte.valueOf((byte) 1);
+    public static final UnsignedByte MIXED = UnsignedByte.valueOf((byte) 2);
+
+    private SenderSettleMode() {
+      //No instances
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/8d9c1f38/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/generate-types.xsl
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/generate-types.xsl
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/generate-types.xsl
index b4361bd..af8e545 100644
--- 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/generate-types.xsl
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/generate-types.xsl
@@ -30,7 +30,7 @@
 </xsl:variable>
 
     <xsl:for-each select="descendant-or-self::node()[name()='type']">
-        <xsl:if test="@name = 'terminus-durability' or @name = 
'terminus-expiry-policy' or @name = 'std-dist-mode' or @name = 'txn-capability' 
or @provides = 'error-condition'">
+        <xsl:if test="@name = 'terminus-durability' or @name = 
'terminus-expiry-policy' or @name = 'std-dist-mode' or @name = 'txn-capability' 
or @provides = 'error-condition' or @name = 'role' or @name = 
'sender-settle-mode' or @name = 'receiver-settle-mode' ">
           <xsl:variable name="classname"><xsl:call-template 
name="dashToCamel"><xsl:with-param name="input" 
select="@name"/></xsl:call-template></xsl:variable>
           <xsl:call-template name="typeClass">
               <xsl:with-param name="license" select="$license"/>
@@ -83,13 +83,14 @@ public class <xsl:value-of select="$classname"/> {
     <xsl:choose>
         <xsl:when test="$type = 'string'">String <xsl:value-of 
select="$constantName"/> ="<xsl:value-of select="$value"/>";</xsl:when>
         <xsl:when test="$type = 'symbol'">Symbol <xsl:value-of 
select="$constantName"/> = Symbol.valueOf("<xsl:value-of 
select="$value"/>")</xsl:when>
-        <xsl:when test="$type = 'ubyte'">UnsignedByte<xsl:value-of 
select="$constantName"/> = UnsignedByte.valueOf((byte) <xsl:value-of 
select="$value"/>)</xsl:when>
+        <xsl:when test="$type = 'ubyte'">UnsignedByte <xsl:value-of 
select="$constantName"/> = UnsignedByte.valueOf((byte) <xsl:value-of 
select="$value"/>)</xsl:when>
         <xsl:when test="$type = 'ushort'">UnsignedShort <xsl:value-of 
select="$constantName"/> = UnsignedShort.valueOf((short) <xsl:value-of 
select="$value"/>)</xsl:when>
         <xsl:when test="$type = 'uint'">UnsignedInteger <xsl:value-of 
select="$constantName"/> = UnsignedInteger.valueOf(<xsl:value-of 
select="$value"/>)</xsl:when>
         <xsl:when test="$type = 'ulong'">UnsignedLong <xsl:value-of 
select="$constantName"/> = UnsignedLong.valueOf(<xsl:value-of 
select="$value"/>L)</xsl:when>
         <xsl:when test="$type = 'long'">long <xsl:value-of 
select="$constantName"/> = <xsl:value-of select="$value"/>L</xsl:when>
         <xsl:when test="$type = 'short'">short <xsl:value-of 
select="$constantName"/> = (short)<xsl:value-of select="$value"/></xsl:when>
         <xsl:when test="$type = 'short'">byte <xsl:value-of 
select="$constantName"/> = (byte)<xsl:value-of select="$value"/></xsl:when>
+        <xsl:when test="$type = 'boolean'">boolean <xsl:value-of 
select="$constantName"/> = <xsl:value-of select="$value"/></xsl:when>
         <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
     </xsl:choose>
 </xsl:template>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to