com.atlassian.crowd.directory.loader
Class InternalDirectoryInstanceLoaderImpl
java.lang.Object
com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader
com.atlassian.crowd.directory.loader.InternalDirectoryInstanceLoaderImpl
- All Implemented Interfaces:
- DirectoryInstanceLoader, InternalDirectoryInstanceLoader
public class InternalDirectoryInstanceLoaderImpl
- extends CachingDirectoryInstanceLoader
- implements InternalDirectoryInstanceLoader
Loads an implementation of a 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalDirectoryInstanceLoaderImpl
public InternalDirectoryInstanceLoaderImpl(InstanceFactory instanceFactory,
com.atlassian.event.api.EventPublisher eventPublisher)
getRawDirectory
public InternalRemoteDirectory getRawDirectory(java.lang.Long id,
java.lang.String className,
java.util.Map<java.lang.String,java.lang.String> directoryAttributes)
throws DirectoryInstantiationException
- Specified by:
getRawDirectory in interface DirectoryInstanceLoader- Specified by:
getRawDirectory in interface InternalDirectoryInstanceLoader
- Throws:
DirectoryInstantiationException
canLoad
public boolean canLoad(java.lang.String className)
- Specified by:
canLoad in interface DirectoryInstanceLoader
getDirectory
public InternalRemoteDirectory getDirectory(Directory directory)
throws DirectoryInstantiationException
- Specified by:
getDirectory in interface DirectoryInstanceLoader- Specified by:
getDirectory in interface InternalDirectoryInstanceLoader- Overrides:
getDirectory in class CachingDirectoryInstanceLoader
- Throws:
DirectoryInstantiationException
getNewDirectory
protected RemoteDirectory getNewDirectory(Directory directory)
throws DirectoryInstantiationException
- Description copied from class:
CachingDirectoryInstanceLoader
- Always returns a new instance of a RemoteDirectory.
- Specified by:
getNewDirectory in class CachingDirectoryInstanceLoader
- Parameters:
directory - directory configuration
- Returns:
- new instance of a RemoteDirectory
- Throws:
DirectoryInstantiationException - if the directory could not be instantiated.
Copyright © 2012 Atlassian. All Rights Reserved.