/** * Delete a filter preference. * @param filterPreferenceId name of the filter preference * @throws NotificationException if an error happens * * @since 9.8RC1 */ public void deleteFilterPreference(String filterPreferenceId) throws NotificationException { notificationFilterPreferenceManager.deleteFilterPreference(documentAccessBridge.getCurrentUserReference(), filterPreferenceId); }
/** * Get a collection of notification filters preferences that are available for the current user and that corresponds * to the given filter. * * @param filter the filter associated to the preferences * @return a set of {@link NotificationFilterPreference} * @throws NotificationException if an error occurs * * @since 9.8RC1 */ public Set<NotificationFilterPreference> getFilterPreferences(NotificationFilter filter) throws NotificationException { return notificationFilterPreferenceManager.getFilterPreferences( notificationFilterPreferenceManager.getFilterPreferences( documentAccessBridge.getCurrentUserReference()), filter ).collect(Collectors.toSet()); }
/** * Enable or disable a filter preference. * @param filterPreferenceId id of the filter preference * @param enabled either or not the filter preference should be enabled * @throws NotificationException if an error happens * * @since 9.8RC1 */ public void setFilterPreferenceEnabled(String filterPreferenceId, boolean enabled) throws NotificationException { notificationFilterPreferenceManager.setFilterPreferenceEnabled(documentAccessBridge.getCurrentUserReference(), filterPreferenceId, enabled); }
/** * Update the start date for every filter preference that current user has. * * @param startDate the new start date * @throws NotificationException if an error occurs * * @since 10.5RC1 * @since 10.4 * @since 9.11.5 */ public void setStartDate(Date startDate) throws NotificationException { notificationFilterPreferenceManager.setStartDateForUser( documentAccessBridge.getCurrentUserReference(), startDate ); }