<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2003-2007 eXo Platform SAS.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Affero General Public License
    as published by the Free Software Foundation; either version 3
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, see<http://www.gnu.org/licenses/>.

-->
<configuration
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
   xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

	<external-component-plugins>
		<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
		<component-plugin>
			<name>init.service.listener</name>
			<set-method>addListenerPlugin</set-method>
			<type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
			<description>this listener populate organization data for the first launch</description>
			<init-params>
				<value-param>
					<name>checkDatabaseAlgorithm</name>
					<description>check database</description>
					<value>entry</value>
				</value-param>
				<value-param>
					<name>printInformation</name>
					<description>Print information init database</description>
					<value>false</value>
				</value-param>
				<object-param>
					<name>configuration</name>
					<description>description</description>
					<object type="org.exoplatform.services.organization.OrganizationConfig">
						<field name="membershipType">
							<collection type="java.util.ArrayList">
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
										<field  name="type">
											<string>manager</string>
										</field>
										<field  name="description">
											<string>manager membership type</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
										<field  name="type">
											<string>member</string>
										</field>
										<field  name="description">
											<string>member membership type</string>
										</field>
									</object>
								</value>
							</collection>
						</field>

						<field name="group">
							<collection type="java.util.ArrayList">
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$Group">
										<field  name="name">
											<string>organization</string>
										</field>
										<field  name="parentId">
											<string/>
										</field>
										<field  name="description">
											<string>the organization group</string>
										</field>
										<field  name="label">
											<string>Organization</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$Group">
										<field  name="name">
											<string>management</string>
										</field>
										<field  name="parentId">
											<string>/organization</string>
										</field>
										<field  name="description">
											<string>the /organization/management group</string>
										</field>
										<field  name="label">
											<string>Management</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$Group">
										<field  name="name">
											<string>executive-board</string>
										</field>
										<field  name="parentId">
											<string>/organization/management</string>
										</field>
										<field  name="description">
											<string>the /organization/management/executive-board group</string>
										</field>
										<field  name="label">
											<string>Executive Board</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$Group">
										<field  name="name">
											<string>human-resources</string>
										</field>
										<field  name="parentId">
											<string>/organization/management</string>
										</field>
										<field  name="description">
											<string>the /organization/management/human-resource group</string>
										</field>
										<field  name="label">
											<string>Human Resources</string>
										</field>
									</object>
								</value>
							</collection>
						</field>
						<field name="user">
							<collection type="java.util.ArrayList">
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$User">
										<field name="userName">
											<string>${exo.super.user}</string>
										</field>
										<field name="password">
											<string>gtn</string>
										</field>
										<field name="firstName">
											<string>Root</string>
										</field>
										<field name="lastName">
											<string>Root</string>
										</field>
										<field name="email">
											<string>root@localhost</string>
										</field>
										<field name="groups">
											<string>member:/organization/management/executive-board</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$User">
										<field name="userName">
											<string>john</string>
										</field>
										<field name="password">
											<string>gtn</string>
										</field>
										<field name="firstName">
											<string>John</string>
										</field>
										<field name="lastName">
											<string>Smith</string>
										</field>
										<field name="email">
											<string>john.smith@acme.exoplatform.com</string>
										</field>
										<field name="groups">
											<string>manager:/organization/management/executive-board,*:/platform/administrators,*:/platform/web-contributors,*:/platform/users,member:/developers,manager:/organization/employees</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$User">
										<field name="userName">
											<string>mary</string>
										</field>
										<field name="password">
											<string>gtn</string>
										</field>
										<field name="firstName">
											<string>Mary</string>
										</field>
										<field name="lastName">
											<string>Williams</string>
										</field>
										<field name="email">
											<string>mary.williams@acme.exoplatform.com</string>
										</field>
										<field name="groups">
											<string>editor:/platform/web-contributors,manager:/platform/web-contributors,publisher:/platform/web-contributors,member:/organization/employees</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$User">
										<field name="userName">
											<string>james</string>
										</field>
										<field name="password">
											<string>gtn</string>
										</field>
										<field name="firstName">
											<string>James</string>
										</field>
										<field name="lastName">
											<string>Davis</string>
										</field>
										<field name="email">
											<string>james.davis@acme.exoplatform.com</string>
										</field>
										<field name="groups">
											<string>*:/organization/management/human-resources,redactor:/platform/web-contributors,author:/platform/web-contributors,member:/organization/employees</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.services.organization.OrganizationConfig$User">
										<field name="userName">
											<string>demo</string>
										</field>
										<field name="password">
											<string>gtn</string>
										</field>
										<field name="firstName">
											<string>Jack</string>
										</field>
										<field name="lastName">
											<string>Miller</string>
										</field>
										<field name="email">
											<string>jack.miller@acme.exoplatform.com</string>
										</field>
										<field name="groups">
											<string>member:/developers,member:/organization/employees</string>
										</field>
									</object>
								</value>
							</collection>
						</field>
					</object>
				</object-param>
			</init-params>
		</component-plugin>
	</external-component-plugins>
</configuration>
