
h1. Default Address Book Configuration



h1. Overview

eXo AddressBook is a contact management application which is part of the eXo Collaboration Suite product. It is written with eXo's [Portal:WebUI] framework as a portlet. It leverage [JCR|JCR:WebHome] as its data storage. As usual, main components are Exo Container components and can be configured through XML. System integration and extension points are  defined as [Component Plugins| Products Tech Overview:Components Registry#CS].



h1. Configuration

CS configuration is applied mainly in *WEB-INF/conf/cs/cs-plugins-configuration.xml*.
The following information will explain details of  eXo AdressBook configuration.

When cs-plugins-configuration.xml file is executed, the component-plugin named *contact.new.user.event.listener* will be referred to org.exoplatform.contact.service.impl.NewUserListener to create Users for Contact correspondingly to the Users existing in the Organization database. Users for Contact are saved in eXo JCR.

{code:language=xml}
......
<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>
   <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>
......
{code}

Explanation:

* *contact.new.user.event.listener*: unique key to avoid duplicate names.

* *addListenerPlugin*: This API of Organization service to allow other listener overwrite.

* *org.exoplatform.contact.service.impl.NewUserListener*: The object defines Contact Service to insert database.

* *description*: Some brief descriptions about plugin.

After Users for Contact are created and saved in eXo JCR, the function postSave() in org.exoplatform.contact.service.impl.NewUserListener  will be executed to create Contact and Address Book default for each user. This function also defines public contact group default basing on User's role. Each group contains contacts of User having the same role.

For example, users have administrator role are grouped in Administrator group, users have moderator role are grouped in Moderator group, users have normal user role are grouped in Users group.
So, when login into AdressBook Application by specific User, his/her default Address book, default Contact and many public contact groups are shown.

