def test_provided(self): from Products.CMFCore.interfaces import IIndexableObjectWrapper from Products.CMFCore.interfaces import IIndexableObject obj = self._makeContent() w = self._makeOne({}, obj) self.assertTrue(IContentish.providedBy(w)) self.assertTrue(IIndexableObjectWrapper.providedBy(w)) self.assertTrue(IIndexableObject.providedBy(w))
def catalog_object(self, obj, uid=None, idxs=None, update_metadata=1, pghandler=None): # Wraps the object with workflow and accessibility # information just before cataloging. if IIndexableObject.providedBy(obj): w = obj else: w = queryMultiAdapter( (obj, self), IIndexableObject ) if w is None: # BBB w = IndexableObjectWrapper(obj, self) ZCatalog.catalog_object(self, w, uid, idxs, update_metadata, pghandler)
def catalog_object(self, obj, uid=None, idxs=None, update_metadata=1, pghandler=None): # Wraps the object with workflow and accessibility # information just before cataloging. if IIndexableObject.providedBy(obj): w = obj else: w = queryMultiAdapter((obj, self), IIndexableObject) if w is None: # BBB w = IndexableObjectWrapper(obj, self) ZCatalog.catalog_object(self, w, uid, idxs, update_metadata, pghandler)
def catalog_object(self, obj, uid=None, idxs=None, update_metadata=1, pghandler=None): # Wraps the object with workflow and accessibility # information just before cataloging. # XXX: this method violates the rules for tools/utilities: # it depends on a non-utility tool if IIndexableObject.providedBy(obj): w = obj else: w = queryMultiAdapter( (obj, self), IIndexableObject ) if w is None: # BBB w = IndexableObjectWrapper(obj, self) ZCatalog.catalog_object(self, w, uid, idxs, update_metadata, pghandler)