List of services

List of available services

Since 3.1 version, the list of availables services can depend on :

  • the type of site (See. Type of site )
  • the type of site and the skin
  • the type of site, the skin and the page template
  • the site type, and the zones of a skin's templates (from 3.4 version only)

The list of availables services are defined in files named services-[siteType].xml

There are two modes :

  • include : to accept only the services listed in file. This is the default mode
<?xml version="1.0" encoding="UTF-8"?>
<services mode="include">
	<service id="org.ametys.web.service.SitemapService"/>
	<service id="org.ametys.web.service.FrontSearchService"/>
	<service id="org.ametys.web.service.IframeService"/>
	<service id="org.ametys.service.Revamping"/>
	<service id="org.ametys.web.service.FilteredContentsService"/>
	<service id="org.ametys.web.service.InsertContentService"/>
	<service id="org.ametys.web.service.AttachmentsService"/>
</services>
  • exclude: to accept all services except those listed in file
<?xml version="1.0" encoding="UTF-8"?>

<services mode="exclude">
	<service id="org.ametys.web.service.IframeService"/>
</services>

This type of files can be defined in three location :

  • in your skins/[skinName]/template/[templateName]/conf directory. If present, this file will be used to list the available services for pages on which this template is assigned, and for each zone of these pages (from 3.4 version only).
  • in your skins/[skinName]/conf directory : if presents this file will be used to list the available services for your skin
  • in your WEB-INF/params directory : if presents this file will be used to list the available services for your type of site

The structure of the files is different in the first case and in the two others. The global configuration file and the skin configuration file use the simple structure shown above, a simple list of service IDs.

To define the templates and zones, the file (placed in the template's conf directory) must follow this structure:

<?xml version="1.0" encoding="UTF-8"?>
<services>
    <!-- List of services included in or excluded from the template by default. -->
    <template mode="exclude">
        <service id="org.ametys.web.service.InsertContentService"/>
        <service id="org.ametys.web.service.FrontSearchService"/>
    </template>
    <!-- List of services included in or excluded from specific zones. -->
    <zones>
        <zone id="default" mode="exclude">
            <service id="org.ametys.web.service.InsertContentService"/>
            <service id="org.ametys.web.service.FrontSearchService"/>
        </zone>
        <zone id="right-column" mode="include">
            <service id="org.ametys.web.service.FilteredContentsService"/>
        </zone>
    </zones>
</services>

N.B: the "template" section and the "zones" section are not mandatory, but one at least must be specified.
N.B.2: in the same way, all zones are not required to be specified in the "zones" section. Existing zones not mentioned in the file have the same available services as their template.