Key Data type Description
org.exoplatform.ks.common. jcr.KSDataLocation org.exoplatform.ks.common. jcr.KSDataLocation Hold the JCR storage location for eXo Knowledge data.
org.exoplatform.services. scheduler.JobSchedulerService org.exoplatform.services.scheduler. impl.JobSchedulerServiceImpl Define a job to execute a given number of times during a given period. It is used to monitor jobs automatically and continously, to schedule event-driven jobs and reports, and to control performance.
Name Possible value Default value
repository string repository
workspace string knowledge
Key Data type Description
org.exoplatform.ks.bbcode. api.BBCodeService org.exoplatform.ks.bbcode. core.BBCodeServiceImpl Manage CRUD operations on BBCodes.
org.exoplatform.forum. service.DataStorage org.exoplatform.forum.service. impl.JCRDataStorage Store data of Forum via the JCR system.
org.exoplatform.forum. service.ForumService org.exoplatform.forum.service. impl.ForumServiceImpl Include all public APIs to interact with the UI component and database.
org.exoplatform.forum.service. ForumStatisticsService org.exoplatform.forum.service. impl.ForumStatisticsServiceImpl Include all public APIs to interact with the database of Statistics system.
Key Data type Description
org.exoplatform.faq. service.FAQService org.exoplatform.faq.service. impl.FAQServiceImpl Include all public APIs to interact with the UI component and database.
org.exoplatform.faq. service.DataStorage org.exoplatform.faq.service. impl.JCRDataStorage Store data of FAQ via the JCR system.
Key Data type Description
org.exoplatform.poll. service.DataStorage org.exoplatform.poll.service. impl.JCRDataStorage Include all public APIs to interact with the UI component and database.
org.exoplatform.poll. service.PollService org.exoplatform.poll.service. impl.PollServiceImpl Store data of Polls via the JCR system.

When the server starts, the jcr-configuration.xml file is initialized. The component-plugin named addConfig will be referred to org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationPlugin to load the war:/ks-extension/jcr/repository-configuration.xml_ file.

Name Set-method Type Description
RepositoryService ConfigurationPlugin addConfigorg.exoplatform.services. jcr.impl.config.Repository ServiceConfigurationPlugin Read the configuration of JCR data to initialize data.
Name Possible value Default value Description
conf-path string war:/ks-extension/jcr/ repository- configuration.xml The path to the repository-configuration.xml file.

Once the workspace name and repository name are registered, the server will load org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator and the addPaths function in org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin is called. Then, the data location will be built.



<component-plugin>
  <name>addPaths</name>
  <set-method>addPlugin</set-method>
  <type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
  <init-params>
    <object-param>
      <name>ks.storage</name>
      <description>ks data storage tree</description>
      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
        <field name="repository">
          <string>repository</string>
        </field>
        <field name="workspaces">
          <collection type="java.util.ArrayList">
            <value>
              <string>knowledge</string>
            </value>
          </collection>
        </field>
        <field name="jcrPaths">
          <collection type="java.util.ArrayList">
            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>eXoApplications</string>
                </field>
                <field name="path">
                  <string>/exo:applications</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>ksUserAvatar</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ksUserAvatar</string>
                </field>
                <field name="nodeType">
                  <string>nt:unstructured</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>ForumService</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService</string>
                </field>
                <field name="nodeType">
                  <string>exo:forumHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>ForumSystem</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem</string>
                </field>
                <field name="nodeType">
                  <string>exo:forumSystem</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>UserProfileHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/UserProfileHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:userProfileHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>StatisticHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/StatisticHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:statisticHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>forumStatistic</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/StatisticHome/forumStatistic</string>
                </field>
                <field name="nodeType">
                  <string>exo:forumStatistic</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>AdministrationHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/AdministrationHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:administrationHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>BanIPHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/BanIPHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:banIPHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>forumBanIP</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumSystem/BanIPHome/forumBanIP</string>
                </field>
                <field name="nodeType">
                  <string>exo:banIP</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>ForumData</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumData</string>
                </field>
                <field name="nodeType">
                  <string>exo:forumData</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>TopicTypeHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumData/TopicTypeHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:topicTypeHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>CategoryHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumData/CategoryHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:categoryHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>TagHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumData/TagHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:tagHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>forumBBCode</string>
                </field>
                <field name="path">
                  <string>/exo:applications/ForumService/ForumData/forumBBCode</string>
                </field>
                <field name="nodeType">
                  <string>exo:forumBBCodeHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>faqApp</string>
                </field>
                <field name="path">
                  <string>/exo:applications/faqApp</string>
                </field>
                <field name="nodeType">
                  <string>exo:faqHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>settingHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/faqApp/settingHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:faqSettingHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>userSettingHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/faqApp/settingHome/userSettingHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:faqUserSettingHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>categories</string>
                </field>
                <field name="path">
                  <string>/exo:applications/faqApp/categories</string>
                </field>
                <field name="nodeType">
                  <string>exo:faqCategory</string>
                </field>
                <field name="mixinTypes">
                  <collection type="java.util.ArrayList">
                    <value>
                      <string>mix:faqSubCategory</string>
                    </value>
                  </collection>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>templateHome</string>
                </field>
                <field name="path">
                  <string>/exo:applications/faqApp/templateHome</string>
                </field>
                <field name="nodeType">
                  <string>exo:templateHome</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>eXoPolls</string>
                </field>
                <field name="path">
                  <string>/exo:applications/eXoPolls</string>
                </field>
                <field name="nodeType">
                  <string>nt:unstructured</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

            <value>
              <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
                <field name="alias">
                  <string>groupsPath</string>
                </field>
                <field name="path">
                  <string>/Groups</string>
                </field>
                <field name="permissions">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>*:/platform/administrators</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>true</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>true</string>
                        </field>
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
                        <field name="identity">
                          <string>any</string>
                        </field>
                        <field name="read">
                          <string>true</string>
                        </field>
                        <field name="addNode">
                          <string>false</string>
                        </field>
                        <field name="setProperty">
                          <string>true</string>
                        </field>
                        <field name="remove">
                          <string>false</string>
                        </field>
                      </object>
                    </value>
                  </collection>
                </field>
              </object>
            </value>

          </collection>
        </field>
      </object>
    </object-param>
  </init-params>
