JBoss.orgCommunity Documentation
The Forum Data injector is configured to register to DataInjectorService by the following code:
<external-component-plug-ins>
<target-component>org.exoplatform.services.bench.DataInjectorService</target-component>
<component-plug-in>
<name>ForumDataInjector</name>
<set-method>addInjector</set-method>
<type>org.exoplatform.forum.bench.ForumDataInjector</type>
<description>inject data for Forum</description>
</component-plug-in>
</external-component-plug-ins>
To inject data, the request link is in the following format:
http://[rest-path]/bench/inject/ForumDataInjector/?type=data&q=10,20,30,40,50&pre=cat,for,top,post,att&attSize=1
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. |
Every created topic can only be read/modified by user 'root' to grant permission to other members.