@PublicApi @Deprecated public interface

WhitelistManager

com.atlassian.jira.bc.whitelist.WhitelistManager
Known Indirect Subclasses

This interface is deprecated.
Replaced by com.atlassian.plugins.whitelist.WhitelistService and com.atlassian.plugins.whitelist.OutboundWhitelist. Since v6.1.

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Manager to control whitelist rules currently used for allowing which http requests gadgets are allowed to make. This can be used in future to whitelist any http requests!

Summary

Public Methods
@Deprecated List<String> getRules()
This method is deprecated. Replaced by getAll(). Since v6.1.
@Deprecated boolean isAllowed(URI uri)
This method is deprecated. Replaced by isAllowed(java.net.URI). Since v6.1.
@Deprecated boolean isDisabled()
This method is deprecated. Replaced by isWhitelistEnabled(). Since v6.1.
@Deprecated List<String> updateRules(List<String> rules, boolean disabled)

Public Methods

@Deprecated public List<String> getRules ()

This method is deprecated.
Replaced by getAll(). Since v6.1.

Returns a list of rules that are currently allowed in the whitelist. The list will contain entries like:

  • http://www.atlassian.com/
  • http://www.google.com/*
  • =http://jira.atlassian.com/
  • \/.*www.*\/

Returns
  • a list of allowed rules

@Deprecated public boolean isAllowed (URI uri)

This method is deprecated.
Replaced by isAllowed(java.net.URI). Since v6.1.

Checks if requests to the provided URI are allowed according to the current whitelist configuration

Parameters
uri The uri a http request is made to
Returns
  • true if requests are allowed, false otherwise

@Deprecated public boolean isDisabled ()

This method is deprecated.
Replaced by isWhitelistEnabled(). Since v6.1.

Returns true if the whitelist is currently disabled (meaning all requests are allowed).

Returns
  • true if the whitelist is currently disabled (meaning all requests are allowed)

@Deprecated public List<String> updateRules (List<String> rules, boolean disabled)

This method is deprecated.
Replaced by add(com.atlassian.plugins.whitelist.WhitelistRule), remove(int), disableWhitelist() and enableWhitelist(). Since v6.1.

Used to update the whitelist configuration. Takes a list of rules as well as a boolean flag that allows switching the whitelist off completely.

The method then returns the peristed rules

Parameters
rules List of rules to persist
disabled True if the whitelist should be switched off
Returns
  • A list of persisted rules