r7415 - in dumbhippo/trunk/server/src/com/dumbhippo/server: blocks impl
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7415 - in dumbhippo/trunk/server/src/com/dumbhippo/server: blocks impl
- Date: Wed, 9 Apr 2008 18:22:32 -0500 (CDT)
Author: marinaz
Date: 2008-04-09 18:22:29 -0500 (Wed, 09 Apr 2008)
New Revision: 7415
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockHandlerBean.java
dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookSystemBean.java
Log:
Allow SystemViewpoint to be passed in when populating a FacebookEvent block view or getting a FacebookEvent.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockHandlerBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockHandlerBean.java 2008-04-09 22:58:06 UTC (rev 7414)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockHandlerBean.java 2008-04-09 23:22:29 UTC (rev 7415)
@@ -26,6 +26,7 @@
import com.dumbhippo.server.NotFoundException;
import com.dumbhippo.server.util.EJBUtil;
import com.dumbhippo.server.views.PersonView;
+import com.dumbhippo.server.views.SystemViewpoint;
import com.dumbhippo.server.views.Viewpoint;
import com.dumbhippo.services.caches.CacheFactory;
import com.dumbhippo.services.caches.FacebookPhotoDataCache;
@@ -80,7 +81,7 @@
// before we implement getting info about one's friends and network, we can only show
// facebook blocks to their owners
- if (!viewpoint.isOfUser(user))
+ if (!viewpoint.isOfUser(user) && !(viewpoint instanceof SystemViewpoint))
throw new BlockNotVisibleException("external facebook account for block " + block + " is not visible to " + viewpoint);
// no extras needed, we just need user.getName
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookSystemBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookSystemBean.java 2008-04-09 22:58:06 UTC (rev 7414)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookSystemBean.java 2008-04-09 23:22:29 UTC (rev 7415)
@@ -34,6 +34,7 @@
import com.dumbhippo.server.NotFoundException;
import com.dumbhippo.server.Configuration.PropertyNotFoundException;
import com.dumbhippo.server.util.EJBUtil;
+import com.dumbhippo.server.views.SystemViewpoint;
import com.dumbhippo.server.views.Viewpoint;
@Stateless
@@ -119,7 +120,7 @@
// facebook blocks to their owners; later we can return it if the viewpoint is for someone
// who is the owner's facebook friend or is in the same network with the owner and
// facebookEvent.getEventType().getDisplayToOthers() is true
- if (viewpoint.isOfUser(facebookEvent.getFacebookAccount().getExternalAccount().getAccount().getOwner())) {
+ if (viewpoint.isOfUser(facebookEvent.getFacebookAccount().getExternalAccount().getAccount().getOwner()) || (viewpoint instanceof SystemViewpoint)) {
return facebookEvent;
} else {
throw new NotFoundException("Viewpoint " + viewpoint + " can't view facebook event " + facebookEvent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]