Class DelegatingDirectoryInstanceLoaderImpl
java.lang.Object
com.atlassian.crowd.directory.loader.DelegatingDirectoryInstanceLoaderImpl
- All Implemented Interfaces:
DelegatingDirectoryInstanceLoader
,DirectoryInstanceLoader
public class DelegatingDirectoryInstanceLoaderImpl
extends Object
implements DelegatingDirectoryInstanceLoader
Iterative directory instance loader.
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingDirectoryInstanceLoaderImpl
(InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, InternalHybridDirectoryInstanceLoader ldapInternalHybridDirectoryInstanceLoader) Pico-friendly constructor.DelegatingDirectoryInstanceLoaderImpl
(InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, InternalHybridDirectoryInstanceLoader ldapInternalHybridDirectoryInstanceLoader, DelegatedAuthenticationDirectoryInstanceLoader delegatedAuthenticationDirectoryInstanceLoader) Pico-friendly constructor.Creates a new instance of DelegatingDirectoryInstanceLoader. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getDirectory
(Directory directory) Loads theRemoteDirectory
implementation class for a specific (already saved)Directory
configuration.Loads a guaranteed un-cached directory implementation for a specific configuration.
-
Constructor Details
-
DelegatingDirectoryInstanceLoaderImpl
Creates a new instance of DelegatingDirectoryInstanceLoader. Spring-friendly.- Parameters:
loaders
- list of delegate directory instance loaders.
-
DelegatingDirectoryInstanceLoaderImpl
public DelegatingDirectoryInstanceLoaderImpl(InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, InternalHybridDirectoryInstanceLoader ldapInternalHybridDirectoryInstanceLoader, DelegatedAuthenticationDirectoryInstanceLoader delegatedAuthenticationDirectoryInstanceLoader) Pico-friendly constructor. Because Pico can not accept list arguments in its constructor it instead hard-codes the two delegate loaders that JIRA needs. This constructor must have more arguments than the spring-friendly constructor for Pico to find it.- Parameters:
internalDirectoryInstanceLoader
- loads an internal directory instanceldapInternalHybridDirectoryInstanceLoader
- loads a directory with caching capabilities (using an internal directory)delegatedAuthenticationDirectoryInstanceLoader
- loads a DelegatedAuthenticationDirectory instance
-
DelegatingDirectoryInstanceLoaderImpl
public DelegatingDirectoryInstanceLoaderImpl(InternalDirectoryInstanceLoader internalDirectoryInstanceLoader, InternalHybridDirectoryInstanceLoader ldapInternalHybridDirectoryInstanceLoader) Pico-friendly constructor. Because Pico can not accept list arguments in its constructor it instead hard-codes the two delegate loaders that JIRA needs. This constructor must have more arguments than the spring-friendly constructor for Pico to find it.- Parameters:
internalDirectoryInstanceLoader
- the internal directory in which to do the cachingldapInternalHybridDirectoryInstanceLoader
- loads a directory with caching capabilities (using an internal directory)
-
-
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
- Parameters:
directory
- The directory to load theRemoteDirectory
implementation from.- Returns:
- The
RemoteDirectory
loaded implementation. - Throws:
DirectoryInstantiationException
- If theRemoteDirectory
implementation could not be loaded.
-
getRawDirectory
public RemoteDirectory getRawDirectory(Long id, String className, Map<String, String> attributes) throws DirectoryInstantiationExceptionDescription copied from interface:DirectoryInstanceLoader
Loads a guaranteed un-cached directory implementation for a specific configuration.- Specified by:
getRawDirectory
in interfaceDirectoryInstanceLoader
- Parameters:
id
- Directory IDclassName
- class name of directory.attributes
- the configuration attributes to pass to the RemoteDirectory- Returns:
- The loaded RemoteDirectory implementation.
- Throws:
DirectoryInstantiationException
- if a RemoteDirectory implementation can not be loaded.
-
canLoad
- Specified by:
canLoad
in interfaceDirectoryInstanceLoader
- Parameters:
className
- class name of directory.- Returns:
true
iff the directory can load the directory of the specified class.
-