<module>
    <manifestVersion>1.0.0</manifestVersion>

    <symbolicName>snap-ceres-core</symbolicName>
    <version>1.0.0</version>
    <name>Ceres Runtime Library</name>
    <activator>com.bc.ceres.core.runtime.internal.RuntimeActivator</activator>

    <changelog>
        <![CDATA[
                ]]>
    </changelog>

    <description>
        The Ceres Runtime provides a platform for applications based on
        updatable, versioned modules.
    </description>

    <vendor>Brockmann Consult GmbH</vendor>
    <contactAddress>Max-Planck-Str. 2, 21502 Geesthacht (Germany)</contactAddress>
    <copyright>(C) 2011 by Brockmann Consult GmbH</copyright>
    <url>http://www.brockmann-consult.de/</url>
    <licenseUrl>http://www.gnu.org/licenses/gpl.html</licenseUrl>

    <categories>System,Library</categories>

    <!--
       applications: Extension point that provides the executable code for applications.
       Applications will be invoked using the Ceres launcher. The configuration parameter is
           ${ceres.context}.app = ${application.id}
       where ${ceres.context} is given by the configuration parameter 'ceres.context'.
    -->
    <extensionPoint id="applications">

        <!--
            The application id is given by the 'id' attribute,
            the application class by the 'class' attribute, e.g.

            <extension point="snap-ceres-core:applications">
                <application id="MyApp" class="com.acme.MyApp" />
            </extension>

        -->
        <application type="com.bc.ceres.core.runtime.RuntimeRunnable"/>

    </extensionPoint>

    <!--
       serviceProviders: Extension point that provides dynamic service registration ("Service Plugin Pattern").
       Since Ceres creates private class loaders for modules, they will not be able to dynamically load
       services registered via the standard JAR method using META-INF/services.
       Using this extension point, your module can declare itself as a host module for that service, which means
       it will provide (or knows) a registry for the specified service type.
    -->
    <extensionPoint id="serviceProviders">

        <!--
            The class name of the service provider interface (SPI).
            Dependent modules will expose the services they provide in the "usual" JAR way, namely by providing
            a resource file META-INF/services/${serviceProvider} containing a list of names of classes that
            implement ${serviceProvider}.
         -->
        <serviceProvider type="java.lang.Class"/>

    </extensionPoint>

    <!--
       adapters: Extension point that provides dynamic object extension ("Adaptable Pattern").
       Ceres allows for further extensions to existing interfaces at runtime.
       New functionality can be added to existing interfaces without having to modify every derivative
       type in and outside of your software.
    -->
    <extensionPoint id="adapters">

        <adapter>

            <!--
                This is the name of an interface or class which will be extended at runtime.
                Either 'extensionFactory' or 'extensionType' must be given in addition.
                Usually, but not necessarily, 'extensionType' implements 'com.bc.ceres.core.Extensible'
                or extends 'com.bc.ceres.core.ExtensibleObject'.
             -->
            <extensibleType type="java.lang.Class"/>

            <!--
                The factory that will be used to create the extension instances for a given instance
                of type 'extensibleType'.
                If 'extensionFactory' is not given, then 'extensionType' must be given.
                See Ceres API documentation on 'com.bc.ceres.core.ExtensionFactory'
                for more information.
             -->
            <extensionFactory type="com.bc.ceres.core.ExtensionFactory"/>

            <!--
                Can be provided instead of 'extensionFactory'.
                If 'extensionSubType' is not given, 'extensionType' must have a public no-arg constructor
                or a public 1-arg constructor that takes an instance of 'extensibleType'.
                See Ceres API documentation on 'com.bc.ceres.core.SingleTypeExtensionFactory'
                for more information.
             -->
            <extensionType type="java.lang.Class"/>

            <!--
                If given in addition to 'extensionType', it will be used to create the actual extension instances.
                Must therefore be a sub-type of 'extensionType' and must have a public no-arg constructor
                or a public 1-arg constructor that takes an instance of 'extensibleType'.
                See Ceres API documentation on 'com.bc.ceres.core.SingleTypeExtensionFactory'
                for more information.
             -->
            <extensionSubType type="java.lang.Class"/>

        </adapter>

    </extensionPoint>

</module>