Class Overview
A custom AccessProvider for Confluence that caches 'handles' lookups.
Summary
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)
|
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
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)