esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r939633 - in /incubator/esme/trunk/server: ./ src/main/scala/bootstrap/liftweb/ src/main/scala/org/apache/esme/actor/ src/main/scala/org/apache/esme/api/ src/main/scala/org/apache/esme/lib/ src/main/scala/org/apache/esme/model/
Date Fri, 30 Apr 2010 11:02:26 GMT
Author: rhirsch
Date: Fri Apr 30 11:02:26 2010
New Revision: 939633

URL: http://svn.apache.org/viewvc?rev=939633&view=rev
Log:
[ESME-160] Move to Lift 2.0 	 

Modified:
    incubator/esme/trunk/server/   (props changed)
    incubator/esme/trunk/server/pom.xml
    incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Tag.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala

Propchange: incubator/esme/trunk/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 30 11:02:26 2010
@@ -1 +1,2 @@
+/incubator/esme/branches/lift-2.0/server:928728-939625
 /incubator/esme/branches/ui-2010-03-05:919339-923098

Modified: incubator/esme/trunk/server/pom.xml
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/pom.xml?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/pom.xml (original)
+++ incubator/esme/trunk/server/pom.xml Fri Apr 30 11:02:26 2010
@@ -75,7 +75,7 @@
     </developer>
     </developers>
     <properties>
-        <lift.version>1.1-M8</lift.version>
+        <lift.version>2.0-SNAPSHOT</lift.version>
         <scala.version>2.7.7</scala.version>
         <compass.version>2.1.1</compass.version>
         <lucene.version>2.4.0</lucene.version>

