incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r932954 - in /incubator/esme/trunk/server/src/main/scala: bootstrap/liftweb/Boot.scala org/apache/esme/external/AtomFeed.scala org/apache/esme/external/Feed.scala org/apache/esme/external/RssFeed.scala org/apache/esme/model/Action.scala
Date Sun, 11 Apr 2010 17:47:35 GMT
Author: esjewett
Date: Sun Apr 11 17:47:34 2010
New Revision: 932954

URL: http://svn.apache.org/viewvc?rev=932954&view=rev
Log:
Well, the backwards merge didn't work, so I just downloaded the previous revisions of the
necessary files and replaced them. PubSubHubbub be gone! (At least for the moment)

Modified:
    incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/AtomFeed.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/Feed.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/RssFeed.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala

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=932954&r1=932953&r2=932954&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 Sun Apr 11 17:47:34
2010
@@ -33,8 +33,7 @@ import net.liftweb.mapper.{DB, Connectio
 import java.sql.{Connection, DriverManager}
 import org.apache.esme._
 import model._
-import org.apache.esme.actor._          
-import org.apache.esme.external.PubSubHubbubReceiver
+import org.apache.esme.actor._
 import lib._
 import snippet._
 import api._
@@ -82,7 +81,7 @@ class Boot {
       case r@Req("api" :: "send_msg" :: Nil, "", PostRequest)
         if r.param("token").isDefined =>
         () => RestAPI.sendMsgWithToken(r)
-    }  
+    }
     
     //Added exceptions to the log
     LiftRules.exceptionHandler.prepend {
@@ -92,9 +91,6 @@ class Boot {
       }
     } 
 
-    // PubSubHubbub support
-    LiftRules.statelessDispatchTable.append(PubSubHubbubReceiver.dispatch)
-
     LiftRules.dispatch.append(ESMEOpenIDVendor.dispatchPF)
 
     //Resources for Internationalization
@@ -134,7 +130,7 @@ class Boot {
           Loc.Snippet("user_info", TagDisplay.userInfo))) ::
         Menu(Loc("about", List("static", "about"), S.?("base_menu_about"), Hidden)) ::
         Menu(Loc("tag", List("info_view", "tag"), "Tag", Hidden, Loc.Snippet("tag_display",
TagDisplay.display))) ::
-        Menu(Loc("public", List("info_view", "public"), "Public")) ::
+        Menu(Loc("public", List("info_view", "public"), S.?("base_profile_public"))) ::
         Menu(Loc("sign_up", List("signup"), S.?("base_menu_signup"),
           Snippet("signup", User.signupForm),
           Unless(User.loggedIn_? _, S.?("base_menu_sign_up_error")))) ::
@@ -154,7 +150,7 @@ class Boot {
 
     LiftRules.setSiteMap(SiteMap(entries: _*))
 
-    S.addAround(ExtSession.requestLoans)       
+    S.addAround(ExtSession.requestLoans)          
 
     // API security rules
     LiftRules.dispatch.append(API2.authorizationRules)

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/AtomFeed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/AtomFeed.scala?rev=932954&r1=932953&r2=932954&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/AtomFeed.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/AtomFeed.scala Sun
Apr 11 17:47:34 2010
@@ -1,8 +1,6 @@
 package org.apache.esme.external
 
 /**
- * Copyright 2008-2009 WorldWide Conferencing, LLC
- * 
  * 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
@@ -67,22 +65,5 @@ class AtomFeed(user: User, atomURL: Stri
       else published
     parseInternetDate(date text).getTime
   }
-
-  override def detPubSubHubbub:Boolean = {
-    val r:Boolean = try {
-      val feedXml = XML.loadString(responseString)
-      val feedLinks = ( feedXml \\ "link" ) 
-      val pushLinks = for { 
-        tag <- feedLinks                
-        val link = ( tag \ "@href" ).text if ( tag \ "@rel" ).text == "hub"
-      } yield link
-
-      pushLinks.isEmpty == false
-    } catch {
-      case _ => false
-    }   
-
-    r   
-  }
 }
 

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/Feed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/Feed.scala?rev=932954&r1=932953&r2=932954&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/Feed.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/Feed.scala Sun Apr
11 17:47:34 2010
@@ -1,8 +1,6 @@
 package org.apache.esme.external
 
 /**
- * Copyright 2008-2009 WorldWide Conferencing, LLC
- * 
  * 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
@@ -58,10 +56,6 @@ abstract class Feed(val user: User, val 
         )
     ).toList
   }
-
-  lazy val isPubSubHubbub: Boolean = detPubSubHubbub
-
-  protected def detPubSubHubbub:Boolean
   
   protected def getEntries(xml: Elem): NodeSeq
   
@@ -69,8 +63,8 @@ abstract class Feed(val user: User, val 
   
   protected def getLink(xml: Node): String
   
-  protected def getDate(xml: Node): Long         
-
+  protected def getDate(xml: Node): Long
+  
   protected def responseString() = {
     // url.openConnection
     val httpClient = HttpSender.httpClient

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/RssFeed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/RssFeed.scala?rev=932954&r1=932953&r2=932954&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/RssFeed.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/external/RssFeed.scala Sun
Apr 11 17:47:34 2010
@@ -1,8 +1,6 @@
 package org.apache.esme.external
 
 /**
- * Copyright 2008-2009 WorldWide Conferencing, LLC
- * 
  * 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
@@ -83,23 +81,6 @@ class RssFeed(user: User, rssURL: String
         }
       case None => msgs
     }
-  }.reverse  
-             
-  override def detPubSubHubbub:Boolean = {  
-    val r:Boolean = try {
-      val feedXml = XML.loadString(responseString)
-      val feedLinks = ( feedXml \\ "link" ) 
-      val pushLinks = for { 
-        tag <- feedLinks                
-        val link = ( tag \ "@href" ).text if ( tag \ "@rel" ).text == "hub"
-      } yield link
-
-      pushLinks.isEmpty == false
-    } catch {
-      case _ => false
-    }        
-
-    r
-  }
+  }.reverse
 }
 

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=932954&r1=932953&r2=932954&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 Sun Apr
11 17:47:34 2010
@@ -1,8 +1,6 @@
 package org.apache.esme.model
 
 /**
- * Copyright 2008-2009 WorldWide Conferencing, LLC
- * 
  * 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
@@ -209,20 +207,8 @@ class Action extends LongKeyedMapper[Act
             val feed = a match {
               case FetchAtom(_, _) => new AtomFeed(u, url.url, urlSourcePrefix + url.uniqueId,
0, tags)
               case FetchRss(_, _) => new RssFeed(u, url.url, urlSourcePrefix + url.uniqueId,
0, tags)
-            }      
-
-// Pubsubhubbub - check if feed is PuSH-enabled. If it is, shut down the regular actor
-// then start up the PuSH subscription                                     
-
-            if(feed.isPubSubHubbub) {
-              SchedulerActor ! SchedulerActor.StopRegular(this.id.is)
-
-            } else {
-
-// If not PuSH-enabled, go ahead as before and start the message pull actor
-
-              MessagePullActor ! MessagePullActor.StartPullActor(id, lastMsg, feed)
             }
+            MessagePullActor ! MessagePullActor.StartPullActor(id, lastMsg, feed)
           
           case _ =>
         }



Mime
View raw message