[Zope-Checkins] CVS: Zope/lib/python/Products/Transience/help - Transience-add.stx:1.3 Transience-change.stx:1.5
Chris McDonough
chrism@zope.com
Sat, 17 Nov 2001 10:45:03 -0500
Update of /cvs-repository/Zope/lib/python/Products/Transience/help
In directory cvs.zope.org:/tmp/cvs-serv23584/help
Modified Files:
Transience-add.stx Transience-change.stx
Log Message:
Minor test, documentation, and appearance changes according to some of Amos' comments.
=== Zope/lib/python/Products/Transience/help/Transience-add.stx 1.2 => 1.3 ===
Transient Object Containers
- A TransientObjectContainer contains objects which will expire after
- a given period of time. A TransientObjectContainer is used by
- SessionDataMangers to store session information.
+ A Transient Object Container contains objects which expire after
+ a user-settable period of time. Items placed into transient object
+ must have string keys, but may have any type of value.
- To create a TransientObjectContainer, specify the following:
+ Common Usages
- - **id**
+ A Transient Object Container is used by Session Data Mangers to store
+ session data.
- The ID of the TransientObjectContainer is the container's name.
+ To create a Transient Object Container, specify the following:
- - *title*
+ - **Id**
+
+ The Zope id of the Transient Object Container.
+
+ - *Title*
The title of the object.
- - **timeout_minutes**
+ - **Data object timeout in minutes**
The minimum number of minutes that objects in the container will
persist for. Objects in the container are passively deleted, so
- they may not be deleted exactly after timeout_minutes elapses.
+ they may not be deleted exactly after this number of minutes elapses.
+
+ - *Script to call when objects are added*
+
+ The physical path of of a Zope script which will receive notifications
+ when objects are added to the Transient Object Container.
+
+ Ex: '/path/to/add/script'.
- - *addNotification*
+ For more information, see "Add and Delete Scripts" below.
- The name of an object to receive notifications when objects are
- added to the TransientObjectContainer. See NotificationTargets.
+ - *Script to call when objects are deleted*
- - *delNotification*
+ The physical path of a Zope script which will receive notifications
+ when objects are deleted from the Transient Object Container, either
+ explicitly or through timeout-related expiration.
- The name of an object to receive notifications when objects are
- deleted from the TransientObjectContainer. See NotificationTargets.
+ Ex: '/path/to/delete/script'
-
- Notification Targets
+ For more information, see "Add and Delete Scripts" below.
- A NotificationTarget is a callable (a bound method, function, or
- named Zope object) which is called when an object is added or removed
- from a TransientObjectContainer.
+ Add and Delete Scripts
- NotificationTargets are called with two arguments, the first being
- the item being added or removed from the container, and the second
- being the container itself. Within Zope, the container will be
- acquisition wrapped, allowing the container to be used as a context
- to reference other Zope objects.
+ Add and Delete scripts are Zope scripts which are called,
+ respectively, when an object is added or removed from a
+ Transient Object Container. An add or delete script is specified
+ by naming it by its full Zope object path with slash separators,
+ e.g. "/path/to/method".
+ Add and delete scripts are called with two arguments. The first
+ argument is the item being added or removed from the container;
+ the second argument is the Transient Object Container itself.
+ The container will be acquisition wrapped, allowing the
+ it to be used as a context to reference other Zope objects.
See Also
=== Zope/lib/python/Products/Transience/help/Transience-change.stx 1.4 => 1.5 ===
Transient Object Containers
- A TransientObjectContainer contains objects which will expire after
- a given period of time. A TransientObjectContainer is used by
- a SessionDataManager to store session data.
+ A Transient Object Container contains objects which expire after
+ a user-settable period of time. Items placed into transient object
+ must have string keys, but may have any type of value.
- To change a TransientObjectContainer, specify the following:
+ Common Usages
- - **Title**
+ A Transient Object Container is used by Session Data Mangers to store
+ session data.
- The title of the object (optional).
+ To create a Transient Object Container, specify the following:
+
+ - **Id**
+
+ The Zope id of the Transient Object Container.
+
+ - *Title*
+
+ The title of the object.
- **Data object timeout in minutes**
The minimum number of minutes that objects in the container will
persist for. Objects in the container are passively deleted, so
- they may not be deleted exactly after timeout_minutes elapses.
+ they may not be deleted exactly after this number of minutes elapses.
If you change the timeout value, all objects in the transient
container will be flushed.
- The default is 20 minutes.
+ - *Script to call when objects are added*
- - **Add Notification Target**
+ The physical path of of a Zope script which will receive notifications
+ when objects are added to the Transient Object Container.
- The physical path of a script which will receive notifications when
- objects are added to the TransientObjectContainer. See
- NotificationTargets below. Ex: '/path/to/addNotificationMethod'.
+ Ex: '/path/to/add/script'.
- - **Delete Notification Target**
+ For more information, see "Add and Delete Scripts" below.
- The physical path of a script which will receive notifications when
- objects are deleted from the TransientObjectContainer. See
- NotificationTargets below. Ex: 'path/to/delNotificationMethod'.
-
- Notification Targets
+ - *Script to call when objects are deleted*
+
+ The physical path of a Zope script which will receive notifications
+ when objects are deleted from the Transient Object Container, either
+ explicitly or through timeout-related expiration.
- A NotificationTarget is a string representing a physical path to a
- Zope Script (Python Script or External Method) object which is
- called when an object is added or removed from a
- TransientObjectContainer.
-
- Notification targets are called with two arguments, the first
- being the item being added or removed from the container, and the
- second being the container itself. Within Zope, the container
- will be acquisition wrapped, allowing the container to be used as
- a context to reference other Zope objects.
-
- An example of a notification target External Method::
-
- def notificationTarget(item, container):
- from zLOG import LOG
- LOG(100, 'test', 'id: %s' % item.getId())
+ Ex: '/path/to/delete/script'
+
+ For more information, see "Add and Delete Scripts" below.
+
+ Add and Delete Scripts
+
+ Add and Delete scripts are Zope scripts which are called,
+ respectively, when an object is added or removed from a
+ Transient Object Container. An add or delete script is specified
+ by naming it by its full Zope object path with slash separators,
+ e.g. "/path/to/method".
+
+ Add and delete scripts are called with two arguments. The first
+ argument is the item being added or removed from the container;
+ the second argument is the Transient Object Container itself.
+ The container will be acquisition wrapped, allowing the
+ it to be used as a context to reference other Zope objects.
+
+ An example of an External Method used as a delete script::
+
+ def deleteScript(item, container):
+ from zLOG import LOG
+ LOG(100, 'test', 'id: %s' % item.getId())
See Also