use of com.netflix.metacat.common.server.events.MetacatDeleteMViewPreEvent in project metacat by Netflix.
the class MViewServiceImpl method deleteAndReturn.
@Override
public TableDto deleteAndReturn(@Nonnull final QualifiedName name) {
final MetacatRequestContext metacatRequestContext = MetacatContextManager.getContext();
eventBus.postSync(new MetacatDeleteMViewPreEvent(name, metacatRequestContext, this));
final QualifiedName viewQName = QualifiedName.ofTable(name.getCatalogName(), VIEW_DB_NAME, createViewName(name));
log.info("Deleting view {}.", viewQName);
final TableDto deletedDto = tableService.deleteAndReturn(viewQName, true);
eventBus.postAsync(new MetacatDeleteMViewPostEvent(name, metacatRequestContext, this, deletedDto));
return deletedDto;
}
Aggregations