Runtime file.xml


The file runtime.xml must be present in the WEB-INF/param back-office application (cms) and front-office application (site).

It mainly defines the choice of "simple" extensions. As an integrator, you will certainly need to modify this file, either manually, or using the "Plugins and workspaces" tool accessible from the administration interface (see plugins and workspace management).

It is in this file that you will define :

  • user managers (database SQL, LDAP, static, ...)
  • group managers (base SQL, LDAP, static, ...)
  • authentication mode (basic, CAS, Jcif, ...)
  • rights managers (flat, hierarchical, etc.)

Back-office application (cms)

The following is an example of a runtime file.xml for the CMS application:

<runtime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ametys.org/Runtime/2.0/runtime.xsd">
    
    <application>
        <version>3.4.0</version>
        <date>20120808T1714 GMT</date>
    </application>
    
	<plugins>
        <exclude>
            <feature>core/runtime.sqlmap</feature>
            <feature>core/runtime.core.has_right_sitemap_components</feature>
            ...
        </exclude>
    </plugins>

    <workspaces default="web"/>
    
    <extensions>
        <org.ametys.runtime.authentication.CredentialsProvider>org.ametys.runtime.plugins.core.authentication.FormBased</org.ametys.runtime.authentication.CredentialsProvider>
        <org.ametys.runtime.user.UsersManager>org.ametys.runtime.plugins.core.user.CoreModifiableCredentialsAwareJdbc</org.ametys.runtime.user.UsersManager>
        <org.ametys.runtime.group.GroupsManager>org.ametys.runtime.plugins.core.group.ModifiableJdbcCore</org.ametys.runtime.group.GroupsManager>
		<org.ametys.runtime.right.RightsManager>org.ametys.runtime.plugins.web.right.WebHierarchicalProfileBased</org.ametys.runtime.right.RightsManager>
		...
	</extensions>

</runtime>

They include :

  • Version number and delivery date tag (ISO8601 format) of the application in the <application>
    This information is displayed in the footer of the administration section.



    The <version> can contain the value @VERSION@ to be filled in automatically by script when a delivery is made. The same applies to <date> can contain @DATE@

  • List of features to disable in <plugins> et <exclude>
    For example, in the context of a web application, the "link-resolver" feature provided by plugin "cms", which resolves links, must be deactivated to use the plugin "web" feature (which resolves more types of links). This feature is therefore excluded: <feature>cms/link-resolver</feature>

     <plugins>
            <exclude>
                <feature>core/runtime.sqlmap</feature>
                <feature>core/runtime.core.has_right_sitemap_components</feature>
                <feature>workflow/workflow-store</feature>
                <feature>cms/link-resolver</feature>
                <feature>cms/content-clientside-targetfactory</feature>
                <feature>cms/userinterface.rights.assignment.tool</feature>
                <feature>cms/org.ametys.cms.content.global.consistency</feature>
                <feature>cms/org.ametys.cms.content.consistency.scheduler</feature>
                <feature>cms/userinterface.content</feature>
                <feature>cms/docbookUpdateHandler</feature>
            </exclude>
    </plugins>
    



  • The default workspace : <workspaces default="web"/>. Do not modify this information!

  • Choosing "simple" extension points tag in the <extensions>. A simple extension point is one for which only one implementation can be active. You therefore need to choose the one that will be used.
    The user manager is an example of a simple extension point.



    In the file, the choice of an extension point is written as follows:

    <identifiant_du_point_d_extension>identifiant_de_l_extension_choisie</identifiant_du_point_d_extension>
    


    Go to the Extension points reference page for a list of simple extension points and their roles.

 

  • Possiblya java class to be run at application startup tag in the <initClass>

Front-office application (site)

The rules described above also apply to the runtime.xml of the front-office application. The latter is lighter, however, as the site contains fewer extension points.

Each file runtime.xml of a site application must declare the initialization class org.ametys.site.Init for correct application initialization (this java class enables you to clear the site's static cache).

The default workspace is the "site" workspace.

Here is an example of a file runtime.xml for the front-office application:

<runtime  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:noNamespaceSchemaLocation="http://ametys.org/Runtime/2.0/runtime.xsd">
    
    <application>
        <version>@VERSION@</version>
        <date>@DATE@</date>
    </application>
    
    <initClass>org.ametys.site.Init</initClass>
    
    <plugins>
        <locations>
            <location>modules</location>
        </locations>
        <exclude>
            <feature>core/runtime.sqlmap</feature>
            <feature>core/runtime.datasource.core</feature>
            <feature>core/runtime.authentication.impl.formbased</feature>
        </exclude>
    </plugins>
    
    <workspaces default="site"/>
    
    <extensions>
        <org.ametys.runtime.authentication.CredentialsProvider>org.ametys.site.plugins.site.authentication.FormBased</org.ametys.runtime.authentication.CredentialsProvider>
        <org.ametys.runtime.user.UsersManager>org.ametys.templates.demo.user.Static</org.ametys.runtime.user.UsersManager>
		<org.ametys.runtime.plugins.core.userpref.DefaultUserPreferencesStorage>org.ametys.runtime.plugins.core.userpref.EmptyUserPreferencesStorage</org.ametys.runtime.plugins.core.userpref.DefaultUserPreferencesStorage>
    </extensions>
</runtime>

 

 

 

Back to top