private void createAlert(AcInputChannel channel) { AcReceivedFileAlert alert = _access.newReceivedFileAlert(); alert.setInputChannelId(channel.getId()); alert.setCreateUtcTs(_now); alert.setExpirationUtcTs(getAlertExpiration()); _access.getReceivedFileAlertDb().insert(alert); }
private void expireOldAlerts() { _access.getReceivedFileAlertDb().deleteOldAlerts(); }
private boolean noActiveAlertFor(AcInputChannel channel) { AcReceivedFileAlertDb db = _access.getReceivedFileAlertDb(); JwList<AcReceivedFileAlert> v = db.getAllByInputChannelId(channel.getId()); if (activeAlerts(v)) return false; return true; }