abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1201883 - in /abdera/abdera2: activities/src/main/java/org/apache/abdera2/activities/client/ activities/src/main/java/org/apache/abdera2/activities/model/objects/ ext/src/main/java/org/apache/abdera2/ext/html/ test/src/main/java/org/apache...
Date Mon, 14 Nov 2011 20:38:19 GMT
Author: jmsnell
Date: Mon Nov 14 20:38:18 2011
New Revision: 1201883

URL: http://svn.apache.org/viewvc?rev=1201883&view=rev
Log:
fixing a bug and adding a new Replies extension interface for use with the ASObject.extend
mechanism for working with http://activitystrea.ms/specs/json/replies/1.0/

Added:
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java
  (with props)
Modified:
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClientPusher.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/html/HtmlHelper.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClientPusher.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClientPusher.java?rev=1201883&r1=1201882&r2=1201883&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClientPusher.java
(original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClientPusher.java
Mon Nov 14 20:38:18 2011
@@ -21,8 +21,8 @@ import java.util.concurrent.ExecutorServ
 
 import org.apache.abdera2.activities.model.ASObject;
 import org.apache.abdera2.common.pusher.Pusher;
-import org.apache.abdera2.protocol.client.Session.Listener;
 import org.apache.abdera2.protocol.client.ClientResponse;
+import org.apache.abdera2.protocol.client.Session.Listener;
 import org.apache.abdera2.protocol.client.RequestOptions;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Added: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java?rev=1201883&view=auto
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java
(added)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java
Mon Nov 14 20:38:18 2011
@@ -0,0 +1,52 @@
+package org.apache.abdera2.activities.model.objects;
+
+import org.apache.abdera2.activities.extra.Extra.ExtensionObject;
+import org.apache.abdera2.activities.extra.Extra.ExtensionBuilder;
+import org.apache.abdera2.activities.model.ASObject;
+import org.apache.abdera2.activities.model.Collection;
+import org.apache.abdera2.common.anno.Name;
+
+/**
+ * Extension interface intended to be used with ASObject.extend() to 
+ * provide a type-safe way of working with various extension properties
+ * defined by the Activity Streams Replies and Response Draft
+ * (http://activitystrea.ms/specs/json/replies/1.0/)
+ */
+public interface Replies extends ExtensionObject {
+
+  public <X extends ASObject>Collection<X> getAttending();
+  public <X extends ASObject>Collection<X> getFollowers();
+  public <X extends ASObject>Collection<X> getFollowing();
+  public <X extends ASObject>Collection<X> getFriends();
+  @Name("friend-requests")
+  public <X extends ASObject>Collection<X> getFriendRequests();
+  public <X extends ASObject>Collection<X> getLikes();
+  public <X extends ASObject>Collection<X> getNotAttending();
+  public <X extends ASObject>Collection<X> getMaybeAttending();
+  public <X extends ASObject>Collection<X> getMembers();
+  public <X extends ASObject>Collection<X> getReplies();
+  public <X extends ASObject>Collection<X> getReviews();
+  public <X extends ASObject>Collection<X> getSaves();
+  public <X extends ASObject>Collection<X> getShares();
+  
+  
+  public static interface Builder extends ExtensionBuilder {
+    
+    <X extends ASObject>Builder attending(Collection<X> collection);
+    <X extends ASObject>Builder followers(Collection<X> collection);
+    <X extends ASObject>Builder following(Collection<X> collection);
+    <X extends ASObject>Builder friends(Collection<X> collection);
+    @Name("friend-requests") 
+    <X extends ASObject>Builder friendRequests(Collection<X> collection);
+    <X extends ASObject>Builder likes(Collection<X> collection);
+    <X extends ASObject>Builder notAttending(Collection<X> collection);
+    <X extends ASObject>Builder maybeAttending(Collection<X> collection);
+    <X extends ASObject>Builder members(Collection<X> collection);
+    <X extends ASObject>Builder replies(Collection<X> collection);
+    <X extends ASObject>Builder reviews(Collection<X> collection);
+    <X extends ASObject>Builder saves(Collection<X> collection);
+    <X extends ASObject>Builder shares(Collection<X> collection);
+    
+  }
+  
+}

Propchange: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/objects/Replies.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/html/HtmlHelper.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/html/HtmlHelper.java?rev=1201883&r1=1201882&r2=1201883&view=diff
==============================================================================
--- abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/html/HtmlHelper.java (original)
+++ abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/html/HtmlHelper.java Mon Nov 14
20:38:18 2011
@@ -31,8 +31,8 @@ import org.apache.abdera2.model.Div;
 import org.apache.abdera2.model.Document;
 import org.apache.abdera2.model.Element;
 import org.apache.abdera2.protocol.client.BasicClient;
-import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Client;
+import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Session;
 import org.apache.abdera2.common.mediatype.MimeTypeHelper;
 import org.apache.abdera2.common.xml.XmlRestrictedCharReader;

Modified: abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java?rev=1201883&r1=1201882&r2=1201883&view=diff
==============================================================================
--- abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java
(original)
+++ abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java
Mon Nov 14 20:38:18 2011
@@ -34,8 +34,8 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.objects.PersonObject;
 import org.apache.abdera2.common.http.ResponseType;
 import org.apache.abdera2.protocol.client.BasicClient;
-import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Client;
+import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Session;
 import org.apache.abdera2.test.server.JettyServer;
 import org.junit.AfterClass;

Modified: abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java?rev=1201883&r1=1201882&r2=1201883&view=diff
==============================================================================
--- abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java
(original)
+++ abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java
Mon Nov 14 20:38:18 2011
@@ -37,8 +37,8 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.objects.NoteObject;
 import org.apache.abdera2.activities.model.objects.PersonObject;
 import org.apache.abdera2.protocol.client.BasicClient;
-import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Client;
+import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Session;
 import org.apache.abdera2.test.server.JettyServer;
 import org.apache.abdera2.common.Constants;

Modified: abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java?rev=1201883&r1=1201882&r2=1201883&view=diff
==============================================================================
--- abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java (original)
+++ abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java Mon Nov
14 20:38:18 2011
@@ -31,8 +31,8 @@ import javax.servlet.http.HttpServletRes
 
 import org.apache.abdera2.common.http.CacheControl;
 import org.apache.abdera2.protocol.client.BasicCachingClient;
-import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.Client;
+import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.RequestOptions;
 import org.apache.abdera2.protocol.client.Session;
 import org.apache.abdera2.test.JettyUtil;



Mime
View raw message