r7129 - in dumbhippo/trunk/server/src/com/dumbhippo/server: dm impl
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7129 - in dumbhippo/trunk/server/src/com/dumbhippo/server: dm impl
- Date: Thu, 3 Jan 2008 17:02:33 -0600 (CST)
Author: hp
Date: 2008-01-03 17:02:33 -0600 (Thu, 03 Jan 2008)
New Revision: 7129
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java
dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java
Log:
add change notification to UserDMO.applicationUsageEnabled, musicSharingEnabled, musicSharingPrimed.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java 2008-01-03 22:28:05 UTC (rev 7128)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/dm/UserDMO.java 2008-01-03 23:02:33 UTC (rev 7129)
@@ -40,6 +40,7 @@
import com.dumbhippo.persistence.UserBlockData;
import com.dumbhippo.persistence.XmppResource;
import com.dumbhippo.server.DesktopSettings;
+import com.dumbhippo.server.Enabled;
import com.dumbhippo.server.IdentitySpider;
import com.dumbhippo.server.MusicSystem;
import com.dumbhippo.server.NotFoundException;
@@ -391,6 +392,18 @@
@DMProperty
@DMFilter("viewer.canSeePrivate(this)")
+ public boolean getMusicSharingEnabled() {
+ return identitySpider.getMusicSharingEnabled(user, Enabled.AND_ACCOUNT_IS_ACTIVE);
+ }
+
+ @DMProperty
+ @DMFilter("viewer.canSeePrivate(this)")
+ public boolean getMusicSharingPrimed() {
+ return identitySpider.getMusicSharingPrimed(user);
+ }
+
+ @DMProperty
+ @DMFilter("viewer.canSeePrivate(this)")
public Set<ApplicationDMO> getTopApplications() {
UserViewpoint viewpoint = new UserViewpoint(user, Site.NONE);
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java 2008-01-03 22:28:05 UTC (rev 7128)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/IdentitySpiderBean.java 2008-01-03 23:02:33 UTC (rev 7129)
@@ -1041,6 +1041,7 @@
account.setMusicSharingEnabled(enabled);
notifier.onMusicSharingToggled(viewpoint);
LiveState.getInstance().queueUpdate(new UserPrefChangedEvent(viewpoint.getViewer().getGuid(), "musicSharingEnabled", Boolean.toString(enabled)));
+ DataService.currentSessionRW().changed(UserDMO.class, account.getOwner().getGuid(), "musicSharingEnabled");
}
}
@@ -1053,7 +1054,8 @@
Account account = getAttachedAccount(user);
if (account.isMusicSharingPrimed() != primed) {
account.setMusicSharingPrimed(primed);
- LiveState.getInstance().queueUpdate(new UserPrefChangedEvent(user.getGuid(), "musicSharingPrimed", Boolean.toString(primed)));
+ LiveState.getInstance().queueUpdate(new UserPrefChangedEvent(user.getGuid(), "musicSharingPrimed", Boolean.toString(primed)));
+ DataService.currentSessionRW().changed(UserDMO.class, account.getOwner().getGuid(), "musicSharingPrimed");
}
}
@@ -1067,8 +1069,10 @@
boolean wasSet = account.isApplicationUsageEnabled() != null;
boolean wasEnabled = getApplicationUsageEnabled(viewpoint.getViewer());
account.setApplicationUsageEnabled(enabled);
- if (enabled != wasEnabled)
+ if (enabled != wasEnabled) {
LiveState.getInstance().queueUpdate(new UserPrefChangedEvent(viewpoint.getViewer().getGuid(), "applicationUsageEnabled", Boolean.toString(enabled)));
+ DataService.currentSessionRW().changed(UserDMO.class, account.getOwner().getGuid(), "applicationUsageEnabled");
+ }
if (enabled != wasEnabled || !wasSet)
notifier.onApplicationUsageToggled(viewpoint);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]