use of com.thinkbiganalytics.metadata.api.event.sla.ServiceLevelAgreementChange in project kylo by Teradata.
the class JcrServiceLevelAgreementProvider method addPostSlaChangeAction.
private void addPostSlaChangeAction(ServiceLevelAgreement sla, MetadataChange.ChangeType changeType) {
ServiceLevelAgreement.ID id = sla.getId();
String name = sla.getName();
final Principal principal = SecurityContextHolder.getContext().getAuthentication();
Consumer<Boolean> action = (success) -> {
if (success) {
ServiceLevelAgreementChange change = new ServiceLevelAgreementChange(changeType, id, name);
ServiceLevelAgreementEvent event = new ServiceLevelAgreementEvent(change, DateTime.now(), principal);
metadataEventService.notify(event);
}
};
JcrMetadataAccess.addPostTransactionAction(action);
}
Aggregations