Package com.atlassian.crowd.crypto
Class EncryptingDirectoryDAO
java.lang.Object
com.atlassian.crowd.crypto.EncryptingDirectoryDAO
- All Implemented Interfaces:
DataReEncryptor
,DirectoryDao
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStore a new directory in the data store.findAll()
Returns the list of all directories in the data store, or empty list if there are no directories.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
Encrypts or re-encrypts existing data.void
Removes the specified directory from the data store.search
(EntityQuery<Directory> entityQuery) Search for directories matching the specified query.void
setDelegate
(DirectoryDao delegate) void
setDirectoryPasswordsEncryptor
(DirectoryPasswordsEncryptor directoryPasswordsEncryptor) Persists any changes made to the provided directory.
-
Constructor Details
-
EncryptingDirectoryDAO
public EncryptingDirectoryDAO()
-
-
Method Details
-
setDelegate
-
setDirectoryPasswordsEncryptor
-
findById
Description copied from interface:DirectoryDao
Returns the directory with the specified ID, throwingDirectoryNotFoundException
if it cannot be found.- Specified by:
findById
in interfaceDirectoryDao
- 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
Description copied from interface:DirectoryDao
Returns the directory with the specified name, throwingDirectoryNotFoundException
if it cannot be found.- Specified by:
findByName
in interfaceDirectoryDao
- 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
Description copied from interface:DirectoryDao
Returns the list of all directories in the data store, or empty list if there are no directories.- Specified by:
findAll
in interfaceDirectoryDao
-
add
Description copied from interface:DirectoryDao
Store a new directory in the data store.- Specified by:
add
in interfaceDirectoryDao
- Parameters:
directory
- the directory to persist- Returns:
- the newly-persisted directory, which should be used for subsequent operations
-
update
Description copied from interface:DirectoryDao
Persists any changes made to the provided directory.- Specified by:
update
in interfaceDirectoryDao
- 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
Description copied from interface:DirectoryDao
Removes the specified directory from the data store.- Specified by:
remove
in interfaceDirectoryDao
- Parameters:
directory
- the directory to remove- Throws:
DirectoryNotFoundException
- if the directory does not exist
-
search
Description copied from interface:DirectoryDao
Search for directories matching the specified query.- Specified by:
search
in interfaceDirectoryDao
- Parameters:
entityQuery
- the search query to run against the directory data store- Returns:
- a list of directories matching the query
- See Also:
-
reEncrypt
public void reEncrypt()Description copied from interface:DataReEncryptor
Encrypts or re-encrypts existing data.- Specified by:
reEncrypt
in interfaceDataReEncryptor
-