use of org.apache.nifi.admin.dao.KeyDAO in project nifi by apache.
the class DeleteKeysAction method execute.
@Override
public Void execute(DAOFactory daoFactory) throws DataAccessException {
final KeyDAO keyDao = daoFactory.getKeyDAO();
keyDao.deleteKeys(identity);
return null;
}
use of org.apache.nifi.admin.dao.KeyDAO in project nifi by apache.
the class GetOrCreateKeyAction method execute.
@Override
public Key execute(DAOFactory daoFactory) {
final KeyDAO keyDao = daoFactory.getKeyDAO();
Key key = keyDao.findLatestKeyByIdentity(identity);
if (key == null) {
key = keyDao.createKey(identity);
}
return key;
}