The Auto-count Active Users component is to calculate the number of active users automatically. A user is considered as the active user only when he/she adds a topic/post in the Forum and his/her last post date matches the predefined interval time.
For example, if one user does not have any new posts after 15 days, he/she is not considered as an active user.
When the Job Scheduler runs, it will get values returned from the Auto-count Active Users plug-in component to identify the number of active users. This value is updated to Active Members information when the user views Forum statistics.
The properties of Auto-count Active Users plug-in is configured in the
war:/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.
<component-plugin>
<name>RecountActiveUserJob</name>
<set-method>addPeriodJob</set-method>
<type>org.exoplatform.forum.service.conf.RecountActiveUserPeriodJob</type>
<description>add a RecountActiveUser job to the JobSchedulerService</description>
<init-params>
<properties-param>
<name>job.info</name>
<description>save the monitor data periodically</description>
<property name="jobName" value="RecountActiveUserJob"/>
<property name="groupName" value="KnowlegedSuite"/>
<property name="job" value="org.exoplatform.forum.service.conf.RecountActiveUserJob"/>
<property name="repeatCount" value="0"/>
<property name="period" value="7200000"/> <!-- 2 hours-->
<property name="startTime" value="+0"/>
<property name="endTime" value=""/>
</properties-param>
<properties-param>
<name>RecountActiveUser.info</name>
<description/>
<property name="lastPost" value="15"/> <!-- users are active if have last posts in 15 day -->
</properties-param>
</init-params>
</component-plugin>
In which,
Name | Method | Type | Description |
---|---|---|---|
RecountActiveUserJob | addPeriodJob | org.exoplatform.forum. service.conf. RecountActiveUserPeriodJob | Adds a RecountActiveUser job to the JobSchedulerService . |
The properties for Auto-count Active Members plug-in are defined in the property tag as below:
...
<property name="jobName" value="RecountActiveUserJob"/>
<property name="groupName" value="KnowlegedSuite"/>
<property name="job" value="org.exoplatform.forum.service.conf.RecountActiveUserJob"/>
<property name="repeatCount" value="0"/>
<property name="period" value="7200000"/>
<property name="startTime" value="+0"/>
<property name="endTime" value=""/>
...
<property name="lastPost" value="15"/>
...
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.