Source:
private void dontUseUserPreferences(NotificationParameters notificationParameters, Map<ParametersKey, String> parameters) throws NotificationException, EventStreamException { List<String> excludedFilters = new ArrayList<>(); if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_OWN_EVENTS))) { excludedFilters.add(OwnEventFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_MINOR_EVENTS)) && notificationParameters.format == NotificationFormat.ALERT) { excludedFilters.add(MinorEventAlertNotificationFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_SYSTEM_EVENTS))) { excludedFilters.add(SystemUserNotificationFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_READ_EVENTS)) && notificationParameters.format == NotificationFormat.ALERT) { excludedFilters.add(EventReadAlertFilter.FILTER_NAME); } notificationParameters.filters = notificationFilterManager.getAllFilters(true).stream() .filter(filter -> !excludedFilters.contains(filter.getName())).collect(Collectors.toList()); enableAllEventTypes(notificationParameters); String wikis = parameters.get(ParametersKey.WIKIS); String currentWiki = parameters.get(ParametersKey.CURRENT_WIKI); if (StringUtils.isEmpty(currentWiki)) { currentWiki = wikiDescriptorManager.getCurrentWikiId(); } handleLocationParameter(parameters.get(ParametersKey.PAGES), notificationParameters, NotificationFilterProperty.PAGE, currentWiki); handleLocationParameter(parameters.get(ParametersKey.SPACES), notificationParameters, NotificationFilterProperty.SPACE, currentWiki); handleLocationParameter(wikis, notificationParameters, NotificationFilterProperty.WIKI, currentWiki); if (StringUtils.isBlank(wikis) && StringUtils.isBlank(parameters.get(ParametersKey.PAGES)) && StringUtils.isBlank(parameters.get(ParametersKey.SPACES)) && !StringUtils.equals(currentWiki, wikiDescriptorManager.getMainWikiId())) { handleLocationParameter(currentWiki, notificationParameters, NotificationFilterProperty.WIKI, currentWiki); } usersParameterHandler.handleUsersParameter(parameters.get(ParametersKey.USERS), notificationParameters); handleTagsParameter(notificationParameters, parameters.get(ParametersKey.TAGS), currentWiki); }

Target:
private void dontUseUserPreferences(NotificationParameters notificationParameters, Map<ParametersKey, String> parameters) throws NotificationException, EventStreamException { List<String> excludedFilters = new ArrayList<>(); if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_OWN_EVENTS))) { excludedFilters.add(OwnEventFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_MINOR_EVENTS)) && notificationParameters.format == NotificationFormat.ALERT) { excludedFilters.add(MinorEventAlertNotificationFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_SYSTEM_EVENTS))) { excludedFilters.add(SystemUserNotificationFilter.FILTER_NAME); } if (Boolean.parseBoolean(parameters.get(ParametersKey.DISPLAY_READ_EVENTS)) && notificationParameters.format == NotificationFormat.ALERT) { excludedFilters.add(EventReadAlertFilter.FILTER_NAME); } notificationParameters.filters = notificationFilterManager.getAllFilters(true).stream() .filter(filter -> !excludedFilters.contains(filter.getName())).collect(Collectors.toList()); enableAllEventTypes(notificationParameters); String wikis = parameters.get(ParametersKey.WIKIS); String currentWiki = parameters.get(ParametersKey.CURRENT_WIKI); if (StringUtils.isEmpty(currentWiki)) { currentWiki = wikiDescriptorManager.getCurrentWikiId(); } handleLocationParameter(parameters.get(ParametersKey.PAGES), notificationParameters, NotificationFilterProperty.PAGE, currentWiki); handleLocationParameter(parameters.get(ParametersKey.SPACES), notificationParameters, NotificationFilterProperty.SPACE, currentWiki); handleLocationParameter(wikis, notificationParameters, NotificationFilterProperty.WIKI, currentWiki); handleSubwikiWithoutLocationParameters(notificationParameters, parameters, currentWiki); usersParameterHandler.handleUsersParameter(parameters.get(ParametersKey.USERS), notificationParameters); handleTagsParameter(notificationParameters, parameters.get(ParametersKey.TAGS), currentWiki); }