|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.manager.directory.DirectoryManagerGeneric com.atlassian.crowd.acceptance.tests.directory.MockDirectoryManager
public class MockDirectoryManager
Constructor Summary | |
---|---|
MockDirectoryManager(PermissionManager permissionManager,
com.atlassian.event.api.EventPublisher eventPublisher,
DirectoryInstanceLoader directoryInstanceLoader,
DirectorySynchroniser directorySynchroniser,
DirectoryPollerManager directoryPollerManager,
DirectoryLockManager directoryLockManager)
|
Method Summary | |
---|---|
Directory |
addDirectory(Directory directory)
Adds the given directory. |
java.util.List<Directory> |
findAllDirectories()
Returns a List of all directories in the system. |
Directory |
findDirectoryById(long directoryID)
This is the only implemented method. |
Directory |
findDirectoryByName(java.lang.String name)
Finds a directory given the supplied name . |
User |
findUserByToken(java.lang.String key)
|
void |
invalidateToken(java.lang.String token)
|
void |
removeDirectory(Directory directory)
Removes a given directory and all its associated entities and mappings. |
void |
removeExpiredTokens()
|
java.util.List<Directory> |
searchDirectories(EntityQuery query)
Returns a List of Directories matching the search query. |
java.util.List<Token> |
searchTokens(EntityQuery query)
|
void |
setDirectory(Directory directory)
|
Directory |
updateDirectory(Directory directory)
Updates the passed in directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockDirectoryManager(PermissionManager permissionManager, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryInstanceLoader directoryInstanceLoader, DirectorySynchroniser directorySynchroniser, DirectoryPollerManager directoryPollerManager, DirectoryLockManager directoryLockManager)
Method Detail |
---|
public void setDirectory(Directory directory)
public Directory addDirectory(Directory directory) throws DirectoryInstantiationException
DirectoryManager
addDirectory
in interface DirectoryManager
addDirectory
in class DirectoryManagerGeneric
directory
- the Directory to add
DirectoryInstantiationException
- if there was an error instantiating the directorypublic Directory findDirectoryById(long directoryID) throws DirectoryNotFoundException
directory
.
findDirectoryById
in interface DirectoryManager
findDirectoryById
in class DirectoryManagerGeneric
directoryID
-
DirectoryNotFoundException
- is thrown if the Directory cannot be found.public java.util.List<Directory> findAllDirectories()
DirectoryManager
findAllDirectories
in interface DirectoryManager
findAllDirectories
in class DirectoryManagerGeneric
public java.util.List<Directory> searchDirectories(EntityQuery query)
DirectoryManager
searchDirectories
in interface DirectoryManager
searchDirectories
in class DirectoryManagerGeneric
query
- the context to search on
public Directory findDirectoryByName(java.lang.String name) throws DirectoryNotFoundException
DirectoryManager
name
.
findDirectoryByName
in interface DirectoryManager
findDirectoryByName
in class DirectoryManagerGeneric
name
- the name of the directory
name
DirectoryNotFoundException
- if no Directory is foundpublic Directory updateDirectory(Directory directory) throws DirectoryNotFoundException
DirectoryManager
updateDirectory
in interface DirectoryManager
updateDirectory
in class DirectoryManagerGeneric
directory
- the directory with updated attributes
DirectoryNotFoundException
- if no Directory is foundpublic void removeDirectory(Directory directory) throws DirectoryNotFoundException, DirectoryCurrentlySynchronisingException
DirectoryManager
removeDirectory
in interface DirectoryManager
removeDirectory
in class DirectoryManagerGeneric
directory
- the directory to remove
DirectoryNotFoundException
- if the directory cannot be found
DirectoryCurrentlySynchronisingException
- if the directory is currently synchronisingpublic void invalidateToken(java.lang.String token)
public java.util.List<Token> searchTokens(EntityQuery query)
public void removeExpiredTokens()
public User findUserByToken(java.lang.String key) throws InvalidTokenException, OperationFailedException
InvalidTokenException
OperationFailedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |