<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd" xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

   <component>
      <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
      <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
      <init-params>
         <value-param>
            <name>logger</name>
            <value>org.slf4j.Logger</value>
         </value-param>
         <value-param>
            <name>configurator</name>
            <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
         </value-param>
         <properties-param>
            <name>properties</name>
            <description>Log4J properties</description>
            <property name="log4j.rootLogger" value="INFO, stdout" />
            <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
            <property name="log4j.appender.stdout.threshold" value="DEBUG" />
            <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
            <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
            <property name="log4j.appender.file" value="org.apache.log4j.FileAppender" />
            <property name="log4j.appender.file.File" value="target/container.log" />
            <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout" />
            <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
         </properties-param>
      </init-params>
   </component>

   <component>
      <key>org.exoplatform.services.jcr.RepositoryService</key>
      <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
      <component-plugins>
         <component-plugin>
            <name>add.namespaces</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
            <init-params>
               <properties-param>
                  <name>namespaces</name>
                  <property name="dc" value="http://purl.org/dc/elements/1.1/" />
                  <property name="cmis" value="http://www.exoplatform.com/jcr/cmis/1.0" />
                  <property name="xcmis" value="http://www.exoplatform.com/jcr/xcmis/1.0" />
               </properties-param>
            </init-params>
         </component-plugin>
         <component-plugin>
            <name>add.nodeType</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
            <init-params>
               <values-param>
                  <name>autoCreatedInNewRepository</name>
                  <description>Node types configuration file</description>
                  <value>jar:/conf/cmis-nodetypes-config.xml</value>
                  <!--                  <value>jar:/conf/test/test-cmis-nodetypes-config.xml</value>-->
               </values-param>
            </init-params>
         </component-plugin>
      </component-plugins>
   </component>

   <component>
      <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
      <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
      <init-params>
         <value-param>
            <name>conf-path</name>
            <description>JCR configuration file</description>
            <value>jar:/conf/tck/tck-cmis-jcr-configuration.xml</value>
         </value-param>
      </init-params>
   </component>

   <component>
      <key>org.exoplatform.services.idgenerator.IDGeneratorService</key>
      <type>org.exoplatform.services.idgenerator.impl.IDGeneratorServiceImpl</type>
   </component>


   <component>
      <type>org.exoplatform.ecms.xcmis.sp.StorageProviderImpl</type>
      <init-params>
         <object-param>
            <name>configuration</name>
            <object type="org.exoplatform.ecms.xcmis.sp.StorageProviderImpl$StorageProviderConfig">
               <field name="storage">
                  <object type="org.exoplatform.ecms.xcmis.sp.StorageConfiguration">
                     <field name="id">
                        <string>cmis1</string>
                     </field>
                     <field name="repository">
                        <string>db1</string>
                     </field>
                     <field name="workspace">
                        <string>cmis-tck</string>
                     </field>
                  </object>
               </field>
            </object>
         </object-param>
      </init-params>
   </component>

   <component>
      <type>org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService</type>
   </component>

   <component>
      <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
      <init-params>
         <properties-param>
            <name>locations</name>
            <property name="db1" value="ws1" />
         </properties-param>
      </init-params>
   </component>


   <component>
      <type>org.xcmis.spi.PermissionService</type>
   </component>

   <component>
      <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
   </component>

   <component>
      <key>org.exoplatform.services.security.Authenticator</key>
      <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
   </component>

   <component>
      <type>org.exoplatform.services.security.IdentityRegistry</type>
   </component>

   <component>
      <key>org.exoplatform.services.naming.InitialContextInitializer</key>
      <type>org.exoplatform.services.naming.InitialContextInitializer</type>
      <init-params>
         <properties-param>
            <name>default-properties</name>
            <description>Default initial context properties</description>
            <property name="java.naming.factory.initial" value="org.exoplatform.services.naming.SimpleContextFactory" />
         </properties-param>
      </init-params>
   </component>

   <external-component-plugins>
      <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
      <component-plugin>
         <name>bind.datasource</name>
         <set-method>addPlugin</set-method>
         <type>org.exoplatform.services.naming.BindReferencePlugin</type>
         <init-params>
            <value-param>
               <name>bind-name</name>
               <value>jdbcexo-ws1</value>
            </value-param>
            <value-param>
               <name>class-name</name>
               <value>javax.sql.DataSource</value>
            </value-param>
            <value-param>
               <name>factory</name>
               <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </value-param>
            <properties-param>
               <name>ref-addresses</name>
               <description>ref-addresses</description>
               <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
               <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal" />
               <property name="username" value="sa" />
               <property name="password" value="" />
            </properties-param>
         </init-params>
      </component-plugin>
      <component-plugin>
         <name>bind.datasource</name>
         <set-method>addPlugin</set-method>
         <type>org.exoplatform.services.naming.BindReferencePlugin</type>
         <init-params>
            <value-param>
               <name>bind-name</name>
               <value>jdbcexo-cmis-tck</value>
            </value-param>
            <value-param>
               <name>class-name</name>
               <value>javax.sql.DataSource</value>
            </value-param>
            <value-param>
               <name>factory</name>
               <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </value-param>
            <properties-param>
               <name>ref-addresses</name>
               <description>ref-addresses</description>
               <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
               <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr" />
               <property name="username" value="sa" />
               <property name="password" value="" />
            </properties-param>
         </init-params>
      </component-plugin>
   </external-component-plugins>

</configuration>
