Reference

Interfaces

Event-related interfaces

interface zope.lifecycleevent.interfaces.IZopeLifecycleEvent[source]

High-level functions for sending events.

These are implemented by the zope.lifecycleevent module.

created(object)

Send an IObjectCreatedEvent for object.

modified(object, *descriptions)

Send an IObjectModifiedEvent for object.

descriptions is a sequence of interfaces or fields which were updated.

copied(object, original)

Send an IObjectCopiedEvent for object.

original is the object the copy was created from.

moved(object, oldParent, oldName, newParent, newName)

Send an IObjectMovedEvent for object.

oldParent is the container object was removed from. oldName was the name used to store object in oldParent. newParent is the container object was added to. newName is the name used to store object in newParent.

added(object, newParent=None, newName=None)

Send an IObjectAddedEvent for object.

newParent is the container object was added to. newName is the name used to store object in the container. These will be determined object.__parent__ and object.__name__ if None.

removed(object, oldParent=None, oldName=None)

Send an IObjectRemovedEvent for object.

oldParent is the container object was removed from. oldName was the name used to store object in oldParent. These will be determined object.__parent__ and object.__name__ if None.

interface zope.lifecycleevent.interfaces.IObjectCreatedEvent[source]

Extends: zope.interface.interfaces.IObjectEvent

An object has been created.

The location will usually be None for this event.

interface zope.lifecycleevent.interfaces.IObjectCopiedEvent[source]

Extends: zope.lifecycleevent.interfaces.IObjectCreatedEvent

An object has been copied

original

The original from which the copy was made

interface zope.lifecycleevent.interfaces.IObjectModifiedEvent[source]

Extends: zope.interface.interfaces.IObjectEvent

An object has been modified

interface zope.lifecycleevent.interfaces.IModificationDescription[source]

Marker interface for descriptions of object modifications.

Can be used as a parameter of an IObjectModifiedEvent.

interface zope.lifecycleevent.interfaces.IAttributes[source]

Extends: zope.lifecycleevent.interfaces.IModificationDescription

Describes the attributes of an interface.

interface

The involved interface.

attributes

A sequence of modified attributes.

interface zope.lifecycleevent.interfaces.ISequence[source]

Extends: zope.lifecycleevent.interfaces.IModificationDescription

Describes the modified keys of a sequence-like interface.

interface

The involved interface.

keys

A sequence of modified keys.

interface zope.lifecycleevent.interfaces.IObjectMovedEvent[source]

Extends: zope.interface.interfaces.IObjectEvent

An object has been moved.

oldParent

The old location parent for the object.

oldName

The old location name for the object.

newParent

The new location parent for the object.

newName

The new location name for the object.

interface zope.lifecycleevent.interfaces.IObjectAddedEvent[source]

Extends: zope.lifecycleevent.interfaces.IObjectMovedEvent

An object has been added to a container.

interface zope.lifecycleevent.interfaces.IObjectRemovedEvent[source]

Extends: zope.lifecycleevent.interfaces.IObjectMovedEvent

An object has been removed from a container.

Implementation

Life cycle events

class zope.lifecycleevent.ObjectCreatedEvent(object)[source]

Bases: zope.interface.interfaces.ObjectEvent

An object has been created

zope.lifecycleevent.created(object)[source]

See IZopeLifecycleEvent.created()

class zope.lifecycleevent.Attributes(interface, *attributes)[source]

Bases: object

Describes modified attributes of an interface.

class zope.lifecycleevent.Sequence(interface, *keys)[source]

Bases: object

Describes modified keys of an interface.

class zope.lifecycleevent.ObjectModifiedEvent(object, *descriptions)[source]

Bases: zope.interface.interfaces.ObjectEvent

An object has been modified

Init with a list of modification descriptions.

zope.lifecycleevent.modified(object, *descriptions)[source]

See IZopeLifecycleEvent.modified()

class zope.lifecycleevent.ObjectCopiedEvent(object, original)[source]

Bases: zope.lifecycleevent.ObjectCreatedEvent

An object has been copied

zope.lifecycleevent.copied(object, original)[source]

See IZopeLifecycleEvent.copied()

class zope.lifecycleevent.ObjectMovedEvent(object, oldParent, oldName, newParent, newName)[source]

Bases: zope.interface.interfaces.ObjectEvent

An object has been moved

zope.lifecycleevent.moved(object, oldParent, oldName, newParent, newName)[source]

See IZopeLifecycleEvent.moved()

class zope.lifecycleevent.ObjectAddedEvent(object, newParent=None, newName=None)[source]

Bases: zope.lifecycleevent.ObjectMovedEvent

An object has been added to a container

zope.lifecycleevent.added(object, newParent=None, newName=None)[source]

See IZopeLifecycleEvent.added()

class zope.lifecycleevent.ObjectRemovedEvent(object, oldParent=None, oldName=None)[source]

Bases: zope.lifecycleevent.ObjectMovedEvent

An object has been removed from a container

zope.lifecycleevent.removed(object, oldParent=None, oldName=None)[source]

See IZopeLifecycleEvent.removed()