use of org.xwiki.model.namespace.DocumentNamespace in project xwiki-platform by xwiki.
the class DocumentDeletedListener method onEvent.
@Override
public void onEvent(Event event, Object o, Object context) {
String document = ((DocumentDeletedEvent) event).getEventFilter().getFilter();
ComponentManager componentManager = this.componentManagerManager.getComponentManager(new DocumentNamespace(document).serialize(), false);
if (componentManager instanceof Disposable) {
try {
((Disposable) componentManager).dispose();
} catch (ComponentLifecycleException e) {
this.logger.error(String.format("Failed to dispose component manager for document [%s]", document), e);
}
}
}
Aggregations