_confmanager.py - ZMS Configuration Manager
Configuration infrastructure for ZMS.
This module concentrates the low-level helpers and the main manager class used to read, store, and expose configuration in a ZMS site. It covers three main areas:
- Global system configuration: ConfDict loads and caches values from etc/zms.conf so process-wide settings are available as a flat dictionary.
- Site configuration import and persistence: module-level helper initConf and methods on ConfManager import zipped packages, repository-backed configuration trees, and single XML files.
- Configuration service layer: ConfManager provides access to configuration properties, design and system customization actions, and delegates to related managers such as workflow, filter, meta-object, text-format, media database, and catalog adapters.
The module is therefore the central bridge between static configuration sources on disk, persisted configuration stored in the Zope object tree, and the higher level APIs that the rest of ZMS uses during rendering and administration.
License: GNU General Public License v2 or later, Organization: ZMS Publishing
| Class | |
Provide helpers for ConfDict. |
| Class | |
Provide helpers for ConfManager. |
| Function | get |
Return the registry of configuration properties. The registry is a global dictionary that holds configuration properties for the application. If the registry does not exist, it is created and initialized with the configuration properties from ConfDict. |
| Function | init |
Initialize a ZMS configuration by importing a set of configuration files that match a given name pattern, e.g. 'unibern.*'. The pattern should be in the format prefix:pattern, where actually only pattern... |
| Constant | __REGISTRY__ |
Undocumented |
| Constant | UNINHERITED |
Undocumented |
| Constant | _NO |
Undocumented |
Return the registry of configuration properties. The registry is a global dictionary that holds configuration properties for the application. If the registry does not exist, it is created and initialized with the configuration properties from ConfDict.
| Returns | |
| dict | The registry of configuration properties. |
Initialize a ZMS configuration by importing a set of configuration files that match a given name pattern, e.g. 'unibern.*'. The pattern should be in the format prefix:pattern, where actually only pattern is the part of the filename to match using function fnmatch(). If a matching file is found and it ends with '.zip', it will be imported as a configuration package. Otherwise, it will be imported as a a single XML file or - if prefixed with conf: as a set of configuration files from the ZMS conf-folder. The full list of available configuration files is aggrgated by the method ConfManager.getConfFiles. In case of conf:-prefix, the filename is expected to be in the format conf:container_id/package-id, e.g. conf:metaobj_manager/com.zms.foundation.theme/theme_zms_base will match to path conf:metaobj_manager/com.zms.foundation.theme. This means only the 1st level of the naming hierarchy (in case of metaobj_manager mostly the package-id is used to match the pattern). Nested packages are always imported as a whole.
| Parameters | |
| self | Undocumented |
| pattern:string | String-pattern to filter filenames. |
| Returns | |
| None | None |