incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r961281 - in /incubator/esme/trunk/server/src/main/scala/org/apache/esme: api/XMLHelper.scala model/Message.scala
Date Wed, 07 Jul 2010 07:57:37 GMT
Author: rhirsch
Date: Wed Jul  7 07:57:37 2010
New Revision: 961281

URL: http://svn.apache.org/viewvc?rev=961281&view=rev
Log:
[ESME-242] The use of metadata in the api2 currently doesn't work 

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/XMLHelper.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/XMLHelper.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/XMLHelper.scala?rev=961281&r1=961280&r2=961281&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/XMLHelper.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/XMLHelper.scala Wed Jul
 7 07:57:37 2010
@@ -59,7 +59,8 @@ trait XmlHelper { 
   <id>{msg.id.toString}</id>
   <date>{toInternetDate(msg.when.is)}</date>
   <source>{msg.source.sourceAttr.getOrElse(Text(""))}</source>
-  <body>{msg.body}</body>  
+  <body>{msg.body}</body>
+  <metadata>{msg.metadata}</metadata>  
   {
     msg.author.obj.map(u =>
       <author><nickname>{u.niceName}</nickname><id>{u.id.toString}</id></author>

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala?rev=961281&r1=961280&r2=961281&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala Wed Jul
 7 07:57:37 2010
@@ -276,6 +276,7 @@ object Message extends Message with Long
   }
 }
 
+
 @Searchable
 class Message extends LongKeyedMapper[Message] {
   import Message._
@@ -309,6 +310,8 @@ class Message extends LongKeyedMapper[Me
    }
  
   lazy val body: String = originalXml \ "body" text
+  
+  lazy val metadata: String = originalXml \ "metadata" text
 
   lazy val metaData: String = {
     val org = originalXml
@@ -514,7 +517,7 @@ class Message extends LongKeyedMapper[Me
              ::: tags).removeDuplicates.map(_.toXml)
           }</tags>{
           metaData match {
-            case Full(xs) => <metadata>xs</metadata>
+            case Full(xs) => <metadata>{xs}</metadata>
             case _ => NodeSeq.Empty
           }
 



Mime
View raw message