|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.manager.directory.DirectoryManagerGeneric
com.atlassian.crowd.acceptance.tests.directory.MockDirectoryManager
public class MockDirectoryManager
| Constructor Summary | |
|---|---|
MockDirectoryManager()
|
|
| 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)
Will find a user via the passed in token key. |
void |
invalidateToken(java.lang.String token)
Attempts to invalidate a Token based on the passed in Token key (random hash). |
void |
removeDirectory(Directory directory)
Removes a given directory and all its associated entities and mappings. |
void |
removeExpiredTokens()
Removes all tokens that have exceeded their expiry time. |
java.util.List<Directory> |
searchDirectories(EntityQuery query)
Returns a List of Directories matching the search query. |
java.util.List<Token> |
searchTokens(EntityQuery query)
Returns a list of users matching the given 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()
| Method Detail |
|---|
public void setDirectory(Directory directory)
public Directory addDirectory(Directory directory)
throws DirectoryInstantiationException
DirectoryManager
addDirectory in interface DirectoryManageraddDirectory in class DirectoryManagerGenericdirectory - the Directory to add
DirectoryInstantiationException - if there was an error instantiating the directory
public Directory findDirectoryById(long directoryID)
throws ObjectNotFoundException
directory.
findDirectoryById in interface DirectoryManagerfindDirectoryById in class DirectoryManagerGenericdirectoryID -
ObjectNotFoundExceptionpublic java.util.List<Directory> findAllDirectories()
DirectoryManager
findAllDirectories in interface DirectoryManagerfindAllDirectories in class DirectoryManagerGenericpublic java.util.List<Directory> searchDirectories(EntityQuery query)
DirectoryManager
searchDirectories in interface DirectoryManagersearchDirectories in class DirectoryManagerGenericquery - the context to search on
public Directory findDirectoryByName(java.lang.String name)
throws ObjectNotFoundException
DirectoryManagername.
findDirectoryByName in interface DirectoryManagerfindDirectoryByName in class DirectoryManagerGenericname - the name of the directory
name
ObjectNotFoundException - if no Directory is found
public Directory updateDirectory(Directory directory)
throws ObjectNotFoundException
DirectoryManager
updateDirectory in interface DirectoryManagerupdateDirectory in class DirectoryManagerGenericdirectory - the directory with updated attrbutes
ObjectNotFoundException - if no Directory is found
public void removeDirectory(Directory directory)
throws ObjectNotFoundException
DirectoryManager
removeDirectory in interface DirectoryManagerremoveDirectory in class DirectoryManagerGenericdirectory - the directory to remove
ObjectNotFoundException - if the directory cannot be foundpublic void invalidateToken(java.lang.String token)
DirectoryManager
invalidateToken in interface DirectoryManagerinvalidateToken in class DirectoryManagerGenerictoken - the token key (random hash) to invalidate.public java.util.List<Token> searchTokens(EntityQuery query)
DirectoryManager
searchTokens in interface DirectoryManagersearchTokens in class DirectoryManagerGenericquery - entity query for Entity.TOKEN.
Token matching the search criteria.public void removeExpiredTokens()
DirectoryManager
removeExpiredTokens in interface DirectoryManagerremoveExpiredTokens in class DirectoryManagerGeneric
public User findUserByToken(java.lang.String key)
throws InvalidTokenException,
DirectoryAccessException
DirectoryManager
findUserByToken in interface DirectoryManagerfindUserByToken in class DirectoryManagerGenerickey - the token key
InvalidTokenException - if the User or Directory cannot be found that relates to the given token,
or the token is associated to an Application and not a User
DirectoryAccessException - if there was an issue accessing the user from the underlying directory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||