eXo Platform 3.0

- Prev
- Next

## Chapter 3. Configurations

## Components in eXo Collaboration Configuration

This table shows some main components that take init-param in the applications of eXo Collaboration:

Applications | Components | Description
--- | --- | ---
Calendar | `CalendarServiceImpl` | It is a service that manages calendars in the Calendar application of eXo Collaboration
Chat | `HistoryImpl` `XMPPMessenger` `DefaultPresenceStatus` | It is a service that saves the chat history of users It is a service that processes messages of chat users, basing on the XMPP Protocol It is a component that controls the presence status of chat users.
Contact | `ContactServiceImpl` | It is a service that supplies functions to manage contacts in the Address Book application of eXo Collaboration
Webservice | `AddActionsPlugin` | It is used to register a listener for the actions on the nodes

### CalendarService

The configuration of the Calendar application is applied mainly in /eXoApplication/calendar/service/src/main/resources/conf/portal/configuration.xml Use the CalendarService to configure the Calendar. The following information will explain details of its configuration. When this configuration file is executed, the component named org.exoplatform.calendar.service.impl.CalendarServiceImpl will process the actions of the Calendar application.

    <component>
        <key>org.exoplatform.calendar.service.CalendarService</key>
        <type>org.exoplatform.calendar.service.impl.CalendarServiceImpl</type>
                    <init-params>
          <properties-param>
            <name>eventNumber.info</name>
            <property name="eventNumber" value="100"/>
          </properties-param>
        </init-params>
      </component>

Details:

Properties-Param | Property name | Description | Possible Value | Default Value
--- | --- | --- | --- | ---
eventNumber | `eventNumber` | The number of events in a calendar | `interger` | `100`

### HistoryImpl

The configuration of historyImpl is found in the /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/chat/chat-service-configuration.xml When this configuration file is executed, the component named org.exoplatform.services.xmpp.history.impl.jcr.HistoryImpl initializes all the configured parameters.

    <component>
                    <type>org.exoplatform.services.xmpp.history.impl.jcr.HistoryImpl</type>
                    <init-params>
                            <value-param>
                                    <name>workspace</name>
                                    <value>collaboration</value>
                            </value-param>
                            <value-param>
                                    <name>repository</name>
                                    <value>repository</value>
                            </value-param>
                            <value-param>
                                    <name>path</name>
                                    <value>exo:applications/eXoChat/history</value>
                            </value-param>
                    </init-params>
            </component>

Details:

Value-Param | Description | Possible Values | Default Value
--- | --- | --- | ---
workspace | Workspace is the workspace name in JCR where history data is stored | `string` | `collaboration`
repository | Repository is the repository name in JCR where history data is stored | `string` | `repository`
path | Path is JCR path to the location where history data is stored | `string` | `exo:applications/eXoChat/history`.

### XMPPMessenger

The configuration of the XMPPMessenger component is found in /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/chat/chat-service-configuration.xml It helps eXo Collaboration connect the Openfire instance.

    <component>
            <type>org.exoplatform.services.xmpp.connection.impl.XMPPMessenger</type>
            <init-params>
                    <properties-param>
                            <name>openfire-connection-conf</name>
                            <property name="host" value="127.0.0.1"/>
                            <property name="port" value="5222"/>
                    </properties-param>
                    <properties-param>
                            <name>send-file</name>
                            <property name="timeout" value="7200000"/>
                    </properties-param>
            </init-params>
    </component>

Details:

Properties-param | Property name | Description | Possible Values | Default Value
--- | --- | --- | --- | ---
openfire-connection-conf | `host` `port` | IP address or hostname for the openfire server Port to connect to on the openfire server. Should be the same that set in openfire configuration "Client to Server" | `integer` `integer` | 127.0.0.1 5222
send-file | `timeout` | timeout before aborting attempt to establish a file transfer | `integer` | `7200000`

### DefaultPresenceStatus

The configuration of the DefaultPresenceStatus component is found in /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/chat/chat-service-configuration.xml

             <component>
                    <type>org.exoplatform.services.presence.DefaultPresenceStatus</type>
                    <init-params>
                            <properties-param>
                                    <name>presence-status</name>
                                     <property name="mode" value="Free to chat"/>
                            </properties-param>
                    </init-params>
            </component>

Details:

Properties-param | Property name | Description | Possible Values | Default Value |
presence-status | `mode` | It shows the present status of users | `string` | `Free to chat` |

### ContactService

The configuration of the ContactService component is found in eXoApplication/contact/service/src/main/resources/conf/portal/configuration.xml when the server starts, the configuration file that contains the declaration of ContactService component is executed, after that a ContactService component is created with params and plug-ins in the configuration file.

     <component>
        <key>org.exoplatform.contact.service.ContactService</key>
        <type>org.exoplatform.contact.service.impl.ContactServiceImpl</type>
        <init-params>
          <values-param>
            <name>UserCanSeeAllGroupAddressBooks</name>
            <description>User can see all GroupAddressBooks or only GroupAddressBooks that the user has at least one membership</description>
            <value>false</value>
          </values-param>
          <values-param>
            <name>NonPublicGroups</name>
            <description>Groups that should not be displayed in broadcast list. Wildcards may be used in groups name</description>
          </values-param>
        </init-params>
      </component>

