Class ConfigurableDbCachingRemoteDirectoryInstanceLoader
java.lang.Object
com.atlassian.crowd.directory.loader.AbstractDirectoryInstanceLoader
com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoader
com.atlassian.crowd.directory.loader.ConfigurableDbCachingRemoteDirectoryInstanceLoader
- All Implemented Interfaces:
DirectoryInstanceLoader
,InternalHybridDirectoryInstanceLoader
public class ConfigurableDbCachingRemoteDirectoryInstanceLoader
extends DbCachingRemoteDirectoryInstanceLoader
A subclass of
DbCachingRemoteDirectoryInstanceLoader
which allows DB caching to be switched off based
on the DirectoryProperties.CACHE_ENABLED
attribute. Since 3.2.0 the uncached directories returned by this
class will be extended with auditing capabilities.
Note, the caching in this class refers to the DB caching of directory data, not of in memory caches of the
RemoteDirectory
instances themselves
- Since:
- 2.8
-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoader
auditLogGroupMapper, auditLogUserMapper, auditService
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurableDbCachingRemoteDirectoryInstanceLoader
(DirectoryInstanceLoader remoteDirectoryInstanceLoader, InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, DirectoryCacheFactory directoryCacheFactory, CacheRefresherFactory cacheRefresherFactory, AuditService auditService, AuditLogUserMapper auditLogUserMapper, AuditLogGroupMapper auditLogGroupMapper, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryDao directoryDao) -
Method Summary
Modifier and TypeMethodDescriptiongetDirectory
(Directory directory) Loads theRemoteDirectory
implementation class for a specific (already saved)Directory
configuration.Methods inherited from class com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoader
canLoad, getRawDirectory
-
Constructor Details
-
ConfigurableDbCachingRemoteDirectoryInstanceLoader
public ConfigurableDbCachingRemoteDirectoryInstanceLoader(DirectoryInstanceLoader remoteDirectoryInstanceLoader, InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, DirectoryCacheFactory directoryCacheFactory, CacheRefresherFactory cacheRefresherFactory, AuditService auditService, AuditLogUserMapper auditLogUserMapper, AuditLogGroupMapper auditLogGroupMapper, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryDao directoryDao)
-
-
Method Details
-
getDirectory
Description copied from interface:DirectoryInstanceLoader
Loads theRemoteDirectory
implementation class for a specific (already saved)Directory
configuration.Implementations of this method may choose to cache the RemoteDirectory, so this must only be called for Directories that have been successfully saved.
- Specified by:
getDirectory
in interfaceDirectoryInstanceLoader
- Overrides:
getDirectory
in classDbCachingRemoteDirectoryInstanceLoader
- Parameters:
directory
- The directory to load theRemoteDirectory
implementation from.- Returns:
- The
RemoteDirectory
loaded implementation. - Throws:
DirectoryInstantiationException
- If theRemoteDirectory
implementation could not be loaded.
-