public class InternalDirectoryInstanceLoaderImpl extends AbstractDirectoryInstanceLoader implements InternalDirectoryInstanceLoader
RemoteDirectory for use at runtime
by the Crowd security server.
The getDirectory(com.atlassian.crowd.embedded.api.Directory) method caches instances of RemoteDirectory as
allowed in the spec of the interface, but getRawDirectory(Long, String, java.util.Map) returns a new instance
every time as required.
This class listens for update events on EventPublisher to know when to refresh the cache.
This loads both AbstractInternalDirectory and
DelegatedAuthenticationDirectory instances.
| Constructor and Description |
|---|
InternalDirectoryInstanceLoaderImpl(InstanceFactory instanceFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLoad(String className) |
InternalRemoteDirectory |
getDirectory(Directory directory)
Loads the
RemoteDirectory implementation class for a specific (already saved)
Directory configuration. |
InternalRemoteDirectory |
getRawDirectory(Long id,
String className,
Map<String,String> directoryAttributes)
Loads a guaranteed un-cached directory implementation for a specific configuration.
|
public InternalDirectoryInstanceLoaderImpl(InstanceFactory instanceFactory)
public InternalRemoteDirectory getRawDirectory(Long id, String className, Map<String,String> directoryAttributes) throws DirectoryInstantiationException
DirectoryInstanceLoadergetRawDirectory in interface DirectoryInstanceLoadergetRawDirectory in interface InternalDirectoryInstanceLoaderid - Directory IDclassName - class name of directory.directoryAttributes - the configuration attributes to pass to the RemoteDirectoryInternalRemoteDirectory.DirectoryInstantiationException - if a RemoteDirectory implementation can not be loaded.DirectoryInstanceLoaderpublic boolean canLoad(String className)
canLoad in interface DirectoryInstanceLoaderclassName - class name of directory.true iff the directory can load the directory of the specified class.public InternalRemoteDirectory getDirectory(Directory directory) throws DirectoryInstantiationException
DirectoryInstanceLoaderRemoteDirectory 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.
getDirectory in interface DirectoryInstanceLoadergetDirectory in interface InternalDirectoryInstanceLoadergetDirectory in class AbstractDirectoryInstanceLoaderdirectory - The directory to load the RemoteDirectory implementation from.RemoteDirectory loaded implementation.DirectoryInstantiationException - If the RemoteDirectory implementation could not be loaded.DirectoryInstanceLoaderCopyright © 2019 Atlassian. All rights reserved.