Values-param | Description | Possible Values | Default Value
--- | --- | --- | ---
UserCanSeeAllGroupAddressBooks | User can see all GroupAddressBooks or only GroupAddressBooks that the user has at least one membership | `true/false` | `false`
NonPublicGroups | Groups that shouldn't be displayed in broadcast list. Wildcards may be used in groups name | `true/false` | N/A

## External Component Plug-ins

Applications | Components | Description
--- | --- | ---
Calendar | `NewUserListener` | It is a plug-in used to create default personal calendars
| `NewGroupListener` | It is a plug-in used to create default group calendars
| `NewMembershipListener` | It is plug-in used to share calendars to members of a specific group
| `ReminderPeriodJob` | It is a plug-in used to execute sending reminder emails to users
| `PopupReminderPeriodJob` | It is a plug-in used to open a pop-up reminder on the browser of users
| `AddActionsPlugin` | It is a plug-in that helps the systems automatically update the updated date of events / tasks in a calendar when the content of these events / tasks are changed
Chat | `HistoryPeriodJob` | It is a plug-in used to save the chat history of users
| `RequestFilterComponentPlugin` | It is used to delete the session of a user when he suddenly closes the browser or changes the session
| `AuthenticationLoginListener` | It is used to start the session and log in the chat server
| `AuthenticationLogoutListener` | It is used to end the session and log out the chat server
Contact | `NewUserListener` | It is used to create personal contact data for users
| `NewMembershipListener` | It is used to create address book for a specific group
| `UpdateUserProfileListener` | It is used to update the personal profile of a user when he changes it on the portal
Content | `RSSContentPlugin` | It is a formatter used to analyze the data from a RSS rsource
| `DescriptionPlugin` | It is a plug-in to represent the data from a RSS source
Mail | `AuthenticationLogoutListener` | It is a plug-in used to stop checking mails of a user when he logs out
Social Intergration | `CalendarDataInitialize` | It is a plug-in used to create a calendar for a group in a specific space
| `ContactDataInitialize` | It is a plug-in used to create an address book for a group in a specific space
| `ContactSpaceActivityPublisher` | It is a plug-in used to customize the activity status of a specific space when an event happens on a address book
| `CalendarSpaceActivityPublisher` | It is a plug-in used to customize the activity status of a specific space when an event happens on a calendar
| `PortletPreferenceRequiredPlugin` | It is a plug-in used to declare the application that will automatically create database

### Calendar Configuration

#### NewUserListener

Each user can have a default personal calendar created. Use the NewUserListener to configure that. To use the plug-in in the component configuration, you must use the target-component:

    <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

The configuration is applied mainly in extension /webapp/src/main/webapp/WEB-INF/cs-extension/cs/calendar/calendar-service-configuration.xml

    	  <component-plugin>
    	    <name>calendar.new.user.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.calendar.service.impl.NewUserListener</type>
    	    <description>description</description>
    	    <init-params>
            <value-param>
            	<name>defaultEventCategories</name>
            	<value>Meeting,Calls,Clients,Holiday,Anniversary</value>
            </value-param>
            <value-param>
            	<name>defaultCalendarCategory</name>
            	<value>My group</value><!-- Single value-->
            </value-param>
            <value-param>
            	<name>defaultCalendar</name>
            	<value>Default</value>
            </value-param>
            <!--Params for default calendar setting-->
            <value-param>
             <name>viewType</name>
             <value>1</value>
            </value-param>

            <value-param>
             <name>timeInterval</name>
             <value>15</value><!-- in minutes -->
            </value-param>

            <value-param>
             <name>weekStartOn</name>
             <value>2</value>
            </value-param>

            <value-param>
             <name>dateFormat</name>
             <value>MM/dd/yyyy</value>
            </value-param>

            <value-param>
             <name>timeFormat</name>
             <value>HH:mm</value> <!-- HH:mm/hh:mm a -->
            </value-param>

            <value-param>
             <name>localeId</name>
             <value>BEL</value>
            </value-param>

             <value-param>
             <name>timezoneId</name>
             <value>Europe/Brussels</value>
            </value-param>

             <value-param>
             <name>baseUrlForRss</name>
             <value/>
            </value-param>

             <value-param>
             <name>isShowWorkingTime</name>
             <value>false</value><!-- boolean true/false -->
            </value-param>

             <value-param>
             <name>workingTimeBegin</name>
             <value>08:00</value><!--  -->
            </value-param>

             <value-param>
    	         <name>workingTimeEnd</name>
    	         <value>18:00</value><!--  -->
            </value-param>

            <values-param>
    	        <name>ignoredUsers</name>
    	        <description>Definition users to ignore create default calendar</description>
    	        <!--
    	        <value>demo</value>
    	        <value>marry</value>
    	         -->
            </values-param>
              </init-params>
    	  </component-plugin>

Explanation:

- Name: `calendar.new.user.event.listener` - unique key to avoid duplicate names. Users can change it.

- Set-method: `addListenerPlugin` - The function is executed at the target of the component to register NewUserListener.

- Type: `org.exoplatform.calendar.service.impl.NewUserListener` - The class is set up to execute the creation of database.

