JBoss.orgCommunity Documentation
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>
In which,
Name | Set-method | Type | Description |
---|---|---|---|
default.data | addInitialDataPlugin | org.exoplatform.forum. service.conf. InitializeForumPlugin | The initial default data of Forum. |
Init-param
Name | Possible value | Default value | Description |
---|---|---|---|
livedemo.default. configuration | object | org.exoplatform.forum. service.conf. ForumInitialData | The initial data for live demo. |
Category array
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:
<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>
...
</object>
</value>
</collection>
</field>
</object>
</object-param>
Category includes some basic data which are defined in the field tag with a specific name as below:
<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>
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. |
Modify values 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:
<value>
<object type="org.exoplatform.forum.service.conf.CategoryData">
<field name=" ">
...
</field>
</object>
</value>