com.atlassian.confluence.plugins.gadgets.whitelist
Class ConfluenceURIWhitelist

java.lang.Object
  extended by com.atlassian.confluence.plugins.gadgets.whitelist.ConfluenceURIWhitelist
All Implemented Interfaces:
ConfluenceGadgetWhitelistManager, com.atlassian.gadgets.opensocial.spi.Whitelist

public class ConfluenceURIWhitelist
extends Object
implements com.atlassian.gadgets.opensocial.spi.Whitelist, ConfluenceGadgetWhitelistManager


Nested Class Summary
static class ConfluenceURIWhitelist.URICacheKey
           
 
Constructor Summary
ConfluenceURIWhitelist(com.atlassian.gadgets.directory.spi.ExternalGadgetSpecStore gadgetSpecStore, com.atlassian.gadgets.directory.spi.SubscribedGadgetFeedStore gadgetFeedStore, com.atlassian.bandana.BandanaManager bandanaManager, SettingsManager settingsManager)
           
 
Method Summary
 void add(String uri)
          Add the given uri to the whitelist.
 boolean allows(URI uri)
          Checks if the uri given should be allowed or not
 Set<String> getAllUserConfiguredRules()
          Returns a set with all the rules configured in this whitelist.
 void remove(String uri)
          Remove the given uri from the whitelist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceURIWhitelist

public ConfluenceURIWhitelist(com.atlassian.gadgets.directory.spi.ExternalGadgetSpecStore gadgetSpecStore,
                              com.atlassian.gadgets.directory.spi.SubscribedGadgetFeedStore gadgetFeedStore,
                              com.atlassian.bandana.BandanaManager bandanaManager,
                              SettingsManager settingsManager)
Method Detail

allows

public boolean allows(URI uri)
Description copied from interface: ConfluenceGadgetWhitelistManager
Checks if the uri given should be allowed or not

Specified by:
allows in interface ConfluenceGadgetWhitelistManager
Specified by:
allows in interface com.atlassian.gadgets.opensocial.spi.Whitelist
Parameters:
uri - uri to check.
Returns:
true if the passed in uri is allowed.

add

public void add(String uri)
Description copied from interface: ConfluenceGadgetWhitelistManager
Add the given uri to the whitelist. If the whitelist already contains the uri this method should not do anything.

Specified by:
add in interface ConfluenceGadgetWhitelistManager
Parameters:
uri - uri to add.

getAllUserConfiguredRules

public Set<String> getAllUserConfiguredRules()
Description copied from interface: ConfluenceGadgetWhitelistManager
Returns a set with all the rules configured in this whitelist. Implementations should ensure the returned value is immutable.

Specified by:
getAllUserConfiguredRules in interface ConfluenceGadgetWhitelistManager
Returns:
an immutable set with all the rules.

remove

public void remove(String uri)
Description copied from interface: ConfluenceGadgetWhitelistManager
Remove the given uri from the whitelist. If the whitelist does not contain the uri this method should not do anything.

Specified by:
remove in interface ConfluenceGadgetWhitelistManager
Parameters:
uri - uri to remove.


Copyright © 2003-2012 Atlassian. All Rights Reserved.