- Description: It is a plug-in used to create default personal calendars.

See the details about the init-params of the component in the following table:

Value-params | Description | Possible value | Default Value
--- | --- | --- | ---
defaultEventCategories | Default event categories for users | `String (Comma separated list of category names)` | `Meeting,Calls,Clients,Holiday,Anniversary`
defaultCalendarCategory | Name of the calendar group | `String` | `Default`
viewType | Default view after user logins and goes to Calendar portlet | `0-6 (see below)` | `1`
timeInterval | The time unit interval when you drag and move the event (in Day view and Week view only) | `integer in minutes` | `15`
weekStartOn | Day to use as the beginning of the week. only affect on Week view | `1-7 (see below)` | `2`
dateFormat | The display format for dates | `valid Java Date format` | `MM/dd/yyyy`
timeFormat | The display format for time | `valid Java Date format` | `HH:mm`
localeId | ID of the geographic locale | `valid locale ID` | `BEL`
timezoneIds | User time zone | `valid TimeZone id` | `Europe`
baseUrlForRss | The url to publish the RSS content | `none` | `none`
isShowWorkingTime | Indicate if the working time should be hilighted in day view | `true/false` | `false`
workingTimeBegin | The start time in working time | `time in timeFormat` | `08:00`
workingTimeEnd | The end time in working time | `time in timeFormat` | `18:00`
ignoredUsers | Definition users to ignore create default calendar | `user id, use multiple by each line` | `demo/marry`

viewType parameter is encoded by a number as follow:

0 : Day view

1 : Week view

2 : Month view

3 : Year view

4 : List view

5 : Schedule view

6 : Working days view

weekStartOn parameter is encoded as follow:

1 : Sunday

2 : Monday

3 : Tuesday

4 : Wednesday

5 : Thursday

6 : Friday

7 : Saturday

#### NewGroupListener

To use the plug-in in the component configuration, you must use the target-component:

    <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