Modified: incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala Fri Apr 30 11:02:26
2010
@@ -160,9 +160,13 @@ class Boot {
     LiftRules.dispatch.prepend(RestAPI.dispatch)
     LiftRules.dispatch.append(API2.dispatch)
 
-    LiftRules.httpAuthProtectedResource.prepend {
+    /*LiftRules.httpAuthProtectedResource.prepend {
       case ParsePath(l, _, _, _) if l startsWith TwitterAPI.ApiPath => Full(AuthRole("user"))
-    }
+    }*/
+    
+    LiftRules.httpAuthProtectedResource.prepend {
+      case Req(TwitterAPI.ApiPath :: _,_,_) => Full(AuthRole("user"))
+    } 
 
     LiftRules.authentication = TwitterAPI.twitterAuth
                                

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/UserActor.scala Fri Apr
30 11:02:26 2010
@@ -30,7 +30,6 @@ import org.apache.esme._
 import model._
 import lib._
 
-import java.util.logging._
 import java.util.{TimeZone, Calendar}
 import scala.xml.{Elem}
 import com.twitter.stats.Stats
@@ -54,7 +53,7 @@ object UserActor {
   case class Resend(msgId: Long)
   case class MessageReceived(msg: Message, reason: MailboxReason)
   
-  val logger: Logger = Logger.getLogger("org.apache.esme.actor")
+  val logger: Logger = Logger("org.apache.esme.actor")
 }
 
 

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/API2.scala Fri Apr 30 11:02:26
2010
@@ -59,7 +59,7 @@ import org.apache.esme.actor._
 import scala.xml.{NodeSeq, Text, Elem, XML, Node}
 
 import scala.collection.mutable.ListBuffer
-import java.util.logging._      
+ 
 
 import org.compass.annotations._
 import bootstrap.liftweb.Compass.compass
@@ -69,7 +69,7 @@ import org.apache.lucene.index.TermFreqV
 import org.tartarus.snowball.ext.PorterStemmer
 
 object API2 extends ApiHelper with XmlHelper {
-  val logger: Logger = Logger.getLogger("org.apache.esme.api")
+  val logger: Logger = Logger("org.apache.esme.api2")
 
   def authorizationRules: LiftRules.DispatchPF = {
     case Req("api2" :: "users" :: Nil, _, PostRequest)

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/RestAPI.scala Fri Apr 30
11:02:26 2010
@@ -42,11 +42,9 @@ import org.apache.esme.actor._
 import scala.xml.{NodeSeq, Text, Elem, Node, XML}
 
 import scala.collection.mutable.ListBuffer
-import java.util.logging._
 
 object RestAPI extends XMLApiHelper {
-  val logger: Logger = Logger.getLogger("org.apache.esme.api")
-  logger.setLevel(Level.INFO)
+  val logger: Logger = Logger("org.apache.esme.api")
 
   private val fakeSession = new LiftSession("/", "fakeSession", Empty)
   

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala Fri Apr
30 11:02:26 2010
@@ -45,7 +45,6 @@ import org.apache.esme.actor._
 import scala.xml._
 
 import scala.collection.mutable.ListBuffer
-import java.util.logging._
 
 // operator to match on last elements of a List
 object ::> {def unapply[A] (l: List[A]) = l match {
@@ -75,7 +74,7 @@ abstract class TwitterAPI {
   import TwitterAPI._
   
   val tf = new java.text.SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", java.util.Locale.US)
-  val logger: Logger = Logger.getLogger("org.apache.esme.twitterapi")
+  val logger: Logger = Logger("org.apache.esme.twitterapi")
   val method: String
   // TODO: twitter struct could be stronger typed- if recursive types are enabled
   type TwitterResponse = Either[(String,List[Any]),Map[String,Any]]

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala Fri
Apr 30 11:02:26 2010
@@ -45,14 +45,12 @@ import scala.xml._
 
 import java.util.Date
 import java.text.{DateFormat,SimpleDateFormat}
-import java.util.logging._
 
 /**
  * Manage the sitemap and related snippets for Access Pools
  */
 object AccessPoolMgr {
-  val logger: Logger = Logger.getLogger("org.apache.esme.lib.AccessPoolMgr")
-  logger.setLevel(Level.INFO)
+  val logger: Logger = Logger("org.apache.esme.lib.AccessPoolMgr")
   def loggedIn_? = User.loggedIn_?
 
   val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("base_error_not_logged_in")))

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=939633&r1=939632&r2=939633&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 Fri Apr
30 11:02:26 2010
@@ -25,7 +25,6 @@ import util._
 import common._
 import http.js._
 import Helpers._
-import java.util.logging._
 
 import scala.xml._
 
@@ -42,8 +41,7 @@ import org.apache.esme._
 import lib._
 
 object Message extends Message with LongKeyedMetaMapper[Message] {
-  val logger: Logger = Logger.getLogger("org.apache.esme.model.Message")
-  logger.setLevel(Level.INFO)
+  val logger: Logger = Logger ("org.apache.esme.model.Message")
 
   private def fixConversation(msg: Message) {
     if (!msg.conversation.defined_? && msg.replyTo.defined_?) {
@@ -212,7 +210,7 @@ object Message extends Message with Long
       case _ => Nil
     }
     val modifiedQueryParams = by ++ newQueryParams
-    logger.fine("Modified query: " + modifiedQueryParams)
+    logger.info("Modified query: " + modifiedQueryParams)
     super.findMapDb(dbId, modifiedQueryParams:_*)(f)
   }
 

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Tag.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Tag.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Tag.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Tag.scala Fri Apr 30
11:02:26 2010
@@ -28,7 +28,6 @@ import common._
 import Helpers._
 
 import scala.collection.mutable.HashMap
-import java.util.logging._
 
 import org.apache.esme.lib.TagUtils
 
@@ -37,8 +36,7 @@ object Tag extends Tag with MetaProtoTag
 
   def cacheSize = 500
   
-  val logger: Logger = Logger.getLogger("org.apache.esme.model")
-  logger.setLevel(Level.WARNING);
+  val logger: Logger = Logger("org.apache.esme.model")
   
   private var listeners: List[LiftActor] = Nil
   private var cloud: List[(String, Float)] = Nil

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala?rev=939633&r1=939632&r2=939633&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/UserAuth.scala Fri Apr
30 11:02:26 2010
@@ -37,6 +37,8 @@ import JsCmds._ 
 import SHtml._
 import JE._
 
+import net.liftweb.openid._
+
 import scala.xml._
 
 import org.apache.esme.actor._
@@ -272,7 +274,7 @@ object OpenIDAuthModule extends AuthModu
 }
 
 
-object ESMEOpenIDVendor extends OpenIdVendor {
+object ESMEOpenIDVendor extends OpenIDVendor {
   type UserType = User
   type ConsumerType = ESMEOpenIDConsumer
 
@@ -302,7 +304,7 @@ object ESMEOpenIDVendor extends OpenIdVe
   def createAConsumer = new ESMEOpenIDConsumer
 }
 
-class ESMEOpenIDConsumer extends OpenIdConsumer[User]
+class ESMEOpenIDConsumer extends OpenIDConsumer[User]
 {
   override val manager = {
 



Mime
View raw message