--- a/src/source/config.rst Thu Apr 12 18:01:15 2018 +0200
+++ b/src/source/config.rst Fri Apr 20 16:52:49 2018 +0200
@@ -3,76 +3,73 @@
PyAMS configuration
===================
-PyAMS application configuration is done via several complementary ways:
+.. Note::
-- via Pyramid's configuration files located in 'etc/' folder
+ PyAMS application configuration is done via several complementary ways:
-- via settings applied to local utilities defined into ZODB
+ - via **Pyramid's configuration** files located in 'etc/' folder
-- via ZCML files.
+ - via **ZCML files** .
+
+ - via **Site Management** to setup Local utilities defined into ZODB (see :ref:`appmanage`)
Pyramid's configuration files
-----------------------------
-PyAMS is using default Pyramid's configuration files to define settings. When using default PyAMS scaffold, these
+PyAMS is using default Pyramid's ini_ configuration files to define settings. When using default PyAMS scaffold, these
INI files are stored into *etc* folder. Two files are created by scaffold: a development file (*development.ini*) and
a production file (*production.ini*) which contain nearly the same directives, except for debug toolbar (activated only
in development), Fanstatic configuration and logging.
+.. _ini: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/project.html#development-ini
+
These files are actually documented, but here are a few important directives:
-- **zodbconn.uri**:
+- **zodbconn.uri**: (ex: zconfig:/zodb-relstorage.conf)
-- **pyams.application_factory**:
-
-- **pyams.application_name**:
+- **pyams.application_name**: Name of your own application
+- **pyams.application_factory**: Configuration module path to your custom application.
-- **pyams_xxx.tcp_handler** and **pyams_xxx.start_handler**:
+- **pyams_xxx.tcp_handler** : Adress of the tcp handler for the service associated to the pyams package
+- **pyams_xxx.start_handler**: True / False
-- **pyams_content.config.tools_name**:
+- **pyams_content.config.xxx_tool_factory** and **pyams_content.config.xxx_tool_name**: You can override default factory by defining these settings or by providing your own adapters.
-- **pyams_content.config.xxx_tool_factory** and **pyams_content.config.xxx_tool_name**:
-Local registry utilities
-------------------------
+Pyramid's configuration files powered by PyAMS_utils
+----------------------------------------------------
-When the ZODB is created, PyAMS automatically create and register several utilities into the *local registry* (see
-:ref:`zca`). These utilities are created with default values which can be modified through management interface when
-the application is started.
+On application startup, if PyAMS_utils package is included into Pyramid configuration, several operations take
+place:
-Some important utilities include:
+ - a custom **site factory** is defined
-- a **catalog**: the catalog has the responsibility to index every content properties which are required to make quick
- and efficient searches. Catalog indexes are automatically created on database upgrade; management interface
- allows administrator to get indexes properties, to get the number of indexed objects and values for a given index, and
- to delete an index before recreating it by running the database upgrade script another time (see :ref:`scripts`).
+ - custom request methods are defined
+
+ - a custom **traverser** handling **namespaces** is defined
-- an **internal IDs** utility:
+ - a custom subscribers predicate based on interfaces support is defined
-- a **language negotiator**:
+ - several adapters are registered, to handle annotations and key references
-- a **portal templates** container:
-
-- a **security manager**:
+ - custom TALES extensions are registered.
-- a **sequential IDs** utility:
+The site factory is an important component in this process. It is this factory which will define the application root
+and create a **local site manager**.
-- a **server timezone** utility:
-
-- a **user profiles** container:
+Pyramid application is loaded from ZODB's root via a key defined in Pyramid's configuration file; the key is named
+*pyams.application_name* and it's default value is *application*.
-
-Optional utilities can also include:
-
-- an **Elasticsearch content indexer**:
+If the application can't be found, PyAMS is looking for an application class name in Pyramid's configuration file; the
+class name configuration key is called *pyams.application_factory* and defined by default as
+*pyams_utils.site.BaseSiteRoot*. PyAMS default site factory will then create the application, and add a local site
+manager to it (see :ref:`zca`).
-- a **maps manager**:
+After application creation, a :py:class:`NewLocalSiteCreatedEvent <pyams_utils.site.NewLocalSiteCreatedEvent>` is
+notified. Custom packages can subscribe to this event to register custom components.
-- a **medias converter**:
-
-- a **tasks scheduler**:
ZCML configuration files