class ConfManager(_multilangmanager.MultiLanguageManager): (source)
Implements interfaces: Products.zms.IZMSFormatProvider.IZMSFormatProvider, Products.zms.IZMSMetamodelProvider.IZMSMetamodelProvider
Provide helpers for ConfManager.
| Method | customize |
Build and return the ordered list of ZMI management tab descriptors for this ZMS instance. |
| Method | del |
Removes property from configuration. |
| Method | get |
Return conf properties. |
| Method | get |
Return a configuration value, resolving local and inherited defaults. |
| Method | get |
Return the catalog adapter. |
| Method | get |
Return the set of character formats. |
| Method | get |
Retrieve configuration files from the ZMS distribution code: |
| Method | get |
Return confmanager. |
| Method | get |
Returns properties from configuration. |
| Method | get |
Return configuration properties defaults. The method returns a list of dicts, each describing a configuration property with keys. |
| Method | get |
Returns property from configuration. |
| Method | get |
Resolve a configuration reference to a (filename, xmlfile) pair. |
| Method | get |
Return the filter manager. |
| Method | get |
Return the format manager. |
| Method | get |
Return the LLM connector. |
| Method | get |
Return the MediaDb storage object attached to the document element, or None if no MediaDb has been configured. |
| Method | get |
Return metacmd. |
| Method | get |
getMetaCmdDescription |
| Method | get |
Return metacmdids. |
| Method | get |
Return the metacmd manager. |
| Method | get |
Return metacmds. |
| Method | get |
Return meta-object. |
| Method | get |
Return meta-object attribute. |
| Method | get |
Return meta-object attribute identifier id. |
| Method | get |
Return meta-object attribute ids. |
| Method | get |
Return meta-object attributes. |
| Method | get |
Return meta-object id. |
| Method | get |
Return meta-object ids. |
| Method | get |
Return the metaobj manager. |
| Method | get |
Return meta-object revision. It delegates the retrieval of the meta-object revision to the meta-object manager. If the metaobj manager is not available, it returns None. |
| Method | get |
Return the IDs of installed ZMS plug-ins located under the product's plugins/ subdirectory. |
| Method | get |
Returns property from request (used to get zope-request-properties, e.g. SERVER_URL oder AUTHENTICATED_USER). |
| Method | get |
Return the ordered list of resource-container folders used by the current theme. |
| Method | get |
Return the site-wide sequence counter object used for generating unique numeric IDs. |
| Method | get |
Return a single stylesheet object from the available stylesheets. |
| Method | get |
Return the ordered list of all CSS stylesheet objects found in the configured resource folders. |
| Method | get |
Return the text format for the given ID. |
| Method | get |
Return the default text format. |
| Method | get |
Return the set of text formats. |
| Method | get |
Return the list of theme folder objects available at the site home. |
| Method | get |
Return the workflow activities. |
| Method | get |
Return the workflow activities IDs. It delegates the retrieval of workflow activity IDs to the workflow manager. If the workflow manager is not available, it returns an empty list. |
| Method | get |
Return a specific workflow activity by its ID. It delegates the retrieval of a specific workflow activity to the workflow manager. |
| Method | get |
Return a specific workflow transition by its ID. It delegates the retrieval of a specific workflow transition to the workflow manager. If the workflow manager is not available, it returns None. |
| Method | get |
Return the workflow transitions. It delegates the retrieval of workflow transitions to the workflow manager. If the workflow manager is not available, it returns an empty list. |
| Method | get |
Return the workflow manager. |
| Method | get |
Return the ZMSIndex object, creating and initializing it if it does not already exist. |
| Method | get |
Return the ZMSSysConf object, creating and initializing it if it does not already exist. |
| Method | import |
Imports configuration from the given file and processes it in the context according to its filename. |
| Method | import |
Import a zipped configuration package and delegate each contained file to importConf. |
| Method | manage_customize |
Customize design properties. |
| Method | manage_customize |
Manage the system customization. |
| Method | notify |
Notify meta-object attribute definition about (a new) value. It delegates the notification of a meta-object attribute about a value to the meta-object manager. If the meta-object manager is not available, it returns None. |
| Method | set |
Sets property into configuration. |
| Class Variable | customize |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | manage_customize |
Undocumented |
| Class Variable | manage_customize |
Undocumented |
| Class Variable | manage_customize |
Undocumented |
| Class Variable | manage |
Undocumented |
| Class Variable | security |
Undocumented |
| Instance Variable | __attr |
Undocumented |
Build and return the ordered list of ZMI management tab descriptors for this ZMS instance.
Each descriptor is a dict with 'label' and 'action' keys compatible with Zope's manage_options convention. The list always starts with the main view and user tab, followed by any tabs contributed by installed IZMSConfigurationProvider sub-objects, and ends with the design tab. When the current request is a management request, tabs that cannot be traversed are filtered out.
| Returns | |
| list | List of tab descriptor dicts with 'label' and 'action'. |
Return a configuration value, resolving local and inherited defaults.
Positional arguments are mapped in order to key, default, and REQUEST. Keyword arguments are supported with the same names.
| Parameters | |
| *args | Undocumented |
| key:str | Configuration key to resolve. |
| default:any | Fallback value when the key is not configured. |
| REQUEST:ZPublisher.HTTPRequest | Triggering request used for optional base64 decoding of key. |
| Returns | |
| any | Resolved configuration value. |
Return the catalog adapter.
It delegates the retrieval of the catalog adapter to the catalog adapter object. If the catalog adapter is not available, it returns a default catalog adapter.
| Returns | |
| IZMSCatalogAdapter | The catalog adapter object. |
Return the set of character formats.
It delegates the retrieval of the character formats to the format manager object. If the format manager is not available, it returns a default set of character formats.
| Returns | |
| list of character formats | The set of character format objects. |
Retrieve configuration files from the ZMS distribution code:
- Product/zms/conf: Sets of singular configuration files (repository-manager style, pattern-prefix 'conf:').
- Product/zms/import: Classical zipped XML packages, e.g. for importing as single file via web-frontend.
| Parameters | |
| pattern | string, optional, pattern to filter filenames. |
| REQUEST | ZPublisher.HTTPResponse, optional. |
| RESPONSE | ZPublisher.HTTPRequest, optional, if provided, the method will return a JSON response. |
Returns properties from configuration.
| Returns | |
| dict | A dictionary of configuration properties, optionally filtered by a prefix and including inherited properties from the portal master if specified. |
Return configuration properties defaults. The method returns a list of dicts, each describing a configuration property with keys.
- 'key': The unique identifier for the configuration property, used for retrieval and storage.
- 'title': A human-readable title for the configuration property, used in the management interface.
- 'desc': A description of the configuration property, providing context and usage information for administrators.
- 'datatype': The data type of the configuration property, indicating how the value should be interpreted and validated (e.g., 'string', 'boolean', 'text').
- 'default': The default value of the configuration property, used when no explicit value is set.
- 'options': A list of valid options for the configuration property, used for validation and selection in the management interface.
| Returns | |
| list | A list of dictionaries, each representing a configuration property with its metadata and default value. |
Returns property from configuration.
| Parameters | |
| key:string | The key. |
| default:any | The default-value. |
| REQUEST:ZPublisher.HTTPRequest | Undocumented |
| Returns | |
| any | Undocumented |
Resolve a configuration reference to a (filename, xmlfile) pair.
Three input forms are handled:
- dict — the dict has 'filename' and 'data' keys (e.g. entry from a ZIP archive); the data is wrapped in a StringIO.
- str starting with 'conf:' — the remainder is treated as a repository path inside the ZMS conf base directory. The repository model is read and translated to XML by the matching container object.
- Any other str — treated as a plain filesystem path; the file is opened in binary mode.
| Parameters | |
| file:dict or str | Configuration reference — dict entry, 'conf:'-prefixed path, or a plain filesystem path string. |
| Returns | |
| tuple | Tuple of (filename, xmlfile) where filename is the bare filename and xmlfile is a readable file-like object. |
Return the filter manager.
It delegates the retrieval of the filter manager to the filter manager object. If the filter manager is not available, it returns a default filter manager.
| Returns | |
| ZMSFilterManager | The filter manager object. |
Return the format manager.
It delegates the retrieval of the format manager to the format manager object. If the format manager is not available, it returns a default format manager.
| Returns | |
| DefaultFormatManager | The format manager object. |
Return the LLM connector.
Walks the breadcrumb path upward to find a ``ZMSLLMConnector`` object. Returns ``None`` if no connector has been added — it must be added manually like other ZMS components (e.g. workflow_manager, ZMSLog).
| Returns | |
| IZMSLLMConnector or None | The LLM connector object, or None. |
Return the MediaDb storage object attached to the document element, or None if no MediaDb has been configured.
| Returns | |
| _mediadb.MediaDb or None | The MediaDb object, or None. |
Return the metacmd manager.
It delegates the retrieval of the metacmd manager to the metacmd manager object. If the metacmd manager is not available, it returns a default metacmd manager.
| Returns | |
| DefaultMetacmdManager | The metacmd manager object. |
Return the metaobj manager.
It delegates the retrieval of the metaobj manager to the metaobj manager object. If the metaobj manager is not available, it returns a default metaobj manager.
| Returns | |
| DefaultMetaobjManager | The metaobj manager object. |
Return meta-object revision. It delegates the retrieval of the meta-object revision to the meta-object manager. If the metaobj manager is not available, it returns None.
Return the IDs of installed ZMS plug-ins located under the product's plugins/ subdirectory.
Only non-empty sub-directories are included. The optional path argument descends into a sub-directory of plugins/ first, enabling discovery of plug-in sub-categories such as ['rte'] for rich-text editor plug-ins.
| Parameters | |
| path:list | Path segments appended below plugins/ before scanning. |
| Returns | |
| list | List of plug-in directory names. |
Returns property from request (used to get zope-request-properties, e.g. SERVER_URL oder AUTHENTICATED_USER).
| Parameters | |
| key:string | The key. |
| default:any | The default-value. |
| REQUEST | Undocumented |
| Returns | |
| any | Undocumented |
Return the ordered list of resource-container folders used by the current theme.
The folder IDs to include are read from the 'ZMS.resourceFolders' configuration property (comma-separated, default 'instance,common'). A wildcard '*' entry expands to all sub-folders of the theme home. Folders that contain ZMS content nodes are excluded so that only pure resource containers are returned.
| Returns | |
| list | List of Zope folder objects serving as resource containers. |
Return the site-wide sequence counter object used for generating unique numeric IDs.
If a portal master is configured the sequence counter is kept on the master node so that all client portals draw from a single shared counter. In that case any local counter is removed and its current value is transferred to the master to avoid gaps. If no master exists the local counter is created on demand.
| Returns | |
| _sequence.Sequence | The Sequence object whose .value attribute is the next ID. |
Return a single stylesheet object from the available stylesheets.
If id is None the first (primary) stylesheet is returned. Otherwise the stylesheet whose getId() matches id is returned, or None if no match is found.
| Parameters | |
| id:str or None | Stylesheet object ID to look up, or None for the primary. |
| Returns | |
| file-like Zope object or None | The matching stylesheet file object, or None. |
Return the ordered list of all CSS stylesheet objects found in the configured resource folders.
The method walks each resource folder's optional css sub-folder and then the folder itself, collecting File and DTML objects whose path contains a .css component. The stylesheet configured as 'ZMS.stylesheet' (default 'style.css') is promoted to the front.
| Returns | |
| list | Ordered list of stylesheet objects, primary stylesheet first. |
Return the text format for the given ID.
It delegates the retrieval of the text format to the format manager object. If the format manager is not available, it returns a default text format.
| Parameters | |
| id:str | The ID of the text format. |
| REQUEST:ZopeRequest | The request object. |
| Returns | |
| TextFormat | The text format object. |
Return the default text format.
It delegates the retrieval of the default text format to the format manager object. If the format manager is not available, it returns a default text format.
| Returns | |
| string | The default text format object. |
Return the set of text formats.
It delegates the retrieval of the text formats to the format manager object. If the format manager is not available, it returns a default set of text formats.
| Parameters | |
| REQUEST:ZopeRequest | The request object. |
| Returns | |
| list of text formats | The set of text format objects. |
Return the list of theme folder objects available at the site home.
A folder qualifies as a theme when it contains a standard_html object. Both the direct home and the absolute home are scanned; duplicates (same ID) are excluded.
| Returns | |
| list | Distinct list of Zope folder objects that serve as theme folders. |
Return the workflow activities.
It delegates the retrieval of workflow activities to the workflow manager. If the workflow manager is not available, it returns an empty list.
| Returns | |
| list | A list of workflow activities. |
Return the workflow activities IDs. It delegates the retrieval of workflow activity IDs to the workflow manager. If the workflow manager is not available, it returns an empty list.
| Returns | |
| list | A list of workflow activities IDs. |
Return a specific workflow activity by its ID. It delegates the retrieval of a specific workflow activity to the workflow manager.
| Parameters | |
| id:str | The ID of the workflow activity. |
| Returns | |
| dict or None | The workflow activity associated with the given ID. |
Return a specific workflow transition by its ID. It delegates the retrieval of a specific workflow transition to the workflow manager. If the workflow manager is not available, it returns None.
| Parameters | |
| id:str | The ID of the workflow transition. |
| Returns | |
| dict or None | The workflow transition associated with the given ID. |
Return the workflow transitions. It delegates the retrieval of workflow transitions to the workflow manager. If the workflow manager is not available, it returns an empty list.
| Returns | |
| list | A list of workflow transitions. |
Return the workflow manager.
It delegates the retrieval of the workflow manager to the workflow manager object. If the workflow manager is not available, it returns a default workflow manager.
| Returns | |
| DefaultWorkflowManager | The workflow manager object. |
Return the ZMSIndex object, creating and initializing it if it does not already exist.
| Returns | |
| ZMSIndex | The ZMSIndex object associated with the root element. |
Return the ZMSSysConf object, creating and initializing it if it does not already exist.
The method checks if the ZMSSysConf object is already present as an attribute of the current instance. If it is not found, a new ZMSSysConf object is created, added to the current instance using _setObject, and then initialized. Finally, the method returns the ZMSSysConf object.
| Returns | |
| ZMSSysConf | The ZMSSysConf object associated with the current instance. |
Imports configuration from the given file and processes it in the context according to its filename.
| Parameters | |
| file:str | The path to the configuration file to be imported. |
| sync | Flag indicating whether to synchronize object attributes if necessary. Defaults to True. |
| Returns | |
str Notes:
| A message indicating the result of the import operation. |
Import a zipped configuration package and delegate each contained file to importConf.
If file is a string starting with http:// or https://, the archive is fetched via HTTP first. Otherwise the string is treated as a local filesystem path. Every non-directory entry in the ZIP archive is passed to importConf one by one.
| Parameters | |
| file:str or file-like object | Local file path, HTTP(S) URL, or file-like object of the ZIP archive to import. |
Customize design properties.
The method handles various design customization actions based on the provided button parameter. It processes actions related to saving CSS, saving themes, deleting themes, copying themes, importing themes, and inserting new themes. The method also constructs appropriate messages based on the actions performed and redirects the user to the design customization form with the relevant message.
| Parameters | |
| btn:string | The button that was clicked to trigger the action. |
| lang:string | The language code for localization purposes. |
| REQUEST:ZPublisher.HTTPRequest | The HTTP request object containing form data and other request information. |
| RESPONSE:ZPublisher.HTTPResponse | The HTTP response object for sending responses. |
| Returns | |
| string | A message indicating the result of the design customization action. |
Manage the system customization.
The method handles various system customization actions based on the provided key and button parameters. It processes configuration changes, imports, history management, client management, media database operations, and custom configuration properties.
| Parameters | |
| btn:string | The button that was clicked to trigger the action. |
| key:string | The key indicating the type of action to perform (e.g., 'Import', 'History', 'Clients', 'MediaDb', 'Custom', 'Configuration', 'Manager'). |
| lang:string | The language code for localization purposes. |
| REQUEST:ZPublisher.HTTPRequest | The HTTP request object containing form data and other request information. |
| RESPONSE:ZPublisher.HTTPResponse | The HTTP response object for sending responses. |
| Returns | |
| string | A message indicating the result of the customization action. |
Notify meta-object attribute definition about (a new) value. It delegates the notification of a meta-object attribute about a value to the meta-object manager. If the meta-object manager is not available, it returns None.
| Parameters | |
| meta | The ID of the meta-object. |
| key:str | The key of the attribute to notify. |
| value:any | The value to notify the attribute about. |
| Returns | |
| any | The result of the notification, or None if the meta-object manager is not available. |