<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

    Copyright (C) 2009 eXo Platform SAS.
    
    This is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.
    
    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.
    
    You should have received a copy of the GNU Lesser General Public
    License along with this software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->

<configuration
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">

  <component>
     <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
     <type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
  </component>

  <component>
    <key>org.exoplatform.services.transaction.TransactionService</key>
    <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
    <init-params>
      <value-param>
        <name>timeout</name>
        <value>300</value>
      </value-param>
    </init-params>
  </component>

	<component>
    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
    <type>org.exoplatform.commons.InitialContextInitializer2</type>
    <init-params>
      <properties-param>
        <name>default-properties</name>
        <description>Default initial context properties</description>
      </properties-param>
    </init-params>
  </component>
    
  <component>
    <key>org.exoplatform.services.resources.LocaleConfigService</key>
    <type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
      <init-params>
        <value-param>
          <name>locale.config.file</name>
          <value>war:/conf/common/locales-config.xml</value>
        </value-param>
      </init-params>
  </component>
  
  <component>
    <key>org.exoplatform.services.resources.ResourceBundleService</key>
    <type>org.exoplatform.services.resources.impl.SimpleResourceBundleService</type>
    <init-params>
      <values-param>
        <name>classpath.resources</name>
        <description>The resources  that start with the following package name should be load from file system</description>
        <value>locale.portlet</value>      
      </values-param>      
      <values-param>
        <name>init.resources</name>
        <description>Initiate the following resources during the first launch</description>
        <value>locale.portal.expression</value>
        <value>locale.portal.services</value>
        <value>locale.portal.webui</value>
        <value>locale.portal.custom</value>
        <value>locale.navigation.portal.classic</value>
        <value>locale.navigation.group.platform.administrators</value>
        <value>locale.navigation.group.platform.users</value>
        <value>locale.navigation.group.platform.guests</value>
        <value>locale.navigation.group.organization.management.executive-board</value>               
      </values-param>      
      <values-param>
        <name>portal.resource.names</name>
        <description>The properties files of  the portal ,  those file will be merged 
          into one ResoruceBundle properties </description>
        <value>locale.portal.expression</value>
        <value>locale.portal.services</value>
        <value>locale.portal.webui</value>
        <value>locale.portal.custom</value>        
      </values-param>      
    </init-params>
  </component>
            
  <component>
    <key>org.exoplatform.services.resources.ResourceBundleManager</key>
    <type>org.exoplatform.services.resources.ResourceBundleManager</type>
  </component>

  <component>
    <key>org.exoplatform.commons.scope.ScopeManager</key>
    <type>org.exoplatform.commons.scope.ScopeManager</type>
  </component>

  <component>
  	<key>org.exoplatform.services.cache.CacheService</key>
    <jmx-name>cache:type=CacheService</jmx-name>
  	<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
  	<init-params>
      <object-param>
        <name>cache.config.default</name>
        <description>The default cache configuration</description>
        <object type="org.exoplatform.services.cache.ExoCacheConfig">
          <field name="name"><string>default</string></field>
          <field name="maxSize"><int>${gatein.cache.default.maxsize:300}</int></field>
          <field name="liveTime"><long>${gatein.cache.default.livetime:600}</long></field>
          <field name="distributed"><boolean>false</boolean></field>
          <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field> 
        </object>
      </object-param>
    </init-params>	
  </component>  

  <component>
    <key>org.exoplatform.services.cache.ExoCacheFactory</key>
    <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
    <init-params>
      <value-param>
        <name>cache.config.template</name>
        <value>war:/conf/jbosscache/local/config.xml</value>
      </value-param>
      <value-param profiles="cluster">
        <name>cache.config.template</name>
        <value>war:/conf/jbosscache/cluster/config.xml</value>
      </value-param>
    </init-params>
  </component>

  <component>
    <key>org.exoplatform.commons.chromattic.ChromatticManager</key>
    <type>org.exoplatform.commons.chromattic.ChromatticManager</type>
  </component>

  <component>
    <type>org.exoplatform.portal.resource.SkinService</type>
  </component>

  <component>
   <key>org.exoplatform.services.portletcontainer.bundle.ResourceBundleDelegate</key>
   <type>org.exoplatform.portal.application.ResourceBundleDelegateImpl</type>
  </component>

  <component>
    <key>org.exoplatform.management.RestManagementProvider</key>
    <type>org.exoplatform.management.RestManagementProvider</type>
  </component>

  <component>
    <type>org.exoplatform.groovyscript.text.TemplateStatisticService</type>
  </component>

  <component>
    <type>org.exoplatform.groovyscript.text.TemplateService</type>
  </component>

  <component>
  	<key>org.exoplatform.web.security.proxy.ProxyFilterService</key>
  	<type>org.exoplatform.web.security.proxy.ProxyFilterService</type>
    <init-params>
      <values-param>
        <!-- The white list -->
        <name>white-list</name>
        <!-- We accept anything not black listed -->
        <value>*</value>
      </values-param>
      <values-param>
        <name>black-list</name>
        <value>*.evil.org</value>
      </values-param>
    </init-params>
  </component>

  <external-component-plugins>
    <target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
    <component-plugin>
      <name>addCreator</name>
      <set-method>addCreator</set-method>
      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheCreatorPlugin</type>
      <description>add Exo Cache Creator</description>
      <init-params>
        <object-param>
          <name>LRU</name>
          <description>The LRU cache creator</description>
          <object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator"></object>
        </object-param>
        <object-param>
          <name>EA</name>
          <description>The EA cache creator</description>
          <object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheCreator"></object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>
