Exemplo n.º 1
0
    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))
Exemplo n.º 2
0
    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))
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)