<?xml version="1.0" encoding="UTF-8"?>
<!--

    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.exoplatform.application.gadget.SourceStorage</key>
    <type>org.exoplatform.application.gadget.impl.SourceStorageImpl</type>
  </component>

  <component>
    <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
    <type>org.exoplatform.application.gadget.impl.GadgetRegistryServiceImpl</type>
    <init-params>
      <value-param>
        <name>gadgets.country</name>
        <description>US</description>
        <value>US</value>
      </value-param>
      <value-param>
        <name>gadgets.language</name>
        <description>en</description>
        <value>en</value>
      </value-param>
      <value-param>
        <name>gadgets.moduleId</name>
        <description>0</description>
        <value>0</value>
      </value-param>
      <value-param>
        <name>gadgets.hostName</name>
        <description>Gadget server url</description>
        <value>eXoGadgetServer/gadgets</value>
      </value-param>
      <properties-param>
        <name>developerInfo</name>
        <description>The group that is allowed to develop gadgets</description>
        <property name="developer.group" value="/platform/administrators"/>
      </properties-param>
    </init-params>
  </component>

  <component>
     <key>org.exoplatform.application.gadget.GadgetDeployer</key>
     <type>org.exoplatform.application.gadget.GadgetDeployer</type>
  </component>

   <component>
      <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
      <type>org.exoplatform.application.registry.impl.ApplicationRegistryServiceImpl</type>
      <component-plugins>
         <component-plugin>
            <name>new.portal.portlets.registry</name>
            <set-method>initListener</set-method>
            <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
            <description>this listener init the portlets are registered in PortletRegister</description>
            <init-params>
               <object-param>
                  <name>administration</name>
                  <description>description</description>
                  <object type="org.exoplatform.application.registry.ApplicationCategory">
                     <field name="name">
                        <string>Administration</string>
                     </field>
                     <field name="displayName">
                        <string>Administration</string>
                     </field>
                     <field name="description">
                        <string>application for administration</string>
                     </field>
                     <field name="accessPermissions">
                        <collection type="java.util.ArrayList" item-type="java.lang.String">
                           <value>
                              <string>*:/platform/administrators</string>
                           </value>
                           <value>
                              <string>*:/organization/management/executive-board</string>
                           </value>
                        </collection>
                     </field>
                     <field name="applications">
                        <collection type="java.util.ArrayList">
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="applicationName">
                                    <string>ApplicationRegistryPortlet</string>
                                 </field>
                                 <field name="categoryName">
                                    <string>administration</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Application Registry</string>
                                 </field>
                                 <field name="description">
                                    <string>Application Registry</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>exoadmin/ApplicationRegistryPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/administrators</string>
                                       </value>
                                       <value>
                                          <string>*:/organization/management/executive-board</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="applicationName">
                                    <string>OrganizationPortlet</string>
                                 </field>
                                 <field name="categoryName">
                                    <string>administration</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Organization Management</string>
                                 </field>
                                 <field name="description">
                                    <string>Organization Management</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>exoadmin/OrganizationPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/administrators</string>
                                       </value>
                                       <value>
                                          <string>*:/organization/management/executive-board</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="applicationName">
                                    <string>AccountPortlet</string>
                                 </field>
                                 <field name="categoryName">
                                    <string>administration</string>
                                 </field>
                                 <field name="displayName">
                                    <string>New Account</string>
                                 </field>
                                 <field name="description">
                                    <string>New Account</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>exoadmin/AccountPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/administrators</string>
                                       </value>
                                       <value>
                                          <string>*:/organization/management/executive-board</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                        </collection>
                     </field>
                  </object>
               </object-param>

               <object-param>
                  <name>web</name>
                  <description>description</description>
                  <object type="org.exoplatform.application.registry.ApplicationCategory">
                     <field name="name">
                        <string>web</string>
                     </field>
                     <field name="displayName">
                        <string>web</string>
                     </field>
                     <field name="description">
                        <string>BasicPortlets</string>
                     </field>
                     <field name="accessPermissions">
                        <collection type="java.util.ArrayList" item-type="java.lang.String">
                           <value>
                              <string>*:/platform/users</string>
                           </value>
                        </collection>
                     </field>
                     <field name="applications">
                        <collection type="java.util.ArrayList">
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>web</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>IFramePortlet</string>
                                 </field>
                                 <field name="displayName">
                                    <string>IFrame</string>
                                 </field>
                                 <field name="description">
                                    <string>IFrame</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>web/IFramePortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>web</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>SiteMapPortlet</string>
                                 </field>
                                 <field name="displayName">
                                    <string>SiteMap</string>
                                 </field>
                                 <field name="description">
                                    <string>SiteMap</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>web/SiteMapPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                        </collection>
                     </field>
                  </object>
               </object-param>

               <object-param>
                  <name>dashboard</name>
                  <description>description</description>
                  <object type="org.exoplatform.application.registry.ApplicationCategory">
                     <field name="name">
                        <string>dashboard</string>
                     </field>
                     <field name="displayName">
                        <string>Dashboard</string>
                     </field>
                     <field name="description">
                        <string>Dashboard</string>
                     </field>
                     <field name="accessPermissions">
                        <collection type="java.util.ArrayList" item-type="java.lang.String">
                           <value>
                              <string>*:/platform/users</string>
                           </value>
                        </collection>
                     </field>
                     <field name="applications">
                        <collection type="java.util.ArrayList">
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>dashboard</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>DashboardPortlet</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Dashboard Portlet</string>
                                 </field>
                                 <field name="description">
                                    <string>Dashboard Portlet</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>dashboard/DashboardPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>dashboard</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>GadgetPortlet</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Gadget Wrapper Portlet</string>
                                 </field>
                                 <field name="description">
                                    <string>Gadget Wrapper Portlet</string>
                                 </field>
                                 <field name="type">
                                    <string>portlet</string>
                                 </field>
                                 <field name="contentId">
                                    <string>dashboard/GadgetPortlet</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                        </collection>
                     </field>
                  </object>
               </object-param>

               <object-param>
                  <name>Gadgets</name>
                  <description>Gadgets</description>
                  <object type="org.exoplatform.application.registry.ApplicationCategory">
                     <field name="name">
                        <string>Gadgets</string>
                     </field>
                     <field name="displayName">
                        <string>Gadgets</string>
                     </field>
                     <field name="description">
                        <string>Gadgets</string>
                     </field>
                     <field name="accessPermissions">
                        <collection type="java.util.ArrayList" item-type="java.lang.String">
                           <value>
                              <string>*:/platform/users</string>
                           </value>
                        </collection>
                     </field>
                     <field name="applications">
                        <collection type="java.util.ArrayList">
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>Gadgets</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>To-do</string>
                                 </field>
                                 <field name="displayName">
                                    <string>To-do</string>
                                 </field>
                                 <field name="description">
                                    <string>To-do Gadget, easily manage and track your daily to-do list.</string>
                                 </field>
                                 <field name="type">
                                    <string>gadget</string>
                                 </field>
                                 <field name="contentId">
                                    <string>To-do</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>Gadgets</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>Calendar</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Calendar</string>
                                 </field>
                                 <field name="description">
                                    <string>What date is it? Use this cool calendar to keep track of the date in style.
                                       You can switch easily between daily, monthly or yearly view.
                                    </string>
                                 </field>
                                 <field name="type">
                                    <string>gadget</string>
                                 </field>
                                 <field name="contentId">
                                    <string>Calendar</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>Gadgets</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>Calculator</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Calculator</string>
                                 </field>
                                 <field name="description">
                                    <string>This simple and useful calculator lets you perform most of the basic
                                       arithmetic operations.
                                    </string>
                                 </field>
                                 <field name="type">
                                    <string>gadget</string>
                                 </field>
                                 <field name="contentId">
                                    <string>Calculator</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                           <value>
                              <object type="org.exoplatform.application.registry.Application">
                                 <field name="categoryName">
                                    <string>Gadgets</string>
                                 </field>
                                 <field name="applicationName">
                                    <string>rssAggregator</string>
                                 </field>
                                 <field name="displayName">
                                    <string>Rss Reader</string>
                                 </field>
                                 <field name="description">
                                    <string>Rss Reader</string>
                                 </field>
                                 <field name="type">
                                    <string>gadget</string>
                                 </field>
                                 <field name="contentId">
                                    <string>rssAggregator</string>
                                 </field>
                                 <field name="accessPermissions">
                                    <collection type="java.util.ArrayList" item-type="java.lang.String">
                                       <value>
                                          <string>*:/platform/users</string>
                                       </value>
                                    </collection>
                                 </field>
                              </object>
                           </value>
                        </collection>
                     </field>
                  </object>
               </object-param>
            </init-params>
         </component-plugin>
      </component-plugins>
   </component>

  <external-component-plugins>
    <target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
    <component-plugin>
      <name>chromattic</name>
      <set-method>addLifeCycle</set-method>
      <type>org.exoplatform.application.registry.impl.ApplicationRegistryChromatticLifeCycle</type>
      <init-params>
        <value-param>
          <name>domain-name</name>
          <value>app</value>
        </value-param>
        <value-param>
          <name>workspace-name</name>
          <value>portal-system</value>
        </value-param>
        <values-param>
          <name>entities</name>
          <value>org.exoplatform.application.registry.impl.ContentRegistry</value>
          <value>org.exoplatform.application.registry.impl.CategoryDefinition</value>
          <value>org.exoplatform.application.registry.impl.ContentDefinition</value>
          <value>org.exoplatform.application.gadget.impl.GadgetRegistry</value>
          <value>org.exoplatform.application.gadget.impl.GadgetDefinition</value>
          <value>org.exoplatform.application.gadget.impl.LocalGadgetData</value>
          <value>org.exoplatform.application.gadget.impl.RemoteGadgetData</value>
          <value>org.chromattic.ext.ntdef.NTFile</value>
          <value>org.chromattic.ext.ntdef.NTFolder</value>
          <value>org.chromattic.ext.ntdef.NTResource</value>
        </values-param>
        <properties-param>
          <name>options</name>
          <property name="org.chromattic.api.Option.root_node.path" value="/production"/>
          <property name="org.chromattic.api.Option.root_node.create" value="true"/>
        </properties-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>