Search in sources :

Example 1 with GetActionsAction

use of org.apache.nifi.admin.service.action.GetActionsAction in project nifi by apache.

the class StandardAuditService method getActions.

@Override
public History getActions(HistoryQuery query) {
    Transaction transaction = null;
    History history = null;
    readLock.lock();
    try {
        // start the transaction
        transaction = transactionBuilder.start();
        // seed the accounts
        GetActionsAction getActions = new GetActionsAction(query);
        history = transaction.execute(getActions);
        // commit the transaction
        transaction.commit();
    } catch (TransactionException | DataAccessException te) {
        rollback(transaction);
        throw new AdministrationException(te);
    } catch (Throwable t) {
        rollback(transaction);
        throw t;
    } finally {
        closeQuietly(transaction);
        readLock.unlock();
    }
    return history;
}
Also used : TransactionException(org.apache.nifi.admin.service.transaction.TransactionException) Transaction(org.apache.nifi.admin.service.transaction.Transaction) GetActionsAction(org.apache.nifi.admin.service.action.GetActionsAction) History(org.apache.nifi.history.History) AdministrationException(org.apache.nifi.admin.service.AdministrationException) DataAccessException(org.apache.nifi.admin.dao.DataAccessException)

Aggregations

DataAccessException (org.apache.nifi.admin.dao.DataAccessException)1 AdministrationException (org.apache.nifi.admin.service.AdministrationException)1 GetActionsAction (org.apache.nifi.admin.service.action.GetActionsAction)1 Transaction (org.apache.nifi.admin.service.transaction.Transaction)1 TransactionException (org.apache.nifi.admin.service.transaction.TransactionException)1 History (org.apache.nifi.history.History)1