def content_removed(content, event): if INoAutoIndex.providedBy(content): return service = queryUtility(ISecurityOverviewService) intids = queryUtility(IIntIds) if intids and service: service.catalog.unindex_doc(intids.register(content))
def indexDocSubscriber(event): """A subscriber to IntIdAddedEvent""" ob = event.object if INoAutoIndex.providedBy(ob): return for cat in component.getAllUtilitiesRegisteredFor(ICatalog, context=ob): id = component.getUtility(IIntIds, context=cat).getId(ob) cat.index_doc(id, ob)
def content_moved(content, event): if IObjectRemovedEvent.providedBy(event) or \ INoAutoIndex.providedBy(content) or \ INoAutoReindex.providedBy(content): return index_object(content)
def content_added(content, event): if INoAutoIndex.providedBy(content): return index_object(content)
def role_removed(content, event): if INoAutoIndex.providedBy(content): return service = queryUtility(ISecurityOverviewService) if service: service.index_object(content)