<?xml version="1.0" encoding="UTF-8"?>
<StrolchConfiguration>
    <env id="global">
        <Runtime>
            <applicationName>${appName}</applicationName>
            <Properties>
                <locale>en</locale>
                <timezone>Europe/Zurich</timezone>
            </Properties>
        </Runtime>
        <Component>
            <name>PrivilegeHandler</name>
            <api>li.strolch.runtime.privilege.PrivilegeHandler</api>
            <impl>li.strolch.runtime.privilege.DefaultStrolchPrivilegeHandler</impl>
            <Properties>
                <privilegeConfigFile>PrivilegeConfig.xml</privilegeConfigFile>
            </Properties>
        </Component>
        <Component>
            <name>RealmHandler</name>
            <api>li.strolch.agent.api.RealmHandler</api>
            <impl>li.strolch.agent.impl.DefaultRealmHandler</impl>
            <depends>PrivilegeHandler</depends>
            <Properties>
                <realms>defaultRealm</realms>
                <dataStoreMode>TRANSIENT</dataStoreMode>
                <dataStoreFile>Model.xml</dataStoreFile>
            </Properties>
        </Component>

        <Component>
            <name>EnumHandler</name>
            <api>li.strolch.runtime.query.enums.EnumHandler</api>
            <impl>li.strolch.runtime.query.enums.DefaultEnumHandler</impl>
            <depends>RealmHandler</depends>
        </Component>

        <Component>
            <name>ServiceHandler</name>
            <api>li.strolch.service.api.ServiceHandler</api>
            <impl>li.strolch.service.api.DefaultServiceHandler</impl>
            <depends>RealmHandler</depends>
            <depends>PrivilegeHandler</depends>
            <Properties>
                <verbose>true</verbose>
            </Properties>
        </Component>

        <Component>
            <name>PolicyHandler</name>
            <api>li.strolch.policy.PolicyHandler</api>
            <impl>li.strolch.policy.DefaultPolicyHandler</impl>
            <Properties>
                <readPolicyFile>true</readPolicyFile>
            </Properties>
        </Component>

        <Component>
            <name>MigrationsHandler</name>
            <api>li.strolch.migrations.MigrationsHandler</api>
            <impl>li.strolch.migrations.MigrationsHandler</impl>
            <depends>RealmHandler</depends>
        </Component>

        <Component>
            <name>OperationsLog</name>
            <api>li.strolch.handler.operationslog.OperationsLog</api>
            <impl>li.strolch.handler.operationslog.OperationsLog</impl>
            <depends>RealmHandler</depends>
        </Component>

        <Component>
            <name>StrolchJobsHandler</name>
            <api>li.strolch.job.StrolchJobsHandler</api>
            <impl>li.strolch.job.StrolchJobsHandler</impl>
            <depends>RealmHandler</depends>
        </Component>

        <Component>
            <name>SessionHandler</name>
            <api>li.strolch.runtime.sessions.StrolchSessionHandler</api>
            <impl>li.strolch.runtime.sessions.DefaultStrolchSessionHandler</impl>
            <depends>PrivilegeHandler</depends>
            <Properties>
                <session.ttl.minutes>1440</session.ttl.minutes>
                <session.maxKeepAlive.minutes>10080</session.maxKeepAlive.minutes>
            </Properties>
        </Component>
        <Component>
            <name>RestfulHandler</name>
            <api>li.strolch.rest.RestfulStrolchComponent</api>
            <impl>li.strolch.rest.RestfulStrolchComponent</impl>
            <depends>SessionHandler</depends>
            <Properties>
                <cookieMaxAge>30</cookieMaxAge>
                <secureCookie>false</secureCookie>
            </Properties>
        </Component>

        <Component>
            <name>PostInitializer</name>
            <api>li.strolch.agent.api.PostInitializer</api>
            <impl>${package}.components.PostInitializer</impl>
            <depends>RestfulHandler</depends>
            <Properties>
            </Properties>
        </Component>

        <Component>
            <name>ExecutionHandler</name>
            <api>li.strolch.execution.ExecutionHandler</api>
            <impl>li.strolch.execution.EventBasedExecutionHandler</impl>
            <depends>PostInitializer</depends>
            <Properties>
                <restartExecution>true</restartExecution>
            </Properties>
        </Component>

    </env>

    <env id="dev">
        <!-- taken from global env -->
    </env>

    <env id="test">
        <!-- taken from global env -->
    </env>
</StrolchConfiguration>
