use of cz.metacentrum.perun.notif.entities.PerunNotifAuditMessage in project perun by CESNET.
the class SchedulingManagerImpl method processOneAuditerMessage.
public void processOneAuditerMessage(String message) throws Exception {
PerunNotifAuditMessage perunNotifAuditMessage = null;
try {
perunNotifAuditMessage = perunNotifAuditMessagesManager.saveMessageToPerunAuditerMessage(message, session);
} catch (InternalErrorException ex) {
logger.error("Error during saving one time auditer message: " + message);
}
processPerunNotifAuditMessage(perunNotifAuditMessage, session);
}
use of cz.metacentrum.perun.notif.entities.PerunNotifAuditMessage in project perun by CESNET.
the class SchedulingManagerImpl method processPerunAuditMessages.
/**
* The method loads perun audit messages from the database and saves them as PerunNotifAudiMessages.
*/
public void processPerunAuditMessages() throws Exception {
List<PerunNotifAuditMessage> perunNotifAuditMessages = new ArrayList<PerunNotifAuditMessage>();
try {
List<AuditMessage> messages = perun.getAuditMessagesManagerBl().pollConsumerMessagesForParser(consumerName);
for (AuditMessage message : messages) {
try {
PerunNotifAuditMessage perunNotifAuditMessage = perunNotifAuditMessagesManager.saveMessageToPerunAuditerMessage(message.getMsg(), session);
perunNotifAuditMessages.add(perunNotifAuditMessage);
} catch (InternalErrorException ex) {
logger.error("Error during saving message to db. Message: " + message.getMsg());
throw ex;
}
}
} catch (Exception ex) {
logger.error("Error during perunNotification process.");
throw ex;
}
}
Aggregations