public class EncryptingDirectoryDAO extends Object implements DirectoryDao, DataReEncryptor
Constructor and Description |
---|
EncryptingDirectoryDAO() |
Modifier and Type | Method and Description |
---|---|
Directory |
add(Directory directory)
Store a new directory in the data store.
|
List<Directory> |
findAll()
Returns the list of all directories in the data store, or empty list if there are no directories.
|
Directory |
findById(long directoryId)
Returns the directory with the specified ID, throwing
DirectoryNotFoundException if it cannot be found. |
Directory |
findByName(String name)
Returns the directory with the specified name, throwing
DirectoryNotFoundException if it cannot be found. |
void |
reEncrypt()
Encrypts or re-encrypts existing data.
|
void |
remove(Directory directory)
Removes the specified directory from the data store.
|
List<Directory> |
search(EntityQuery<Directory> entityQuery)
Search for directories matching the specified query.
|
void |
setDelegate(DirectoryDao delegate) |
void |
setDirectoryPasswordsEncryptor(DirectoryPasswordsEncryptor directoryPasswordsEncryptor) |
Directory |
update(Directory directory)
Persists any changes made to the provided directory.
|
public void setDelegate(DirectoryDao delegate)
public void setDirectoryPasswordsEncryptor(DirectoryPasswordsEncryptor directoryPasswordsEncryptor)
public Directory findById(long directoryId) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.findById
in interface DirectoryDao
directoryId
- the ID of the directory to findDirectoryNotFoundException
- if there is no directory with the specified IDpublic Directory findByName(String name) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.findByName
in interface DirectoryDao
name
- the name of the directory to findDirectoryNotFoundException
- if there is no directory with the specified namepublic List<Directory> findAll()
DirectoryDao
findAll
in interface DirectoryDao
public Directory add(Directory directory)
DirectoryDao
add
in interface DirectoryDao
directory
- the directory to persistpublic Directory update(Directory directory) throws DirectoryNotFoundException
DirectoryDao
update
in interface DirectoryDao
directory
- the directory which has changes to persistDirectoryNotFoundException
- if the directory is not found in the data storepublic void remove(Directory directory) throws DirectoryNotFoundException
DirectoryDao
remove
in interface DirectoryDao
directory
- the directory to removeDirectoryNotFoundException
- if the directory does not existpublic List<Directory> search(EntityQuery<Directory> entityQuery)
DirectoryDao
search
in interface DirectoryDao
entityQuery
- the search query to run against the directory data storeQueryBuilder.queryFor(java.lang.Class<T>, com.atlassian.crowd.search.EntityDescriptor)
public void reEncrypt()
DataReEncryptor
reEncrypt
in interface DataReEncryptor
Copyright © 2021 Atlassian. All rights reserved.
View cookie preferences