Author: julien_viet
Date: 2009-12-11 16:41:36 -0500 (Fri, 11 Dec 2009)
New Revision: 1014
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-01.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-02.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-03.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-04.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-05.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-06.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-07.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-08.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-09.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-10.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-11.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-12.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-13.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-14.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-15.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-16.xml
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_1.java
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java
Log:
correct handling of namespace kernel 1.0 and 1.1
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java 2009-12-11
20:44:15 UTC (rev 1013)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -25,7 +25,9 @@
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
import org.w3c.dom.Document;
+import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -39,6 +41,7 @@
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.dom.DOMSource;
@@ -90,8 +93,8 @@
+ "XML declaration similar to\n"
+ "<configuration\n"
+ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
- + "
xsi:schemaLocation=\"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd\"\n"
- + "
xmlns=\"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd\">&q...);
+ + "
xsi:schemaLocation=\"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd\"\n"
+ + "
xmlns=\"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd\">&q...);
}
else
{
@@ -133,49 +136,39 @@
*/
public boolean isValid(URL url) throws NullPointerException, IOException
{
- SchemaFactory factory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- URL schemaURL = getClass().getResource("kernel-configuration_1_0.xsd");
- if (schemaURL != null)
- {
- try
- {
- Schema schema = factory.newSchema(schemaURL);
- Validator validator = schema.newValidator();
- Reporter reporter = new Reporter(url);
- validator.setErrorHandler(reporter);
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ String[] schemas = {
+ Namespaces.KERNEL_1_0_URI,
+ Namespaces.KERNEL_1_1_URI
+ };
+
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
"http://www.w3.org/2001/XMLSchema");
+
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
schemas);
+ factory.setNamespaceAware(true);
+ factory.setValidating(true);
- // Validate the document
- validator.validate(new StreamSource(url.openStream()));
- return reporter.valid;
- }
- catch (SAXException e)
- {
- log.error("Got a sax exception when doing XSD validation");
- e.printStackTrace(System.err);
- return false;
- }
+ try
+ {
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Reporter reporter = new Reporter(url);
+ builder.setErrorHandler(reporter);
+ builder.setEntityResolver(Namespaces.resolver);
+ builder.parse(url.openStream());
+ return reporter.valid;
}
- else
+ catch (ParserConfigurationException e)
{
- return true;
+ log.error("Got a parser configuration exception when doing XSD
validation");
+ return false;
}
+ catch (SAXException e)
+ {
+ log.error("Got a sax exception when doing XSD validation");
+ return false;
+ }
}
public Configuration unmarshall(URL url) throws Exception
{
-
- /*
- byte[] bytes = new byte[256];
- InputStream in = url.openStream();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- for (int s = in.read(bytes);s != -1;s = in.read(bytes)) {
- out.write(bytes, 0, s);
- }
- String s = out.toString();
- log.info("s = " + s);
- */
-
- //
boolean valid = isValid(url);
if (!valid)
{
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/EntityResolverImpl.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,101 @@
+/*
+ * 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/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.commons.utils.IOUtil;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+class EntityResolverImpl implements EntityResolver
+{
+
+ /** . */
+ private final Map<String, String> systemIdToResourcePath;
+
+ /** . */
+ private final ConcurrentMap<String, byte[]> systemIdToSource;
+
+ /** . */
+ private final ClassLoader loader;
+
+ public EntityResolverImpl(ClassLoader loader, Map<String, String>
systemIdToResourcePath)
+ {
+ // Defensive copy
+ this.systemIdToResourcePath = new HashMap<String,
String>(systemIdToResourcePath);
+ this.systemIdToSource = new ConcurrentHashMap<String, byte[]>();
+ this.loader = loader;
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
+ {
+ if (systemId != null)
+ {
+ byte[] data = systemIdToSource.get(systemId);
+
+ //
+ if (data == null)
+ {
+ String path = systemIdToResourcePath.get(systemId);
+ if (path != null)
+ {
+ InputStream in = loader.getResourceAsStream(path);
+ if (in != null)
+ {
+ data = IOUtil.getStreamContentAsBytes(in);
+ }
+ }
+
+ // Black list it, we won't find it
+ if (data == null)
+ {
+ data = new byte[0];
+ }
+
+ // Put in cache
+ systemIdToSource.put(systemId, data);
+
+ // Some basic prevention against stupid use of this class that could cause
OOME
+ if (systemIdToSource.size() > 1000)
+ {
+ systemIdToSource.clear();
+ }
+ }
+
+ //
+ if (data != null && data.length > 0)
+ {
+ return new InputSource(new ByteArrayInputStream(data));
+ }
+ }
+
+ //
+ return null;
+ }
+}
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/Namespaces.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,47 @@
+/*
+ * 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/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.xml.sax.EntityResolver;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+public class Namespaces
+{
+
+ /** . */
+ public static final String KERNEL_1_0_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
+
+ /** . */
+ public static final String KERNEL_1_1_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
+
+ /** . */
+ static final EntityResolver resolver;
+
+ static
+ {
+ Map<String, String> resourceMap = new HashMap<String, String>();
+ resourceMap.put(KERNEL_1_0_URI,
"org/exoplatform/container/configuration/kernel-configuration_1_0.xsd");
+ resourceMap.put(KERNEL_1_1_URI,
"org/exoplatform/container/configuration/kernel-configuration_1_1.xsd");
+ resolver = new EntityResolverImpl(Namespaces.class.getClassLoader(), resourceMap);
+ }
+}
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2009-12-11
20:44:15 UTC (rev 1013)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -29,6 +29,7 @@
import java.util.HashSet;
import java.util.Set;
+import static org.exoplatform.container.configuration.Namespaces.*;
/**
* Removes kernel namespace declaration from the document to not confuse the jibx thing.
@@ -44,12 +45,6 @@
private static final Log log =
ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
/** . */
- private static final String KERNEL_1_0_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
-
- /** . */
- private static final String KERNEL_1_1_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
-
- /** . */
private static final String XSI_URI =
"http://www.w3.org/2001/XMLSchema-instance";
/** . */
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java 2009-12-11
20:44:15 UTC (rev 1013)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -27,6 +27,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Set;
+import static org.exoplatform.container.configuration.Namespaces.*;
/**
* Filters a kernel DOM according to a list of active profiles.
@@ -38,12 +39,6 @@
{
/** . */
- private static final String KERNEL_1_0_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
-
- /** . */
- private static final String KERNEL_1_1_URI =
"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
-
- /** . */
private static final String PROFILE_ATTRIBUTE = "profile";
/** . */
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-01.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-01.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-01.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.portal.config.DataStorage</key>
+ <type>org.exoplatform.portal.config.jcr.DataStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.application.UserGadgetStorage</key>
+
<type>org.exoplatform.portal.application.jcr.UserGadgetStorageImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.layout.PortalLayoutService</key>
+ <type>org.exoplatform.portal.layout.jcr.PortalLayoutServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>template.location</name>
+ <description>Location of container templates</description>
+ <value>war:/conf/portal/template/containers</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserACL</key>
+ <type>org.exoplatform.portal.config.UserACL</type>
+ <init-params>
+ <value-param>
+ <name>super.user</name>
+ <description>administrator</description>
+ <value>root</value>
+ </value-param>
+
+ <value-param>
+ <name>portal.creator.groups</name>
+ <description>groups with membership type have permission to manage
portal</description>
+
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <description>specific membership type have full permission with group
navigation</description>
+ <value>manager</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <description>guests group</description>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>access.control.workspace</name>
+ <description>groups with memberships that have the right to access the
User Control Workspace</description>
+
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserPortalConfigService</key>
+ <type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal
configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or
not</description>
+ <value>classic</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>classic</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>portal</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+
<value><string>platform/administrators</string></value>
+
<value><string>platform/users</string></value>
+
<value><string>platform/guests</string></value>
+
<value><string>organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>group</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>user</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>page.templates</name>
+ <description>List of page templates</description>
+ <object
type="org.exoplatform.portal.config.PageTemplateConfig">
+ <field name="templates">
+ <collection
type="java.util.ArrayList"></collection>
+ </field>
+ <field
name="location"><string>war:/conf/portal/template/pages</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+
+ </component>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+
+ <component-plugin>
+ <name>user.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>group.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>ecm.new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
+ <description>description</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field
name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+
<value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field
name="alias"><string>userApplicationData</string></field>
+ <field
name="path"><string>ApplicationData</string></field>
+ <field
name="nodeType"><string>nt:unstructured</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field
name="identity"><string>*:/platform/administrators</string></field>
+ <field
name="read"><string>true</string></field>
+ <field
name="addNode"><string>true</string></field>
+ <field
name="setProperty"><string>true</string></field>
+ <field
name="remove"><string>true</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="mixinTypes">
+ <collection type="java.util.ArrayList">
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-02.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-02.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-02.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
+
<type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.gadget.SourceStorage</key>
+
<type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
+ <init-params>
+ <properties-param>
+ <name>location</name>
+ <description>The location store source of gadgets</description>
+ <property name="repository"
value="repository"></property>
+ <property name="workspace"
value="gadgets"></property>
+ <property name="store.path"
value="/"></property>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+
<key>org.exoplatform.application.registry.ApplicationRegistryService</key>
+
<type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+
<type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in
PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>administration</string></field>
+ <field
name="displayName"><string>Administration</string></field>
+ <field name="description"><string>application
for administration</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>ApplicationRegistryPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field
name="displayName"><string>Application
Registry</string></field>
+ <field
name="description"><string>Application
Registry</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>OrganizationPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field
name="displayName"><string>Organization
Management</string></field>
+ <field
name="description"><string>Organization
Management</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>AccountPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field
name="displayName"><string>New Account</string></field>
+ <field
name="description"><string>New Account</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>web</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>web</string></field>
+ <field
name="displayName"><string>web</string></field>
+ <field
name="description"><string>BasicPortlets</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>IFramePortlet</string></field>
+ <field
name="displayName"><string>IFrame</string></field>
+ <field
name="description"><string>IFrame</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>SiteMapPortlet</string></field>
+ <field
name="displayName"><string>SiteMap</string></field>
+ <field
name="description"><string>SiteMap</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>BrowserPortlet</string></field>
+ <field
name="displayName"><string>Web Explorer</string></field>
+ <field
name="description"><string>Web Explorer</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>dashboard</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>dashboard</string></field>
+ <field
name="displayName"><string>Dashboard</string></field>
+ <field
name="description"><string>Dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>dashboard</string></field>
+ <field
name="applicationName"><string>DashboardPortlet</string></field>
+ <field
name="displayName"><string>Dashboard
Portlet</string></field>
+ <field
name="description"><string>Dashboard
Portlet</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>dashboard</string></field>
+ <field
name="applicationName"><string>GadgetPortlet</string></field>
+ <field
name="displayName"><string>Gadget Wrapper
Portlet</string></field>
+ <field
name="description"><string>Gadget Wrapper
Portlet</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection
type="java.util.ArrayList" item-type="java.lang.String">
+
<value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-03.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-03.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-03.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.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>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field
name="type"><string>validator</string></field>
+ <field name="description"><string>validator
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>platform</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
/platform group</string></field>
+ <field
name="label"><string>Platform</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>administrators</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/administrators group</string></field>
+ <field
name="label"><string>Administrators</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>users</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/users group</string></field>
+ <field
name="label"><string>Users</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>guests</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/guests group</string></field>
+ <field
name="label"><string>Guests</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>organization</string></field>
+ <field
name="parentId"><string></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>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>communication</string></field>
+ <field
name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the
/organization/communication group</string></field>
+ <field
name="label"><string>Communication</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>marketing</string></field>
+ <field
name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the
/organization/communication/marketing group</string></field>
+ <field
name="label"><string>Marketing</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>press-and-media</string></field>
+ <field
name="parentId"><string>/organization/communication</string></field>
+ <field name="description"><string>the
/organization/communication/press-and-media group</string></field>
+ <field name="label"><string>Press and
Media</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>operations</string></field>
+ <field
name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the
/organization/operations and media group</string></field>
+ <field
name="label"><string>Operations</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>sales</string></field>
+ <field
name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the
/organization/operations/sales group</string></field>
+ <field
name="label"><string>Sales</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>finances</string></field>
+ <field
name="parentId"><string>/organization/operations</string></field>
+ <field name="description"><string>the
/organization/operations/finances group</string></field>
+ <field
name="label"><string>Finances</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>customers</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
/customers group</string></field>
+ <field
name="label"><string>Customers</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>partners</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
/partners group</string></field>
+ <field
name="label"><string>Partners</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>root</string></field>
+ <field
name="password"><string>exo</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>
+ manager:/platform/administrators,member:/platform/users,
+ 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>exo</string></field>
+ <field
name="firstName"><string>John</string></field>
+ <field
name="lastName"><string>Anthony</string></field>
+ <field
name="email"><string>john@localhost</string></field>
+ <field name="groups">
+ <string>
+ member:/platform/administrators,member:/platform/users,
+ manager:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>marry</string></field>
+ <field
name="password"><string>exo</string></field>
+ <field
name="firstName"><string>Marry</string></field>
+ <field
name="lastName"><string>Kelly</string></field>
+ <field
name="email"><string>marry@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>demo</string></field>
+ <field
name="password"><string>exo</string></field>
+ <field
name="firstName"><string>Demo</string></field>
+ <field
name="lastName"><string>exo</string></field>
+ <field
name="email"><string>demo@localhost</string></field>
+ <field name="groups">
+
<string>member:/platform/guests,member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created
user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field
name="groupId"><string>/platform/users</string></field>
+ <field
name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>marry</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-04.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-04.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-04.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object
type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+ <!-- for multiple ldap servers, use comma seperated list of host:port
(Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <!-- whether or not to enable ssl, if ssl is used ensure that the
javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
+ <!-- exo portal default installed javax.net.ssl.trustStore with file is
java.home/lib/security/cacerts-->
+ <!-- ldap service will check protocol, if protocol is ldaps, ssl is
enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 )
-->
+ <!-- when enable ssl, ensure server name is *.directory and port (Ex.
active.directory) -->
+ <field
name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
+ <field
name="rootdn"><string>CN=Administrator,CN=Users,
DC=exoplatform,DC=org</string></field>
+ <field
name="password"><string>site</string></field>
+
+ <field
name="version"><string>3</string></field>
+
+ <field
name="minConnection"><int>5</int></field>
+
+ <field
name="maxConnection"><int>10</int></field>
+
+ <field
name="referralMode"><string>ignore</string></field>
+
+ <field
name="serverName"><string>active.directory</string></field>
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+
<type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create
default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object
type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field
name="userLDAPClasses"><string>top,person,organizationalPerson,user</string></field>
+ <field
name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field
name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field
name="membershipTypeLDAPClasses"><string>top,group</string></field>
+ <field
name="membershipLDAPClasses"><string>top,group</string></field>
+
+ <field
name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field
name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field
name="userAuthenticationAttr"><string>mail</string></field>
+ <field
name="userUsernameAttr"><string>sAMAccountName</string></field>
+ <field
name="userPassword"><string>unicodePwd</string></field>
+ <!--unicodePwd-->
+ <field
name="userFirstNameAttr"><string>givenName</string></field>
+ <field
name="userLastNameAttr"><string>sn</string></field>
+ <field
name="userDisplayNameAttr"><string>displayName</string></field>
+ <field
name="userMailAttr"><string>mail</string></field>
+ <field
name="userObjectClassFilter"><string>objectClass=user</string></field>
+
+ <field
name="membershipTypeMemberValue"><string>member</string></field>
+ <field
name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field
name="membershipTypeNameAttr"><string>cn</string></field>
+ <field
name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
+ <field
name="membershiptypeObjectClass"><string>group</string></field>
+
+ <field
name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field
name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field
name="membershipObjectClass"><string>group</string></field>
+ <field
name="membershipObjectClassFilter"><string>objectClass=group</string></field>
+
+ <field
name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field
name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field
name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <!--external-component-plugins>
+
<target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+
<value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins-->
+
+ <import>classpath:/conf/portal/organization-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-05.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-05.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-05.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.ldap.LDAPService</key>
+ <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>ldap.config</name>
+ <description>Default ldap config</description>
+ <object
type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
+
+ <!-- for multiple ldap servers, use comma seperated list of
host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
+ <field
name="providerURL"><string>ldap://127.0.0.1:389,10.0.0.1:389</string></field>
+
+ <field
name="rootdn"><string>CN=Manager,DC=exoplatform,DC=org</string></field>
+
+ <field
name="password"><string>secret</string></field>
+
+ <field
name="version"><string>3</string></field>
+
+ <field
name="minConnection"><int>5</int></field>
+
+ <field
name="maxConnection"><int>10</int></field>
+
+ <field
name="referralMode"><string>follow</string></field>
+
+<!--
+ <field
name="referralMode"><string>ignore</string></field>
+-->
+
+ <field
name="serverName"><string>default</string></field>
+
+<!--
+ LDAP server names : default,
+ active.directory,
+ open.ldap,
+ netscape.directory,
+ redhat.directory;
+-->
+
+
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+
<type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.ldap.OrganizationLdapInitializer</type>
+ <description>this listener populate organization ldap service create
default dn</description>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <value-param>
+ <name>ldap.userDN.key</name>
+ <description>The key used to compose user DN</description>
+ <value>cn</value>
+ </value-param>
+
+ <object-param>
+ <name>ldap.attribute.mapping</name>
+ <description>ldap attribute mapping</description>
+ <object
type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">
+ <field
name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field>
+ <field
name="profileLDAPClasses"><string>top,organizationalPerson</string></field>
+ <field
name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
+ <field
name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
+ <field
name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
+
+ <field
name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <field
name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <field
name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+
+ <field
name="userUsernameAttr"><string>uid</string></field>
+ <field
name="userPassword"><string>userPassword</string></field>
+ <field
name="userFirstNameAttr"><string>givenName</string></field>
+ <field
name="userLastNameAttr"><string>sn</string></field>
+ <field
name="userDisplayNameAttr"><string>displayName</string></field>
+ <field
name="userMailAttr"><string>mail</string></field>
+ <field
name="userObjectClassFilter"><string>objectClass=person</string></field>
+
+ <field
name="membershipTypeMemberValue"><string>member</string></field>
+ <field
name="membershipTypeRoleNameAttr"><string>cn</string></field>
+ <field
name="membershipTypeNameAttr"><string>cn</string></field>
+ <field
name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field>
+ <field
name="membershiptypeObjectClass"><string>organizationalRole</string></field>
+
+ <field
name="groupObjectClass"><string>organizationalUnit</string></field>
+ <field
name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field>
+
+ <field
name="membershipObjectClass"><string>groupOfNames</string></field>
+ <field
name="membershipObjectClassFilter"><string>objectClass=groupOfNames</string></field>
+
+ <field
name="ldapCreatedTimeStampAttr"><string>createdTimeStamp</string></field>
+ <field
name="ldapModifiedTimeStampAttr"><string>modifiedTimeStamp</string></field>
+ <field
name="ldapDescriptionAttr"><string>description</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+
<value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <!-- for ldap clean database
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.ldap.LDAPService</target-component>
+ <component-plugin>
+ <name>delete.object</name>
+ <set-method>addDeleteObject</set-method>
+ <type>org.exoplatform.services.ldap.DeleteObjectCommand</type>
+ <init-params>
+ <values-param>
+ <name>objects.to.delete</name>
+ <value>cn=demo,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=test,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=Benj,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ <value>cn=tuan,ou=users,ou=portal,dc=exoplatform,dc=org</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+ -->
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-06.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-06.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-06.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+
<type>org.exoplatform.services.organization.jdbc.OrganizationServiceImpl</type>
+ </component>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.listener.ListenerService</target-component>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.RemoveUserProfileListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.postCreate</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.CreateUserListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.user.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.portal.config.RemoveUserPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.membershipType.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.RemoveMembershipListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.portal.config.RemoveGroupPortalConfigListener</type>
+ </component-plugin>
+
+ <component-plugin>
+ <name>organization.group.preDelete</name>
+ <set-method>addListener</set-method>
+
<type>org.exoplatform.services.organization.jdbc.listeners.RemoveGroupListener</type>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-07.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-07.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-07.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name"
value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-08.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-08.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-08.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.mail.MailService</key>
+ <type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>config</name>
+ <property name="mail.smtp.auth.username"
value="exoservice(a)gmail.com" />
+ <property name="mail.smtp.auth.password"
value="exoadmin" />
+ <property name="mail.smtp.host" value="smtp.gmail.com"
/>
+ <property name="mail.smtp.port" value="465" />
+ <property name="mail.smtp.starttls.enable"
value="true" />
+ <property name="mail.smtp.auth" value="true" />
+ <property name="mail.smtp.debug" value="false" />
+ <property name="mail.smtp.socketFactory.port"
value="465" />
+ <property name="mail.smtp.socketFactory.class"
value="javax.net.ssl.SSLSocketFactory" />
+ <property name="mail.smtp.socketFactory.fallback"
value="false" />
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-09.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-09.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-09.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
+ <component-plugin>
+ <name>addPaths</name>
+ <set-method>addPlugin</set-method>
+
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
+ <init-params>
+ <object-param>
+ <name>cms.configuration</name>
+ <description>configuration for the cms path</description>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
+ <field
name="repository"><string>repository</string></field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+
<value><string>collaboration</string></value>
+ </collection>
+ </field>
+ <field name="jcrPaths">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
+ <field
name="alias"><string>usersPath</string></field>
+ <field
name="path"><string>/Users</string></field>
+ <field name="permissions">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field
name="identity"><string>*:/platform/administrators</string></field>
+ <field
name="read"><string>true</string></field>
+ <field
name="addNode"><string>true</string></field>
+ <field
name="setProperty"><string>true</string></field>
+ <field
name="remove"><string>true</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
+ <field
name="identity"><string>*:/platform/users</string></field>
+ <field
name="read"><string>true</string></field>
+ <field
name="addNode"><string>false</string></field>
+ <field
name="setProperty"><string>true</string></field>
+ <field
name="remove"><string>false</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-10.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-10.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-10.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name"
value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="source-name" value="jdbcexo"/>
+ <property name="dialect" value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="repository" value="system"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-11.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-11.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-11.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.show_sql" value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size" value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <!--
+ <component>
+ <key>org.exoplatform.services.database.DatabaseService</key>
+
<type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
+ <init-params>
+ <properties-param>
+ <name>default</name>
+ <description>Connection configuration</description>
+ <property name='connection.driver'
value='org.hsqldb.jdbcDriver'/>
+ <property name='connection.url'
value='jdbc:hsqldb:file:../temp/data/exodb'/>
+ <property name='connection.login' value='sa'/>
+ <property name='connection.password' value=''/>
+ <property name='connection.min-size' value='3'/>
+ <property name='connection.max-size' value='5'/>
+ </properties-param>
+ </init-params>
+ </component>
+ -->
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcexo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName"
value="org.hsqldb.jdbcDriver"/>
+ <property name="url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-12.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-12.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-12.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+
<type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>
+ <init-params>
+ <object-param>
+ <name>conf</name>
+ <object
type="org.exoplatform.services.portletcontainer.PortletContainer">
+ <field name="global">
+ <object
type="org.exoplatform.services.portletcontainer.config.Global">
+ <field
name="name"><string>ExoPortletContainer</string></field>
+ <field name="description">
+ <string>A JSR 286 compliant portlet container
</string>
+ </field>
+ <field
name="majorVersion"><int>2</int></field>
+ <field
name="minorVersion"><int>0</int></field>
+ </object>
+ </field>
+ <field name="bundle">
+ <object
type="org.exoplatform.services.portletcontainer.config.DelegatedBundle">
+ <field
name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="cache">
+ <object
type="org.exoplatform.services.portletcontainer.config.Cache">
+ <field
name="enable"><string>true</string></field>
+ </object>
+ </field>
+ <field name="supportedContent">
+ <collection type="java.util.ArrayList">
+ <value>
+
<object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field
name="name"><string>text/html</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>text/wml</string> </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>audio/x-mpeg</string></field>
+ </object>
+ </value>
+ <value>
+
<object type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>image/bmp</string> </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>image/jpg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>image/jpeg</string> </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.SupportedContent">
+ <field name="name">
<string>image/gif</string> </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="customMode">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.CustomMode">
+ <field name="name">
<string>config</string> </field>
+ <field name="description">
+ <collection
type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.Description">
+ <field name="lang">
<string>en</string></field>
+ <field
name="description"><string>to let admin config portlets </string>
</field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.portletcontainer.config.Description">
+ <field
+ name="lang">
+ <string>
+ fr
+ </string>
+ </field>
+ <field
+ name="description">
+ <string>
+ permet de
+ configurer
+ les portlets
+ </string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="properties">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
+
type="org.exoplatform.services.portletcontainer.config.Properties">
+ <field name="description">
+ <string>
+ a testing property
+ </string>
+ </field>
+ <field name="name">
+ <string>test</string>
+ </field>
+ <field name="value">
+ <string>test_value</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-13.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-13.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-13.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <import>war:/conf/common/common-configuration.xml</import>
+ <import>war:/conf/common/logs-configuration.xml</import>
+ <import>war:/conf/database/database-configuration.xml</import>
+ <import>war:/conf/jcr/jcr-configuration.xml</import>
+ <import>war:/conf/common/portlet-container-configuration.xml</import>
+
+ <!--if organization service is database, import
hibernate-organization-configuration.xml-->
+ <import>war:/conf/organization/hibernate-configuration.xml</import>
+
+ <!-- <import>war:/conf/jdbc-configuration.xml</import> -->
+ <!--for organization service used active directory which is user lookup server
-->
+ <!--
+ <import>war:/conf/activedirectory-configuration.xml</import>
+ -->
+
+ <!--for organization service used ldap server which is user lookup server -->
+ <!--
+ <import>war:/conf/ldap-configuration.xml</import>
+ -->
+ <!-- <import>war:/conf/security-configuration.xml</import> -->
+ <import>war:/conf/organization/organization-configuration.xml</import>
+ <import>war:/conf/jcr/component-plugins-configuration.xml</import>
+ <import>war:/conf/mail/portal-mail-configuration.xml</import>
+ <import>war:/conf/portal/portal-configuration.xml</import>
+ <import>war:/conf/portal/application-registry-configuration.xml</import>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-14.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-14.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-14.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.security.SecurityService</key>
+
<type>org.exoplatform.services.security.impl.SecurityServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>security.authentication</name>
+ <value>sso</value>
+ </value-param>
+ <value-param>
+ <name>security.sso-authentication</name>
+ <value>cas</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-15.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-15.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-15.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+
+ <!-- JDK -->
+ <value-param>
+ <name>configurator</name>
+
<value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers"
value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level"
value="FINE"/>
+ </properties-param>
+ <!-- end JDK -->
+ <!-- Log4J -->
+ <!--
+ <value-param>
+ <name>configurator</name>
+
<value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="DEBUG,
stdout, file"/>
+ <property name="log4j.appender.stdout"
value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.layout"
value="org.apache.log4j.PatternLayout"/>
+ <property
name="log4j.appender.stdout.layout.ConversionPattern" value="%d {dd.MM.yyyy
HH:mm:ss} %c {1}: %m (%F, line %L) %n"/>
+ <property name="log4j.appender.file"
value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File"
value="jcr.log"/>
+ <property name="log4j.appender.file.layout"
value="org.apache.log4j.PatternLayout"/>
+ <property
name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy
HH:mm:ss} %m (%F, line %L) %n"/>
+ </properties-param>
+ -->
+ <!-- end Log4J-->
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-16.xml
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-16.xml
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-16.xml 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <init-params>
+ <properties-param>
+ <name>default-properties</name>
+ <description>Default initial context properties</description>
+ <!--
+ <property name="java.naming.factory.initial"
value="org.exoplatform.services.naming.SimpleContextFactory"/>
+ -->
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.LocaleConfigService</key>
+
<type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>locale.config.file</name>
+ <value>war:/conf/common/locales-config.xml</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.resources.ResourceBundleService</key>
+
<type>org.exoplatform.services.resources.jcr.ResourceBundleServiceImpl</type>
+ <init-params>
+ <values-param>
+ <name>classpath.resources</name>
+ <description>The resources that start with the following package name
should be load from file system</description>
+ <value>locale.portlet</value>
+ </values-param>
+ <values-param>
+ <name>init.resources</name>
+ <description>Store the following resources into the db for the first
launch </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ <value>locale.navigation.portal.classic</value>
+ <value>locale.navigation.group.platform.administrators</value>
+ <value>locale.navigation.group.platform.users</value>
+ <value>locale.navigation.group.platform.guests</value>
+
<value>locale.navigation.group.organization.management.executive-board</value>
+ </values-param>
+ <values-param>
+ <name>portal.resource.names</name>
+ <description>The properties files of the portal , those file will be
merged
+ into one ResoruceBundle properties </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ </values-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field
name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field
name="liveTime"><long>-1</long></field>
+ <field
name="distributed"><boolean>false</boolean></field>
+ <field
name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+</configuration>
\ No newline at end of file
Added:
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_1.java
===================================================================
---
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_1.java
(rev 0)
+++
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_1.java 2009-12-11
21:41:36 UTC (rev 1014)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.exoplatform.container.configuration.test;
+
+import org.exoplatform.container.configuration.ConfigurationUnmarshaller;
+import org.exoplatform.test.BasicTestCase;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+public class TestXSD_1_1 extends BasicTestCase
+{
+
+ public void testValidation() throws Exception
+ {
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ String baseDirPath = System.getProperty("basedir");
+ File baseDir = new File(baseDirPath + "/src/main/resources/xsd_1_1");
+ int count = 0;
+ for (File f : baseDir.listFiles(new FileFilter()
+ {
+ public boolean accept(File pathname)
+ {
+ return pathname.getName().endsWith(".xml");
+ }
+ }))
+ {
+ count++;
+ try
+ {
+ URL url = f.toURI().toURL();
+ assertTrue("XML configuration file " + url + " is not
valid", unmarshaller.isValid(url));
+ }
+ catch (MalformedURLException e)
+ {
+ fail("Was not expecting such exception " + e.getMessage());
+ }
+ }
+ assertEquals(17, count);
+ }
+}
\ No newline at end of file