Search in sources :

Example 1 with ActionDAO

use of org.apache.nifi.admin.dao.ActionDAO in project nifi by apache.

the class GetActionsAction method execute.

@Override
public History execute(DAOFactory daoFactory) {
    ActionDAO actionDao = daoFactory.getActionDAO();
    // find all matching history
    History history = actionDao.findActions(query);
    history.setLastRefreshed(new Date());
    return history;
}
Also used : History(org.apache.nifi.history.History) Date(java.util.Date) ActionDAO(org.apache.nifi.admin.dao.ActionDAO)

Example 2 with ActionDAO

use of org.apache.nifi.admin.dao.ActionDAO in project nifi by apache.

the class PurgeActionsAction method execute.

@Override
public Void execute(DAOFactory daoFactory) {
    ActionDAO actionDao = daoFactory.getActionDAO();
    // remove the corresponding actions
    actionDao.deleteActions(end);
    // create a purge action
    actionDao.createAction(purgeAction);
    return null;
}
Also used : ActionDAO(org.apache.nifi.admin.dao.ActionDAO)

Aggregations

ActionDAO (org.apache.nifi.admin.dao.ActionDAO)2 Date (java.util.Date)1 History (org.apache.nifi.history.History)1