public class

CachingAccessProvider

extends ChainedAccessProvider
implements CacheFactoryAware
java.lang.Object
   ↳ bucket.user.providers.ChainedUserProvider
     ↳ bucket.user.providers.ChainedAccessProvider
       ↳ bucket.user.providers.CachingAccessProvider

Class Overview

A custom AccessProvider for Confluence that caches 'handles' lookups.

Summary

Fields
protected CacheFactory cacheFactory
[Expand]
Inherited Fields
From class bucket.user.providers.ChainedAccessProvider
Public Constructors
CachingAccessProvider()
Public Methods
boolean addToGroup(String username, String groupname)
boolean create(String name)
void flushCaches()
boolean handles(String name)
boolean inGroup(String username, String groupname)
boolean init(Properties properties)
NECESSARY HACK: LDAPCredentialsProvider.handles() calls UserManager.getInstance().getCredentialsProviders() which triggers of an initialisation of all providers in osuser.xml (including this one) Initialisation is done via this init() method, so we need to ensure a cacheManager is available so that this caching provider is initialised correctly (normally, we have CachingAccessProvider instantiated and initialised by altassian-user's DefaultOSUConfigurationLoader.addProvider())
boolean remove(String name)
boolean removeFromGroup(String username, String groupname)
void setCacheFactory(CacheFactory cacheFactory)
[Expand]
Inherited Methods
From class bucket.user.providers.ChainedAccessProvider
From class bucket.user.providers.ChainedUserProvider
From class java.lang.Object
From interface com.atlassian.user.cache.CacheFactoryAware
From interface com.opensymphony.user.provider.AccessProvider
From interface com.opensymphony.user.provider.UserProvider

Fields

protected CacheFactory cacheFactory

Public Constructors

public CachingAccessProvider ()

Public Methods

public boolean addToGroup (String username, String groupname)

public boolean create (String name)

public void flushCaches ()

public boolean handles (String name)

public boolean inGroup (String username, String groupname)

public boolean init (Properties properties)

NECESSARY HACK: LDAPCredentialsProvider.handles() calls UserManager.getInstance().getCredentialsProviders() which triggers of an initialisation of all providers in osuser.xml (including this one) Initialisation is done via this init() method, so we need to ensure a cacheManager is available so that this caching provider is initialised correctly (normally, we have CachingAccessProvider instantiated and initialised by altassian-user's DefaultOSUConfigurationLoader.addProvider())

Parameters
properties initialisation properties for this provider, and subsequent providers in the chain.
Returns
  • true if initialisation was successful, false otherwise

public boolean remove (String name)

public boolean removeFromGroup (String username, String groupname)

public void setCacheFactory (CacheFactory cacheFactory)