@Override public Set<String> getEventTypes() { return filterPreference.getEventTypes(); }
/** * @param filterPreference a filter preference * @return either or not the preference concern all event types */ private boolean matchAllEvents(NotificationFilterPreference filterPreference) { // When the list of event types concerned by the filter is empty, we consider that the filter concerns // all events. return filterPreference.getEventTypes().isEmpty(); }
/** * @param filterPreference a filter preference * @param eventType the event type * @return if the filter preference concerns the event of the notification preference */ private boolean matchEventType(NotificationFilterPreference filterPreference, String eventType) { return eventType == null || filterPreference.getEventTypes().contains(eventType); } }
/** * @param filterPreference a filter preference * @return either or not the preference concern all event types */ private boolean matchAllEvents(NotificationFilterPreference filterPreference) { // When the list of event types concerned by the filter i // s empty, we consider that the filter concerns // all events. return filterPreference.getEventTypes().isEmpty(); } }
/** * Construct a DefaultNotificationFilterPreference which is a copy of the given notificationFilterPreference. * @param notificationFilterPreference object to copy */ public DefaultNotificationFilterPreference(NotificationFilterPreference notificationFilterPreference) { if (notificationFilterPreference instanceof DefaultNotificationFilterPreference) { this.internalId = ((DefaultNotificationFilterPreference) notificationFilterPreference).internalId; this.owner = ((DefaultNotificationFilterPreference) notificationFilterPreference).owner; } this.id = notificationFilterPreference.getId(); this.filterName = notificationFilterPreference.getFilterName(); this.providerHint = notificationFilterPreference.getProviderHint(); this.enabled = notificationFilterPreference.isEnabled(); this.active = notificationFilterPreference.isActive(); this.filterType = notificationFilterPreference.getFilterType(); this.notificationFormats = notificationFilterPreference.getNotificationFormats(); this.startingDate = notificationFilterPreference.getStartingDate(); this.eventTypes = new HashSet<>(notificationFilterPreference.getEventTypes()); this.user = notificationFilterPreference.getUser(); this.pageOnly = notificationFilterPreference.getPageOnly(); this.page = notificationFilterPreference.getPage(); this.wiki = notificationFilterPreference.getWiki(); this.setNotificationFormats(notificationFilterPreference.getNotificationFormats()); }