mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-22 20:13:52 +00:00
Supporting additional constructor from superclass in NotificationSets to
automatically track the UserStore via OSGi service registry
This commit is contained in:
1 parent
8da490d09a
commit
a0cec5fb37
5 files changed
+45
No files matched your search
+9
@@ -4,6 +4,8 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.server.impl.preferences.model.BoatClassNotificationPreference;
|
||||
import com.sap.sailing.server.impl.preferences.model.BoatClassNotificationPreferences;
|
||||
@@ -16,6 +18,13 @@ public abstract class AbstractBoatClassNotificationSet
|
||||
public AbstractBoatClassNotificationSet(UserStore store) {
|
||||
super(BoatClassNotificationPreferences.PREF_NAME, store);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used to automatically track {@link UserStore} as OSGi service.
|
||||
*/
|
||||
public AbstractBoatClassNotificationSet(BundleContext bundleContext) {
|
||||
super(BoatClassNotificationPreferences.PREF_NAME, bundleContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<BoatClass> calculateObjectsToNotify(BoatClassNotificationPreferences preference) {
|
||||
|
||||
+9
@@ -4,6 +4,8 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.server.impl.preferences.model.CompetitorNotificationPreference;
|
||||
import com.sap.sailing.server.impl.preferences.model.CompetitorNotificationPreferences;
|
||||
@@ -16,6 +18,13 @@ public abstract class AbstractCompetitorNotificationSet
|
||||
public AbstractCompetitorNotificationSet(UserStore store) {
|
||||
super(CompetitorNotificationPreferences.PREF_NAME, store);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used to automatically track {@link UserStore} as OSGi service.
|
||||
*/
|
||||
public AbstractCompetitorNotificationSet(BundleContext bundleContext) {
|
||||
super(CompetitorNotificationPreferences.PREF_NAME, bundleContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<Competitor> calculateObjectsToNotify(CompetitorNotificationPreferences preference) {
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.server.impl.preferences;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.server.impl.preferences.model.BoatClassNotificationPreference;
|
||||
import com.sap.sse.security.UserStore;
|
||||
|
||||
@@ -9,6 +11,13 @@ public class BoatClassResultsNotificationSet extends AbstractBoatClassNotificati
|
||||
super(store);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used to automatically track {@link UserStore} as OSGi service.
|
||||
*/
|
||||
public BoatClassResultsNotificationSet(BundleContext bundleContext) {
|
||||
super(bundleContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldNotifyFor(BoatClassNotificationPreference pref) {
|
||||
return pref.isNotifyAboutResults();
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.server.impl.preferences;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.server.impl.preferences.model.BoatClassNotificationPreference;
|
||||
import com.sap.sse.security.UserStore;
|
||||
|
||||
@@ -9,6 +11,13 @@ public class BoatClassUpcomingRaceNotificationSet extends AbstractBoatClassNotif
|
||||
super(store);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used to automatically track {@link UserStore} as OSGi service.
|
||||
*/
|
||||
public BoatClassUpcomingRaceNotificationSet(BundleContext bundleContext) {
|
||||
super(bundleContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldNotifyFor(BoatClassNotificationPreference pref) {
|
||||
return pref.isNotifyAboutUpcomingRaces();
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.server.impl.preferences;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.server.impl.preferences.model.CompetitorNotificationPreference;
|
||||
import com.sap.sse.security.UserStore;
|
||||
|
||||
@@ -9,6 +11,13 @@ public class CompetitorResultsNotificationSet extends AbstractCompetitorNotifica
|
||||
super(store);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used to automatically track {@link UserStore} as OSGi service.
|
||||
*/
|
||||
public CompetitorResultsNotificationSet(BundleContext bundleContext) {
|
||||
super(bundleContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldNotifyFor(CompetitorNotificationPreference pref) {
|
||||
return pref.isNotifyAboutResults();
|
||||
|
||||
Reference in new issue
Block a user