Package com.atlassian.crowd.embedded.spi
Interface DirectoryDao
- All Known Subinterfaces:
TransactionalDirectoryDao
- All Known Implementing Classes:
DirectoryDAOHibernate
,DirectoryDaoTransactionalDecorator
,EncryptingDirectoryDAO
public interface DirectoryDao
Stores and retrieves directories. Directories are used for identifying a collection of users, groups and memberships.
-
Method Summary
Modifier and TypeMethodDescriptionStore a new directory in the data store.findAll()
Deprecated.findById
(long directoryId) Returns the directory with the specified ID, throwingDirectoryNotFoundException
if it cannot be found.findByName
(String name) Returns the directory with the specified name, throwingDirectoryNotFoundException
if it cannot be found.void
Removes the specified directory from the data store.search
(EntityQuery<Directory> entityQuery) Search for directories matching the specified query.Persists any changes made to the provided directory.
-
Method Details
-
findById
Returns the directory with the specified ID, throwingDirectoryNotFoundException
if it cannot be found.- Parameters:
directoryId
- the ID of the directory to find- Returns:
- the directory with the specified ID
- Throws:
DirectoryNotFoundException
- if there is no directory with the specified ID
-
findByName
Returns the directory with the specified name, throwingDirectoryNotFoundException
if it cannot be found.- Parameters:
name
- the name of the directory to find- Returns:
- the directory with the specified name
- Throws:
DirectoryNotFoundException
- if there is no directory with the specified name
-
findAll
Deprecated.Usesearch(EntityQuery)
instead. Since v3.2.0Returns the list of all directories in the data store, or empty list if there are no directories. -
add
Store a new directory in the data store.- Parameters:
directory
- the directory to persist- Returns:
- the newly-persisted directory, which should be used for subsequent operations
-
update
Persists any changes made to the provided directory.- Parameters:
directory
- the directory which has changes to persist- Returns:
- the updated directory after it has been persisted, which should be used for subsequent operations
- Throws:
DirectoryNotFoundException
- if the directory is not found in the data store
-
remove
Removes the specified directory from the data store.- Parameters:
directory
- the directory to remove- Throws:
DirectoryNotFoundException
- if the directory does not exist
-
search
Search for directories matching the specified query.- Parameters:
entityQuery
- the search query to run against the directory data store- Returns:
- a list of directories matching the query
- See Also:
-
search(EntityQuery)
instead.