<?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>
   <type>org.exoplatform.upload.UploadService</type>
     <init-params>
       <value-param>
        <name>upload.limit.size</name>
        <description>Maximum size of the file to upload in MB</description>
        <value>20</value>
      </value-param>
    </init-params>  
  </component>
  
  <component>
    <key>org.exoplatform.forum.service.user.ContactProvider</key>
    <type>org.exoplatform.ks.common.user.DefaultContactProvider</type>    
  </component>
  
  
  <!-- FAQ plugins -->
  <external-component-plugins>
    <target-component>org.exoplatform.faq.service.FAQService</target-component>   
    <component-plugin>
      <name>add.role.rules.plugin</name>
      <set-method>addRolePlugin</set-method>
      <type>org.exoplatform.ks.common.conf.RoleRulesPlugin</type>
      <description>add role rules</description>
      <init-params>
        <value-param>
          <name>role</name>
          <description>name of the role</description>
          <value>ADMIN</value>
        </value-param>        
        <values-param>
          <name>rules</name>
          <description>rules of the role</description>
          <value>root</value>
          <value>admin</value>
          <!--value>member:/demo</value-->
          <!--value>/platform/administrators</value-->
          <!--value>manager:/platform/users</value-->
          <!--value>*:/somegroup/somesubgroup</value-->
          <!--value>manager:/somegroup/someothergroup</value-->
        </values-param>
      </init-params>
    </component-plugin>

    <component-plugin>
      <name>technical-faq</name>
      <set-method>addInitialDataPlugin</set-method>
      <type>org.exoplatform.faq.service.InitialDataPlugin</type>
      <description>Initialize</description>
      <init-params>
        <value-param>
          <name>location</name>
          <description>location where FAQ export format file is stored</description>
          <value>war:/data/Technical-FAQ.zip</value>
        </value-param>
      </init-params>
    </component-plugin> 

    <component-plugin>
      <name>general-questions</name>
      <set-method>addInitialDataPlugin</set-method>
      <type>org.exoplatform.faq.service.InitialDataPlugin</type>
      <description>Initialize</description>
      <init-params>
        <value-param>
          <name>location</name>
          <description>location where FAQ export format file is stored</description>
          <value>war:/data/General-Questions.zip</value>
        </value-param>
      </init-params>
    </component-plugin>    
      
  </external-component-plugins>
     
