Search in sources :

Example 1 with KeyDAO

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;
}
Also used : KeyDAO(org.apache.nifi.admin.dao.KeyDAO)

Example 2 with KeyDAO

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;
}
Also used : KeyDAO(org.apache.nifi.admin.dao.KeyDAO) Key(org.apache.nifi.key.Key)

Aggregations

KeyDAO (org.apache.nifi.admin.dao.KeyDAO)2 Key (org.apache.nifi.key.Key)1