module documentation

_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:

  1. Global system configuration: ConfDict loads and caches values from etc/zms.conf so process-wide settings are available as a flat dictionary.
  2. Site configuration import and persistence: module-level helper initConf and methods on ConfManager import zipped packages, repository-backed configuration trees, and single XML files.
  3. 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 ConfDict Provide helpers for ConfDict.
Class ConfManager Provide helpers for ConfManager.
Function getRegistry 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 initConf 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_PROPERTIES Undocumented
Constant _NO_DEFAULT Undocumented
def getRegistry(): (source)

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
dictThe registry of configuration properties.
def initConf(self, pattern): (source)

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
selfUndocumented
pattern:stringString-pattern to filter filenames.
Returns
NoneNone
__REGISTRY__ = (source)

Undocumented

Value
None
UNINHERITED_PROPERTIES: list[str] = (source)

Undocumented

Value
['ASP', 'Portal']
_NO_DEFAULT = (source)

Undocumented

Value
object()