|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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(java.lang.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(java.lang.Long id,
java.lang.String className,
java.util.Map<java.lang.String,java.lang.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(java.lang.Long id,
java.lang.String className,
java.util.Map<java.lang.String,java.lang.String> directoryAttributes)
throws DirectoryInstantiationException
DirectoryInstanceLoader
getRawDirectory in interface DirectoryInstanceLoadergetRawDirectory in interface InternalDirectoryInstanceLoaderid - 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.DirectoryInstanceLoaderpublic boolean canLoad(java.lang.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 CachingDirectoryInstanceLoaderdirectory - 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 CachingDirectoryInstanceLoaderdirectory - 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 | |||||||||