</component-plugin>

The plug-in is configured in the roles-configuration.xml file.

When the user signs in, his or her username, group and membership will be compared with the user roles defined in the .xml file that is provided by the roles plug-in component.

In particular, at runtime of ForumService, the roles plug-in component is called. The role plug-in is configured in the roles-configuration.xml file. The plug-in component named add.role.rules.plugin will be referred to org.exoplatform.ks.common.conf.RoleRulesPlugin to create users for Forum corresponding to users who exist in the organization database. In addition, the list of users who have administration roles are also defined.

In which:

Name Set-method Type Description
add.role.rules.plugin addRolePlugin org.exoplatform.ks. common.conf. RoleRulesPlugin Add role rules.
Name Possible value Default value Description
role string ADMIN The name of role.
rules string root The rules of role.

For example:

In the example above, the default administrators of Forum include root, john, users in /platform/administrators group and users who have member/validator memberships in the VIP group.

When being root, the users who belong to the /platform/administrators group or who have member/validator memberships in the VIP group and sign in the Forum, they will be identified as the default administrator of Forum.

To add or remove the default administrator of the Forum, simply edit the roles-configuration.xml file, add or remove the relevant "value" tags.

The default administrators of the Forum can only change their roles by editing in the roles-configuration.xml file.

At runtime, modifications in the roles-configuration.xml file will be read and database will be updated. Normal users of the Forum and default administration will be created correspondingly.

You can get the ContactProvider as follows:

In eXo Knowlege, when using ContactProvider, you can use one of two following classes:

When you start the Tomcat, the DefaultContactProvider class will be initialized and the OrganizationService component is set within the DefaultContactProvider component.

The DefaultContactProvider class allows you to get user information via the OrganizationService component.

Name Type Description
email String Email of user.
firstName String First name of user.
lastName String Last name of user.
Attribute Type Description
user.other-info.avatar.url String The path containing the user's avatar.
user.bdate String The user's birthday.
user.home-info.postal.city String The home city of user.
user.home-info.postal.country String The home country of user.
user.gender String The user's gender.
user.jobtitle String The user's job.
user.home-info.telecom. mobile.number String The home phone number of user.
user.business-info.telecom. telephone.number String The mobile number of user.
user.home-info.online.uri String The individual websites of user.

The SocailContactProvider class gets users' profiles by userId via the IdentityManager class.



public CommonContact getCommonContact(String userId) {
  CommonContact contact = new CommonContact();
  try {
    IdentityManager identityM = (IdentityManager) PortalContainer.getInstance().getComponentInstanceOfType(IdentityManager.class);
    Identity userIdentity = identityM.getIdentity(OrganizationIdentityProvider.NAME, userId, true);
    Profile profile = userIdentity.getProfile();
    if (profile.contains(Profile.EMAIL)) {
      contact.setEmailAddress(profile.getProperty(Profile.EMAIL).toString());
    }
    if (profile.contains(Profile.FIRST_NAME)) {
      contact.setFirstName(profile.getProperty(Profile.FIRST_NAME).toString());
    }
    if (profile.contains(Profile.LAST_NAME)) {
      contact.setLastName(profile.getProperty(Profile.LAST_NAME).toString());
    }
    contact.setAvatarUrl(profile.getAvatarImageSource());
    if (profile.contains(Profile.GENDER)) {
      contact.setGender(profile.getProperty(Profile.GENDER).toString());
    }
    if (profile.contains(Profile.CONTACT_PHONES)) {
      contact.setPhone(profile.getProperty(Profile.CONTACT_PHONES).toString());
    }
    if (profile.contains(Profile.URL)) {
      contact.setWebSite(profile.getProperty(Profile.URL).toString());
    }
  } catch (Exception e) {
    if (LOG.isErrorEnabled()) LOG.error(String.format("can not load contact from eXo Social Profile with user [%s]", userId), e);
  }
  return contact;
}

