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

    Copyright (C) 2003-2010 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.social.core.space.spi.SpaceService</target-component>
		<component-plugin>
			<name>Space Application Configuration</name>
			<set-method>setSpaceApplicationConfigPlugin</set-method>
			<type>org.exoplatform.social.core.space.SpaceApplicationConfigPlugin</type>
			<init-params>
				<object-param>
					<name>spaceHomeApplication</name>
					<description>Space Home Application</description>
					<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
						<field name="portletApp">
							<string>social-portlet</string>
						</field>
						<field name="portletName">
							<string>SpaceActivityStreamPortlet</string>
						</field>
						<field name="appTitle">
							<string>Home</string>
						</field>
					</object>
				</object-param>
				<object-param>
					<name>spaceApplicationListConfig</name>
					<description>space application list configuration</description>
					<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin">
						<field name="spaceApplicationList">
							<collection type="java.util.ArrayList">
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string/>
										</field>
										<field name="portletName">
											<string>ForumPortlet</string>
										</field>
										<field name="appTitle">
											<string>Discussions</string>
										</field>
										<field name="removable">
											<boolean>true</boolean>
										</field>
										<field name="order">
											<int>2</int>
										</field>
										<field name="uri">
											<string>forum</string>
										</field>
										<field name="preferences">
											<map type="java.util.HashMap">
												<entry>
													<key>
														<string>useAjax</string>
													</key>
													<value>
														<string>false</string>
													</value>
												</entry>
											</map>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string>wiki</string>
										</field>
										<field name="portletName">
											<string>WikiPortlet</string>
										</field>
										<field name="appTitle">
											<string>Wiki</string>
										</field>
										<field name="removable">
											<boolean>true</boolean>
										</field>
										<field name="order">
											<int>3</int>
										</field>
										<field name="uri">
											<string>wiki</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string/>
										</field>
										<field name="portletName">
											<string>FileExplorerPortlet</string>
										</field>
										<field name="appTitle">
											<string>Documents</string>
										</field>
										<field name="removable">
											<boolean>true</boolean>
										</field>
										<field name="order">
											<int>4</int>
										</field>
										<field name="uri">
											<string>documents</string>
										</field>
										<field name="preferences">
											<map type="java.util.HashMap">
												<entry>
													<key>
														<string>usecase</string>
													</key>
													<value>
														<string>parameterize</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>driveName</string>
													</key>
													<value>
														<string>{modifiedGroupId}</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>nodePath</string>
													</key>
													<value>
														<string>Documents</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>showSideBar</string>
													</key>
													<value>
														<string>true</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>showActionBar</string>
													</key>
													<value>
														<string>true</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>showFilterBar</string>
													</key>
													<value>
														<string>true</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>showTopBar</string>
													</key>
													<value>
														<string>true</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>categoryMandatoryWhenFileUpload</string>
													</key>
													<value>
														<string>false</string>
													</value>
												</entry>
												<entry>
													<key>
														<string>editInNewWindow</string>
													</key>
													<value>
														<string>false</string>
													</value>
												</entry>
											</map>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string>calendar</string>
										</field>
										<field name="portletName">
											<string>CalendarPortlet</string>
										</field>
										<field name="appTitle">
											<string>Agenda</string>
										</field>
										<field name="removable">
											<boolean>true</boolean>
										</field>
										<field name="order">
											<int>5</int>
										</field>
										<field name="uri">
											<string>calendar</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string>social-portlet</string>
										</field>
										<field name="portletName">
											<string>MembersPortlet</string>
										</field>
										<field name="appTitle">
											<string>Members</string>
										</field>
										<field name="removable">
											<boolean>true</boolean>
										</field>
										<field name="order">
											<int>6</int>
										</field>
										<field name="uri">
											<string>members</string>
										</field>
									</object>
								</value>
								<value>
									<object type="org.exoplatform.social.core.space.SpaceApplicationConfigPlugin$SpaceApplication">
										<field name="portletApp">
											<string>social-portlet</string>
										</field>
										<field name="portletName">
											<string>SpaceSettingPortlet</string>
										</field>
										<field name="appTitle">
											<string>Space Settings</string>
										</field>
										<field name="removable">
											<boolean>false</boolean>
										</field>
										<field name="order">
											<int>7</int>
										</field>
										<field name="uri">
											<string>settings</string>
										</field>
									</object>
								</value>
							</collection>
						</field>
					</object>
				</object-param>
			</init-params>
		</component-plugin>
	</external-component-plugins>
	<external-component-plugins>
		<target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
		<component-plugin>
			<name>Default Spaces Content Deployment</name>
			<set-method>addSpaceListener</set-method>
			<type>org.exoplatform.platform.common.space.plugin.XMLDeploymentPlugin</type>
			<description>XML Deployment Plugin</description>
			<init-params>
				<object-param>
					<name>Welcome Content</name>
					<description>Deployment Descriptor</description>
					<object type="org.exoplatform.services.deployment.DeploymentDescriptor">
						<field name="target">
							<object type="org.exoplatform.services.deployment.DeploymentDescriptor$Target">
								<field name="workspace">
									<string>collaboration</string>
								</field>
								<!-- relative node path to the space root path -->
								<field name="nodePath">
									<string>/SharedData</string>
								</field>
							</object>
						</field>
						<field name="sourcePath">
							<string>war:/conf/office-extension/social/artifacts/SpaceWelcome.xml</string>
						</field>
						<field name="cleanupPublication">
							<boolean>true</boolean>
						</field>
					</object>
				</object-param>
			</init-params>
		</component-plugin>
	</external-component-plugins>
	<external-component-plugins>
		<target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
		<component-plugin>
			<name>SpaceFileExplorerInitializer</name>
			<set-method>addSpaceListener</set-method>
			<type>org.exoplatform.platform.common.space.listeners.CustomizeSpaceHomePageListener</type>
			<init-params>
				<properties-param>
					<name>welcomeSCVCustomPreferences</name>
					<description>Customized Preferences for Single Content Viewer Portlet</description>
					<property name="nodeIdentifier" value="/Groups{spaceGroupId}/SharedData/welcome"/>
				</properties-param>
			</init-params>
		</component-plugin>
	</external-component-plugins>
	<external-component-plugins>
		<target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
		<component-plugin>
			<name>SpaceDriveViewInitializer</name>
			<set-method>addSpaceListener</set-method>
			<type>org.exoplatform.platform.common.space.listeners.CustomizeSpaceDriveListener</type>
			<description>This listener will add space manager permission to the given view</description>
			<init-params>
				<value-param>
					<name>space.drive.view</name>
					<value>Spacemanagement-Document-View</value>
				</value-param>
			</init-params>
		</component-plugin>
	</external-component-plugins>
</configuration>