exo-jcr SVN: r1052 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2009-12-15 03:37:26 -0500 (Tue, 15 Dec 2009)
New Revision: 1052
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-199: JBoss Cache persistence prototype
Fix issues related to 2 TCK tests that did not pass
testSaveInvalidStateException(org.apache.jackrabbit.test.api.SessionTest)
testSaveInvalidStateException(org.apache.jackrabbit.test.api.NodeTest)
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-12-15 08:31:59 UTC (rev 1051)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-12-15 08:37:26 UTC (rev 1052)
@@ -175,24 +175,35 @@
{
startBatch();
- if (data.getParentIdentifier() != null) {
- final Fqn<String> name = makeChildNodeFqn(data.getQPath()
- .getEntries()[data.getQPath().getEntries().length - 1]);
- Object value = cache.put(Fqn.fromRelativeFqn(Fqn
- .fromElements(JBossCacheStorage.NODES), Fqn
- .fromRelativeFqn(makeNodeFqn(data.getParentIdentifier()),
- name)), ITEM_ID, data.getIdentifier());
+ Object value;
+ if (data.getParentIdentifier() != null)
+ {
+ Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
+ if (parent == null)
+ {
+ throw new InvalidItemStateException("Node's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
+ }
+ final Fqn<String> name =
+ makeChildNodeFqn(data.getQPath().getEntries()[data.getQPath().getEntries().length - 1]);
+ value =
+ cache.put(Fqn.fromRelativeFqn(Fqn.fromElements(JBossCacheStorage.NODES), Fqn.fromRelativeFqn(
+ makeNodeFqn(data.getParentIdentifier()), name)), ITEM_ID, data.getIdentifier());
- if (value != null) {
- throw new ItemExistsException("Node already exists "
- + data.getQPath().getAsString());
- }
- }
+ if (value != null)
+ {
+ throw new ItemExistsException("Node already exists " + data.getQPath().getAsString());
+ }
+ }
- // add in NODES
- cache.put(Fqn.fromRelativeFqn(
- Fqn.fromElements(JBossCacheStorage.NODES), makeNodeFqn(data
- .getIdentifier())), ITEM_DATA, data);
+ // add in NODES
+ value =
+ cache.put(Fqn.fromRelativeFqn(Fqn.fromElements(JBossCacheStorage.NODES), makeNodeFqn(data.getIdentifier())),
+ ITEM_DATA, data);
+ if (value != null)
+ {
+ throw new ItemExistsException("Node already exists " + data.getQPath().getAsString());
+ }
}
/**
@@ -203,25 +214,37 @@
{
startBatch();
- String propName = data.getQPath().getName().getAsString();
- Object value = cache.put(Fqn.fromRelativeFqn(Fqn
- .fromElements(JBossCacheStorage.NODES), makeNodeFqn(data
- .getParentIdentifier())), propName, data.getIdentifier());
+ Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
+ if (parent == null)
+ {
+ throw new InvalidItemStateException("Property's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
+ }
+
+ String propName = data.getQPath().getName().getAsString();
+ Object value =
+ cache.put(Fqn.fromRelativeFqn(Fqn.fromElements(JBossCacheStorage.NODES), makeNodeFqn(data
+ .getParentIdentifier())), propName, data.getIdentifier());
- if (value != null) {
- throw new ItemExistsException("Property already exists "
- + data.getQPath().getAsString());
- }
+ if (value != null)
+ {
+ throw new ItemExistsException("Property already exists " + data.getQPath().getAsString());
+ }
- // add in PROPERTIES
- cache.put(Fqn.fromRelativeFqn(
- Fqn.fromElements(JBossCacheStorage.PROPS), makePropFqn(data
- .getIdentifier())), ITEM_DATA, data);
+ // add in PROPERTIES
+ value =
+ cache.put(Fqn.fromRelativeFqn(Fqn.fromElements(JBossCacheStorage.PROPS), makePropFqn(data.getIdentifier())),
+ ITEM_DATA, data);
- // REFERENCEs hadnling
- if (data.getType() == PropertyType.REFERENCE) {
- addReferences(data);
- }
+ if (value != null)
+ {
+ throw new ItemExistsException("Property already exists " + data.getQPath().getAsString());
+ }
+
+ // REFERENCEs hadnling
+ if (data.getType() == PropertyType.REFERENCE) {
+ addReferences(data);
+ }
}
/**
16 years, 7 months
exo-jcr SVN: r1051 - in jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster: test and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-12-15 03:31:59 -0500 (Tue, 15 Dec 2009)
New Revision: 1051
Added:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadIndexerQuery.java
Log:
EXOJCR-291: Added manual load test for cluster env.
Added: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java 2009-12-15 08:31:59 UTC (rev 1051)
@@ -0,0 +1,199 @@
+/*
+ * 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.services.jcr.lab.cluster.prepare;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+
+import java.util.Random;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+/**
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: TestLoadIndexerWriter.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class TestLoadIndexerWriter extends JcrAPIBaseTest
+{
+ public static final String COUNT = "count";
+
+ public static final String CONTENT = "Content";
+
+ public static final String STATISTIC = "Statistic";
+
+ private boolean stop = false;
+
+ private int threadCount = 1;
+
+ private static final String[] words =
+ new String[]{"private", "branch", "final", "string", "logging", "bottle", "property", "node", "repository",
+ "exception", "cycle", "value", "index", "meaning", "strange", "words", "hello", "outline", "finest",
+ "basetest", "writer"};
+
+ public void testWrite() throws RepositoryException
+ {
+ log.info("Creating threads...");
+ for (int i = 0; i < threadCount; i++)
+ {
+ // create new thread and start it
+ new Thread(new WriterTask(i)).start();
+ log.info("Thread#" + i + " created and started.");
+ }
+
+ // wait 4 minutes
+ try
+ {
+ Thread.sleep(60000 * 4);
+ }
+ catch (InterruptedException e)
+ {
+ log.error(e);
+ }
+
+ stop = true;
+ }
+
+ private class WriterTask implements Runnable
+ {
+
+ private int id;
+
+ private SessionImpl sessionLocal;
+
+ private Node statisticNode;
+
+ private Node contentNode;
+
+ private Random random;
+
+ public WriterTask(int id) throws RepositoryException
+ {
+ this.id = id;
+ // login
+ CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+ sessionLocal = (SessionImpl)repository.login(credentials, "ws");
+ // prepare nodes
+ Node root = sessionLocal.getRootNode();
+ Node threadNode = root.addNode("Thread" + id);
+ statisticNode = threadNode.addNode(STATISTIC);
+ contentNode = threadNode.addNode(CONTENT);
+ random = new Random();
+ sessionLocal.save();
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run()
+ {
+ try
+ {
+ while (!stop)
+ {
+ // get any word
+ int i = random.nextInt(words.length);
+ String word = words[i] + id; // "hello12" if thread#12 is creating it
+ // update statistic
+ updateStatistic(word);
+ // add actual node
+ createTree().addNode(word);
+ sessionLocal.save();
+ System.out.print("#");
+
+ try
+ {
+ Thread.sleep(300);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ }
+ catch (RepositoryException e)
+ {
+ log.error(e);
+ }
+ }
+
+ /**
+ * increments property in JCR: "./statistic/[word].count"
+ *
+ * @param word
+ * @throws RepositoryException
+ */
+ private void updateStatistic(String word) throws RepositoryException
+ {
+ Node wordNode;
+ long count = 0;
+ if (statisticNode.hasNode(word))
+ {
+ wordNode = statisticNode.getNode(word);
+ count = wordNode.getProperty(COUNT).getLong();
+ }
+ else
+ {
+ wordNode = statisticNode.addNode(word);
+ }
+ wordNode.setProperty(COUNT, count + 1);
+ }
+
+ /**
+ * Created node tree like: "./content/n123456/n1234567/n12345678"
+ * based on current time
+ *
+ * @return
+ * @throws RepositoryException
+ */
+ private Node createTree() throws RepositoryException
+ {
+ // created node tree like: "./content/n123456/n1234567/n12345678"
+ Node end;
+ long time = System.currentTimeMillis();
+ long child1 = time / 100000; // each 100s new node
+ long child2 = time / 10000; // each 10s new node
+ long child3 = time / 1000; // each 1s new node
+ end = addOrCreate("n" + child1, contentNode);
+ end = addOrCreate("n" + child2, end);
+ end = addOrCreate("n" + child3, end);
+ return end;
+ }
+
+ /**
+ * Gets or creates node
+ *
+ * @param name
+ * @param parent
+ * @return
+ * @throws RepositoryException
+ */
+ private Node addOrCreate(String name, Node parent) throws RepositoryException
+ {
+ if (parent.hasNode(name))
+ {
+ return parent.getNode(name);
+ }
+ else
+ return parent.addNode(name);
+ }
+ }
+
+}
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/prepare/TestLoadIndexerWriter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadIndexerQuery.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadIndexerQuery.java (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadIndexerQuery.java 2009-12-15 08:31:59 UTC (rev 1051)
@@ -0,0 +1,145 @@
+/*
+ * 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.services.jcr.lab.cluster.test;
+
+import junit.framework.AssertionFailedError;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.lab.cluster.prepare.TestLoadIndexerWriter;
+
+import java.util.Random;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+import javax.jcr.query.QueryResult;
+
+/**
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: TestLoadIndexerQuery.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class TestLoadIndexerQuery extends JcrAPIBaseTest
+{
+ private boolean stop = false;
+
+ private int threadCount = 1;
+
+ public void testQuery() throws RepositoryException
+ {
+ log.info("Creating threads...");
+ for (int i = 0; i < threadCount; i++)
+ {
+ // create new thread and start it
+ new Thread(new QueryTask()).start();
+ log.info("Thread#" + i + " created and started.");
+ }
+
+ // wait 4 minutes
+ try
+ {
+ Thread.sleep(60000 * 4);
+ }
+ catch (InterruptedException e)
+ {
+ log.error(e);
+ }
+
+ stop = true;
+ }
+
+ private class QueryTask implements Runnable
+ {
+ private SessionImpl sessionLocal;
+
+ private Node rootLocal;
+
+ private Random random;
+
+ public QueryTask() throws RepositoryException
+ {
+ // login
+ CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+ sessionLocal = (SessionImpl)repository.login(credentials, "ws");
+ // prepare nodes
+ rootLocal = sessionLocal.getRootNode();
+ random = new Random();
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run()
+ {
+ try
+ {
+ while (!stop)
+ {
+ Node threadNode = getRandomChild(rootLocal, "Thread*");
+ if (threadNode != null)
+ {
+ Node statisticNode = threadNode.getNode(TestLoadIndexerWriter.STATISTIC);
+ Node wordNode = getRandomChild(statisticNode, "*");
+ if (wordNode != null)
+ {
+ String word = wordNode.getName();
+ Long count = wordNode.getProperty(TestLoadIndexerWriter.COUNT).getLong();
+
+ QueryManager qman = sessionLocal.getWorkspace().getQueryManager();
+
+ Query q = qman.createQuery("SELECT * FROM nt:base WHERE fn:name() = '" + word + "'", Query.SQL);
+ QueryResult res = q.execute();
+ long sqlsize = res.getNodes().getSize();
+ try
+ {
+ assertTrue("Exp: "+count+"\t found:"+sqlsize, sqlsize >= count);
+ System.out.print("+("+sqlsize+")");
+ }
+ catch (AssertionFailedError e)
+ {
+ System.out.println("-"+e.getMessage());
+ }
+ }
+ }
+ }
+
+ }
+ catch (RepositoryException e)
+ {
+ log.error(e);
+ }
+ }
+
+ private Node getRandomChild(Node parent, String pattern) throws RepositoryException
+ {
+ NodeIterator iterator = parent.getNodes(pattern);
+ if (iterator.getSize() < 1)
+ {
+ return null;
+ }
+ int i = random.nextInt((int)iterator.getSize());
+ iterator.skip(i);
+ return iterator.nextNode();
+ }
+ }
+}
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestLoadIndexerQuery.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 7 months
exo-jcr SVN: r1050 - kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-14 19:36:17 -0500 (Mon, 14 Dec 2009)
New Revision: 1050
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java
Log:
minor thing that helps to write better unit test for clients
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java 2009-12-14 17:14:40 UTC (rev 1049)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycle.java 2009-12-15 00:36:17 UTC (rev 1050)
@@ -17,9 +17,10 @@
package org.exoplatform.container.component;
import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.component.ComponentRequestLifecycle;
+import java.util.IdentityHashMap;
import java.util.List;
+import java.util.Map;
/**
* <p>The request life cycle object allows a client to demarcate the life cycle of the various components
@@ -55,22 +56,30 @@
}
}
- List<ComponentRequestLifecycle> doEnd()
+ IdentityHashMap<Object, Throwable> doEnd()
{
+ IdentityHashMap<Object, Throwable> result = new IdentityHashMap<Object, Throwable>();
+
+ //
for (ComponentRequestLifecycle componentRLF : components)
{
+ Throwable t = null;
try
{
componentRLF.endRequest(container);
}
- catch (Exception e)
+ catch (Throwable throwable)
{
- // Swallow and log
+ t = throwable;
}
+ finally
+ {
+ result.put(componentRLF, t);
+ }
}
//
- return components;
+ return result;
}
/**
@@ -131,23 +140,29 @@
}
/**
- * Ends the life cycle of the most recent container started.
- * Only the components of the container that have not been previously enrolled in a life cycle
- * are ended.
+ * <p>Ends the life cycle of the most recent container started. Only the components of the container that
+ * have not been previously enrolled in a life cycle are ended.</p>
*
+ * <p>The result map returned has for keys the components whose the life cycle ended during this method call
+ * and the associated value are the potential throwable that were thrown by those components. It is usefull
+ * when writing unit test to be aware of the throwable of the various components involved in a request
+ * life cycle.</p>
+ *
* @throws IllegalStateException if no container life cycle is associated with this thread
+ * @return the result map
*/
- public static void end() throws IllegalStateException
+ public static Map<Object, Throwable> end() throws IllegalStateException
{
RequestLifeCycleStack lf = current.get();
if (lf == null)
{
throw new IllegalStateException();
}
- lf.end();
+ Map<Object, Throwable> result = lf.end();
if (lf.isEmpty())
{
current.set(null);
}
+ return result;
}
}
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java 2009-12-14 17:14:40 UTC (rev 1049)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/component/RequestLifeCycleStack.java 2009-12-15 00:36:17 UTC (rev 1050)
@@ -23,8 +23,10 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
+import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Set;
/**
@@ -87,14 +89,17 @@
lifeCycle.doBegin();
}
- void end()
+ Map<Object, Throwable> end()
{
RequestLifeCycle lifeCycle = removeLast();
//
- List<ComponentRequestLifecycle> components = lifeCycle.doEnd();
+ IdentityHashMap<Object, Throwable> result = lifeCycle.doEnd();
//
- allComponents.removeAll(components);
+ allComponents.removeAll(result.keySet());
+
+ //
+ return result;
}
}
16 years, 7 months
exo-jcr SVN: r1049 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/dataflow/persistent and 14 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2009-12-14 12:14:40 -0500 (Mon, 14 Dec 2009)
New Revision: 1049
Added:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java
Removed:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/PersistedValueData.java
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/value/ExtendedValue.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/PersistedPropertyData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/ValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/PropertyDefinitionComparator.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedPropertyDataWriter.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java
Log:
EXOJCR-274 TransientValueData rework part2; cleanups
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/value/ExtendedValue.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/value/ExtendedValue.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/value/ExtendedValue.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -39,12 +39,13 @@
*/
public int getOrderNumber();
- /**
- * Set order value in the list
- *
- * @return order value in the list
- */
- public void setOrderNumber(int orderNumber);
+ // TODO cleanup
+// /**
+// * Set order value in the list
+// *
+// * @return order value in the list
+// */
+// public void setOrderNumber(int orderNumber);
/**
* Return length of the value .
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/PersistedPropertyData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/PersistedPropertyData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/PersistedPropertyData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -22,7 +22,7 @@
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/ValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/ValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/ValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -32,13 +32,13 @@
{
// TODO cleanup
-// /**
-// * Set Value order number.
-// *
-// * @param orderNum
-// * int, Value order number
-// */
-// void setOrderNumber(int orderNum);
+ // /**
+ // * Set Value order number.
+ // *
+ // * @param orderNum
+ // * int, Value order number
+ // */
+ // void setOrderNumber(int orderNum);
/**
* Return Value order number.
@@ -81,7 +81,7 @@
* @return long
*/
long getLength();
-
+
/**
* Read <code>length</code> bytes from the binary value at <code>position</code> to the
* <code>stream</code>.
@@ -98,12 +98,16 @@
*/
long read(OutputStream stream, long length, long position) throws IOException;
- // TODO
-// /**
-// * Tell if this ValueData is transient (not saved).<br/>
-// * It means this ValueData instance of <code>TransientValueData<code/>.
-// *
-// * @return boolean, true if ValueData is transient, false - otherwise
-// */
-// boolean isTransient();
+ /**
+ * Indicates whether some other ValueData is "equals to" this ValueData. Return "true" if <code>valueData</code>
+ * can be treated as equal to this ValueData. Otherwise "false" returned.<p/>
+ *
+ * This method assumes that ValueData.equals(Object) implemented also and uses this method to perform the check.
+ *
+ * @see java.lang.Object#equals(Object)
+ *
+ * @param valueData, another ValueData
+ * @return boolean, "true" if this ValueData equals to another ValueData
+ */
+ boolean equals(ValueData another);
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -26,7 +26,6 @@
import org.exoplatform.services.jcr.core.ExtendedPropertyType;
import org.exoplatform.services.jcr.dataflow.DataManager;
import org.exoplatform.services.jcr.dataflow.ItemState;
-import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
@@ -37,7 +36,6 @@
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -40,11 +40,9 @@
import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.NodeImpl;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/PropertyDefinitionComparator.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/PropertyDefinitionComparator.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/PropertyDefinitionComparator.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -35,7 +35,6 @@
import org.exoplatform.services.jcr.impl.core.LocationFactory;
import org.exoplatform.services.jcr.impl.core.nodetype.ItemAutocreator;
import org.exoplatform.services.jcr.impl.core.value.ValueConstraintsMatcher;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -50,7 +50,6 @@
import org.exoplatform.services.jcr.impl.core.value.NameValue;
import org.exoplatform.services.jcr.impl.core.value.PathValue;
import org.exoplatform.services.jcr.impl.core.value.ValueFactoryImpl;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -33,7 +33,6 @@
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.LocationFactory;
import org.exoplatform.services.jcr.impl.core.value.ValueFactoryImpl;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -22,7 +22,7 @@
import org.exoplatform.services.jcr.core.value.ReadableBinaryValue;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractTransientValueData;
import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -31,6 +31,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
import java.util.Calendar;
import javax.jcr.PropertyType;
@@ -43,7 +44,7 @@
*
* @author Gennady Azarenkov
*
- * @version $Id: BaseValue.java 34801 2009-07-31 15:44:50Z dkatayev $
+ * @version $Id$
*/
public abstract class BaseValue implements ExtendedValue, ReadableBinaryValue
{
@@ -295,20 +296,21 @@
}
}
- /**
- * {@inheritDoc}
- */
- public void setOrderNumber(int order)
- {
- try
- {
- getLocalData(type == PropertyType.BINARY).setOrderNumber(order);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
+ // TODO cleanup
+// /**
+// * {@inheritDoc}
+// */
+// public void setOrderNumber(int order)
+// {
+// try
+// {
+// getLocalData(type == PropertyType.BINARY).setOrderNumber(order);
+// }
+// catch (IOException e)
+// {
+// throw new RuntimeException(e);
+// }
+// }
/**
* {@inheritDoc}
@@ -321,7 +323,7 @@
/**
* Session scope ValueData.
*/
- protected class LocalTransientValueData extends AbstractValueData
+ protected class LocalTransientValueData extends AbstractTransientValueData
{
protected InputStream stream;
@@ -355,6 +357,28 @@
length = idata.getLength();
}
+ public boolean equals(ValueData another)
+ {
+ if (bytes != null)
+ {
+ // by content
+ try
+ {
+ return Arrays.equals(getAsByteArray(), another.getAsByteArray());
+ }
+ catch (IOException e)
+ {
+ log.error("Read error", e);
+ return false;
+ }
+ }
+ else
+ {
+ // TODO by stream... not equals
+ return false;
+ }
+ }
+
/**
* {@inheritDoc}
*/
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractPersistedValueData.java (from rev 1048, jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/PersistedValueData.java)
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractPersistedValueData.java (rev 0)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractPersistedValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -0,0 +1,73 @@
+/*
+ * 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.services.jcr.impl.dataflow;
+
+import org.exoplatform.services.jcr.datamodel.ValueData;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter Nedonosko</a>
+ * @version $Id$
+ */
+public abstract class AbstractPersistedValueData implements ValueData
+{
+
+ protected final static Log LOG = ExoLogger.getLogger("jcr.PersistedValueData");
+
+ protected int orderNumber;
+
+ protected AbstractPersistedValueData(int orderNumber)
+ {
+ this.orderNumber = orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final int getOrderNumber()
+ {
+ return orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ValueData)
+ {
+ return this.equals((ValueData)obj);
+ }
+
+ return false;
+ }
+
+ /**
+ * Create transient copy of persisted data.
+ *
+ * @return TransientValueData
+ * @throws RepositoryException if error ocurs
+ */
+ @Deprecated
+ public abstract TransientValueData createTransientCopy() throws RepositoryException;
+}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractPersistedValueData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Copied: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java (from rev 1048, jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractValueData.java)
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java (rev 0)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -0,0 +1,62 @@
+/*
+ * 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.services.jcr.impl.dataflow;
+
+import org.exoplatform.services.jcr.datamodel.ValueData;
+
+/**
+ *
+ * Created by The eXo Platform SAS .
+ *
+ * @author Gennady Azarenkov
+ * @version $Id:AbstractValueData.java 12534 2007-02-02 15:30:52Z peterit $
+ */
+
+public abstract class AbstractTransientValueData implements ValueData
+{
+
+ protected int orderNumber;
+
+ protected AbstractTransientValueData(int orderNumber)
+ {
+ this.orderNumber = orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final int getOrderNumber()
+ {
+ return orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ValueData)
+ {
+ return this.equals((ValueData)obj);
+ }
+
+ return false;
+ }
+}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -1,52 +0,0 @@
-/*
- * 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.services.jcr.impl.dataflow;
-
-import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-/**
- *
- * Created by The eXo Platform SAS .
- *
- * @author Gennady Azarenkov
- * @version $Id:AbstractValueData.java 12534 2007-02-02 15:30:52Z peterit $
- */
-
-public abstract class AbstractValueData implements ValueData
-{
-
- protected int orderNumber;
-
- protected AbstractValueData(int orderNumber)
- {
- this.orderNumber = orderNumber;
- }
-
- public final int getOrderNumber()
- {
- return orderNumber;
- }
-
- public final void setOrderNumber(int orderNumber)
- {
- this.orderNumber = orderNumber;
- }
-}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/PersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/PersistedValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/PersistedValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -1,59 +0,0 @@
-/*
- * 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.services.jcr.impl.dataflow;
-
-import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-import javax.jcr.RepositoryException;
-
-/**
- * @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter Nedonosko</a>
- * @version $Id$
- */
-public abstract class PersistedValueData implements ValueData
-{
-
- protected final static Log LOG = ExoLogger.getLogger("jcr.PersistedValueData");
-
- protected int orderNumber;
-
- protected PersistedValueData(int orderNumber)
- {
- this.orderNumber = orderNumber;
- }
-
- /**
- * {@inheritDoc}
- */
- public final int getOrderNumber()
- {
- return orderNumber;
- }
-
- /**
- * Create transient copy of persisted data.
- *
- * @return TransientValueData
- * @throws RepositoryException if error ocurs
- */
- @Deprecated
- public abstract TransientValueData createTransientCopy() throws RepositoryException;
-}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -25,7 +25,6 @@
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.SpoolFile;
@@ -54,19 +53,17 @@
/**
* Created by The eXo Platform SAS.<br/>
*
- * @author Gennady Azarenkov
- * @version $Id: TransientValueData.java 35209 2009-08-07 15:32:27Z pnedonosko $
+ * @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter Nedonosko</a>
+ * @version $Id$
*/
-public class TransientValueData implements ValueData /*extends AbstractValueData*/
+public class TransientValueData implements ValueData
{
protected final static Log LOG = ExoLogger.getLogger("jcr.TransientValueData");
- private static final long serialVersionUID = -5280857006905550884L;
-
protected ValueData delegate;
- protected class NewValueData extends AbstractValueData
+ protected class NewValueData extends AbstractTransientValueData
{
protected byte[] data;
@@ -484,8 +481,82 @@
deleteCurrentSpoolFile();
}
- // ///////////////////////////////////
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(ValueData another)
+ {
+ if (this == another)
+ {
+ return true;
+ }
+ if (isByteArray() == another.isByteArray())
+ {
+ // by content
+ try
+ {
+ if (isByteArray())
+ {
+ // compare bytes
+ return Arrays.equals(getAsByteArray(), another.getAsByteArray());
+ }
+ else
+ {
+ // it's comparison of BLOB values
+ // they can be equal in theory, but we will not check BLOB files content due to performance
+ // check only if it's not a same file or stream (not real) backed both
+
+ File dataFile;
+ if (another instanceof TransientValueData)
+ {
+ // if both transient... or stream of file can be equal
+ TransientValueData transnt = (TransientValueData)another;
+
+ if (transnt.delegate instanceof NewValueData)
+ {
+ // if both are transient... check stream or file
+ NewValueData otherVd = (NewValueData)transnt.delegate;
+ if (this.tmpStream == otherVd.tmpStream)
+ {
+ return true;
+ }
+ dataFile = otherVd.spoolFile;
+ }
+ else if (transnt.delegate instanceof FileStreamPersistedValueData)
+ {
+ // if other persistent as delegated - check file
+ dataFile = ((FileStreamPersistedValueData)transnt.delegate).getFile();
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else if (another instanceof FileStreamPersistedValueData)
+ {
+ FileStreamPersistedValueData persisted = (FileStreamPersistedValueData)another;
+
+ // if other persistent - check file
+ dataFile = persisted.getFile();
+ }
+ else
+ {
+ return false;
+ }
+
+ return spoolFile != null ? spoolFile.equals(dataFile) : false;
+ }
+ }
+ catch (IOException e)
+ {
+ LOG.error("Read error", e);
+ return false;
+ }
+ }
+ return false;
+ }
+
/**
* Spool ValueData InputStream to a temp File.
*/
@@ -706,13 +777,17 @@
private void deleteCurrentSpoolFile() throws IOException
{
if (spoolChannel != null)
+ {
spoolChannel.close();
+ }
if (spoolFile != null)
{
if (spoolFile instanceof SpoolFile)
+ {
((SpoolFile)spoolFile).release(this);
+ }
if (deleteSpoolFile && spoolFile.exists())
{
@@ -1137,138 +1212,28 @@
/**
* {@inheritDoc}
*/
- public boolean equals(Object obj)
+ public boolean equals(ValueData another)
{
- if (this == obj || this.delegate == obj)
+ if (this == another)
{
return true;
}
+ return delegate.equals(another);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
if (obj instanceof ValueData)
{
-
- ValueData other = (ValueData)obj;
- if (isByteArray() == other.isByteArray())
- {
- // by content
- try
- {
- if (isByteArray())
- {
- // compare bytes
- return Arrays.equals(getAsByteArray(), other.getAsByteArray());
- }
- else
- {
- // compare files
- if (other instanceof TransientValueData)
- {
-
- // if both transient... or stream of file can be equal
- TransientValueData transnt = (TransientValueData)other;
-
- if (this.delegate == transnt.delegate)
- {
- return true;
- }
-
- if (this.delegate instanceof NewValueData)
- {
- if (transnt.delegate instanceof NewValueData)
- {
- // if both are transient
- NewValueData thisVd = (NewValueData)this.delegate;
- NewValueData otherVd = (NewValueData)transnt.delegate;
- if (thisVd.tmpStream == otherVd.tmpStream)
- {
- return true;
- }
- else if (thisVd.spoolFile != null)
- {
- return thisVd.spoolFile.equals(otherVd.spoolFile);
- }
- }
- else if (transnt.delegate instanceof FileStreamPersistedValueData)
- {
- // TODO ?
-
- }
- }
- }
- // TODO cleanup
- // else if (other instanceof StreamPersistedValueData)
- // {
- // // else - it's comparison of values from transient and peristent layers
- // // they can be equal in theory, but we will not check BLOB files content due to performance
- // // check only if it's not a same file or stream (not real) backed both
- //
- // StreamPersistedValueData persisted = (StreamPersistedValueData)other;
- //
- // if (this.delegate instanceof NewValueData)
- // {
- // // if this is newly created/updated
- // NewValueData thisVd = (NewValueData)this.delegate;
- //
- // if (thisVd.tmpStream == persisted.getStream())
- // {
- // return true;
- // }
- // else if (thisVd.spoolFile != null)
- // {
- // return thisVd.spoolFile.equals(persisted.getFile());
- // }
- // }
- // }
- else if (other instanceof FileStreamPersistedValueData)
- {
- // else - it's comparison of values from transient and peristent layers
- // they can be equal in theory, but we will not check BLOB files content due to performance
- // check only if it's not a same file or stream (not real) backed both
-
- FileStreamPersistedValueData persisted = (FileStreamPersistedValueData)other;
-
- if (this.delegate instanceof NewValueData)
- {
- // if this is newly created/updated and other is persistent
- NewValueData thisVd = (NewValueData)this.delegate;
-
- if (thisVd.spoolFile != null)
- {
- if (persisted.getFile() == thisVd.spoolFile)
- {
- return true;
- }
-
- return thisVd.spoolFile.equals(persisted.getFile());
- }
- }
- else if (this.delegate instanceof FileStreamPersistedValueData)
- {
- // if this is two persistent comparison
- FileStreamPersistedValueData thisVd = (FileStreamPersistedValueData)this.delegate;
-
- if (persisted.getFile() == thisVd.getFile())
- {
- return true;
- }
-
- return thisVd.getFile().equals(persisted.getFile());
- }
- else
- {
- // TODO what we ca have here more?
- }
- }
- }
- }
- catch (IOException e)
- {
- LOG.error("Read error", e);
- return false;
- }
- }
+ return equals((ValueData)obj);
}
+
return false;
}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -20,7 +20,7 @@
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.dataflow.EditableValueData;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -42,9 +42,9 @@
* Created by The eXo Platform SAS.
*
* @author Gennady Azarenkov
- * @version $Id: ByteArrayPersistedValueData.java 11907 2008-03-13 15:36:21Z ksm $
+ * @version $Id$
*/
-public class ByteArrayPersistedValueData extends PersistedValueData
+public class ByteArrayPersistedValueData extends AbstractPersistedValueData
{
protected byte[] data;
@@ -118,31 +118,28 @@
return true;
}
- @Override
- public boolean equals(Object obj)
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(ValueData another)
{
- if (this == obj)
+ if (this == another)
{
return true;
}
- if (obj instanceof ValueData)
+ if (isByteArray() && another.isByteArray())
{
-
- ValueData other = (ValueData)obj;
- if (isByteArray() && other.isByteArray())
+ // by content
+ try
{
- // by content
- try
- {
- return Arrays.equals(getAsByteArray(), other.getAsByteArray());
- }
- catch (IOException e)
- {
- LOG.error("Read error", e);
- return false;
- }
+ return Arrays.equals(getAsByteArray(), another.getAsByteArray());
}
+ catch (IOException e)
+ {
+ LOG.error("Read error", e);
+ return false;
+ }
}
return false;
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -19,7 +19,7 @@
package org.exoplatform.services.jcr.impl.dataflow.persistent;
import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import java.io.File;
@@ -40,10 +40,10 @@
* Created by The eXo Platform SAS.
*
* @author Gennady Azarenkov
- * @version $Id: FileStreamPersistedValueData.java 11907 2008-03-13 15:36:21Z ksm $
+ * @version $Id$
*/
-public class FileStreamPersistedValueData extends PersistedValueData
+public class FileStreamPersistedValueData extends AbstractPersistedValueData
{
protected File file;
@@ -138,42 +138,37 @@
return false;
}
- @Override
- public boolean equals(Object obj)
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(ValueData another)
{
- if (this == obj)
+ if (this == another)
{
return true;
}
- if (obj instanceof ValueData)
+ if (!isByteArray() && !another.isByteArray())
{
- ValueData other = (ValueData)obj;
- if (!isByteArray() && !other.isByteArray())
+ // compare files
+ try
{
- // by content
- try
+ if (another instanceof TransientValueData)
{
- // compare files
- if (other instanceof TransientValueData)
- {
- // if other transient... files can be equal
- return file.equals(((TransientValueData)other).getSpoolFile());
- }
- else if (other instanceof FileStreamPersistedValueData)
- {
- // else - it's comparison of values from peristent layer
- // they can be equal by file backed them
-
- return file.equals(((FileStreamPersistedValueData)other).getFile());
- }
+ // if another transient
+ return file.equals(((TransientValueData)another).getSpoolFile());
}
- catch (IOException e)
+ else if (another instanceof FileStreamPersistedValueData)
{
- LOG.error("Read error", e);
- return false;
+ // both from peristent layer
+ return file.equals(((FileStreamPersistedValueData)another).getFile());
}
}
+ catch (IOException e)
+ {
+ LOG.error("Read error", e);
+ return false;
+ }
}
return false;
}
@@ -204,7 +199,7 @@
private byte[] fileToByteArray() throws IOException
{
// TODO do refactor of work with NIO
-
+
FileChannel fch = new FileInputStream(file).getChannel();
try
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -60,7 +60,7 @@
* Date: 09.06.2009
*
* @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter Nedonosko</a>
- * @version $Id: FileStreamTransientValueData.java 34801 2009-07-31 15:44:50Z dkatayev $
+ * @version $Id$
*/
@Deprecated
public class FileStreamTransientValueData extends TransientValueData
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -39,7 +39,7 @@
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.storage.SystemDataContainerHolder;
import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
@@ -384,7 +384,7 @@
if (vd instanceof TransientValueData)
{
TransientValueData tvd = (TransientValueData)vd;
- PersistedValueData pvd;
+ AbstractPersistedValueData pvd;
if (vd.isByteArray())
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedPropertyDataWriter.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedPropertyDataWriter.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedPropertyDataWriter.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -22,7 +22,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter;
import org.exoplatform.services.jcr.dataflow.serialization.SerializationConstants;
import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import java.io.IOException;
import java.util.List;
@@ -73,7 +73,7 @@
PersistedValueDataWriter wr = new PersistedValueDataWriter();
for (int i = 0; i < listSize; i++)
{
- wr.write(out, (PersistedValueData)values.get(i));
+ wr.write(out, (AbstractPersistedValueData)values.get(i));
}
}
else
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -21,7 +21,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.ObjectReader;
import org.exoplatform.services.jcr.dataflow.serialization.SerializationConstants;
import org.exoplatform.services.jcr.dataflow.serialization.UnknownClassIdException;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
@@ -84,7 +84,7 @@
* @throws IOException
* If an I/O error has occurred.
*/
- public PersistedValueData read(ObjectReader in) throws UnknownClassIdException, IOException
+ public AbstractPersistedValueData read(ObjectReader in) throws UnknownClassIdException, IOException
{
File tempDirectory = new File(SerializationConstants.TEMP_DIR);
tempDirectory.mkdirs();
@@ -125,7 +125,7 @@
sf.acquire(this); // TODO workaround for AsyncReplication test
try
{
- PersistedValueData vd = new FileStreamPersistedValueData(sf, orderNumber);
+ AbstractPersistedValueData vd = new FileStreamPersistedValueData(sf, orderNumber);
// skip data in input stream
if (in.skip(length) != length)
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -20,7 +20,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter;
import org.exoplatform.services.jcr.dataflow.serialization.SerializationConstants;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
import org.exoplatform.services.jcr.util.IdGenerator;
@@ -46,7 +46,7 @@
* @throws IOException
* If an I/O error has occurred.
*/
- public void write(ObjectWriter out, PersistedValueData vd) throws IOException
+ public void write(ObjectWriter out, AbstractPersistedValueData vd) throws IOException
{
// write id
out.writeInt(SerializationConstants.PERSISTED_VALUE_DATA);
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -32,7 +32,7 @@
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.core.value.ValueFactoryImpl;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
@@ -195,7 +195,7 @@
values = new ArrayList<ValueData>();
for (ValueData val : prop.getValues())
{
- values.add(((PersistedValueData)val).createTransientCopy());
+ values.add(((AbstractPersistedValueData)val).createTransientCopy());
}
}
TransientPropertyData newData =
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -1928,6 +1928,7 @@
long vlen = swapFile.length();
if (vlen < 0)
{
+ // TODO not actual with SwapFile, but if it will be reworked can be so
streamLength = stream.available();
LOG.warn("Cannot obtain exact Value data length, will use available from the stream " + streamLength
+ ". Property " + data.getQPath().getAsString());
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.dataflow.serialization;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
@@ -52,7 +52,7 @@
public void testSerialization() throws Exception
{
- List<PersistedValueData> list = new ArrayList<PersistedValueData>();
+ List<AbstractPersistedValueData> list = new ArrayList<AbstractPersistedValueData>();
// Random random = new Random();
ByteArrayInputStream bin;
@@ -63,7 +63,7 @@
list.add(new StreamPersistedValueData(null, null, bin, 0));
}
- Iterator<PersistedValueData> it;
+ Iterator<AbstractPersistedValueData> it;
// Serialize with JCR
long jcrwrite = 0;
@@ -96,7 +96,7 @@
PersistedValueDataReader rdr = new PersistedValueDataReader(fileCleaner, maxBufferSize, holder);
for (int i = 0; i < nodes; i++)
{
- PersistedValueData obj = rdr.read(jcrin);
+ AbstractPersistedValueData obj = rdr.read(jcrin);
}
t3 = System.currentTimeMillis() - t3;
jcrread += t3;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java 2009-12-14 16:07:53 UTC (rev 1048)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java 2009-12-14 17:14:40 UTC (rev 1049)
@@ -21,7 +21,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.ObjectReader;
import org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter;
import org.exoplatform.services.jcr.dataflow.serialization.UnknownClassIdException;
-import org.exoplatform.services.jcr.impl.dataflow.PersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
16 years, 7 months
exo-jcr SVN: r1048 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2009-12-14 11:07:53 -0500 (Mon, 14 Dec 2009)
New Revision: 1048
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java
Log:
EXOJCR-199: JBoss Cache persistence prototype
Debug capabilities added in JDBCStorageConnectionFactory, now we can switch to the debug mode thanks to
JDBCStorageConnectionFactory.DEBUG.set(true) to make it count the total amount of connections and show the trace
thanks to JDBCStorageConnectionFactory.SHOW_TRACE.set(true)
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java 2009-12-14 15:30:42 UTC (rev 1047)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java 2009-12-14 16:07:53 UTC (rev 1048)
@@ -1,13 +1,33 @@
+/*
+ * 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 3 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.services.jcr.impl.storage.jbosscache;
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection;
+import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
+
import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
import javax.jcr.RepositoryException;
-import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection;
-import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
-
/**
* This class is used to holds the JDBC connection open during the live time of
* the {@link JBossCacheStorageConnection}. We keep one
@@ -17,63 +37,91 @@
* @author nicolasfilotto
*
*/
-public class JDBCStorageConnectionFactory {
+public class JDBCStorageConnectionFactory
+{
- /**
- * The {@link ThreadLocal} in which we store all the current opened
- * connections
- */
- private static final ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>> CONNECTIONS = new ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>>();
+ /**
+ * The {@link ThreadLocal} in which we store all the current opened
+ * connections
+ */
+ private static final ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>> CONNECTIONS =
+ new ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>>();
- /**
- * Gives the current opened connection for the related
- * {@link WorkspaceDataContainer} if it exists, returns a new one otherwise
- *
- * @param dataContainer
- * the data container for which we want a connection
- * @return an opened connection
- * @throws RepositoryException
- * if an error occurs
- */
- static JDBCStorageConnection get(WorkspaceDataContainer dataContainer)
- throws RepositoryException {
- Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS
- .get();
- if (connections == null) {
- connections = new HashMap<WorkspaceDataContainer, JDBCStorageConnection>();
- CONNECTIONS.set(connections);
- }
- JDBCStorageConnection connection = connections.get(dataContainer);
- if (connection == null || !connection.isOpened()) {
- connection = (JDBCStorageConnection) dataContainer.openConnection();
- connections.put(dataContainer, connection);
- }
- return connection;
- }
+ /**
+ * Indicates if we are in a debug mode
+ */
+ public static AtomicBoolean DEBUG = new AtomicBoolean(false);
- /**
- * Close the current opened connection related to the given
- * {@link WorkspaceDataContainer}
- *
- * @param dataContainer
- * the data container for which we want to close the connection
- * @throws IllegalStateException
- * if connection is already closed
- * @throws RepositoryException
- * if some exception occured
- */
- static void close(WorkspaceDataContainer dataContainer)
- throws IllegalStateException, RepositoryException {
- Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS
- .get();
- if (connections == null) {
- return;
- }
- JDBCStorageConnection connection = connections.remove(dataContainer);
- if (connection == null || !connection.isOpened()) {
- return;
- }
- connection.close();
- connection = null;
- }
+ /**
+ * The total amount of connections. Used for debugging purpose only.
+ */
+ public static AtomicInteger TOTAL_CONNECTION = new AtomicInteger(0);
+
+ /**
+ * Indicates if we display the stack trace into the output stream. Used for
+ * debugging purpose only.
+ */
+ public static AtomicBoolean SHOW_TRACE = new AtomicBoolean(false);
+
+ /**
+ * Gives the current opened connection for the related
+ * {@link WorkspaceDataContainer} if it exists, returns a new one otherwise
+ *
+ * @param dataContainer
+ * the data container for which we want a connection
+ * @return an opened connection
+ * @throws RepositoryException
+ * if an error occurs
+ */
+ static JDBCStorageConnection get(WorkspaceDataContainer dataContainer) throws RepositoryException
+ {
+ if (DEBUG.get())
+ {
+ if (SHOW_TRACE.get())
+ {
+ (new Exception()).printStackTrace();
+ }
+ TOTAL_CONNECTION.incrementAndGet();
+ }
+ Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS.get();
+ if (connections == null)
+ {
+ connections = new HashMap<WorkspaceDataContainer, JDBCStorageConnection>();
+ CONNECTIONS.set(connections);
+ }
+ JDBCStorageConnection connection = connections.get(dataContainer);
+ if (connection == null || !connection.isOpened())
+ {
+ connection = (JDBCStorageConnection)dataContainer.openConnection();
+ connections.put(dataContainer, connection);
+ }
+ return connection;
+ }
+
+ /**
+ * Close the current opened connection related to the given
+ * {@link WorkspaceDataContainer}
+ *
+ * @param dataContainer
+ * the data container for which we want to close the connection
+ * @throws IllegalStateException
+ * if connection is already closed
+ * @throws RepositoryException
+ * if some exception occured
+ */
+ static void close(WorkspaceDataContainer dataContainer) throws IllegalStateException, RepositoryException
+ {
+ Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS.get();
+ if (connections == null)
+ {
+ return;
+ }
+ JDBCStorageConnection connection = connections.remove(dataContainer);
+ if (connection == null || !connection.isOpened())
+ {
+ return;
+ }
+ connection.close();
+ connection = null;
+ }
}
16 years, 7 months
exo-jcr SVN: r1047 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2009-12-14 10:30:42 -0500 (Mon, 14 Dec 2009)
New Revision: 1047
Added:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java
Log:
EXOJCR-199: JBoss Cache persistence prototype
JDBCStorageConnectionFactory has been added to hold the JDBC connection opened in order to reduce the total amount of TimeoutException
Added: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCStorageConnectionFactory.java 2009-12-14 15:30:42 UTC (rev 1047)
@@ -0,0 +1,79 @@
+package org.exoplatform.services.jcr.impl.storage.jbosscache;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.RepositoryException;
+
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection;
+import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
+
+/**
+ * This class is used to holds the JDBC connection open during the live time of
+ * the {@link JBossCacheStorageConnection}. We keep one
+ * {@link JDBCStorageConnection} per JDBCStorageConnection into a
+ * {@link ThreadLocal}
+ *
+ * @author nicolasfilotto
+ *
+ */
+public class JDBCStorageConnectionFactory {
+
+ /**
+ * The {@link ThreadLocal} in which we store all the current opened
+ * connections
+ */
+ private static final ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>> CONNECTIONS = new ThreadLocal<Map<WorkspaceDataContainer, JDBCStorageConnection>>();
+
+ /**
+ * Gives the current opened connection for the related
+ * {@link WorkspaceDataContainer} if it exists, returns a new one otherwise
+ *
+ * @param dataContainer
+ * the data container for which we want a connection
+ * @return an opened connection
+ * @throws RepositoryException
+ * if an error occurs
+ */
+ static JDBCStorageConnection get(WorkspaceDataContainer dataContainer)
+ throws RepositoryException {
+ Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS
+ .get();
+ if (connections == null) {
+ connections = new HashMap<WorkspaceDataContainer, JDBCStorageConnection>();
+ CONNECTIONS.set(connections);
+ }
+ JDBCStorageConnection connection = connections.get(dataContainer);
+ if (connection == null || !connection.isOpened()) {
+ connection = (JDBCStorageConnection) dataContainer.openConnection();
+ connections.put(dataContainer, connection);
+ }
+ return connection;
+ }
+
+ /**
+ * Close the current opened connection related to the given
+ * {@link WorkspaceDataContainer}
+ *
+ * @param dataContainer
+ * the data container for which we want to close the connection
+ * @throws IllegalStateException
+ * if connection is already closed
+ * @throws RepositoryException
+ * if some exception occured
+ */
+ static void close(WorkspaceDataContainer dataContainer)
+ throws IllegalStateException, RepositoryException {
+ Map<WorkspaceDataContainer, JDBCStorageConnection> connections = CONNECTIONS
+ .get();
+ if (connections == null) {
+ return;
+ }
+ JDBCStorageConnection connection = connections.remove(dataContainer);
+ if (connection == null || !connection.isOpened()) {
+ return;
+ }
+ connection.close();
+ connection = null;
+ }
+}
16 years, 7 months
exo-jcr SVN: r1046 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: storage/jdbc and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-12-14 10:20:34 -0500 (Mon, 14 Dec 2009)
New Revision: 1046
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
Log:
EXOJCR-300: swap values
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java 2009-12-14 15:17:05 UTC (rev 1045)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java 2009-12-14 15:20:34 UTC (rev 1046)
@@ -41,7 +41,7 @@
{
protected final static Log LOG = ExoLogger.getLogger("jcr.CleanableFileStreamValueData");
-
+
protected final FileCleaner cleaner;
/**
@@ -80,7 +80,7 @@
if (LOG.isDebugEnabled())
{
- LOG.debug("�ould not remove temporary file on finalize: inUse=" + (((SwapFile)file).inUse()) + ", "
+ LOG.debug("Could not remove temporary file on finalize: inUse=" + (((SwapFile)file).inUse()) + ", "
+ file.getAbsolutePath());
}
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java 2009-12-14 15:17:05 UTC (rev 1045)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java 2009-12-14 15:20:34 UTC (rev 1046)
@@ -19,9 +19,11 @@
package org.exoplatform.services.jcr.impl.dataflow.persistent;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
+import org.exoplatform.services.jcr.impl.util.io.SwapFile;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -83,9 +85,15 @@
* persistent layer (Value storage).
*
* @param file File
+ * @throws FileNotFoundException
*/
- public void setPersistedFile(File file)
+ public void setPersistedFile(File file) throws FileNotFoundException
{
+ if (file instanceof SwapFile)
+ {
+ ((SwapFile)file).acquire(this);
+ }
+
this.file = file;
this.tempFile = null;
@@ -180,4 +188,22 @@
throw new RepositoryException(e);
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void finalize() throws Throwable
+ {
+ try
+ {
+ if (file != null && file instanceof SwapFile)
+ {
+ ((SwapFile)file).release(this);
+ }
+ }
+ finally
+ {
+ super.finalize();
+ }
+ }
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-14 15:17:05 UTC (rev 1045)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-14 15:20:34 UTC (rev 1046)
@@ -1835,6 +1835,57 @@
}
/**
+ * Writes value data to swap file.
+ *
+ * @param cid
+ * Property id
+ * @param orderNumber
+ * Value order number
+ * @param version
+ * persistent version (used for BLOB swapping)
+ * @param content
+ * @return ValueData
+ * @throws SQLException
+ * database error
+ * @throws IOException
+ * I/O error (swap)
+ */
+ protected SwapFile swapValueData(String cid, int orderNumber, int version, final InputStream content)
+ throws SQLException, IOException
+ {
+
+ byte[] spoolBuffer = new byte[ValueFileIOHelper.IOBUFFER_SIZE];
+ int read;
+ int len = 0;
+
+ SwapFile swapFile = SwapFile.get(swapDirectory, cid + orderNumber + "." + version);
+ OutputStream out = new FileOutputStream(swapFile);;
+
+ if (swapFile.isSpooled())
+ {
+ return swapFile;
+ }
+
+ try
+ {
+ if (content != null)
+ while ((read = content.read(spoolBuffer)) >= 0)
+ {
+ // spool to temp file
+ out.write(spoolBuffer, 0, read);
+ len += read;
+ }
+ }
+ finally
+ {
+ out.close();
+ swapFile.spoolDone();
+ }
+
+ return swapFile;
+ }
+
+ /**
* Add Values to Property record.
*
* @param data
@@ -1871,7 +1922,10 @@
// it's StreamPersistedValueData
StreamPersistedValueData streamData = (StreamPersistedValueData)vd;
stream = streamData.getStream();
- long vlen = streamData.getLength();
+
+ SwapFile swapFile = swapValueData(cid, i, data.getPersistedVersion(), stream);
+
+ long vlen = swapFile.length();
if (vlen < 0)
{
streamLength = stream.available();
@@ -1887,6 +1941,8 @@
throw new RepositoryException("Value data large of allowed by JDBC (Integer.MAX_VALUE) " + vlen
+ ". Property " + data.getQPath().getAsString());
}
+
+ streamData.setPersistedFile(swapFile);
}
storageId = null;
}
16 years, 7 months
exo-jcr SVN: r1045 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-12-14 10:17:05 -0500 (Mon, 14 Dec 2009)
New Revision: 1045
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
Log:
EXOJCR-291: Remove log.info(...) from IndexCacheLoader.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2009-12-14 14:34:52 UTC (rev 1044)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2009-12-14 15:17:05 UTC (rev 1045)
@@ -80,7 +80,6 @@
log.info("Received list wrapper, start indexing...");
}
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)val;
- log.info("Loader=" + this + " changes=" + wrapper.dump());
updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(), wrapper
.getParentRemovedNodes());
}
16 years, 7 months
exo-jcr SVN: r1016 - in kernel/branches/config-branch: exo.kernel.container/src/main/resources and 5 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-11 17:34:33 -0500 (Fri, 11 Dec 2009)
New Revision: 1016
Added:
kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-bad-schema.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-no-schema.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/object.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
Removed:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-bad-schema.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-no-schema.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/object.xml
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/
kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
Modified:
kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestConfigurationService.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_0.java
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/xml/test/TestDataXML.java
Log:
tidy up : move test configuration files to test/resources
Modified: kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/PropertyManager.java 2009-12-11 22:34:33 UTC (rev 1016)
@@ -46,6 +46,9 @@
public static final String DATA_DIR = "exo.data.dir";
/** . */
+ public static final String PROPERTIES_PATH = "exo.properties.path";
+
+ /** . */
private static final ConcurrentMap<String, String> cache = new ConcurrentHashMap<String, String>();
/** This is read only once at startup. */
Deleted: kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-bad-schema.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-bad-schema.xml 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-bad-schema.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <foo/>
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
-</configuration>
Deleted: kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-no-schema.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-no-schema.xml 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-no-schema.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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>
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
-</configuration>
Deleted: kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration.xml 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <container-lifecycle-plugin>
- <type>component.type</type>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </container-lifecycle-plugin>
-
- <component-lifecycle-plugin>
- <type>component.type</type>
- <manageable-components>
- <component-type>component.type</component-type>
- <component-type>component.type</component-type>
- <component-type>component.type</component-type>
- </manageable-components>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component-lifecycle-plugin>
-
- <component>
- <key>org.exoplatform.services.templates.velocity.VelocityService</key>
- <type>org.exoplatform.services.templates.velocity.impl.VelocityServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>name plugin 1</name>
- <set-method>class.type</set-method>
- <type>class.type</type>
- <description>description</description>
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
-
- <init-params>
- <value-param>
- <name>name</name>
- <description>description</description>
- <value>a value</value>
- </value-param>
- </init-params>
- </component>
-
- <import>1</import>
- <import>2</import>
- <remove-configuration>1</remove-configuration>
- <remove-configuration>2</remove-configuration>
-</configuration>
Deleted: kernel/branches/config-branch/exo.kernel.container/src/main/resources/object.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/object.xml 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/object.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,50 +0,0 @@
-<!--
-
- 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.
-
--->
-<object type="package.name">
- <field name="string"><string>This is a string</string></field>
- <field name="int"><int>1234</int></field>
- <field name="long"><long>123456</long></field>
- <field name="double"><double>1.1234</double></field>
- <field name="boolean"><boolean>true</boolean></field>
- <field name="name">
- <object version="1.0" type="package.name">
- <field name="nested 1"><string>value</string></field>
- <field name="nested 2"><int>1234</int></field>
- </object>
- </field>
- <field name="map">
- <map type="java.util.HashMap">
- <entry>
- <key><string>akey</string></key>
- <value><string>a value</string></value>
- </entry>
- <entry>
- <key><int>1234</int></key>
- <value><string>a value</string></value>
- </entry>
- </map>
- </field>
- <field name="list">
- <collection type="java.util.ArrayList">
- <value><string>a value</string></value>
- </collection>
- </field>
-</object>
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestConfigurationService.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestConfigurationService.java 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestConfigurationService.java 2009-12-11 22:34:33 UTC (rev 1016)
@@ -60,7 +60,7 @@
public void testXSDBadSchema() throws Exception
{
String basedir = System.getProperty("basedir");
- File f = new File(basedir + "/src/main/resources/configuration-bad-schema.xml");
+ File f = new File(basedir + "/src/test/resources/configuration-bad-schema.xml");
ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
URL url = f.toURI().toURL();
try
@@ -77,7 +77,7 @@
public void testXSDNoSchema() throws Exception
{
String basedir = System.getProperty("basedir");
- File f = new File(basedir + "/src/main/resources/configuration-no-schema.xml");
+ File f = new File(basedir + "/src/test/resources/configuration-no-schema.xml");
ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
URL url = f.toURI().toURL();
Configuration conf = unmarshaller.unmarshall(url);
@@ -90,7 +90,7 @@
ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
- File f = new File(basedir + "/src/main/resources/configuration.xml");
+ File f = new File(basedir + "/src/test/resources/configuration.xml");
Object obj = unmarshaller.unmarshall(f.toURI().toURL());
System.out.print(obj);
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_0.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_0.java 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_0.java 2009-12-11 22:34:33 UTC (rev 1016)
@@ -37,7 +37,7 @@
{
ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
String baseDirPath = System.getProperty("basedir");
- File baseDir = new File(baseDirPath + "/src/main/resources/xsd_1_0");
+ File baseDir = new File(baseDirPath + "/src/test/resources/xsd_1_0");
int count = 0;
for (File f : baseDir.listFiles(new FileFilter()
{
Modified: 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 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestXSD_1_1.java 2009-12-11 22:34:33 UTC (rev 1016)
@@ -37,7 +37,7 @@
{
ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
String baseDirPath = System.getProperty("basedir");
- File baseDir = new File(baseDirPath + "/src/main/resources/xsd_1_1");
+ File baseDir = new File(baseDirPath + "/src/test/resources/xsd_1_1");
int count = 0;
for (File f : baseDir.listFiles(new FileFilter()
{
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java 2009-12-11 21:57:45 UTC (rev 1015)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/xml/test/TestDataXML.java 2009-12-11 22:34:33 UTC (rev 1016)
@@ -50,7 +50,7 @@
String projectdir = System.getProperty("basedir");
IBindingFactory bfact = BindingDirectory.getFactory(XMLObject.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
- Object obj = uctx.unmarshalDocument(new FileInputStream(projectdir + "/src/main/resources/object.xml"), null);
+ Object obj = uctx.unmarshalDocument(new FileInputStream(projectdir + "/src/test/resources/object.xml"), null);
System.out.print(obj);
IMarshallingContext mctx = bfact.createMarshallingContext();
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-bad-schema.xml (from rev 1005, kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-bad-schema.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-bad-schema.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-bad-schema.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <foo/>
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+</configuration>
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-no-schema.xml (from rev 1005, kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration-no-schema.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-no-schema.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration-no-schema.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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>
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+</configuration>
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration.xml (from rev 1005, kernel/branches/config-branch/exo.kernel.container/src/main/resources/configuration.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/configuration.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <container-lifecycle-plugin>
+ <type>component.type</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </container-lifecycle-plugin>
+
+ <component-lifecycle-plugin>
+ <type>component.type</type>
+ <manageable-components>
+ <component-type>component.type</component-type>
+ <component-type>component.type</component-type>
+ <component-type>component.type</component-type>
+ </manageable-components>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component-lifecycle-plugin>
+
+ <component>
+ <key>org.exoplatform.services.templates.velocity.VelocityService</key>
+ <type>org.exoplatform.services.templates.velocity.impl.VelocityServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>name plugin 1</name>
+ <set-method>class.type</set-method>
+ <type>class.type</type>
+ <description>description</description>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <description>description</description>
+ <value>a value</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <import>1</import>
+ <import>2</import>
+ <remove-configuration>1</remove-configuration>
+ <remove-configuration>2</remove-configuration>
+</configuration>
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/object.xml (from rev 1005, kernel/branches/config-branch/exo.kernel.container/src/main/resources/object.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/object.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/object.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -0,0 +1,50 @@
+<!--
+
+ 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.
+
+-->
+<object type="package.name">
+ <field name="string"><string>This is a string</string></field>
+ <field name="int"><int>1234</int></field>
+ <field name="long"><long>123456</long></field>
+ <field name="double"><double>1.1234</double></field>
+ <field name="boolean"><boolean>true</boolean></field>
+ <field name="name">
+ <object version="1.0" type="package.name">
+ <field name="nested 1"><string>value</string></field>
+ <field name="nested 2"><int>1234</int></field>
+ </object>
+ </field>
+ <field name="map">
+ <map type="java.util.HashMap">
+ <entry>
+ <key><string>akey</string></key>
+ <value><string>a value</string></value>
+ </entry>
+ <entry>
+ <key><int>1234</int></key>
+ <value><string>a value</string></value>
+ </entry>
+ </map>
+ </field>
+ <field name="list">
+ <collection type="java.util.ArrayList">
+ <value><string>a value</string></value>
+ </collection>
+ </field>
+</object>
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0 (from rev 1005, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0)
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,224 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-01.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,241 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-02.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,304 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-03.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,134 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-04.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,168 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-05.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,85 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-06.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,56 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-07.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,47 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-08.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,82 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-09.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,56 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-10.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,101 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-11.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,154 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-12.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,53 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-13.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,42 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-14.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-15.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,68 +0,0 @@
-<?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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-15.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-15.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml 2009-12-11 13:04:44 UTC (rev 1005)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,105 +0,0 @@
-<?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="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_0/sample-configuration-16.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1 (from rev 1013, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1)
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-01.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-01.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-02.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-02.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-03.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-03.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-04.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-04.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-05.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-05.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-06.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-06.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-07.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-07.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-08.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-08.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-09.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-09.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-10.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-10.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-11.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-11.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-12.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-12.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-13.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-13.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-14.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-14.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml (from rev 1015, 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/test/resources/xsd_1_1/sample-configuration-15.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-15.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml (from rev 1015, 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/resources/xsd_1_1/sample-configuration-16.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-16.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -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
Deleted: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml 2009-12-11 20:44:15 UTC (rev 1013)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -1,95 +0,0 @@
-<?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>
- </component>
-
- <component profile="a">
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- </component>
-
- <component profile="a,b">
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- <init-params>
- <object-param>
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profile="a">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <object-param profile="a,b">
- <name>object</name>
- <object type="object"></object>
- </object-param>
- <properties-param>
- <name>properties</name>
- </properties-param>
- <properties-param profile="a">
- <name>properties</name>
- </properties-param>
- <properties-param profile="a,b">
- <name>properties</name>
- </properties-param>
- <value-param>
- <name>value</name>
- <value>value</value>
- </value-param>
- <value-param profile="a">
- <name>value</name>
- <value>value</value>
- </value-param>
- <value-param profile="a,b">
- <name>value</name>
- <value>value</value>
- </value-param>
- <values-param>
- <name>values</name>
- </values-param>
- <values-param profile="a">
- <name>values</name>
- </values-param>
- <values-param profile="a,b">
- <name>values</name>
- </values-param>
- </init-params>
- </component>
-
- <import>import_1</import>
- <import profile="a">import_1</import>
- <import profile="a,b">import_1</import>
-
-</configuration>
\ No newline at end of file
Copied: kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml (from rev 1015, kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/xsd_1_1/sample-configuration-17.xml 2009-12-11 22:34:33 UTC (rev 1016)
@@ -0,0 +1,95 @@
+<?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>
+ </component>
+
+ <component profile="a">
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ </component>
+
+ <component profile="a,b">
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <init-params>
+ <object-param>
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profile="a">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <object-param profile="a,b">
+ <name>object</name>
+ <object type="object"></object>
+ </object-param>
+ <properties-param>
+ <name>properties</name>
+ </properties-param>
+ <properties-param profile="a">
+ <name>properties</name>
+ </properties-param>
+ <properties-param profile="a,b">
+ <name>properties</name>
+ </properties-param>
+ <value-param>
+ <name>value</name>
+ <value>value</value>
+ </value-param>
+ <value-param profile="a">
+ <name>value</name>
+ <value>value</value>
+ </value-param>
+ <value-param profile="a,b">
+ <name>value</name>
+ <value>value</value>
+ </value-param>
+ <values-param>
+ <name>values</name>
+ </values-param>
+ <values-param profile="a">
+ <name>values</name>
+ </values-param>
+ <values-param profile="a,b">
+ <name>values</name>
+ </values-param>
+ </init-params>
+ </component>
+
+ <import>import_1</import>
+ <import profile="a">import_1</import>
+ <import profile="a,b">import_1</import>
+
+</configuration>
\ No newline at end of file
16 years, 7 months
exo-jcr SVN: r1015 - in kernel/branches/config-branch/exo.kernel.container/src: test/java/org/exoplatform/container/configuration/test and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-11 16:57:45 -0500 (Fri, 11 Dec 2009)
New Revision: 1015
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestComponentPluginProfile.java
kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml
Log:
support for external component plugin profile
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd 2009-12-11 21:41:36 UTC (rev 1014)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd 2009-12-11 21:57:45 UTC (rev 1015)
@@ -153,6 +153,7 @@
<xsd:element name="priority" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
+ <xsd:attribute name="profile" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="externalComponentPluginType">
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestComponentPluginProfile.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestComponentPluginProfile.java 2009-12-11 21:41:36 UTC (rev 1014)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/configuration/test/TestComponentPluginProfile.java 2009-12-11 21:57:45 UTC (rev 1015)
@@ -35,21 +35,16 @@
public class TestComponentPluginProfile extends TestCase
{
-/*
public void testNoProfile() throws Exception
{
String basedir = System.getProperty("basedir");
- File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml");
- ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
+ File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml");
+ ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller(Tools.<String>set());
URL url = f.toURI().toURL();
- PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "");
Configuration config = unmarshaller.unmarshall(url);
Component component = config.getComponent("Component");
- InitParams initParams = component.getInitParams();
- ValueParam valueParam = initParams.getValueParam("param");
- assertEquals("empty", valueParam.getValue());
+ assertEquals(1, component.getComponentPlugins().size());
}
-*/
public void testFooProfile() throws Exception
{
@@ -59,27 +54,6 @@
URL url = f.toURI().toURL();
Configuration config = unmarshaller.unmarshall(url);
Component component = config.getComponent("Component");
- System.out.println("component.getComponentPlugins() = " + component.getComponentPlugins());
-/*
- InitParams initParams = component.getInitParams();
- ValueParam valueParam = initParams.getValueParam("param");
- assertEquals("foo", valueParam.getValue());
-*/
+ assertEquals(2, component.getComponentPlugins().size());
}
-
-/*
- public void testFooBarProfiles() throws Exception
- {
- String basedir = System.getProperty("basedir");
- File f = new File(basedir + "/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml");
- ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller();
- URL url = f.toURI().toURL();
- PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "foo,bar");
- Configuration config = unmarshaller.unmarshall(url);
- Component component = config.getComponent("Component");
- InitParams initParams = component.getInitParams();
- ValueParam valueParam = initParams.getValueParam("param");
- assertEquals("bar", valueParam.getValue());
- }
-*/
}
\ No newline at end of file
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml 2009-12-11 21:41:36 UTC (rev 1014)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-plugin-configuration.xml 2009-12-11 21:57:45 UTC (rev 1015)
@@ -21,10 +21,8 @@
-->
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:foo="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns:bar="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ 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>Component</key>
@@ -35,11 +33,11 @@
<set-method>set_method</set-method>
<type>PluginA</type>
</component-plugin>
- <foo:component-plugin>
+ <component-plugin profile="foo">
<name>Plugin</name>
<set-method>set_method</set-method>
<type>PluginA</type>
- </foo:component-plugin>
+ </component-plugin>
</component-plugins>
</component>
16 years, 7 months