zms.py - ZMS Root Object and Lifecycle Management
This module provides the core ZMS (Zope Management System) root content object and lifecycle event handling for the ZMS publishing platform. The module encapsulates:
- Root Content Object: The
ZMSclass serves as the top-level content container combining configuration management, content editing capabilities, and search indexing functionality. - Lifecycle Event Handling: The
subscriberfunction dispatches Zope container lifecycle events (object addition, movement, removal) to the internal ZMS event framework, enabling custom business logic triggers throughout the object hierarchy. - Site Initialization: The
initZMSfunction handles creation and configuration of new ZMS sites, supporting both standalone master sites and client sites that acquire their content model from a portal master. - Theme Management: The
importThemefunction imports or acquires configured themes for newly created sites. - Content Import: The
init_contentfunction imports initial site content from bundled archive files. - Management Interface: The
manage_addZMSfunction provides the factory method for creating top-level ZMS installations through the Zope add form.
The ZMS class inherits from multiple managers providing specific functionality:
- ZMSCustom: Custom user extensions
- AccessManager: Permission and role management
- Builder: XML content model building
- ConfManager: Configuration property management
- ObjAttrsManager: Object attribute management
- ZCatalogManager: Search catalog integration
This module also includes a workaround for zope.browserresource compatibility to provide ETag adapter functionality required by zope.browserresource 3.11.0+.
License: GNU General Public License v2 or later, Organization: ZMS Publishing
| Class | |
Undocumented |
| Class | ZMS |
Root ZMS content object that combines configuration, editing, and indexing. |
| Function | container |
Restrict add-dialog containers to plain folders. |
| Function | create |
Undocumented |
| Function | import |
Import or acquire the configured theme for a newly created site. |
| Function | init |
Import initial site content from a bundled archive. |
| Function | init |
Initialize a multisite content structure with the given depth and number of clients. |
| Function | init |
Create and initialize a new ZMS site below the given container. |
| Function | manage_add |
Create the top-level home folder and initial ZMS site from the add form. |
| Function | subscriber |
Dispatch ZMS object lifecycle events to the internal event framework. |
| Variable | manage_add |
Undocumented |
Restrict add-dialog containers to plain folders.
| Parameters | |
| container:object | Candidate container displayed by the add dialog. |
| Returns | |
| bool | True when the container is a folder. |
Import or acquire the configured theme for a newly created site.
| Parameters | |
| self:ZMS | ZMS site that receives the theme configuration. |
| theme:str | Theme package identifier or import source. |
| Returns | |
| str | None | Identifier of the imported theme, or None when the theme is acquired from a portal master. |
Import initial site content from a bundled archive.
| Parameters | |
| self:ZMS | ZMS site that receives the imported content. |
| filename:str | Name of the import archive below the product import folder. |
| REQUEST:ZPublisher.HTTPRequest.HTTPRequest | Active HTTP request. |
Initialize a multisite content structure with the given depth and number of clients.
| Parameters | |
| zms | ZMS site that receives the multisite content structure. |
| depth | Depth of the multisite folder hierarchy. |
| clients | Number of client folders at each level. |
| prefix | Undocumented |
| REQUEST | Active HTTP request. |
Create and initialize a new ZMS site below the given container.
A new site can either be initialized as a standalone master site or as a client that acquires its content model from a portal master when the request variable acquire is set.
| Parameters | |
| self:OFS.ObjectManager.ObjectManager | Container that receives the new ZMS site. |
| id:str | Identifier of the created ZMS object. |
| titlealt:str | Alternative title shown in the management interface. |
| title:str | Human readable title of the site. |
| lang:str | Primary content language. |
| manage | Management interface language. |
| REQUEST:ZPublisher.HTTPRequest.HTTPRequest | HTTP request with initialization options. |
| minimal | Initialize only the minimal default configuration. |
| Returns | |
| ZMS | Newly created and initialized ZMS site. |
Create the top-level home folder and initial ZMS site from the add form.
| Parameters | |
| self:OFS.ObjectManager.ObjectManager | Container in which the home folder is created. |
| lang:str | Primary content language. |
| manage | Management interface language. |
| REQUEST:ZPublisher.HTTPRequest.HTTPRequest | HTTP request containing form input. |
| RESPONSE:ZPublisher.HTTPResponse.HTTPResponse | HTTP response used for redirects. |