incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r989062 - in /incubator/esme/trunk/server/src/main/scala/org/apache/esme/model: AccessPool.scala Action.scala
Date Wed, 25 Aug 2010 12:29:18 GMT
Author: rhirsch
Date: Wed Aug 25 12:29:18 2010
New Revision: 989062

URL: http://svn.apache.org/viewvc?rev=989062&view=rev
Log:
[ESME-262] Pool Id shown in actions display instead of pool description
[ESME-261] User Id shown in actions when using "&"
Patch by Imtiaz Ahmed Hajee Esmail 

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala?rev=989062&r1=989061&r2=989062&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala Wed
Aug 25 12:29:18 2010
@@ -43,6 +43,13 @@ object AccessPool extends AccessPool wit
     ap.creator(User.currentUser)
     ap
   }
+
+  def getPoolName(poolId: long) = {
+    AccessPool.find(poolId) match {
+      case Full(p) => p.getName
+      case _ => "ERROR"
+    }
+  }
 }
 
 class AccessPool extends LongKeyedMapper[AccessPool] {

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala?rev=989062&r1=989061&r2=989062&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala Wed Aug
25 12:29:18 2010
@@ -362,13 +362,16 @@ case object SentToMeAction extends TestA
 }
 case class NotAction(action: TestAction) extends TestAction {
   def toStr = "not( "+action.toStr+" )"
+  override def toDisplayStr = "not( "+action.toDisplayStr+" )"
 }
 case class OrAction(left: TestAction, right: TestAction) extends TestAction {
   def toStr = left.toStr + " | " + right.toStr
+  override def toDisplayStr = left.toDisplayStr + " | " + right.toDisplayStr
 }
 
 case class AndAction(left: TestAction, right: TestAction) extends TestAction {
   def toStr = left.toStr + " &  " + right.toStr
+  override def toDisplayStr = left.toDisplayStr + " &  " + right.toDisplayStr
 }
 
 case class AtUserAction(userId: Long) extends TestAction {
@@ -386,6 +389,7 @@ case object PoolAction extends TestActio
 
 case class PoolAction(poolId: Long) extends TestAction {
   def toStr = "pool:" + poolId
+  override def toDisplayStr = "pool:" + AccessPool.getPoolName(poolId)
 }
 
 case object ResentAction extends TestAction {
@@ -439,6 +443,7 @@ case class HashAction(hashId: Long, str:
 
 case class ParenAction(action: TestAction) extends TestAction {
   def toStr = "( "+action.toStr+" )"
+  override def toDisplayStr = "( "+action.toDisplayStr+" )"
 }
 
 case class PercentAction(percent: Int) extends TestAction {



Mime
View raw message