You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by li...@apache.org on 2009/01/12 04:29:08 UTC

svn commit: r733594 - in /incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi: GroupId.java UserId.java

Author: lindner
Date: Sun Jan 11 19:29:08 2009
New Revision: 733594

URL: http://svn.apache.org/viewvc?rev=733594&view=rev
Log:
SHINDIG-804 | Patch from Henning Schmiedehausen - implement toString for UserId and GroupId

Modified:
    incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/GroupId.java
    incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/UserId.java

Modified: incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/GroupId.java
URL: http://svn.apache.org/viewvc/incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/GroupId.java?rev=733594&r1=733593&r2=733594&view=diff
==============================================================================
--- incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/GroupId.java (original)
+++ incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/GroupId.java Sun Jan 11 19:29:08 2009
@@ -87,4 +87,21 @@
     }
     return this.type.hashCode() + groupHashCode;
   }
+
+  @Override public String toString() {
+      switch (type) {
+          case all:
+              return "ALL";
+          case deleted:
+              return "DELETE";
+          case friends:
+              return "FRIENDS";
+          case self:
+              return "SELF";
+          case groupId:
+              return "GROUPID(" + groupId + ")";
+          default:
+              return "UNKNOWN";
+      }
+  }
 }

Modified: incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/UserId.java
URL: http://svn.apache.org/viewvc/incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/UserId.java?rev=733594&r1=733593&r2=733594&view=diff
==============================================================================
--- incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/UserId.java (original)
+++ incubator/shindig/branches/1.0.x-incubating/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/UserId.java Sun Jan 11 19:29:08 2009
@@ -99,4 +99,20 @@
     int userHashCode = this.userId == null ? 0 : this.userId.hashCode();
     return this.type.hashCode() + userHashCode;
   }
+
+  @Override
+  public String toString() {
+      switch(type) {
+          case owner:
+            return "OWNER";
+          case viewer:
+          case me:
+            return "VIEWER";
+          case userId:
+            return "USER(" + userId + ")";
+          default:
+              return "UNKNOWN";
+        }
+
+  }
 }