Exemple #1
0
def confirmed(event):
    """
    When a subscription has been confirmed,
    execute rules assigned to channel folder.
    """
    portal = getSite()
    execute(portal, event)
Exemple #2
0
 def execute_rules(event):
     """ When an action is invoked on an object,
         execute rules assigned to its parent.
         Base action executor handler """
     if is_portal_factory(event.object):
         return
 
     execute(aq_parent(aq_inner(event.object)), event)
Exemple #3
0
    def execute_rules(event):
        """ When an action is invoked on an object,
            execute rules assigned to its parent.
            Base action executor handler """
        if is_portal_factory(event.object):
            return

        execute(aq_parent(aq_inner(event.object)), event)
Exemple #4
0
def copied(event):
    """When an object is copied, execute rules assigned to its parent
    """
    obj = event.object
    if not (IContentish.providedBy(obj) or IComment.providedBy(obj)):
        return

    if is_portal_factory(obj):
        return

    execute(aq_parent(aq_inner(event.original)), event)
Exemple #5
0
def copied(event):
    """When an object is copied, execute rules assigned to its parent
    """
    obj = event.object
    if not (IContentish.providedBy(obj) or IComment.providedBy(obj)):
        return

    if is_portal_factory(obj):
        return

    execute(aq_parent(aq_inner(event.original)), event)
Exemple #6
0
def patched_added(event):
    """When an object is added, execute rules assigned to its new parent.

    There is special handling for Archetypes objects.
    """
    if pcrh.is_portal_factory(event.object):
        return

    # The object added event executes too early for Archetypes objects.
    # We need to delay execution until we receive a subsequent IObjectInitializedEvent

    pcrh.init()
    pcrh.execute(event.newParent, event)
Exemple #7
0
def moved(event):
    """ When an object is renamed/moved,
    execute rules assigned to its new parent."""
    obj = event.object
    if (not event.oldParent or not event.newParent
            or getattr(obj, "_at_creation_flag", None)):
        return
    if is_portal_factory(obj):
        return
    elif IContentish.providedBy(obj):
        execute(event.newParent, event)
    else:
        return
Exemple #8
0
def moved(event):
    """ When an object is renamed/moved,
    execute rules assigned to its new parent."""
    obj = event.object
    if (not event.oldParent or not
            event.newParent or
            getattr(obj, "_at_creation_flag", None)):
        return
    if is_portal_factory(obj):
        return
    elif IContentish.providedBy(obj):
        execute(event.newParent, event)
    else:
        return
Exemple #9
0
def modified(event):
    """When an object is modified, execute rules assigned to its parent
    """

    if handlers.is_portal_factory(event.object):
        return

    if hasattr(event.object,'getId'):
        if event.object.getId().split('.')[0]=='file':
            return

    # Let the special handler take care of IObjectInitializedEvent
    if not IObjectInitializedEvent.providedBy(event):
        handlers.execute(aq_parent(aq_inner(event.object)), event)
Exemple #10
0
def send_organization_members_subscriber(event):
    handlers.execute(event.object, event)
Exemple #11
0
def send_non_contributor_subscriber(event):
    handlers.execute(event.object, event)
def unauthorized_handler(event):
    """
    Execute any rules that are triggered by the IUnauthorizedEvent
    """
    execute(event.object, event)
Exemple #13
0
def send_non_connected_members_subscriber(event):
    handlers.execute(event.object, event)
Exemple #14
0
def send_non_contributor_subscriber(event):
    handlers.execute(event.object, event)
Exemple #15
0
def removedFromFavorites(event):
    obj = event.object
    execute(obj, event)
def execute_comment(event):
    """ Execute comment content rules
    """
    execute(event.object, event)
Exemple #17
0
def trigger_contentrules(event):
    execute(event.object, event)
Exemple #18
0
def unsubscribed(event):
    # The object added event executes too early for Archetypes objects.
    # We need to delay execution until we receive
    # a subsequent IObjectInitializedEvent
    portal = getSite()
    execute(portal, event)
Exemple #19
0
def inline_comment(event):
    """ Execute inline comment
    """
    execute(event.object, event)
def submit_talk(event):
    """ Execute inline comment
    """
    execute(event.object, event)
Exemple #21
0
def downloaded(event):
    """When a file is downloaded, execute rules assigned to its parent
    """
    execute(aq_parent(aq_inner(event.object)), event)
Exemple #22
0
def trigger_indicator_contentrule(event):
    # context = aq_parent(aq_inner(event.object))
    execute(event.object, event)
Exemple #23
0
def send_non_connected_members_subscriber(event):
    handlers.execute(event.object, event)
Exemple #24
0
def send_mail_field_subscriber(event):
    handlers.execute(event.object, event)
Exemple #25
0
def execute_comment(event):
    """ Execute comment content rules
    """
    execute(event.object, event)
Exemple #26
0
def addedToFavorites(event):
    obj = event.object
    execute(obj, event)
def unlike(event):
    obj = event.object
    execute(obj, event)
def blacklisted(event):
    obj = event.object
    execute(obj, event)
def removed(event):
    obj = event.object
    execute(obj, event)
Exemple #30
0
def send_organization_members_subscriber(event):
    handlers.execute(event.object, event)
Exemple #31
0
def execute_event(event):
    """ Execute custom rules
    """
    execute(event.object, event)
Exemple #32
0
def send_mail_field_subscriber(event):
    handlers.execute(event.object, event)
def maildropped(event):
    execute(event.context, event)
def toggle(event):
    obj = event.object
    execute(obj, event)
def added(event):
    obj = event.object
    execute(obj, event)
Exemple #36
0
def execute_event(event):
    """ Execute custom rules
    """
    execute(event.object, event)
def subscribed(event):
    obj = event.object
    execute(obj, event)