Beispiel #1
0
def reindex_item_badge(event):
    """Reindex `item_badge` for all item versions of èvent.object."""
    catalogs = find_service(event.object, 'catalogs')
    children = event.object.values()
    versionables = (c for c in children if IVersionable.providedBy(c))
    for versionable in versionables:
        catalogs.reindex_index(versionable, 'item_badge')
Beispiel #2
0
def reindex_item_badge(event):
    """Reindex `item_badge` for all item versions of èvent.object."""
    catalogs = find_service(event.object, 'catalogs')
    children = event.object.values()
    versionables = (c for c in children if IVersionable.providedBy(c))
    for versionable in versionables:
        catalogs.reindex_index(versionable, 'item_badge')
Beispiel #3
0
def reindex_workflow_state(event):
    """Reindex the workflow_state index for item and its versions."""
    catalogs = find_service(event.object, 'catalogs')
    catalogs.reindex_index(event.object, 'workflow_state')
    children = event.object.values()
    versionables = (c for c in children if IVersionable.providedBy(c))
    for versionable in versionables:
        catalogs.reindex_index(versionable, 'workflow_state')
Beispiel #4
0
def reindex_workflow_state(event):
    """Reindex the workflow_state index for item and its versions."""
    catalogs = find_service(event.object, 'catalogs')
    catalogs.reindex_index(event.object, 'workflow_state')
    children = event.object.values()
    versionables = (c for c in children if IVersionable.providedBy(c))
    for versionable in versionables:
        catalogs.reindex_index(versionable, 'workflow_state')
Beispiel #5
0
def reindex_decision_date(event):
    """Reindex the decision_date index for item and its versions."""
    catalogs = find_service(event.object, "catalogs")
    catalogs.reindex_index(event.object, "decision_date")
    children = event.object.values()
    versionables = (c for c in children if IVersionable.providedBy(c))
    for versionable in versionables:
        catalogs.reindex_index(versionable, "decision_date")