r6941 - in dumbhippo/trunk/server/src/com/dumbhippo/server: dm impl



Author: marinaz
Date: 2007-11-29 15:57:44 -0600 (Thu, 29 Nov 2007)
New Revision: 6941

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java
Log:
Add "facebook" property to UserDMO.

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java	2007-11-28 21:14:09 UTC (rev 6940)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java	2007-11-29 21:57:44 UTC (rev 6941)
@@ -26,6 +26,7 @@
 import com.dumbhippo.persistence.DesktopSetting;
 import com.dumbhippo.persistence.EmailResource;
 import com.dumbhippo.persistence.ExternalAccount;
+import com.dumbhippo.persistence.FacebookResource;
 import com.dumbhippo.persistence.Resource;
 import com.dumbhippo.persistence.TrackHistory;
 import com.dumbhippo.persistence.User;
@@ -335,6 +336,17 @@
 	}	
 	
 	@DMProperty
+	public String getFacebook() {
+		for (AccountClaim ac : user.getAccountClaims()) {
+			Resource r = ac.getResource();
+			if (r instanceof FacebookResource)
+				return ((FacebookResource)r).getFacebookUserId();
+		}
+		
+		return null;
+	}
+	
+	@DMProperty
 	@DMFilter("viewer.canSeePrivate(this)")
 	public Set<String> getGoogleEnabledEmails() {
 		Set<String> results = new HashSet<String>();

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java	2007-11-28 21:14:09 UTC (rev 6940)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java	2007-11-29 21:57:44 UTC (rev 6941)
@@ -408,7 +408,6 @@
 			DataService.currentSessionRW().changed(UserDMO.class, claimedOwner.getGuid(), "aim");
 		else if (res instanceof XmppResource)
 			DataService.currentSessionRW().changed(UserDMO.class, claimedOwner.getGuid(), "xmpp");
-		// TODO: is there a list of property names anywhere that needs to be updated?
 		else if (res instanceof FacebookResource)
 			DataService.currentSessionRW().changed(UserDMO.class, claimedOwner.getGuid(), "facebook");
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]