Search in sources :

Example 1 with GetActionAction

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

the class StandardAuditService method getAction.

@Override
public Action getAction(Integer actionId) {
    Transaction transaction = null;
    Action action = null;
    readLock.lock();
    try {
        // start the transaction
        transaction = transactionBuilder.start();
        // seed the accounts
        GetActionAction getAction = new GetActionAction(actionId);
        action = transaction.execute(getAction);
        // 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 action;
}
Also used : GetActionAction(org.apache.nifi.admin.service.action.GetActionAction) GetActionsAction(org.apache.nifi.admin.service.action.GetActionsAction) PurgeActionsAction(org.apache.nifi.admin.service.action.PurgeActionsAction) GetActionAction(org.apache.nifi.admin.service.action.GetActionAction) AddActionsAction(org.apache.nifi.admin.service.action.AddActionsAction) Action(org.apache.nifi.action.Action) TransactionException(org.apache.nifi.admin.service.transaction.TransactionException) Transaction(org.apache.nifi.admin.service.transaction.Transaction) AdministrationException(org.apache.nifi.admin.service.AdministrationException) DataAccessException(org.apache.nifi.admin.dao.DataAccessException)

Aggregations

Action (org.apache.nifi.action.Action)1 DataAccessException (org.apache.nifi.admin.dao.DataAccessException)1 AdministrationException (org.apache.nifi.admin.service.AdministrationException)1 AddActionsAction (org.apache.nifi.admin.service.action.AddActionsAction)1 GetActionAction (org.apache.nifi.admin.service.action.GetActionAction)1 GetActionsAction (org.apache.nifi.admin.service.action.GetActionsAction)1 PurgeActionsAction (org.apache.nifi.admin.service.action.PurgeActionsAction)1 Transaction (org.apache.nifi.admin.service.transaction.Transaction)1 TransactionException (org.apache.nifi.admin.service.transaction.TransactionException)1