Interface WhitelistManager


@PublicApi public interface WhitelistManager
Handles all whitelist rules related data queries and modification.
Since:
1.0
  • Method Details

    • add

      WhitelistRule add(WhitelistRule whitelistRule)
      Add a new whitelist rule. Publishes WhitelistRuleAddedEvent after the modification has been finished.
      Parameters:
      whitelistRule - the whitelist rule to be added
      Returns:
      the created whitelist rule
    • addAll

      Collection<WhitelistRule> addAll(Iterable<WhitelistRule> whitelistRules)
      Add the given collection of whitelist rules. Publishes a WhitelistRuleAddedEvent for each rule which was added after all rules have been processed.
      Parameters:
      whitelistRules - the collection of whitelist rules to be added
      Returns:
      the newly created whitelist rules
    • update

      WhitelistRule update(WhitelistRule whitelistRule)
      Update a given whitelist rule. Publishes WhitelistRuleChangedEvent after the modification has been finished.
      Parameters:
      whitelistRule - the updated information to be used with the whitelist rule
      Returns:
      the updated whitelist rule
    • remove

      void remove(WhitelistRule whitelistRule)
      Remove the given whitelist rule. Publishes WhitelistRuleRemovedEvent after the modification has been finished.
      Parameters:
      whitelistRule - the whitelistRule to be removed
    • removeAll

      void removeAll(Iterable<WhitelistRule> whitelistRules)
      Remove the given collection of whitelist rules. Published a WhitelistRuleRemovedEvent for each rule that was removed after all rules have been processed.
      Parameters:
      whitelistRules - the collection of whitelist rules to be removed
    • getAll

      Returns:
      all known whitelist rules
    • get

      @Nullable WhitelistRule get(int id)
      Parameters:
      id - the id of the whitelist rule
      Returns:
      the whitelist rule with the given id or null if not found