コード例 #1
0
	public void subcribe(long userid, long entityid, SubscriptionProvider service) throws SystemException {
		if (this == ALL) {
			for (DebateActivityKeys key:values()) {
				if (key == ALL) continue;
				else key.subcribe(userid,entityid,service);
			}
		}
		service.createSubscription("debates", userid, entityid,ordinal());
	}
コード例 #2
0
     public boolean isSubscribed(long userid, long entityid, SubscriptionProvider service) throws SystemException {
       if (this == ALL) {
			for (DebateActivityKeys key:values()) {
				if (key == ALL) continue;
				if (!key.isSubscribed(userid,entityid,service)) return false;
			}
		}
		return service.isSubscribed("debates", userid, entityid,ordinal());
    }
コード例 #3
0
	public static DebateActivityKeys fromId(int id) {
		return DebateActivityKeys.values()[id];
	}