def reindexObjectSecurity(self, skip_self=False):
    if not filterTemporaryItems(self):
        return

    if not skip_self:
        self.reindexObject(idxs=self._cmf_security_indexes)

    def _reindex(obj, path):
        obj.reindexObject(idxs=self._cmf_security_indexes)

    self.ZopeFindAndApply(self, search_sub=True, apply_func=_reindex)
def reindexObject(self, idxs=None):
    # `CMFCatalogAware.reindexObject` also updates the modification date
    # of the object for the "reindex all" case.  unfortunately, some other
    # packages like `CMFEditions` check that date to see if the object was
    # modified during the request, which fails when it's only set on commit
    if idxs in (None, []) and hasattr(aq_base(self), 'notifyModified'):
        self.notifyModified()
    obj = filterTemporaryItems(self)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.reindex(obj, idxs)
Exemple #3
0
def reindexObject(self, idxs=None):
    # `CMFCatalogAware.reindexObject` also updates the modification date
    # of the object for the "reindex all" case.  unfortunately, some other
    # packages like `CMFEditions` check that date to see if the object was
    # modified during the request, which fails when it's only set on commit
    if idxs in (None, []) and hasattr(aq_base(self), 'notifyModified'):
        self.notifyModified()
    obj = filterTemporaryItems(self)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.reindex(obj, idxs)
def unindexObject(self):
    obj = filterTemporaryItems(self, checkId=False)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.unindex(obj)
def indexObject(self):
    obj = filterTemporaryItems(self)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.index(obj)
Exemple #6
0
def unindexObject(self):
    obj = filterTemporaryItems(self, checkId=False)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.unindex(obj)
Exemple #7
0
def indexObject(self):
    obj = filterTemporaryItems(self)
    indexer = getQueue()
    if obj is not None and indexer is not None:
        indexer.index(obj)