The configuration is applied mainly in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/calendar/calendar-service-configuration.xml

     <component-plugin>
    	    <name>calendar.new.group.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.calendar.service.impl.NewGroupListener</type>
    	    <description>description</description>
    	    <init-params>
            <value-param>
            	<name>defaultEditPermission</name>
            	<value>*.*</value><!-- Multi value membership, use coma (,) to split values-->
            </value-param>
            <value-param>
            	<name>defaultViewPermission</name>
            	<value>*.*</value>
            </value-param>

            <value-param>
    	      	<name>defaultLocale</name>
    	        <value>BEL</value>
          	</value-param>

          	<value-param>
    	      	<name>defaultTimeZone</name>
    	      	<value>Europe/Brussels</value>
          	</value-param>

            <values-param>
    	        <name>ignoredGroups</name>
    	        <description>Definition group to ignore create default calendar</description>
    	        <!--
    	        <value>/platform/guests</value>
    	         -->
    	        <value>/spaces/*</value> <!--  single value, use more <value> tags to add more group -->
            </values-param>

    	    </init-params>
    	  </component-plugin>

Explanation:

- Name: `calendar.new.group.event.listener` is the unique key to avoid duplicate names. Users can change it.

- Set-method: `addListenerPlugin` is the function is executed at the target of the component to register NewGroupListener.

- Type: `org.exoplatform.calendar.service.impl.NewGroupListener` is the class set up to execute the creation of database.

- Description: It is a plug-in used to create default group calendars.

See the details about the init-params of the component in the following table:

Value-params | Description | Possible values | Default values
--- | --- | --- | ---
defaultEditPermission | The default permission assigned to membership in a specific group to edit calendars and events /tasks of calendar | `User id` (Multi value membership, use coma (,) to split values) | `. means that all members in that group can modify and add, remove a calendar, events/tasks of the calendar`
defaultViewPermission | The default permission assigned to membership in a specific group to view a calendar and events /tasks of the calendar. `` | `User id` (Multi value membership, use coma (,) to split values) | `. means that all members in that group can view this calendar and all the events/tasks of this calendar.`
defaultLocale | The default locale of the calendar | `Valid locade id` | `BEL (see more locale ids http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html )`
defaultTimeZone | The default time zone of calendar | `Valid timezone id` | `Europe/Brussels (see more for timeZone ids http://www.unicode.org/cldr/data/docs/design/formatting/zone_log.html#windows_ids)`
ignoredGroups | Definition group to ignore create default calendar | `Group id (use line to define multiple value)` | `/platform/guests`

#### NewMembershipListener

To use the plug-in in the component configuration, you must use the target-component:

    <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

The configuration is applied mainly in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/calendar/calendar-service-configuration.xml

    	  <component-plugin>
    	    <name>calendar.new.membership.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.calendar.service.impl.NewMembershipListener</type>
    	    <description>description</description>
    	  </component-plugin>

Explanation:

- Name: `calendar.new.membership.event.listener` is the unique key to avoid duplicate names. Users can change it.

- Set-method: `addListenerPlugin` is the function is executed at the target of the component.

- Type: `org.exoplatform.calendar.service.impl.NewMembershipListener` is the class is set up to execute the creation of database.

- Description: It is a plug-in used to execute sending reminder emails to users.

#### ReminderPeriodJob

The Calendar application of eXo Collaboration can send event reminders by email by using the email reminder plug-in configuration. You will probably need to adjust this configuration to your own need. The feature is based on a periodic poll of the stored reminders.

You must use the following target component to use the plug-in in this configuration:

    <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>

The configuration is applied in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/cs-configuration.xml

    <component-plugin>
          <name>RecordsJob</name>
          <set-method>addPeriodJob</set-method>
          <type>org.exoplatform.calendar.service.ReminderPeriodJob</type>
          <description>add e-mail reminder job to the JobSchedulerService</description>
          <init-params>
            <properties-param>
              <name>job.info</name>
              <description>save the monitor data  periodically</description>
              <property name="jobName" value="ReminderJob"/>
              <property name="groupName" value="CollaborationSuite"/>
              <property name="job" value="org.exoplatform.calendar.service.ReminderJob"/>
              <property name="repeatCount" value="0"/>
              <property name="period" value="180000"/>
              <property name="startTime" value="+0"/>
              <property name="endTime" value=""/>
            </properties-param>

          </init-params>
        </component-plugin>

Explanation:

- Name: `RecordsJob` is the name of a schedule job. Keep this value.

- Set-method: `addPeriodJob` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.calendar.service.ReminderPeriodJob` is a class that executes to transfer the data into database of Job Scheduler.

- Description: Add email reminder job to the JobSchedulerService.

See the details about the init-params of the component in the following table:

Properties-param | Description | Property names | Description | Possible values | Default values
--- | --- | --- | --- | --- | ---
job.info | save the monitor data periodically | `jobName` | The name of job | `String` | `ReminderJob`
|  | `groupName` | The name of group job | `String` | `CollaborationSuite`
|  | `job` | The name of actual job class | `Class path` | `org.exoplatform.calendar.service.ReminderJob`
|  | `repeatCount` | How many times to run this job | `Long` | `0, ( use '0' which means 'run forever)`
|  | `period` | The time interval (millisecond) between job executions | `Long` | `180000`
|  | `startTime` | The time the job starts to run | `Integer` | `+0`
|  | `endTime` | The time the job ends to run | `Integer` | `none`

#### PopupReminderPeriodJob

You must use the following target component to use the plug-in in this configuration:

    <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>

The configuration is applied in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/cs-configuration.xml

    <component-plugin>
          <name>PopupRecordsJob</name>
          <set-method>addPeriodJob</set-method>
          <type>org.exoplatform.calendar.service.PopupReminderPeriodJob</type>
          <description>add popup reminder job to the JobSchedulerService</description>
          <init-params>
            <properties-param>
              <name>job.info</name>
              <description>save the monitor data  periodically</description>
              <property name="jobName" value="PopupReminderJob"/>
              <property name="groupName" value="CollaborationSuite"/>
              <property name="job" value="org.exoplatform.calendar.service.PopupReminderJob"/>
              <property name="repeatCount" value="0"/>
              <property name="period" value="6000"/>
              <property name="startTime" value="+0"/>
              <property name="endTime" value=""/>
            </properties-param>
    	<properties-param>
              <name>popupreminder.info</name>
              <description>save the monitor data  periodically</description>
              <property name="portalName" value="portal"/>
            </properties-param>
          </init-params>
        </component-plugin>

Explanation:

- Name: `PopupRecordsJob` is the name of the job. Keep this value.

- Set-method: `addPeriodJob` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.calendar.service.PopupReminderPeriodJob` is a class that executes to transfer the data into database of Job Scheduler.

- Description: Add popup reminder job to the JobSchedulerService.

See the details about the init-params of the component in the following table:

Properties-param | Description | Property names | Description | Possible values | Default values |
job.info | Save the monitor data periodically | `jobName` | The name of job | `String` | `PopupReminderJob` |
|  | `groupName` | The name of group job | `String` | `CollaborationSuite` |
|  | `job` | The name of actual job class | `Class path` | `org.exoplatform.calendar.service.PopupReminderJob` |
|  | `repeatCount` | How many times to run this job | `Long` | `0, ( use '0' which means 'run forever)` |
|  | `period` | The time interval (millisecond) between job executions | `Long` | `6000` |
|  | `startTime` | The time the job starts to run | `Long` | `+0` |
|  | `endTime` | The time the job ends to run | `Integer` | `None` |
popupreminder.info | save the monitor data periodically | `portalName` | The name of the portal | `String` | `portal` | ‎‏

### AddActionsPlugin

The configuration of the AddActionsPlugin is found in WEB-INF/cs-extension/cs/webservice/webservice-configuration.xml It is used to register the listener named `org.exoplatform.webservice.cs.LastUpdateAction` and it is executed basing on eventTypes.

      <component>
      	<type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
      	<component-plugins>
      	<component-plugin>
        <name>Last Update Action</name>
        <set-method>addPlugin</set-method>
        <type>org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin</type>
        <description>add actions plugin</description>
        <init-params>
          <object-param>
            <name>actions</name>
            <object type="org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin$ActionsConfig">
              <field name="actions">
                <collection type="java.util.ArrayList">
                  <value>
                    <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
                      <field name="eventTypes"><string>addNode,changeProperty</string></field>
                      <field name="nodeTypes"><string>exo:calendarEvent</string></field>
                      <field name="actionClassName"><string>org.exoplatform.webservice.cs.LastUpdateAction</string></field>
                    </object>
                  </value>
                </collection>
              </field>
            </object>
          </object-param>
        </init-params>
      	</component-plugin>
      	</component-plugins>
      </component>

- object-param: `Actions` is the name of the object.

- object type: `org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin$ActionsConfig` is a class used to register the following field names in the table below:

Field name | Description | String
--- | --- | ---
eventTypes | The type of the event | `addNode,changeProperty`
nodeTypes | The type of the node | `exo:calendarEvent`
actionClassName | The registration class to execute the actions that the plug-in requires | `org.exoplatform.webservice.cs.LastUpdateAction`

### Chat Configuration

The Chat congiguration is applied in /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/chat/chat-service-configuration.xml

#### HistoryPeriodJob

    <external-component-plugins>
                    <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
                    <component-plugin>
                            <name>ChatRecordsJob</name>
                            <set-method>addPeriodJob</set-method>
                            <type>org.exoplatform.services.xmpp.connection.impl.HistoryPeriodJob</type>
                            <description>add chat messages from Openfire Server to History</description>
                            <init-params>
                                    <properties-param>
                                            <name>job.info</name>
                                            <description>save the monitor data periodically</description>
                                            <property name="jobName" value="messageToHistoricalMessageJob"/>
                                            <property name="groupName" value="CollaborationSuite"/>
                                            <property name="job" value="org.exoplatform.services.xmpp.connection.impl.HistoryJob"/>
                                            <property name="repeatCount" value="0"/>
                                            <property name="period" value="3000"/>
                                            <property name="startTime" value="+0"/>
                                            <property name="endTime" value=""/>
                                    </properties-param>
                                    <properties-param>
                                            <name>history.info</name>
                                            <description>save the monitor data periodically</description>
                                            <property name="logBatchSize" value="50"/>
                                    </properties-param>
                            </init-params>
                    </component-plugin>
            </external-component-plugins>

Explanation:

- Name: `ChatRecordsJob` is the name of the job. Keep this value.

- Set-method: `addPeriodJob` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.services.xmpp.connection.impl.HistoryPeriodJob` is a class that executes to transfer the data into the database of Job Scheduler.

- Description: It is used to save chat messages from Openfire Server to History

See the details about the init-params of the component in the following table:

Properties-param | Description | Property names | Description | Possible values | Default values
--- | --- | --- | --- | --- | ---
job.info | Save the monitor data periodically | `jobName` | The name of job | `String` | `messageToHistoricalMessageJob`
|  | `groupName` | The name of group name | `String` | `CollaborationSuite`
|  | `job` | The name of actual job class | `Class path` | `org.exoplatform.services.xmpp.connection.impl.HistoryJob`
|  | `repeatCount` | How many times to run this job | `integer` | `0` ( use '0' which means 'run forever)
|  | `period` | The time interval (millisecond) between job executions | `Long` | `3000`
|  | `startTime` | The time the job starts running. | `Long` | `+0`
|  | `endTime` | The time the job ends running. | `Long` | `none`
history.info | Save the monitor data periodically | `logBatchSize` | The maximum number of messages in the cache are saved once the job runs. | `Integer` | `50`

#### RequestFilterComponentPlugin

    <external-component-plugins>
        <target-component>org.exoplatform.services.rest.impl.RequestHandlerImpl</target-component>
          <component-plugin>
            <name>ws.rs.request.filter</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.services.rest.impl.RequestFilterComponentPlugin</type>
             <init-params>
                <value-param>
                   <name>RESTXMPPServiceFilter</name>
                   <value>org.exoplatform.services.xmpp.rest.filter.RESTXMPPServiceFilter</value>
                </value-param>
             </init-params>
          </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `ws.rs.request.filter` is the name of the filter. Keep this value.

- Set-method: `addPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.services.rest.impl.RequestFilterComponentPlugin` is a class that executes the requests of the plugin.

- Description: It is used to delete the session of a user when he suddenly closes the browser or changes the session.

See the details about the init-params of the component in the following table:

Value-param | Description | Possible value | Default value
--- | --- | --- | ---
RESTXMPPServiceFilter | The name of the filter | `Class path` | `org.exoplatform.services.xmpp.rest.filter.RESTXMPPServiceFilter`

#### AuthenticationLoginListener and AuthenticationLogoutListener

Two functions: login and logout of XMPPRestService is responsible for creating a new XMPPSessionImpl and destroying an existed XMPPSessionImpl. They can be called by listeners: AuthenticationLoginListener, AuthenticationLogoutListener or from client(browser) through Rest protocol (jabberLogin, jabberLogout in UIMainChatWindow.js). You must use the same target component for two external component plug-ins:

    <target-component>org.exoplatform.services.listener.ListenerService</target-component>

##### AuthenticationLoginListener

    	  <component-plugin>
    	    <name>exo.core.security.ConversationRegistry.register</name>
    	    <set-method>addListener</set-method>
    	    <type>org.exoplatform.services.xmpp.connection.impl.AuthenticationLoginListener</type>
    	    <description>description</description>
    	  </component-plugin>

Explanation:

- Name: `exo.core.security.ConversationRegistry.register` is the name of plug-in.

- Set-method: `addListener` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.services.xmpp.connection.impl.AuthenticationLoginListener` is a class to execute the requests of the plug-in.

- Description: It is used to start the session and log in the chat server.

##### AuthenticationLogoutListener

        <component-plugin>
    	    <name>exo.core.security.ConversationRegistry.unregister</name>
    	    <set-method>addListener</set-method>
    	    <type>org.exoplatform.services.xmpp.connection.impl.AuthenticationLogoutListener</type>
    	    <description>description</description>
        </component-plugin>

Explanation:

- Name: `exo.core.security.ConversationRegistry.register` is the name of plug-in.

- Set-method: `addListener` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.services.xmpp.connection.impl.AuthenticationLogoutListener` is a class to execute the requests of the plug-in.

- Description: It is used to end the session and log in the chat server.

### Contact Configuration

The Contact Application is configured by three external component plug-ins: `NewUserListener`, `NewMembershipListener` and `UpdateUserProfileListener`. They use the same target component:

    <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

The Contact configuration is found in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/contact/contact-service-configuration.xml

#### NewUserListener

    	 <component-plugin>
    	    <name>contact.new.user.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.contact.service.impl.NewUserListener</type>
    	    <description>description</description>
    	 </component-plugin>

Explanation:

- Name: `contact.new.user.event.listener` is the name of listener.

- Set-method: `addListenerPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.contact.service.impl.NewUserListener` is a class that executes all the requires of the plug-in.

- Description: It is used to initialize personal contact data for users.

#### NewMembershipListener

    	  <component-plugin>
    	    <name>contact.new.membership.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.contact.service.impl.NewMembershipListener</type>
    	    <description>description</description>
    	  </component-plugin>

Explanation:

- Name: `contact.new.membership.event.listener` is the name of the listener.

- Set-method: `addListenerPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.contact.service.impl.NewMembershipListener` is a class that executes all the requires of the plug-in.

- Description: It is used to initialize an address book for a specific group.

#### UpdateUserProfileListener

    	  <component-plugin>
    	    <name>contact.new.userprofile.event.listener</name>
    	    <set-method>addListenerPlugin</set-method>
    	    <type>org.exoplatform.contact.service.impl.UpdateUserProfileListener</type>
    	    <description>description</description>
    	  </component-plugin>

Explanation:

- Name: `contact.new.userprofile.event.listener` is the name of the listener.

- Set-method: `addListenerPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.contact.service.impl.UpdateUserProfileListener` is a class that executes all the requires of the plug-in.

- Description: It is used to update the personal profile of a user when he changes it on the portal.

### Content Configuration

The Content application such as RSS reader of eXo Collaboration is configured by two external component plug-ins: RSSContentPlugin and DescriptionPlugin Both the external components plug-ins use the same target component:

    <target-component>org.exoplatform.content.service.ContentDAO</target-component>

This content configuration is applied in extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/content/content-service-configuration.xml

#### RSSContentPluginDescriptionPlugin

     	   <component-plugin>
    	      <name>rssreader.listener</name>
    	      <set-method>addPlugin</set-method>
    	      <type>org.exoplatform.content.service.RSSContentPlugin</type>
    	      <description>rss reader plugin</description>
    	    </component-plugin>

Explanation:

- Name: `rssreader.listener` is the name of the listener.

- Set-method: `addPlugin` is the plugin registering method. Keep this value.

- Type: `org.exoplatform.content.service.RSSContentPlugin` is a class extending ContentPlugin and implements loadContentMeta method to get content items.

- Description: It is a formater used to analyze the data from a RSS resource.

#### DescriptionPlugin

     <component-plugin>
    	      <name>description.listener</name>
    	      <set-method>addPlugin</set-method>
    	      <type>org.exoplatform.content.service.DescriptionPlugin</type>
    	      <description>Description plugin</description>
     </component-plugin>

Explanation:

- Name: `description.listener` is the name of the listener.

- Set-method: `addPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.content.service.DescriptionPlugin` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in to represent the data from a RSS source.

### Mail Configuration

#### AuthenticationLogoutListener

In the Mail application of eXo Collaboration, when a user check messages for one account, the remote mailbox fetch is performed as a background job. Before CS 1.2, the job was continuing until all messages had been retrieved or when the user stopped the check through the UI. Hence, even when a user was not logged in, the background job was continuing. This can be resource intensive for the server if many users have large mailboxes.

Since CS 1.2, we added the capability to halt the background job when the user session terminates (logout or time out). It makes CS more friendly with server resources. If you want to activate this feature, you need to add a bunch of xml congifuration in /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/mail/mail-service-configuration.xml:

        <external-component-plugins>
        	<target-component>org.exoplatform.services.listener.ListenerService</target-component>
       		<component-plugin>
                <name>exo.core.security.ConversationRegistry.unregister</name>
         		<set-method>addListener</set-method>
                <type>org.exoplatform.mail.service.AuthenticationLogoutListener</type>
          		<description>description</description>
        	</component-plugin>
      	</external-component-plugins>

Explanation:

- Name: `exo.core.security.ConversationRegistry.unregister` is the name of listener.

- Set-method: `addListener` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.mail.service.AuthenticationLogoutListener` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in used to stop checking mails of a user when he logs out.

### Social Integration Configuration

The Social Integration Configuration is applied in /extension/webapp/src/main/webapp/WEB-INF/cs-extension/cs/social-integration/social-integration-configuration.xml

#### CalendarDataInitialize

    <external-component-plugins>
        <target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
        <component-plugin>
          <name>CalendarDataInitialize</name>
          <set-method>addSpaceListener</set-method>
          <type>org.exoplatform.cs.ext.impl.CalendarDataInitialize</type>
          <init-params>
    				<value-param>
    					<name>portletName</name>
    					<value>CalendarPortlet</value>
    				</value-param>
    			</init-params>
        </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `CalendarDataInitialize` is the name of plug-in.

- Set-method: `addSpaceListener` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.cs.ext.impl.CalendarDataInitialize` is a class that executes all the requires of the plug-in.

- Description: It is used to initialize a calendar for a group in a specific space.

See the details about the init-params of the component in the following table:

value-param | Description | Possible value | Default value
--- | --- | --- | ---
portletName | The name of the portlet | `String` | `CalendarPortlet`

#### ContactDataInitialize

    <external-component-plugins>
        <target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
        <component-plugin>
          <name>ContactDataInitialize</name>
          <set-method>addSpaceListener</set-method>
          <type>org.exoplatform.cs.ext.impl.ContactDataInitialize</type>
          <init-params>
    				<value-param>
    					<name>portletName</name>
    					<value>ContactPortlet</value>
    				</value-param>
    			</init-params>
        </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `ContactDataInitialize` is the name of the plug-in.

- Set-method: `addSpaceListener` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.cs.ext.impl.ContactDataInitialize` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in used to initialize an address book for a group in a specific space.

See the details about the init-params of the component in the following table:

value-param | Description | Possible value | Default value
--- | --- | --- | ---
portletName | The name of the portlet | `String` | `ContactPortlet`

#### ContactSpaceActivityPublisher

    <external-component-plugins>
        <target-component>org.exoplatform.contact.service.ContactService</target-component>
        <component-plugin>
          <name>ContactEventListener</name>
          <set-method>addListenerPlugin</set-method>
          <type>org.exoplatform.cs.ext.impl.ContactSpaceActivityPublisher</type>
        </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `ContactEventListener` is the name of the plug-in.

- Set-method: `addListenerPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.cs.ext.impl.ContactSpaceActivityPublisher` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in used to customize the activity status of a specific space when an event happens on a address book.

#### CalendarSpaceActivityPublisher

    <external-component-plugins>
        <target-component>org.exoplatform.calendar.service.CalendarService</target-component>
        <component-plugin>
          <name>CalendarEventListener</name>
          <set-method>addEventListenerPlugin</set-method>
          <type>org.exoplatform.cs.ext.impl.CalendarSpaceActivityPublisher</type>
        </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `CalendarEventListener` is the name of the plug-in.

- Set-method: `addEventListenerPlugin` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.cs.ext.impl.CalendarSpaceActivityPublisher` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in used to customize the activity status of a specific space when an event happens on a calendar.

#### PortletPreferenceRequiredPlugin

    <external-component-plugins>
        <target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
        <component-plugin>
          <name>portlets.prefs.required</name>
          <set-method>setPortletsPrefsRequired</set-method>
          <type>org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin</type>
                <init-params>
                  <values-param>
                    <name>portletsPrefsRequired</name>
                    <value>CalendarPortlet</value>
                    <value>ContactPortlet</value>
                  </values-param>
                </init-params>
        </component-plugin>
      </external-component-plugins>

Explanation:

- Name: `ortlets.prefs.required` is the name of the plug-in.

- Set-method: `setPortletsPrefsRequired` is the plug-in registering method. Keep this value.

- Type: `org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin` is a class that executes all the requires of the plug-in.

- Description: It is a plug-in used to declare the application that will automatically create database.

See the details about the init-params of the component in the following table:

value-param | Description | Possible value | Default value
--- | --- | --- | ---
portletsPrefsRequired | The name of plug-in added to SpaceService | `String` | `ContactPortlet / ContactPortlet`

## eXo Chatserver Configuration

### Openfire Configuration

eXo Collaboration chat services is a Jabber engine powered by Openfire. eXo will delegate the actual Jabber protocol communication to Openfire.

You have full latitude to configure Openfire. There are two possible ways do it:

- The admin console: http://localhost:9090/.

- The openfire.xml file in $openfirehome/conf/.

#### Configuration in Openfire.xml

The Openfire server has a single configuration file called openfire.xml and located under exo-openfire/conf directory. Configuration is based on properties expressed in an XML syntax. For example, to set property prop.name.is.blah=value, you would write this xml snippet :

    <prop>
      <name>
                    <is>
                        <blah>value</blah>
                    </is>
      </name>
    </prop>

Openfire has an extensive list of configuration properties. You can read a list of all properties on this page : http://www.igniterealtime.org/community/docs/DOC-1061

#### eXo specific configuration

eXo Collaboration bundle comes with a pre-configured openfire server. It is bundled with some eXo plugins and configurations that allow connectivity with eXo. The key properties for integration are:

- `provider.auth.className` : An implementation of the AuthProvider interface for authentication of users on the chat server.

- `provider.users.className` : An implementation of the UserProvider interface to which openfire will delegate users management.

- `provider.groups.className` : An implementation of the GroupProvider interface to which openfire will delegate groups management.

eXo provides implementations for these 3 interfaces with ExoAuthProvider, ExoUserProvider, ExoGroupProvider. These implementations are based on eXo REST framework and let you configure the endpoints within the openfire.xml file with additional properties :

Property | Description | Default value
--- | --- | ---
eXo.env.serverBaseURL | It is the base URL of the server. | `http://localhost:8080/##`
eXo.env.restContextName | It is the context name of REST Web application . | rest
provider.authorizedUser.name | username to authenticate to access the HTTP REST service | `root`
provider.authorizedUser.password | password matching with provider.authorizeduser.name | `gtn`
exoAuthProvider.authenticationURL | URL to authenticate users | `/organization/authenticate/`
exoAuthProvider.authenticationMethod | HTTP method used for authentication method | `POST`
exoUserProvider.findUsersURL | URL to find all users | `/organization/xml/user/find-all/`
exoUserProvider.findUsersMethod | HTTP method used to find all users in the system | `GET`
exoUserProvider.getUsersURL | URL to retrieve a range of users`` | `/organization/xml/user/view-range/`
exoUserProvider.getUsersMethod | HTTP method used for user/view-range`` | `GET`
exoUserProvider.usersCountURL | URL to count the number of users | `/organization/xml/user/count`
exoUserProvider.usersCountMethod | HTTP method used to count the number of users | `GET`
exoUserProvider.userInfoURL | URL to get the information of users | `/organization/xml/user/info/`
exoUserProvider.userInfoMethod | HTTP method used to get the information of users | `GET`
exoGroupProvider.groupInfoURL | URL to get the information of a user group | `/organization/xml/group/info/`
exoGroupProvider.groupInfoMethod | HTTP method used to get the information of a user group | `GET`
exoGroupProvider.getGroupsAllURL | URL to view a list of all user groups | `/organization/xml/group/view-all/`
exoGroupProvider.getGroupsAllMethod | HTTP method used to view a list of all user groups | `GET`
exoGroupProvider.getGroupsRangeURL | URL to list groups in a specific range | `/organization/xml/group/view-from-to/`
exoGroupProvider.getGroupsRangeMethod | HTTP method used to list groups in a specific range | `GET`
exoGroupProvider.getGroupsForUserURL | URL to list groups to which a user belongs | `/organization/xml/group/groups-for-user/`
exoGroupProvider.getGroupsForUserMethod | HTTP method used to list groups to which a user belongs | `GET`
exoGroupProvider.groupsCountURL | URL to count the number of groups | `/organization/xml/group/count`
exoGroupProvider.groupsCountMethod | HTTP method used to count the number of groups | `GET`

As you can see, the default settings will only work if eXo is deployed on the same host as openfire, on port 8080.

### Note

restContextName is used to specify Openfire server that is dedicated for the portal. If eXo.env.restContextName system property exists, it will override this value.

eXo.env.restContextName system property can be set by specifying the -D option to the java command when running Openfire.

Example:

- If Openfire server is dedicated for the portal named "portal", the command will have the following format:

java -DeXo.env.restContextName=rest -jar ../lib/startup.jar .

- If Openfire server is dedicated for the portal named "csdemo", the command will have following format:

java -DeXo.env.restContextName=rest-csdemo -jar ../lib/startup.jar.

By default, Openfire server is dedicated to the portal named "portal"

### System Configuration

Openfire makes use of several ports for communication.

Interface | Port | Type | Description
--- | --- | --- | ---
All addresses | `5222` | `Client to Server` | The standard port for clients is to connect to the server. Connection may or may not be encrypted. You can update the security settings for this port.
All addresses | `9090 & 9091` | `Admin Console` | The port used for respectively the unsecured and secured Openfire Admin Console access.
All addresses | `7777` | `File Transfer Proxy` | The port used for the proxy service that allows file transfers to occur between two entities on the XMPP network.
All addresses | `3478 & 3479` | `STUN Service` | The port used for the service that ensures connectivity between entities when behind a NAT.

You can view the table above in http://hostname:9090/index.jsp_ after you are logged in to openfire's web console and also customize those ports by yourself.

### AS configuration

To enable propagation of identity across the chat webapp, it is required that you enable the SSO valve on Tomcat-based Application server.

- For jboss server, edit jboss/server/default/deploy/jboss-web.deployer/server.xml

- For tomcat server, edit tomcat/conf/server.xml

The valve should already be there, you just need to uncomment it if it is not already done.

    <Valve className="org.apache.catalina.authenticator.SingleSignOn"/>

In the case of cluster deployment, you may want to use `ClusteredSingleSignOn` instead.

    <Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn"/>

- Prev
- Up
- Home
- Next