|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader com.atlassian.crowd.directory.loader.InternalDirectoryInstanceLoaderImpl
public class InternalDirectoryInstanceLoaderImpl
Loads an implementation of a RemoteDirectory
for use at runtime
by the Crowd security server.
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 Summary | |
---|---|
InternalDirectoryInstanceLoaderImpl(InstanceFactory instanceFactory,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
boolean |
canLoad(String className)
|
InternalRemoteDirectory |
getDirectory(Directory directory)
Loads the RemoteDirectory implementation class for a specific (already saved)
Directory configuration. |
protected RemoteDirectory |
getNewDirectory(Directory directory)
Always returns a new instance of a RemoteDirectory. |
InternalRemoteDirectory |
getRawDirectory(Long id,
String className,
Map<String,String> directoryAttributes)
Loads a guaranteed un-cached directory implementation for a specific configuration. |
Methods inherited from class com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader |
---|
getEventPublisher, handleEvent, handleEvent, handleEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InternalDirectoryInstanceLoaderImpl(InstanceFactory instanceFactory, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public InternalRemoteDirectory getRawDirectory(Long id, String className, Map<String,String> directoryAttributes) throws DirectoryInstantiationException
DirectoryInstanceLoader
getRawDirectory
in interface DirectoryInstanceLoader
getRawDirectory
in interface InternalDirectoryInstanceLoader
id
- Directory IDclassName
- class name of directory.directoryAttributes
- the configuration attributes to pass to the RemoteDirectory
InternalRemoteDirectory
.
DirectoryInstantiationException
- if a RemoteDirectory implementation can not be loaded.DirectoryInstanceLoader
public boolean canLoad(String className)
canLoad
in interface DirectoryInstanceLoader
className
- class name of directory.
true
iff the directory can load the directory of the specified class.public InternalRemoteDirectory getDirectory(Directory directory) throws DirectoryInstantiationException
DirectoryInstanceLoader
RemoteDirectory
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 DirectoryInstanceLoader
getDirectory
in interface InternalDirectoryInstanceLoader
getDirectory
in class CachingDirectoryInstanceLoader
directory
- The directory to load the RemoteDirectory
implementation from.
RemoteDirectory
loaded implementation.
DirectoryInstantiationException
- If the RemoteDirectory
implementation could not be loaded.DirectoryInstanceLoader
protected RemoteDirectory getNewDirectory(Directory directory) throws DirectoryInstantiationException
CachingDirectoryInstanceLoader
getNewDirectory
in class CachingDirectoryInstanceLoader
directory
- directory configuration
DirectoryInstantiationException
- if the directory could not be instantiated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |