The Controller configures web access to the service basing completely on the rules of URL Mapping described in the package metadata file
APP by the
"/service/provision/url-mapping" element defined by the Specification in section 5.3.1. URL Mapping. The Controller may perform this operation before or after executing service configuration script. The only restriction is that the Controller must prepare mapping environment variables and pass them to configuration script irrespective of whether the mapping has been performed or not.
Understanding the URL mapping on the level of package metadata format is what the Controller must at least do to properly copy the correct files on the site, and to properly configure web server. The Controller must select the package directories defined by the
"//mapping[@path]" attributes, and, using an implementation-dependant technology, copy them to the hosting environment in such a way that the directories would be accessible at the corresponding URLs defined by each
"//mapping" element (the root one,
"//url-mapping/mapping", and its children) in the package metadata can nest the 'URL handler' and 'permissions' elements defined by the aspects. To process the URL handlers and permissions, the Controller should use its functional part - Aspects Parser. More information about aspects is provided in the Controller Perspective section. Under processing the URL handlers and permissions, we understand recognizing and performing actions necessary for implementing them, for example, setting specific access permissions on files, configuring web server, etc.
If the Aspects Parser comes over an unknown URL handler or permissions (i.e., the Aspects Parser has no info about such element and cannot recognize it) within at least one
"//mapping" element, the Controller must abort instantiating the application.
To summarize it all, let us say that on the stage of provisioning service to hosting environment with URL mapping method, the following happens:
As soon as the Controller finishes with the mapping, it must prepare the
_DIR environment variables for each mapping to pass them to the configuration script then, as defined by the Specification in section 18.104.22.168.1. URL Mapping Variables. Also, the Controller must pass details of parent's URL mapping to configuration script of its child services.
The Controller must somehow store information on which files and folders of the application it copied to the hosting environment. This is required to distinguish the application files and the files created with this application, which will allow painlessly upgrading the application, replacing the old application files with new ones and leaving the created files untouchable.
Please send us your feedback on this help page