com.atlassian.crowd.directory.loader
Class CachingDirectoryInstanceLoader
java.lang.Object
com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader
- All Implemented Interfaces:
- DirectoryInstanceLoader
- Direct Known Subclasses:
- CustomDirectoryInstanceLoader, DbCachingRemoteDirectoryInstanceLoaderImpl, DelegatedAuthenticationDirectoryInstanceLoaderImpl, InternalDirectoryInstanceLoaderImpl, LDAPDirectoryInstanceLoaderImpl, RemoteCrowdDirectoryInstanceLoaderImpl
public abstract class CachingDirectoryInstanceLoader
- extends Object
- implements DirectoryInstanceLoader
Implements a DirectoryInstanceLoader. Provides caching for RemoteDirectory instances.
- Since:
- v2.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachingDirectoryInstanceLoader
public CachingDirectoryInstanceLoader(com.atlassian.event.api.EventPublisher eventPublisher)
getDirectory
public RemoteDirectory getDirectory(Directory directory)
throws DirectoryInstantiationException
- Description copied from interface:
DirectoryInstanceLoader
- Loads the
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.
- Specified by:
getDirectory
in interface DirectoryInstanceLoader
- Parameters:
directory
- The directory to load the RemoteDirectory
implementation from.
- Returns:
- The
RemoteDirectory
loaded implementation.
- Throws:
DirectoryInstantiationException
- If the RemoteDirectory
implementation could not be loaded.
getEventPublisher
protected com.atlassian.event.api.EventPublisher getEventPublisher()
getNewDirectory
protected abstract RemoteDirectory getNewDirectory(Directory directory)
throws DirectoryInstantiationException
- Always returns a new instance of a RemoteDirectory.
- Parameters:
directory
- directory configuration
- Returns:
- new instance of a RemoteDirectory
- Throws:
DirectoryInstantiationException
- if the directory could not be instantiated.
handleEvent
@EventListener
public void handleEvent(DirectoryUpdatedEvent event)
handleEvent
@EventListener
public void handleEvent(DirectoryDeletedEvent event)
handleEvent
@EventListener
public void handleEvent(XMLRestoreFinishedEvent event)
Copyright © 2013 Atlassian. All Rights Reserved.