The default BBCode data is configured in the bbcodes-configuration.xml file.

In particular, at runtime of BBCode Service, the BBCode plug-in component is called. Then, the bbcodes-configuration.xml file will be executed, and the component-plugin named registerBBCodePlugin will be referred to org.exoplatform.ks.bbcode.spi.BBCodePlugin to execute some objects that will generate default data.



<component-plugin>
  <name>forum.default.bbcodes</name>
  <set-method>registerBBCodePlugin</set-method>
  <type>org.exoplatform.ks.bbcode.spi.BBCodePlugin</type>
  <description>default supported BBCodes</description>
  <init-params>
    <object-param>
      <name>I</name>
      <description>set text in italic</description>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>I</string>
        </field>
        <field name="replacement">
          <string>&lt;i&gt;{param}&lt;/i&gt;</string>
        </field>
        <field name="description">
          <string>Set text in italic</string>
        </field>
        <field name="example">
          <string>[I]This text is italic[/I]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object> 
    </object-param>

    <object-param>
      <name>B</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>B</string>
        </field>
        <field name="replacement">
          <string>&lt;b&gt;{param}&lt;/b&gt;</string>
        </field>
        <field name="description">
          <string>Set text in bold</string>
        </field>
        <field name="example">
          <string>[B]This text is bold[/B]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>U</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>U</string>
        </field>
        <field name="replacement">
          <string>&lt;u&gt;{param}&lt;/u&gt;</string>
        </field>
        <field name="description">
          <string>Set text in underline</string>
        </field>
        <field name="example">
          <string>[U]This text is underline[/U]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>COLOR</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>COLOR</string>
        </field>
        <field name="replacement">
          <string>&lt;font color="{option}"&gt;{param}&lt;/font&gt;</string>
        </field>
        <field name="description">
          <string>The [color=option] tag allows you to change the color of your text.</string>
        </field>
        <field name="example">
          <string>[COLOR=blue]This text is blue[/COLOR]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>SIZE</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>SIZE</string>
        </field>
        <field name="replacement">
          <string>&lt;font size="{option}"&gt;{param}&lt;/font&gt;</string>
        </field>
        <field name="description">
          <string>The [size=option] tag allows you to change the size of your text.</string>
        </field>
        <field name="example">
          <string>[size=+2]this text is two sizes larger than normal[/size]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>FONT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>FONT</string>
        </field>
        <field name="replacement">
          <string>&lt;font face="{option}"&gt;{param}&lt;/font&gt;</string>
        </field>
        <field name="description">
          <string>The [font=option] tag allows you to change the font of your text.</string>
        </field>
        <field name="example">
          <string>[font=courier]this text is in the courier font[/font]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>HIGHLIGHT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>HIGHLIGHT</string>
        </field>
        <field name="replacement">
          <string>&lt;span style="font-weight: bold; color: blue;"&gt;{param}&lt;/span&gt;</string>
        </field>
        <field name="description">
          <string>The [highlight] tag allows you to make highlight of your text.</string>
        </field>
        <field name="example">
          <string>[highlight]this text is highlighted[/highlight]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>LEFT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>LEFT</string>
        </field>
        <field name="replacement">
          <string>&lt;div align="left"&gt;{param}&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [left] tag allows aligntment text to left. </string>
        </field>
        <field name="example">
          <string>[LEFT]This text is left-aligned[/LEFT]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>RIGHT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>RIGHT</string>
        </field>
        <field name="replacement">
          <string>&lt;div align="right"&gt;{param}&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [right] tag allows aligntment text to right.</string>
        </field>
        <field name="example">
          <string>[RIGHT]example[/RIGHT]</string>
        </field>
        <field name="isOption">
          <string>[RIGHT]this text is right-aligned[/RIGHT]</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>CENTER</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>CENTER</string>
        </field>
        <field name="replacement">
          <string>&lt;div align="center"&gt;{param}&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [center] allows aligntment text to center.</string>
        </field>
        <field name="example">
          <string>[CENTER]this text is center-aligned[/CENTER]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>JUSTIFY</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>JUSTIFY</string>
        </field>
        <field name="replacement">
          <string>&lt;div align="justify"&gt;{param}&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [justify] tag allows aligntment text to justify.</string>
        </field>
        <field name="example">
          <string>[JUSTIFY]this text is justify-aligned[/JUSTIFY]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>EMAIL</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>EMAIL</string>
        </field>
        <field name="replacement">
          <string>&lt;a href="mailto:{param}"&gt;{param}&lt;/a&gt;</string>
        </field>
        <field name="description">
          <string>The [email] tag allows you to link to an email address.</string>
        </field>
        <field name="example">
          <string>[email]demo@example.com[/email]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>EMAIL-OPT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>EMAIL</string>
        </field>
        <field name="replacement">
          <string>&lt;a href="mailto:{option}"&gt;{param}&lt;/a&gt;</string>
        </field>
        <field name="description">
          <string>The [email=option] tag allows link to an email address and use an optional parameter to 'name' of this link.</string>
        </field>
        <field name="example">
          <string>[email=demo@example.com]Click Here to Email me[/email] </string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>URL</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>URL</string>
        </field>
        <field name="replacement">
          <string>&lt;a target='_blank' href="{param}"&gt;{param}&lt;/a&gt;</string>
        </field>
        <field name="description">
          <string>The [url] tag allows link to other websites and files.</string>
        </field>
        <field name="example">
          <string>[URL]http://www.exoplatform.com[/URL]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>URL-OPT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>URL</string>
        </field>
        <field name="replacement">
          <string>&lt;a target='_blank' href="{option}"&gt;{param}&lt;/a&gt;</string>
        </field>
        <field name="description">
          <string>The [url=option] tag allows link to other websites and files and usean optional parameter to 'name' of thislink.</string>
        </field>
        <field name="example">
          <string>[URL=http://www.exoplatform.com]Click goto exoplatform website.[/URL]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>GOTO</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>GOTO</string>
        </field>
        <field name="replacement">
          <string>&lt;a href="{option}"&gt;{param}&lt;/a&gt;</string>
        </field>
        <field name="description">
          <string>Allows goto directly to link instead of open a new window or a new tab. </string>
        </field>
        <field name="example">
          <string>[goto=http://www.exoplatform.com]Goto this link.[/goto]&gt;</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>LIST</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>LIST</string>
        </field>
        <field name="replacement">
          <string>You can not define this bbcode tag. It is defined by the developer.</string>
        </field>
        <field name="description">
          <string>The [list] tag allows create simple, each bullet is denoted by the [*] tag.</string>
        </field>
        <field name="example">
          <string>[list][*]list item 1[*]list item 2[/list]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>LIST-OPT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>LIST</string>
        </field>
        <field name="replacement">
          <string>You can not define this bbcode tag. It is defined by the developer.</string>
        </field>
        <field name="description">
          <string>The [list=option] tag allows create bulleted lists specifying an option. Within the value portion, each bullet is denoted by the [*] tag.</string>
        </field>
        <field name="example">
          <string>[list=1][*]list item 1[*]list item 2[/list]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>IMG</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>IMG</string>
        </field>
        <field name="replacement">
          <string>&lt;img border="0" alt="" src="{param}" class="inlineimg"/&gt;</string>
        </field>
        <field name="description">
          <string>The [img] tag allows you to shows the image indicated by {url}</string>
        </field>
        <field name="example">
          <string>[url=http://www.google.com.vn] [img]http://groups.google.com.vn/groups/img/3nb/groups_medium_vi.gif[/img] [/url]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>QUOTE</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>QUOTE</string>
        </field>
        <field name="replacement">
          <string>&lt;div style="background:#ededf7; border:1px solid #d8d8d8; padding:6px 6px 6px 15px; margin:2px 0px;"&gt;{param}&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [quote] tag allows attribute content of post.</string>
        </field>
        <field name="example">
          <string>[quote]Lorem ipsum dolor sit amet[/quote]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>QUOTE-OPT</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>QUOTE</string>
        </field>
        <field name="replacement">
          <string>&lt;div style="background:#ededf7; border:1px solid #d8d8d8; padding:6px 6px 6px 15px; margin:2px 0px;"&gt;&lt;div&gt;Originally Posted by &lt;strong&gt;{option}&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;{param}&lt;/div&gt;&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [quote=option] tag allows attibute content and user name of poster.</string>
        </field>
        <field name="example">
          <string>[quote=John Doe]Lorem ipsum dolor sit amet[/quote]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>CODE</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>CODE</string>
        </field>
        <field name="replacement">
          <string>&lt;div style="background:#ededed; border:1px inset #7b7b7b; margin:5px; overflow:auto;"&gt;&lt;pre style="margin: 0px; padding: 0px; overflow: auto; text-align: left;" dir="ltr"&gt;&lt;div&gt;{param}&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;</string>
        </field>
        <field name="description">
          <string>The [code] tag allows you to view source code html.</string>
        </field>
        <field name="example">
          <string>[code]&lt;div&gt;some text or code html&lt;/div&gt;[/code]</string>
        </field>
        <field name="isOption">
          <string>false</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>CSS</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>CSS</string>
        </field>
        <field name="replacement">
          <string>&lt;span class="{option}"&gt;{param}&lt;/span&gt;</string>
        </field>
        <field name="description">
          <string>The [css=option] tag allows you to add div tag and set class Name for this it.</string>
        </field>
        <field name="example">
          <string>[css=highlight]Text is highlight[/css]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>

    <object-param>
      <name>SLIDESHARE</name>
      <description/>
      <object type="org.exoplatform.ks.bbcode.spi.BBCodeData">
        <field name="tagName">
          <string>SLIDESHARE</string>
        </field>
        <field name="replacement">
          <string>
          &lt;div style="width:425px; height:355px;" align="center"&gt;
          &lt;object style="margin:0px" width="425" height="355"&gt;
            &lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc={option}&amp;rel=0"/&gt;
            &lt;param name="allowFullScreen" value="true"/&gt;
            &lt;param name="allowScriptAccess" value="always"/&gt;
            &lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc={option}&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;
            &lt;/embed&gt;
          &lt;/object&gt;
          &lt;b&gt;{param}&lt;/b&gt;&lt;/div&gt;
          </string>
        </field>
        <field name="description">
          <string>The [SLIDESHARE=option] tag allows you to run slide in slidesharecdn.com site.</string>
        </field>
        <field name="example">
          <string>[SLIDESHARE=slideId]My slide[/SLIDESHARE]</string>
        </field>
        <field name="isOption">
          <string>true</string>
        </field>
        <field name="isActive">
          <string>true</string>
        </field>
      </object>
    </object-param>
  </init-params>
</component-plugin>
Name Set method Type Description
forum.default.bbcodes registerBBCodePlugin org.exoplatform.ks.bbcode. spi.BBCodePlugin Define formats for data displayed on UI.

In which:

Field name Value Description
tagName string The text for the BBCode, which is put between two square brackets ([ ]). For example, for the bold tag, if you type [b], the BBCode tag will be b without any square brackets ([ ]).
replacement string The HTML code that replaces the BBCode entered by the user. Make sure that you include '{param}' (without quotes) to insert the text between opening and closing BBCode tags, and '{option}' for the parameter within the BBCode tag. You can only use option if 'Use Option' is selected.
description string The piece of text to describe the BBCode tag, including HTML tags if you want.
example string The sample piece of BBCode to use as an example for the particular BBCode. For example, to demonstrate the usage of [b] tag, enter [b]text[/b].
isOption true, false Select the [tag=option] [/tag] style tag, rather than just a [tag][/tag]style tag. This function will be created if you select this option.
isActive true, false Activate the BBCode tag.

The default forum data is configured in the war:webapp/WEB-INF/conf/ksdemo/ks/services-configuration.xml file.

In particular, when the ForumService starts, the Initialization plug-in component is called. Next, the services-configuration.xml file is executed. The component-plugin named addInitialDefaultDataPlugin will refer to org.exoplatform.forum.service.conf.InitializeForumPlugin to execute some objects to create default data for the Forum application.



<component-plugin>
  <name>default.data</name>
  <set-method>addInitialDefaultDataPlugin</set-method>
  <type>org.exoplatform.forum.service.conf.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!
                                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.
                                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!
                                As a consequence, the data for this forum (including the accounts) is not meant to stay.
                                [b][center]WE MAY RESET FORUMS AND FAQS ANYTIME[/center][/b]
                                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>
Name Set-method Type Description
default.data addInitialDataPlugin org.exoplatform.forum. service.conf. InitializeForumPlugin The initial default data of Forum.
Name Possible value Default value Description
livedemo.default. configuration object org.exoplatform.forum. service.conf. ForumInitialData The initial data for live demo.

After the org.exoplatform.forum.service.conf.InitializeForumPlugin object has been executed, the org.exoplatform.forum.service.conf.ForumInitialData object will be called. It returns a category array. The value of category array is defined by the org.exoplatform.forum.service.conf.CategoryData object as below:

In which:

Field Possible value Default value Description
owner user id root The creator of Category.
name string Knowledge Suite The title of Category.
description string All about eXo KS The brief description of Category.

Values of the default Category can be changed by editing text values in the string tag of each field by the other one. In the sample code above, the org.exoplatform.forum.service.conf.CategoryData object is called. It means that only one default Category is defined. If you want to define more default Categories, repeat calling the org.exoplatform.forum.service.conf.CategoryData object and define values for the new Category with the sample code as below:

Category may contain one or more Forums. The value of the Forum is defined in the forums field. It returns a forum array. The value of forum array is defined by the org.exoplatform.forum.service.conf.ForumData object as below:

Forum includes some basic data which are defined in the field tag with the specific name as above.

In which:

Field Possible value Default value Description
owner user id root The creator of default Forum.
name string Live demo The name or title of default Forum.
description string Questions about this demo The brief description of default Forum.

The default Forum values can be changed by editing text values in the string tag of each field by the other one.

In the sample code above, the org.exoplatform.forum.service.conf.ForumData object is called only one time. It means that only one default Forum is defined inside the default Category named Knowledge Suite. If you want to define more default Forums, repeat calling the org.exoplatform.forum.service.conf.ForumData object and define values for the new Forum with the sample code as below:

A topic includes some basic data which are defined in the field tag with a specific name as above.

In which:

Field Possible value Default value Description
name string Demo data policy The name or title of default topic.
icon string Tux The default icon of default topic.
owner user id root The creator of default topic.
content string Welcome to eXo Forum live demo...at anytime. The main content of default topic.

The values of default topic can be changed by editing text values in the string tag of each field.

With the sample code above, the org.exoplatform.forum.service.conf.TopicData object is called only one time. It means that only one default topic is defined inside the default Forum named Live demo. If you want to define more default topics, repeat calling the org.exoplatform.forum.service.conf.TopicData object and define values for the new topic with the sample code as below:

A post includes some basic data which are defined in the field tag with a specific name as above.

In which:

Field Possible value Default value Description
name string Reply: Demo data policy The name or title of default post.
icon string IconsView The default icon of default post.
ownwer user id root The creator of default post.
content string Enjoy and don't forget to send feedback at ks@exoplatform.com The main content of default post.

The default post values can be changed by editing text values in the string tag of each field.

With the sample code above, the org.exoplatform.forum.service.conf.PostData object is called only one time. It means that only one default post is defined inside the default topic named Demo data policy. If you want to define more default posts, repeat calling the org.exoplatform.forum.service.conf.PostData object and define values for the new post with the sample code as below:

By default, the default Forum data can only be changed by modifying the services-configuration.xml file.

At runtime, the new changes in the services-configuration.xml file will be executed and updated. The default Forum data will be created correspondingly.

The properties of Auto-prune plug-in are configured in the war:webapp/WEB-INF/ks-extension/ks/forum/prune-configuration.xml file.

In particular, at runtime of Job Scheduler, the Auto-prune plugin component is called. Then, the prune-configuration.xml file will be executed. The component-plugin named ForumDeactiveJob will refer to org.exoplatform.forum.service.conf.DeactivePeriodJob to inactivate topics in Forum which meets predefined inactivation properties.

Name Set-method Type Description
ForumDeactiveJob addPeriodJob org.exoplatform.forum. service.conf. DeactivePeriodJob Add a DeactiveJob to the JobSchedulerService.

In details:

Property name Possible value Default value Description
jobname String DeactiveJob The name of job which will be executed.
groupname String KnowlegedSuite The name of application which will be executed.
job Class path org.exoplatform.forum. service.conf.DeactiveJob The reference function of the job which will be executed.
repeatCount Long 0 The repeating time for the job, meaning that how many times the job will be executed. The 0 value means that DecactiveJob is called at runtime only without repeating. If the value is set to 2 or 3, DecactiveJob will be called two or three times correspondingly.
period Long 72000000 The interval between job executions.
starttime Integer +0 The start time when the function executes. The starttime is 0, meaning that the time to start executing DecactiveJob is the runtime.
endtime Integer null The end time when the function stops executing. The endtime is blank, meaning that there is no limitation for the end time for DecactiveJob.

With start and end time, you can give a specific date in the format: yyyy-mm-dd HH:mm:ss.sss to define the start and end time for DecactiveJob. Besides, inactive information is also defined:

Property name Possible value Default value Description
inactiveDays Integer 15 The number of days the topic has not been activated. The inactivateDays is set to 1, meaning that all the topics, which have one inactivated day, will be set as inactivated status. They will be invisible.
forumname String Live Demo The name of Forum which will be checked for Auto-prune. In case the value of forumname is blank, all forums will be checked for the Auto-prune. If the forumname is Live demo, only the Forum named 'Live demo' is checked for the Auto-prune.

By default, the default properties can only be changed by editing its value in the prune-configuration.xml file.

At runtime, the new changes in the prune-configuration.xml file are executed and updated. After that, the Auto-prune plug-in will be executed, depending on its properties.

The properties of Auto-count Active Users plug-in is configured in the war:webapp/WEB-INF/ks-extension/ks/forum/statistics-configuration.xml file.

In details, at runtime of Job Scheduler, the Auto-count Active Users plug-in component is called. Then, the statistics-configuration.xml file is executed. The component-plugin named RecountActiveUserJob will refer to org.exoplatform.forum.service.conf.RecountActiveUserPeriodJob to calculate the number of active users.

Name Method Type Description
RecountActiveUserJob addPeriodJob org.exoplatform.forum. service.conf. RecountActiveUserPeriodJob Add a RecountActiveUser job to the JobSchedulerService.

In which:

Property name Possible value Default value Description
jobname String RecountActiveUserJob The name of job which will be executed.
groupname String KnowlegedSuite The name of application which will be executed.
job Class path org.exoplatform.forum. service.conf. RecountActiveUserJob The reference function of job which will be executed.
repeatCount Long 0 The number of times the job is repeated. If repeatCount is set to 0, RecountActiveUserJob is called at runtime only without repeating. If the number is set to 2 or 3, RecountActiveUserJob will be called two or three times.
period Long 7200000 (millisecond) (equal to two hours) The interval time to execute the job.
starttime Integer 0 The start time when the function executes. The starttime is 0, meaning that the time to start executing RecountActiveUserJob is the runtime.
endtime Integer null The end time when the function stops executing. The endtime is blank, meaning that there is no limitation for the end time for RecountActiveUserJob.

With start and end time, you can give a specific date in the format: yyyy-mm-dd HH:mm:ss.sss to define the start and end time for RecountActiveUserJob. The information of active time is also defined:

Property name Possible value Default value Description
lastPost Integer 15 The number of days that the user has added the last post. lastPost is 15, meaning that all users, who have any new posts within 15 days as from their last post date, are active members.

By default, the default properties can only be changed by editing its values in the statistics-configuration.xml file.

At runtime, the new changes in the statistics-configuration.xml file will be executed and updated. The Auto-count Active Users plug-in will be executed, depending on its properties.

The properties of Forum's UpdateDataJob is configured in /WEB-INF/ks-extension/ks/forum/statistics-configuration.xml which is located in ks-extension webapp.

In which:

Name Method Type Description
UpdateDataJob addPeriodJob org.exoplatform.services.scheduler.PeriodJob Add a UpdateDataJob to the JobSchedulerService.
Property name Possible value Default value Description
jobname String UpdateDataJob The name of job which will be executed.
groupname String KnowledgeSuite-forum The name of application which will be executed.
job Class path org.exoplatform.forum.service.conf.UpdateDataJob The reference function of job which will be executed.
repeatCount Long 1 The number of times the job is repeated. If repeatCount is set to 1, RecountActiveUserJob is called at runtime only without repeating. If the number is set to 2 or 3, RecountActiveUserJob will be called two or three times.
period Long 30000 (millisecond) (equal to two hours) The interval time to execute the job.
starttime Integer 0 The start time when the function executes. The starttime is 0, meaning that the time to start executing RecountActiveUserJob is the runtime.
endtime Integer null The end time when the function stops executing. The endtime is blank, meaning that there is no limitation for the end time for UpdateDataJob.

With start and end time, you can give a specific date in the format: yyyy-mm-dd HH:mm:ss.sss to define the start and end time for UpdateDataJob.

This configuration is declared in the file named ks-configuration.xml. Its path is "[tomcat source]/webapps/ks-extension/WEB-INF/ks-extension/ks/ks-configuration.xml" if you are running the tomcat and "[project source]/extension/webapp/src/main/webapp/WEB-INF/ks-extension/ks/ks-configuration.xml" if you are in the development phrase.

In which:

Parameter Possible value Default value Description
timeZone Time zone id GMT The time zone set by user. For example: GMT, GMT-05:00, GMT+07:00, GMT+08:30 ... Visit the website: http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html for more details.
shortDateFormat Valid Java Date format MM/dd/yyyy The format to display short information of date. Visit the website: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the exact format.)
longDateFormat Valid Java Date format DDD,MMM dd,yyyy The format to display a date with more information. Visit the website http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the exact format.
timeFormat valid Java Date format hh:mm a The format to view time (for example, hour, minute,). Visit the website: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the exact format.
maxTopic Integer 10 The maximum number of topics per page.
maxPost Integer 10 The maximum number of posts per page.
isShowForumJump true / false true Show the forum jump or not.

The default Answers data is configured in the services-configuration.xml file.

In details, at runtime of Answers Service, the Initialization plug-in component is called, the services-configuration.xml file will be executed. The component-plugin named addInitialDataPlugin will refer to org.exoplatform.faq.service.InitializeDataPlugin to execute some objects to create default data.

The default data in the .zip file is initialized as follows:

Name Set-Method Type Description
technical-faq addInitialDataPlugin org.exoplatform.faq.service. InitialDataPlugin Initialize the data plugin.
Name Possible value Default value Description
location string war:/data/ Technical-FAQ.zip The location where the Answers export format file is stored.

If the default data is in the XML format:

By default, the default Answers data can only import if the importing categories do not exist in database.

To initialize default data in multiple files, it is required to declare them in multiple plugins.

The default Poll data are configured in the war:webapp/WEB-INF/conf/ksdemo/ks/services-configuration.xml file.

In particular, when the Poll service starts, the Initialization plug-in component is called. Next, the services-configuration.xml file is executed. The component-plugin named addInitialDefaultDataPlugin will refer to org.exoplatform.poll.service.InitialDeafaultDataPlugin to execute some objects to create default data for the Poll application.



<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>
Name Set-method Type Description
default.data addInitialDefaultDataPlugin org.exoplatform.poll.service.InitialDefaultDataPlugin The initial default data of Poll.
Name Possible value Default value Description
livedemo.default.configuration object org.exoplatform.poll.service.PollInitialData The initial data for live demo.

After the org.exoplatform.poll.service.InitialDefaultDataPlugin object has been executed, the org.exoplatform.poll.service.PollInitialData object will be called. It returns a polls array. The value of poll array is defined by the org.exoplatform.poll.service.PollData object as below:

In which:

Field Possible value Default value Description
parentPath string ksdemo/Polls Parent path of Poll data.
owner user id root The creator of Poll.
question string What color do you like? The question for Poll.
timeout number 0 The time before poll is closed. If value is set to 0, the poll will never be closed.
isMultiCheck boolean false If the value is true, user can vote for multi-options. If the value is false, only one option can be voted.
isAgainVote boolean false If the value is true, user can vote again.
isClose boolean false If the value is true, the poll will be closed.
options java.util.ArrayList List of string list of options for Poll.

Values of the default Poll can be changed by editing text values in the tag of each field by the other one.

Data injector is used to create data for the performance benchmark. This part will describe which data injectors are implemented in eXo Knowledge and how to use them.

In eXo Knowledge, data injectors are implemented as plugins attached to the org.exoplatform.services.bench.DataInjectorService service. This service is normally registered to the portal container as a general component and handled via RESTful requests.

To use this service, add the following dependency to the Classpath of the server:

When you want to inject data for a specified product, you will have to implement a class which extends org.exoplatform.services.bench.DataInjector and register it to DataInjectorService as a plugin.

In which, methods need to be installed are:

To activate DataInjectorService, you must register this component to a portal container by the following configuration:

In eXo Knowledge, there are three plugins attached to the DataInjectorService component:

The Forum Data injector is configured to register to DataInjectorService by the following code:

The query parameters description:

Param Value Description
q Number The quantity of each item in forum. For example, if the value is 10,20,30,40,50 then the injector will create 10 categories, each category will have 20 forums, each forum contains 30 topics, each topic has 40 posts which contains 50 attachments in each posts.
pre String The prefixes of category, forum, topic, post and attachment. If "cat,for,top,pos,att" is inputed, the injector will create a set of data inlcude: categories with "cat" prefix, forums with "for" prefix and so on.
attSize Number The size of each attachment which is created in a post.

The Data injector for Wiki is configured as follow:

In which, parameters mean:

Param Value Description
type [data | perm] Type of injector. It can be data or perm which injects data or permission respectively.
q Number The number of pages in each depth, separated by commas. For example, if value is 1,2,3 then the injector will create 1 new child of WikiHome, 2 children per each page created in depth 1 and 3 children for each page created in depth 2.
pre String Prefix for page id in each depth, separated by commas. For example, if value is abc,def,ghk then pages in depth 1 have title starting with "abc", title of pages in depth 2 start with "def" and in depth 3 is "ghk".
wo String Wiki owner.
wt String Wiki type. The value can be: 'portal', 'user', 'group'.
maxAtt Number The size of attachment in created pages. the value is evaluated in KByte. If the value is 0 or not set, no attachment is created.
mP Number The maximum pages in each injection. The number of created pages must not exceed this value.

To grant permision, the request link is in the following format:

For instance, in the link above, the injector will set the Read and Edit permission for pages of portal/classic which meet the constraint (q=1,2,3 and pre=abc,def,ghk).

You can use these parameters to set up permissions for pages:

Param Value Description
q Number The number of pages in each depth separated by commas. For example, if value is 1,2,3 then the injector will create 1 new child of WikiHome, 2 children per each page created in depth 1 and 3 children for each page created in depth 2.
pre String The prefix for page id in each depth separated by commas. For example, if the value is "abc,def,ghk" then pages in depth 1 will have title starting with "abc", title of pages in depth 2 will start with "def" and in depth 3 is "ghk"
wo String The wiki owner separated by commas.
wt String The wiki type separated by commas. This value can be: portal, user or group.
users String, The list of granted permissions users separated by commas.
groups String The list of granted permissions groups separated by commas.
memship String The list of granted permissions memberships separated by commas.
perm number number The declared permissions. The value must be a string with 2 numbers. The first number is to define Read permission of identity while the other one is for Edit permission. If the number is "zero", the privilege is denied and vise versa. For example, 11 means that both Read and Edit pages permmission are granted.
rcs Boolean Recursive or not. If the value is true, all pages that meet the constraint will be set permission, or deepest pages (smallest descendants) will be affected.

The following configuration is used for the Answer Data injector:

In which:

Param Value Description  
type data Type of injector. It can be data or perm means injecting data or permission respectively.  
q number,number,etc The number of items in each depth. For example, if the value is 2,3,4,5,6 then the injector will create 2 new categories with the depth level is '3', add 4 questions in each category, 5 answer and 6 comment in each question. Warning: Do not set the depth level to more than 5, because the number of items are calculated by number*depth. 
pre string, string, etc The prefix for items id in each depth. For example, if the value is "cate, ques, answ, comm" then category has fist name/id is "cate", question has fist name/id is "ques", answer has fist id is "answ" and comment has fist id is "comm" .
att number The number of attachments in one question. If the value is '0' or not set, no attachment is created.  
attCp number The capacity of one attachment. The value is evaluated in KByte and must be larger than KByte.  
txtcp number The capacity text of one item (question/answer/comment). The value is evaluated in KByte. If the value is 0 or not set, texts are created randomly.  

In which:

Param Value Description  
view string, string, etc The list of granted permissions users/groups/memberships, if the value is "any" or not set, everyone can view all category create by prefix.
edit string, string, etc The list of granted permissions users/groups/memberships, if the value is "any" or not set, only user with highest permission (Administrator) can edit all category create by prefix.