@Internal public interface

InternalWhitelistManager

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

@Internal

This interface is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Marker interface to distinguish the actual implementation of WhitelistManager living in a plugin from the delegation placeholder in JIRA core.

Summary

Public Methods
List<String> getRules()
Returns a list of rules that are currently allowed in the whitelist.
boolean isAllowed(URI uri)
Checks if requests to the provided URI are allowed according to the current whitelist configuration
boolean isDisabled()
List<String> updateRules(List<String> rules, boolean disabled)
Used to update the whitelist configuration.

Public Methods

public List<String> getRules ()

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

public boolean isAllowed (URI uri)

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

public boolean isDisabled ()

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

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

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