<!-- Forum plugins -->
  <external-component-plugins>
    <target-component>org.exoplatform.forum.service.ForumService</target-component>   
    
    <component-plugin>
      <name>add.role.rules.plugin</name>
      <set-method>addRolePlugin</set-method>
      <type>org.exoplatform.ks.common.conf.RoleRulesPlugin</type>
      <description>add role rules</description>
      <init-params>
        <value-param>
          <name>role</name>
          <description>name of the role</description>
          <value>ADMIN</value>
        </value-param>
        <values-param>
          <name>rules</name>
          <description>rules of the role</description>
          <value>root</value>
          <value>admin</value>
          <value>member:/demo</value>
          <value>/forums/admin</value>
          <value>*:/forum/admin</value> 
          <!--value>/platform/administrators</value-->
          <!--value>manager:/platform/users</value-->
          <!--value>*:/somegroup/somesubgroup</value-->
          <!--value>manager:/somegroup/someothergroup</value-->
        </values-param>
      </init-params>
    </component-plugin>
    
    <component-plugin>
      <name>technical.forum</name>
      <set-method>addInitialDataPlugin</set-method>
      <type>org.exoplatform.forum.service.conf.ForumInitialDataPlugin</type>
      <description>Initialize</description>
      <init-params>
        <values-param>
          <name>locations</name>
          <description>location where Forum export format file is stored</description>
          <!-- value>war:/data/forum/data-full-forum.zip</value -->
          <!-- value>war:/data/forum/forumCategory.xml</value -->
        </values-param>
      </init-params>
    </component-plugin> 
    
    <component-plugin>
      <name>default.data</name>
      <set-method>addInitialDefaultDataPlugin</set-method>
      <type>org.exoplatform.forum.service.InitializeForumPlugin</type>
      <description>description</description>
      <init-params>
        <object-param>
          <name>livedemo.default.configuration</name>
          <description>initial data for live demo</description>
          <object type="org.exoplatform.forum.service.conf.ForumInitialData">
            <field name="categories">
              <collection type="java.util.ArrayList">
                <value>
                  <object type="org.exoplatform.forum.service.conf.CategoryData">
                    <field name="owner">
                      <string>root</string>
                    </field>
                    <field name="name">
                      <string>Knowledge Suite</string>
                    </field>
                    <field name="description">
                      <string>All about eXo KS</string>
                    </field>
                    <field name="forums">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.forum.service.conf.ForumData">
                            <field name="owner"><string>root</string></field>
                            <field name="name"><string>Live demo</string></field>
                            <field name="description"><string>Questions about this demo</string></field>
                            <field name="topics">
                              <collection type="java.util.ArrayList">
                                <value>
                                  <object type="org.exoplatform.forum.service.conf.TopicData">
                                    <field name="name"><string>Demo data policy</string></field>
                                    <field name="icon"><string>Shield</string></field>
                                    <field name="owner"><string>root</string></field>
                                    <field name="content"><string>
                                    Welcome to eXo Knowledge Suite live demo!\n\n\n 

                                    We hope you enjoy discovering eXo Forum and FAQ applications features. 
                                    You don't need to be logged in to see the applications in action. But the power of KS lies in the rich set of admin/moderation features.\n\n
                                    We didn't want you to miss them so, when you [b][url="/portal/public/classic/register"]create a demo account[/url][/b], you will be granted full permissions.
                                    Anybody can become an administrator or a moderator and play in the sandbox!\n
                                    As a consequence, the data for this forum (including the accounts) is not meant to stay.\n\n
                                    [b][center]WE MAY RESET FORUMS AND FAQS ANYTIME[/center][/b]\n\n
                                    Enjoy and don't forget to send feedback at [email]ks@exoplatform.com[/email]</string></field>
                                  </object>
                                </value>
                              </collection>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>  

  <!-- Poll plugins -->
  <external-component-plugins>
    <target-component>org.exoplatform.poll.service.PollService</target-component>   
    <component-plugin>
      <name>default.data</name>
      <set-method>addInitialDefaultDataPlugin</set-method>
      <type>org.exoplatform.poll.service.InitialDefaultDataPlugin</type>
      <description>Initialize</description>
      <init-params>
        <object-param>
          <name>livedemo.default.configuration</name>
          <description>initial data for live demo</description>
          <object type="org.exoplatform.poll.service.PollInitialData">
            <field name="pollDatas">
              <collection type="java.util.ArrayList">
                <value>
                  <object type="org.exoplatform.poll.service.PollData">
                    <field name="parentPath">
                      <string>ksdemo/Polls</string>
                    </field>
                    <field name="owner">
                      <string>root</string>
                    </field>
                    <field name="question">
                      <string>What color do you like ?</string>
                    </field>
                    <field name="timeOut">
                      <string>0</string>
                    </field>
                    <field name="isMultiCheck">
                      <string>false</string>
                    </field>
                    <field name="isAgainVote">
                      <string>false</string>
                    </field>
                    <field name="isClosed">
                      <string>false</string>
                    </field>
                     <field name="options">
	                    <collection type="java.util.ArrayList">
	                    	<value><string>Green</string></value>
	                    	<value><string>Blue</string></value>
	                    	<value><string>Red</string></value>
	                    	<value><string>Yellow</string></value>
	                    	<value><string>Orange</string></value>
	                    	<value><string>Purple</string></value>
	                    </collection>
                    </field>
                   </object>
                 </value>
               </collection>
             </field>
           </object>
         </object-param>
      </init-params>
    </component-plugin>    
      
  </external-component-plugins>
  
  <external-component-plugins>
    <target-component>org.exoplatform.services.jcr.RepositoryService</target-component>      
    <component-plugin> 
      <name>add.ks.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>war:/conf/ksdemo/ks/upgrade-nodetypes.xml</value>
        </values-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
</configuration>  