com.atlassian.jira.bc.whitelist
Interface WhitelistService

All Known Implementing Classes:
DefaultWhitelistService

Deprecated. Replaced by WhitelistService and OutboundWhitelist. Since v6.1.

@PublicApi
@Deprecated
public interface WhitelistService

Service 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! Only system administrators should be allowed to modify the whitelist implemenation

Since:
v4.3

Nested Class Summary
static class WhitelistService.WhitelistResult
          Deprecated. 
static class WhitelistService.WhitelistUpdateValidationResult
          Deprecated. 
 
Method Summary
 WhitelistService.WhitelistResult getRules(JiraServiceContext context)
          Deprecated. Replaced by WhitelistService.getAll(). Since v6.1.
 boolean isAllowed(URI uri)
          Deprecated. Replaced by Whitelist.isAllowed(java.net.URI). Since v6.1.
 boolean isDisabled()
          Deprecated. Replaced by WhitelistService.isWhitelistEnabled(). Since v6.1.
 WhitelistService.WhitelistResult updateRules(WhitelistService.WhitelistUpdateValidationResult result)
          Deprecated. Replaced by WhitelistService.add(com.atlassian.plugins.whitelist.WhitelistRule), WhitelistService.remove(int), WhitelistService.disableWhitelist() and WhitelistService.enableWhitelist(). Since v6.1.
 WhitelistService.WhitelistUpdateValidationResult validateUpdateRules(JiraServiceContext context, List<String> rules, boolean disabled)
          Deprecated. Replaced by WhitelistService.add(com.atlassian.plugins.whitelist.WhitelistRule), WhitelistService.remove(int), WhitelistService.disableWhitelist() and WhitelistService.enableWhitelist(). Since v6.1.
 

Method Detail

getRules

@Deprecated
WhitelistService.WhitelistResult getRules(JiraServiceContext context)
Deprecated. Replaced by WhitelistService.getAll(). Since v6.1.

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

Parameters:
context - The service context with the current user & error collection
Returns:
Result containing the list of rules or an error message

validateUpdateRules

@Deprecated
WhitelistService.WhitelistUpdateValidationResult validateUpdateRules(JiraServiceContext context,
                                                                                List<String> rules,
                                                                                boolean disabled)
Deprecated. Replaced by WhitelistService.add(com.atlassian.plugins.whitelist.WhitelistRule), WhitelistService.remove(int), WhitelistService.disableWhitelist() and WhitelistService.enableWhitelist(). Since v6.1.

Validates that the current user is allowed to update the whitelist by checking if they are a system administrator.

Parameters:
context - The service context with the current user & error collection
rules - List of rule strings
disabled - true if the whitelist should be turned off
Returns:
A validation result that can be used to persist the new whitelist rules.

updateRules

@Deprecated
WhitelistService.WhitelistResult updateRules(WhitelistService.WhitelistUpdateValidationResult result)
Deprecated. Replaced by WhitelistService.add(com.atlassian.plugins.whitelist.WhitelistRule), WhitelistService.remove(int), WhitelistService.disableWhitelist() and WhitelistService.enableWhitelist(). Since v6.1.

Takes the validation result from validateUpdateRules(com.atlassian.jira.bc.JiraServiceContext, java.util.List, boolean) and persists the new rules.

Parameters:
result - a validation result obtained by calling validateUpdateRules(com.atlassian.jira.bc.JiraServiceContext, java.util.List, boolean)
Returns:
Result containing the newly peristed whitelist

isDisabled

@Deprecated
boolean isDisabled()
Deprecated. Replaced by WhitelistService.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)

isAllowed

@Deprecated
boolean isAllowed(URI uri)
Deprecated. Replaced by Whitelist.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


Copyright © 2002-2014 Atlassian. All Rights Reserved.