exo-jcr SVN: r4475 - in kernel/trunk: exo.kernel.component.ext.cache.impl.infinispan.v4 and 1 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2011-06-03 17:16:43 -0400 (Fri, 03 Jun 2011)
New Revision: 4475
Modified:
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/pom.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
kernel/trunk/pom.xml
Log:
EXOJCR-1372: Align dependencies with EAP 5.1 (kernel)
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/pom.xml 2011-06-03 14:24:20 UTC (rev 4474)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/pom.xml 2011-06-03 21:16:43 UTC (rev 4475)
@@ -33,7 +33,12 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
</dependency>
- <dependency>
+ <dependency>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ <version>2.11.1.Final</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2011-06-03 14:24:20 UTC (rev 4474)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2011-06-03 21:16:43 UTC (rev 4475)
@@ -56,7 +56,11 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml 2011-06-03 14:24:20 UTC (rev 4474)
+++ kernel/trunk/pom.xml 2011-06-03 21:16:43 UTC (rev 4475)
@@ -181,12 +181,18 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <version>2.6.20.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
- <version>3.2.6.GA</version>
+ <version>3.2.7.GA</version>
+ <exclusions>
+ <exclusion>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
12 years, 11 months
exo-jcr SVN: r4474 - in jcr/trunk/exo.jcr.component.core: src/main/java/org/exoplatform/services/jcr/impl/core and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-06-03 10:24:20 -0400 (Fri, 03 Jun 2011)
New Revision: 4474
Modified:
jcr/trunk/exo.jcr.component.core/pom.xml
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionRegistry.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionCleaner.java
Log:
EXOJCR-1364: test cleanup
Modified: jcr/trunk/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 12:44:26 UTC (rev 4473)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 14:24:20 UTC (rev 4474)
@@ -402,7 +402,6 @@
<exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceManagement.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceRestore.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestRepositoryManagement.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestSessionCleaner.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestJCRSerializationStream.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestJCRSerializationVersionRestore.java</exclude>
@@ -740,30 +739,20 @@
<include>org/apache/jackrabbit/test/api/version/*Test.java</include>
</includes>
<excludes>
- <!-- From default tests -->
<exclude>org/exoplatform/services/jcr/**/TestQueryUsecases.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/TestRollbackBigFiles.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/TestImport.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/TestRollbackBigFiles.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/TestErrorMultithreading.java</exclude>
<exclude>org/exoplatform/services/jcr/**/api/TestAll.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/api/**/TestSameNameItems.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/api/**/TestSameNameItems.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/TestErrorMultithreading.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/TestRollbackBigFiles.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceManagement.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceRestore.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceRestore.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestRepositoryManagement.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/ValueStoragePluginTest.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestSessionCleaner.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestJCRSerializationStream.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestJCRSerializationVersionRestore.java</exclude>
<exclude>org/exoplatform/services/jcr/**/usecases/**/RemoveSameNameSiblingTest.java</exclude>
<exclude>org/exoplatform/services/jcr/**/usecases/**/TestQueryWithNumberAndSpace.java</exclude>
<exclude>org/exoplatform/services/jcr/**/usecases/BaseUsecasesTest.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/usecases/**/ExportWorkspaceSystemViewTest.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestLinkedWorkspaceStorageCacheMetrics.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/SQLBenchmarkTest.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestCleanableFileStreamValueData.java</exclude>
<!-- From TCK -->
<exclude>org/apache/jackrabbit/test/api/TestAll.java</exclude>
<exclude>org/apache/jackrabbit/test/api/**/Abstract*.java</exclude>
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionRegistry.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionRegistry.java 2011-06-03 12:44:26 UTC (rev 4473)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionRegistry.java 2011-06-03 14:24:20 UTC (rev 4474)
@@ -74,12 +74,19 @@
@ManagedDescription("Set the session time out in seconds")
public void setTimeOut(long timeout)
{
+ if (this.timeOut == timeout)
+ {
+ return;
+ }
+
+ // disable the cleaner
+ this.sessionCleaner.halt();
+ this.sessionCleaner = null;
+
this.timeOut = timeout <= 0 ? 0 : timeout * 1000;
if (timeOut == 0 && sessionCleaner != null)
{
- // We set a time out to 0 so we disable the cleaner
- this.sessionCleaner.halt();
- this.sessionCleaner = null;
+ // We set a time out to 0, no need to create new cleaner
if (log.isDebugEnabled())
{
log.debug("Stop the previous session cleaner");
@@ -87,7 +94,7 @@
}
else if (timeOut > 0 && sessionCleaner == null)
{
- // We set a time out greater than 0, so we enable the cleaner
+ // We set a time out greater than 0, so we create new cleaner
this.sessionCleaner = new SessionCleaner(repositoryId, DEFAULT_CLEANER_TIMEOUT, timeOut);
if (log.isDebugEnabled())
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionCleaner.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionCleaner.java 2011-06-03 12:44:26 UTC (rev 4473)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionCleaner.java 2011-06-03 14:24:20 UTC (rev 4474)
@@ -21,17 +21,10 @@
import org.exoplatform.services.jcr.JcrImplBaseTest;
import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Random;
-import java.util.WeakHashMap;
import javax.jcr.LoginException;
import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.Node;
import javax.jcr.RepositoryException;
-import javax.jcr.Session;
/**
* @author <a href="mailto:Sergey.Kabashnyuk@gmail.com">Sergey Kabashnyuk</a>
@@ -41,48 +34,42 @@
{
private final static int AGENT_COUNT = 10;
+ private final static int TEST_SESSION_TIMEOUT = 1; // seconds
+
private SessionRegistry sessionRegistry;
private long oldTimeOut;
- private final static long TEST_SESSION_TIMEOUT = 20000;
-
@Override
public void setUp() throws Exception
{
super.setUp();
sessionRegistry = (SessionRegistry)session.getContainer().getComponentInstanceOfType(SessionRegistry.class);
- oldTimeOut = sessionRegistry.timeOut;
- sessionRegistry.timeOut = TEST_SESSION_TIMEOUT;
- sessionRegistry.stop();
- Thread.yield();
- sessionRegistry.start();
+ oldTimeOut = sessionRegistry.getTimeOut();
+ sessionRegistry.setTimeOut(TEST_SESSION_TIMEOUT);
}
@Override
protected void tearDown() throws Exception
{
super.tearDown();
- sessionRegistry.stop();
- sessionRegistry.timeOut = oldTimeOut;
- Thread.yield();
- sessionRegistry.start();
+ sessionRegistry.setTimeOut(oldTimeOut);
}
public void testSessionRemove() throws LoginException, NoSuchWorkspaceException, RepositoryException,
InterruptedException
{
SessionImpl session2 = (SessionImpl)repository.login(credentials, "ws");
+ assertTrue(session2.isLive());
// Create a weak reference to the session
WeakReference<SessionImpl> ref = new WeakReference<SessionImpl>(session2);
- assertTrue(session2.isLive());
+ Thread.sleep(5000);
- assertNotNull(sessionRegistry);
+ System.out.println(session2.getLastAccessTime());
+ sessionRegistry.runCleanup();
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT + 1000);
-
assertFalse(session2.isLive());
// Dereference the session explicitely
@@ -95,353 +82,4 @@
assertNull(ref.get());
}
-
- public void testSessionLoginLogoutSimultaneouslyMultiThread() throws Exception
- {
- assertNotNull(sessionRegistry);
-
- class AgentLogin extends Thread
- {
-
- Random random = new Random();
-
- SessionImpl workSession;
-
- boolean sessionStarted = false;
-
- public AgentLogin()
- {
- }
-
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT - random.nextInt(200) + 200);
-
- workSession = (SessionImpl)repository.login(credentials, "ws");
- sessionStarted = true;
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("Exception should not be thrown");
- }
- }
- }
-
- class AgentLogout extends Thread
- {
- AgentLogin agentLogin;
-
- public AgentLogout(AgentLogin agentLogin)
- {
- this.agentLogin = agentLogin;
- }
-
- @Override
- public void run()
- {
- try
- {
- while (!agentLogin.sessionStarted)
- {
- Thread.sleep(50);
- }
-
- if (agentLogin.workSession.isLive())
- {
- agentLogin.workSession.logout();
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("Exception should not be thrown");
- }
- }
- }
-
- Session workSession = (SessionImpl)repository.login(credentials, "ws");
- while (workSession.isLive())
- {
- Thread.sleep(100);
- }
-
- // start
- List<Object> agents = new ArrayList<Object>();
-
- for (int i = 0; i < AGENT_COUNT; i++)
- {
- AgentLogin agentLogin = new AgentLogin();
- agents.add(agentLogin);
- agentLogin.start();
-
- AgentLogout agentLogout = new AgentLogout(agentLogin);
- agents.add(agentLogout);
- agentLogout.start();
- }
-
- // wait to stop all threads
- boolean isNeedWait = true;
- while (isNeedWait)
- {
- isNeedWait = false;
- for (int i = 0; i < AGENT_COUNT * 2; i++)
- {
- Thread agent = (Thread)agents.get(i);
- if (agent.isAlive())
- {
- isNeedWait = true;
- break;
- }
- }
- Thread.sleep(1000);
- }
-
- assertFalse(sessionRegistry.isInUse("ws"));
- }
-
- public void testSessionLoginLogoutMultiThread() throws InterruptedException
- {
- assertNotNull(sessionRegistry);
-
- class AgentLogin extends Thread
- {
-
- SessionImpl workSession;
-
- int sleepTime;
-
- boolean sessionStarted = false;
-
- public AgentLogin(int sleepTime)
- {
- this.sleepTime = sleepTime;
- }
-
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(sleepTime);
- workSession = (SessionImpl)repository.login(credentials, "ws");
- sessionStarted = true;
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("Exception should not be thrown");
- }
- }
- }
-
- class AgentLogout extends Thread
- {
- AgentLogin agentLogin;
-
- public AgentLogout(AgentLogin agentLogin)
- {
- this.agentLogin = agentLogin;
- }
-
- @Override
- public void run()
- {
- try
- {
- while (!agentLogin.sessionStarted)
- {
- Thread.sleep(1000);
- }
-
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT / 2);
-
- if (agentLogin.workSession.isLive())
- {
- agentLogin.workSession.logout();
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("Exception should not be thrown");
- }
- }
- }
-
- // start
- List<Object> agents = new ArrayList<Object>();
-
- int sleepTime = 0;
- for (int i = 0; i < AGENT_COUNT; i++)
- {
- AgentLogin agentLogin = new AgentLogin(sleepTime);
- agents.add(agentLogin);
- agentLogin.start();
-
- AgentLogout agentLogout = new AgentLogout(agentLogin);
- agents.add(agentLogout);
- agentLogout.start();
-
- sleepTime =
- SessionRegistry.DEFAULT_CLEANER_TIMEOUT / 10
- + (sleepTime >= 2 * SessionRegistry.DEFAULT_CLEANER_TIMEOUT ? 0 : sleepTime);
- }
-
- // wait to stop all threads
- boolean isNeedWait = true;
- while (isNeedWait)
- {
- isNeedWait = false;
- for (int i = 0; i < AGENT_COUNT * 2; i++)
- {
- Thread agent = (Thread)agents.get(i);
- if (agent.isAlive())
- {
- isNeedWait = true;
- break;
- }
- }
- Thread.sleep(100);
- }
-
- assertFalse(sessionRegistry.isInUse("ws"));
- }
-
- public void testSessionRemoveMultiThread() throws InterruptedException
- {
- assertNotNull(sessionRegistry);
- final Random random = new Random();
- class Agent extends Thread
- {
- boolean result = false;
-
- boolean active = false;
-
- public Agent()
- {
- active = random.nextBoolean();
- }
-
- @Override
- public void run()
- {
- try
- {
- SessionImpl session2 = (SessionImpl)repository.login(credentials, "ws");
- Node rootNode = session2.getRootNode();
- rootNode.addNode("test");
- assertTrue(session2.isLive());
-
- if (active)
- {
- log.info("start active session");
- long startTime = System.currentTimeMillis();
- while (startTime + sessionRegistry.timeOut * 2 < System.currentTimeMillis())
- {
- Node root2 = session2.getRootNode();
- Node testNode = root2.getNode("test");
- testNode.setProperty("prop1", "value");
- Thread.sleep(sessionRegistry.timeOut / 2);
- }
- result = session2.isLive();
- }
- else
- {
- log.info("start pasive session");
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT + 1000);
- result = !session2.isLive();
- }
-
- }
- catch (InterruptedException e)
- {
- }
- catch (LoginException e)
- {
- }
- catch (NoSuchWorkspaceException e)
- {
- }
- catch (RepositoryException e)
- {
- }
- }
-
- }
- List<Agent> agents = new ArrayList<Agent>();
- for (int i = 0; i < AGENT_COUNT; i++)
- {
- agents.add(new Agent());
- }
- for (Agent agent : agents)
- {
- agent.start();
- }
- boolean isNeedWait = true;
- while (isNeedWait)
- {
- isNeedWait = false;
- for (int i = 0; i < AGENT_COUNT; i++)
- {
- Agent curClient = agents.get(i);
- if (curClient.isAlive())
- {
- isNeedWait = true;
- break;
- }
- }
- Thread.sleep(100);
- }
- for (Agent agent2 : agents)
- {
- assertTrue(agent2.result);
- }
- }
-
- public void testManySessionRemove() throws LoginException, NoSuchWorkspaceException, RepositoryException,
- InterruptedException
- {
- int sessionCount = 100000;
- WeakReference<SessionImpl> refSessions[] = new WeakReference[100000];
- SessionImpl sessions[] = new SessionImpl[100000];
-
- for (int i = 0; i < sessionCount; i++)
- {
- sessions[i] = (SessionImpl)repository.login(credentials, "ws");
- refSessions[i] = new WeakReference<SessionImpl>(sessions[i]);
- }
-
- assertNotNull(sessionRegistry);
-
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT + 120000);
-
- for (SessionImpl session : sessions)
- {
- assertFalse(session.isLive());
- }
-
- // Dereference the session explicitely
- for (int i = 0; i < sessionCount; i++)
- {
- sessions[i] = null;
- }
-
- // Make a GC
- forceGC();
-
- // The weak reference must now be null
- for (WeakReference ref : refSessions)
- {
- assertNull(ref.get());
- }
-
- }
}
12 years, 11 months
exo-jcr SVN: r4473 - in jcr/trunk/exo.jcr.component.core: src/test/java/org/exoplatform/services/jcr/impl/core and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-06-03 08:44:26 -0400 (Fri, 03 Jun 2011)
New Revision: 4473
Removed:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSaveConfiguration.java
Modified:
jcr/trunk/exo.jcr.component.core/pom.xml
Log:
EXOJCR-1364: remove unnecessary test
Modified: jcr/trunk/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 06:17:06 UTC (rev 4472)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 12:44:26 UTC (rev 4473)
@@ -752,7 +752,6 @@
<exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceManagement.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestWorkspaceRestore.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestRepositoryManagement.java</exclude>
- <exclude>org/exoplatform/services/jcr/**/impl/**/TestSaveConfiguration.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/ValueStoragePluginTest.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/TestSessionCleaner.java</exclude>
<exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSaveConfiguration.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSaveConfiguration.java 2011-06-03 06:17:06 UTC (rev 4472)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSaveConfiguration.java 2011-06-03 12:44:26 UTC (rev 4473)
@@ -1,82 +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.core;
-
-import org.exoplatform.services.jcr.JcrImplBaseTest;
-import org.exoplatform.services.jcr.RepositoryService;
-import org.exoplatform.services.jcr.config.RepositoryEntry;
-import org.exoplatform.services.jcr.config.RepositoryServiceConfiguration;
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-/**
- * @author <a href="mailto:Sergey.Kabashnyuk@gmail.com">Sergey Kabashnyuk</a>
- * @version $Id: TestSaveConfiguration.java 11907 2008-03-13 15:36:21Z ksm $
- */
-public class TestSaveConfiguration extends JcrImplBaseTest
-{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.SessionDataManager");
-
- private final TestRepositoryManagement rpm = new TestRepositoryManagement();
-
- public void testSaveConfiguration() throws Exception
- {
- RepositoryService service = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
-
- for (RepositoryEntry rEntry : service.getConfig().getRepositoryConfigurations())
- {
- if (log.isDebugEnabled())
- log.debug("=Repository " + rEntry.getName());
- for (WorkspaceEntry wsEntry : rEntry.getWorkspaceEntries())
- {
- if (log.isDebugEnabled())
- log.debug("===Workspace " + wsEntry.getName());
- }
- }
-
- rpm.createDafaultRepository("repository4TestRepositoryManagement1", "wsTestRepositoryManagement1");
- rpm.createDafaultRepository("repository4TestRepositoryManagement2", "wsTestRepositoryManagement2");
- rpm.createDafaultRepository("repository4TestRepositoryManagement3", "wsTestRepositoryManagement3");
-
- RepositoryServiceConfiguration repoConfig =
- (RepositoryServiceConfiguration)container.getComponentInstanceOfType(RepositoryServiceConfiguration.class);
-
- assertTrue(repoConfig.isRetainable());
- repoConfig.retain();
- Thread.sleep(10 * 1000);
- }
-
- public void testZZ() throws Exception
- {
- System.out.println("testZZ");
- root.addNode("testZZ");
- root.save();
- session.save();
- Thread.sleep(10 * 1000);
- }
-
- @Override
- public void setUp() throws Exception
- {
- rpm.setUp();
- super.setUp();
-
- }
-}
12 years, 11 months
exo-jcr SVN: r4472 - jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2011-06-03 02:17:06 -0400 (Fri, 03 Jun 2011)
New Revision: 4472
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java
Log:
EXOJCR-1354: added thread stopping methods to BackupManager stop method
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2011-06-02 14:24:29 UTC (rev 4471)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2011-06-03 06:17:06 UTC (rev 4472)
@@ -310,6 +310,8 @@
class WorkspaceBackupAutoStopper extends Thread
{
+ private boolean isToBeStopped = false;
+
WorkspaceBackupAutoStopper(ExoContainerContext ctx)
{
super("WorkspaceBackupAutoStopper" + (ctx == null ? "" : " " + ctx.getName()));
@@ -321,7 +323,7 @@
@Override
public void run()
{
- while (true)
+ while (!isToBeStopped)
{
try
{
@@ -360,10 +362,16 @@
}
}
}
+
+ public void close()
+ {
+ isToBeStopped = true;
+ }
}
class RepositoryBackupAutoStopper extends Thread
{
+ boolean isToBeStopped = false;
RepositoryBackupAutoStopper(ExoContainerContext ctx)
{
@@ -376,7 +384,7 @@
@Override
public void run()
{
- while (true)
+ while (!isToBeStopped)
{
try
{
@@ -409,6 +417,11 @@
}
}
}
+
+ public void close()
+ {
+ isToBeStopped = true;
+ }
}
/**
@@ -921,6 +934,10 @@
*/
public void stop()
{
+ workspaceBackupStopper.close();
+ repositoryBackupStopper.close();
+ scheduler.cancelTimer();
+
// 1. stop current backup chains
// for (Iterator iterator = currentBackups.iterator(); iterator.hasNext();) {
// BackupChain bc = (BackupChain) iterator.next();
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java 2011-06-02 14:24:29 UTC (rev 4471)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java 2011-06-03 06:17:06 UTC (rev 4472)
@@ -1135,4 +1135,12 @@
return false;
}
+
+ /**
+ * Simple method to release the thread used by timer used in scheduler
+ */
+ public void cancelTimer()
+ {
+ timer.cancel();
+ }
}
12 years, 11 months
exo-jcr SVN: r4471 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-06-02 10:24:29 -0400 (Thu, 02 Jun 2011)
New Revision: 4471
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java
Log:
EXOJCR-1371: Properties can lose their "isMultivalued" flag after backup/restore operation.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java 2011-06-01 12:12:35 UTC (rev 4470)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java 2011-06-02 14:24:29 UTC (rev 4471)
@@ -510,7 +510,7 @@
ba.read(readBuffer);
String value = new String(readBuffer);
- insertNode.setBoolean(targetIndex + 1, value.equals("true"));
+ insertNode.setBoolean(targetIndex + 1, value.equalsIgnoreCase("true"));
}
else if (columnType.get(i) == Types.VARBINARY || columnType.get(i) == Types.LONGVARBINARY
|| columnType.get(i) == Types.BLOB || columnType.get(i) == Types.BINARY
12 years, 11 months
exo-jcr SVN: r4470 - in jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules: faq and 10 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2011-06-01 08:12:35 -0400 (Wed, 01 Jun 2011)
New Revision: 4470
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/conversationstate-when-membership-changed.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-configuration-hibernate.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-creator-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-schema-creator-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/ldap-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-initalizer.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-listener.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/security-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/spring-security-integration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/tika-document-reader-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq/jcr-faq.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/managed-datasources-under-jboss-as.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-extensions.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-registry-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-usage.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetypes-and-namespaces.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/configuration-persister.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/external-value-storages.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multilanguage-support.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/rest-services-on-groovy.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/search-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container-howto.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbosscache-configuration-templates.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/binary-values-processing.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/link-producer.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/performance-tuning-guide.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/ftp.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/repository-creation-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/aggregation-rule.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/and-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/child-node-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/date-property-comparison.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/escaping-like-statements.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/exact-path-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-descendant-nodes.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-nodes.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-mixin-type.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-primary-type.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-case-insensitive.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-similar-nodes.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-and-settings.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-all-properties.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-property.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/higlight.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/ignore-accent-symbols.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/index-boost-value.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/jcr-query-usecases.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/like-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/multivalue-property-comparison.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-name-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-scope-index.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/not-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/offset-and-limit.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/or-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-descendant.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-score.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-comparison.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-existance-constraint.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/regexp-indexing-rule.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/searching-repository-content.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/spell-checker.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/synonim-provider.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/tip-nodename-with-number.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/statistics.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/transaction-manager-lookup.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/component-plugin-priority.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/container-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/initialcontext-binder-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/inversion-of-control.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/listener-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/logging.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/manageability.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-for-beginners.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-in-detail.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/services-wiring.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/understanding-listnerservice.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/framework-for-cross-domain-ajax.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/overwrite-default-providers.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/restservicelist-service.xml
Log:
EXOJCR-1297: corrected tags to be displayed in proper way in html format
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/conversationstate-when-membership-changed.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/conversationstate-when-membership-changed.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/conversationstate-when-membership-changed.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -16,7 +16,7 @@
<para>Example of configuration.</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-configuration-hibernate.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-configuration-hibernate.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-configuration-hibernate.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -16,7 +16,7 @@
<para>The default DB configuration uses HSQLDB, a Java Database quite
useful for demonstrations.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.database.HibernateService</key>
<jmx-name>exo-service:type=HibernateService</jmx-name>
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
@@ -57,7 +57,7 @@
<para>For MySQL</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.database.HibernateService</key>
<jmx-name>database:type=HibernateService</jmx-name>
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
@@ -92,7 +92,7 @@
so, you just have to add a plugin and indicate the location of your
files.</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<external-component-plugins>
<target-component>org.exoplatform.services.database.HibernateService</target-component>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-creator-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-creator-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-creator-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -41,7 +41,7 @@
new database's connection) or throws <envar>DBCreatorException</envar>
exception if any errors occurs in other case.</para>
- <programlisting>public DBConnectionInfo createDatabase(String dbName) throws DBCreatorException;
+ <programlisting language="java">public DBConnectionInfo createDatabase(String dbName) throws DBCreatorException;
</programlisting>
<para>For MSSQL and Sybase servers, use autocommit mode to set true for
@@ -49,7 +49,7 @@
created database not available for "use" command and therefore you can't
create new user inside database per one script.</para>
- <programlisting>public DBConnectionInfo getDBConnectionInfo(String dbName) throws DBCreatorException;
+ <programlisting language="java">public DBConnectionInfo getDBConnectionInfo(String dbName) throws DBCreatorException;
</programlisting>
<para>Return database connection information without database
@@ -61,7 +61,7 @@
<para>Service's configuration.</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.database.creator.DBCreator</key>
<type>org.exoplatform.services.database.creator.DBCreator</type>
<init-params>
@@ -95,13 +95,15 @@
db-connection may contain additonal properties.</para>
<para>For example, next additional proprites allows reconnect to MySQL
- database when connection was refused:<programlisting> <properties-param>
+ database when connection was refused:</para>
+
+ <programlisting language="xml"> <properties-param>
<name>db-connection</name>
...
<property name="validationQuery" value="select 1"/>
<property name="testOnReturn" value="true"/>
...
- </properties-param></programlisting></para>
+ </properties-param></programlisting>
<para><envar>db-creation</envar> properties section contains paramaters
for database creation using DDL script:</para>
@@ -128,35 +130,35 @@
<para>MySQL:</para>
- <programlisting><property name="driverClassName" value="com.mysql.jdbc.Driver" />
+ <programlisting language="xml"><property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/" />
<property name="username" value="root" />
<property name="password" value="admin" /></programlisting>
<para>PostgreSQL:</para>
- <programlisting><property name="driverClassName" value="org.postgresql.Driver" />
+ <programlisting language="xml"><property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://localhost/" />
<property name="username" value="root" />
<property name="password" value="admin" /></programlisting>
<para>MSSQL:</para>
- <programlisting><property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
+ <programlisting language="xml"><property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="url" value="jdbc:sqlserver://localhost:1433;"/>
<property name="username" value="root"/>
<property name="password" value="admin"/></programlisting>
<para>Sybase:</para>
- <programlisting><property name="driverClassName" value="com.sybase.jdbc3.jdbc.SybDriver" />
+ <programlisting language="xml"><property name="driverClassName" value="com.sybase.jdbc3.jdbc.SybDriver" />
<property name="url" value="jdbc:sybase:Tds:localhost:5000/"/>
<property name="username" value="root"/>
<property name="password" value="admin"/></programlisting>
<para>Oracle:</para>
- <programlisting><property name="driverClassName" value="oracle.jdbc.OracleDriver" />
+ <programlisting language="xml"><property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@db2.exoua-int:1521:orclvm" />
<property name="username" value="root" />
<property name="password" value="admin" /></programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-schema-creator-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-schema-creator-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/db-schema-creator-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -10,7 +10,7 @@
DDL script inside service configuration or in an external file,
calling:</para>
- <programlisting> org.exoplatform.services.database.jdbc.DBSchemaCreator.createTables(String dsName, String script)</programlisting>
+ <programlisting language="java"> org.exoplatform.services.database.jdbc.DBSchemaCreator.createTables(String dsName, String script)</programlisting>
<para>via</para>
@@ -18,7 +18,7 @@
<para>A configuration example:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.database.jdbc.DBSchemaCreator</key>
<type>org.exoplatform.services.database.jdbc.DBSchemaCreator</type>
<component-plugins>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/ldap-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/ldap-configuration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/ldap-configuration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -34,11 +34,11 @@
</listitem>
</itemizedlist>
- <programlisting><import>war:/conf/organization/hibernate-configuration.xml</import></programlisting>
+ <programlisting language="xml"><import>war:/conf/organization/hibernate-configuration.xml</import></programlisting>
<para>With</para>
- <programlisting><import>war:/conf/organization/ldap-configuration.xml</import></programlisting>
+ <programlisting language="xml"><import>war:/conf/organization/ldap-configuration.xml</import></programlisting>
<itemizedlist>
<listitem>
@@ -49,7 +49,7 @@
</listitem>
</itemizedlist>
- <programlisting><field name="providerURL"><string>ldap://127.0.0.1:389</string></field>
+ <programlisting language="xml"><field name="providerURL"><string>ldap://127.0.0.1:389</string></field>
<field name="rootdn"><string>CN=Manager,DC=MyCompany,DC=com</string></field>
<field name="password"><string>secret</string></field></programlisting>
@@ -96,7 +96,7 @@
parameters. This configuration is activated by the init-param
ldap.config of service LDAPServiceImpl.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.ldap.LDAPService</key>
<type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
<init-params>
@@ -177,7 +177,7 @@
<emphasis role="bold">ldap-configuration.xml</emphasis> (by default
located at portal.war/WEB-INF/conf/organization)</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.organization.OrganizationService</key>
<type>org.exoplatform.services.organization.ldap.OrganizationServiceImpl</type>
[...]
@@ -201,7 +201,7 @@
ldap to eXo. At first there are two main parameters to configure in
it:</para>
- <programlisting><field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
+ <programlisting language="xml"><field name="baseURL"><string>dc=exoplatform,dc=org</string></field>
<field name="ldapDescriptionAttr"><string>description</string></field></programlisting>
<itemizedlist>
@@ -234,7 +234,7 @@
<para>Here are the main parameters to map eXo users to your
directory :</para>
- <programlisting><field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
+ <programlisting language="xml"><field name="userURL"><string>ou=users,ou=portal,dc=exoplatform,dc=org</string></field>
<field name="userObjectClassFilter"><string>objectClass=person</string></field>
<field name="userLDAPClasses"><string>top,person,organizationalPerson,inetOrgPerson</string></field></programlisting>
@@ -310,7 +310,7 @@
<para>The following parameters maps ldap attributes to eXo User java
objects attributes.</para>
- <programlisting><field name="userUsernameAttr"><string>uid</string></field>
+ <programlisting language="xml"><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>
@@ -368,7 +368,7 @@
<para>eXo groups can be mapped to organizational or applicative groups
defined in your directory.</para>
- <programlisting><field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
+ <programlisting language="xml"><field name="groupsURL"><string>ou=groups,ou=portal,dc=exoplatform,dc=org</string></field>
<field name="groupLDAPClasses"><string>top,organizationalUnit</string></field>
<field name="groupObjectClassFilter"><string>objectClass=organizationalUnit</string></field></programlisting>
@@ -449,7 +449,7 @@
<para>Membership types are the possible roles that can be assigned to
users in groups.</para>
- <programlisting><field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
+ <programlisting language="xml"><field name="membershipTypeURL"><string>ou=memberships,ou=portal,dc=exoplatform,dc=org</string></field>
<field name="membershipTypeLDAPClasses"><string>top,organizationalRole</string></field>
<field name="membershipTypeNameAttr"><string>cn</string></field></programlisting>
@@ -522,7 +522,7 @@
entry.</para>
<para>Example: To designate tom as the manager of the group
- human-resources :</para>
+ human-resources:</para>
<programlisting>ou=human-resources,ou=groups,ou=portal,dc=exoplatform,dc=org
…
@@ -530,9 +530,9 @@
member: uid=tom,ou=users,ou=portal,dc=exoplatform,dc=org
…</programlisting>
- <para>The parameters to configure memberships are :</para>
+ <para>The parameters to configure memberships are:</para>
- <programlisting><field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
+ <programlisting language="xml"><field name="membershipLDAPClasses"><string>top,groupOfNames</string></field>
<field name="membershipTypeMemberValue"><string>member</string></field>
<field name="membershipTypeRoleNameAttr"><string>cn</string></field>
<field name="membershipTypeObjectClassFilter"><string>objectClass=organizationalRole</string></field></programlisting>
@@ -611,7 +611,7 @@
<programlisting>(&amp;(objectClass=ExoMembership)(membershipURL=*))
</programlisting>
- <para>Note : Pay attention to the xml escaping of the '&' (and)
+ <para>Note: Pay attention to the xml escaping of the '&' (and)
operator</para>
</section>
@@ -620,9 +620,9 @@
<para>eXo User profiles also have entries in the ldap but the actual
storage is still done with the hibernate service. You will need the
- following parameters :</para>
+ following parameters:</para>
- <programlisting><field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
+ <programlisting language="xml"><field name="profileURL"><string>ou=profiles,ou=portal,dc=exoplatform,dc=org</string></field>
<field name="profileLDAPClasses"><string>top,organizationalPerson</string></field></programlisting>
<itemizedlist>
@@ -734,7 +734,7 @@
JAVA_OPTS="${JAVA_OPTS} -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStore=/home/user/java/jdk1.6/jre/lib/security/cacerts"</programlisting>
- <programlisting>[...]
+ <programlisting language="xml">[...]
<component>
<key>org.exoplatform.services.ldap.LDAPService</key>
[..]
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-initalizer.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-initalizer.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-initalizer.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -9,7 +9,7 @@
<para>Use the Organization Service Initializer to create users, groups and
membership types by default.</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
<component-plugin>
<name>init.service.listener</name>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-listener.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-listener.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/organization-service-listener.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -60,7 +60,7 @@
<>org.exoplatform.services.organization.UserEventListener</>
:</para>
- <programlisting>public class MyUserListener extends UserEventListener {
+ <programlisting language="java">public class MyUserListener extends UserEventListener {
public void preSave(User user, boolean isNew) throws Exception {
System.out.println("Before " + (isNew?"creating":"updating") + " user " + user.getUserName());
@@ -88,7 +88,7 @@
<>org.exoplatform.services.organization.GroupEventListener</>
:</para>
- <programlisting>public class MyGroupListener extends GroupEventListener {
+ <programlisting language="java">public class MyGroupListener extends GroupEventListener {
public void preSave(Group group, boolean isNew) throws Exception {
System.out.println("Before " + (isNew?"creating":"updating") + " group " + group.getName());
@@ -115,7 +115,7 @@
<>org.exoplatform.services.organization.MembershipEventListener</>
:</para>
- <programlisting>public class MyMembershipListener extends MembershipEventListener {
+ <programlisting language="java">public class MyMembershipListener extends MembershipEventListener {
public void preSave(Membership membership, boolean isNew) throws Exception {
System.out.println("Before " + (isNew?"creating":"updating") + " membership.");
@@ -151,7 +151,7 @@
a .jar and create a configuration file into it under <emphasis
role="bold">mylisteners.jar!/conf/portal/configuration.xml</emphasis></para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<external-component-plugins>
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/security-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/security-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/security-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -63,7 +63,7 @@
possible to represent it as a <emphasis role="bold">context</emphasis>
(current user's state).</para>
- <programlisting>ConversationState.setCurrent(conversationState);
+ <programlisting language="java">ConversationState.setCurrent(conversationState);
....
ConversationState.getCurrent();</programlisting>
@@ -74,7 +74,7 @@
key-value pairs, the session key is an arbitrary String (user name,
ticket id, httpSessionId etc).</para>
- <programlisting>conversationRegistry.register("key", conversationState);
+ <programlisting language="java">conversationRegistry.register("key", conversationState);
...
conversationRegistry.getState("key");</programlisting>
@@ -82,7 +82,7 @@
ConversationRegistry is a mandatory component deployed into eXo
Container as following:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.security.ConversationRegistry</type>
</component></programlisting>
</section>
@@ -105,7 +105,7 @@
</listitem>
</itemizedlist>
- <programlisting>public interface Authenticator {
+ <programlisting language="java">public interface Authenticator {
/**
* Authenticate user and return userId which can be different to username.
* @param credentials - list of users credentials (such as name/password, X509 certificate etc)
@@ -142,7 +142,7 @@
which compares incoming username/password credentials with the ones
stored in OrganizationService. Configuration example:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.security.Authenticator</key>
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
</component></programlisting>
@@ -169,7 +169,7 @@
</listitem>
</itemizedlist>
- <programlisting>Authenticator authenticator = (Authenticator) container()
+ <programlisting language="java">Authenticator authenticator = (Authenticator) container()
.getComponentInstanceOfType(Authenticator.class);
// RolesExtractor can be null
RolesExtractor rolesExtractor = (RolesExtractor) container().
@@ -195,7 +195,7 @@
registered more than one time. Parameter can be passed in this form
singleLogin=yes or singleLogin=true.</para>
- <programlisting>IdentityRegistry identityRegistry = (IdentityRegistry) getContainer().getComponentInstanceOfType(IdentityRegistry.class);
+ <programlisting language="java">IdentityRegistry identityRegistry = (IdentityRegistry) getContainer().getComponentInstanceOfType(IdentityRegistry.class);
if (singleLogin && identityRegistry.getIdentity(identity.getUserId()) != null)
throw new LoginException("User " + identity.getUserId() + " already logined.");
@@ -227,7 +227,7 @@
ConversationRegistry.unregister(sesionId) and calls the method
LoginModule.logout().</para>
- <programlisting>ConversationRegistry conversationRegistry = (ConversationRegistry) getContainer().getComponentInstanceOfType(ConversationRegistry.class);
+ <programlisting language="java">ConversationRegistry conversationRegistry = (ConversationRegistry) getContainer().getComponentInstanceOfType(ConversationRegistry.class);
ConversationState conversationState = conversationRegistry.unregister(sesionId);
@@ -296,7 +296,7 @@
responsible for mapping primary Subject's principals (userId and a set
of groups) to J2EE Roles:</para>
- <programlisting>public interface RolesExtractor {
+ <programlisting language="java">public interface RolesExtractor {
Set <String> extractRoles(String userId, Set<MembershipEntry> memberships);
}</programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/spring-security-integration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/spring-security-integration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/spring-security-integration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -75,7 +75,7 @@
authentication mechanism in exo. Edit 02portal.war web.xml file and
comment out the JAAS configuration related lines:</para>
- <programlisting>...
+ <programlisting language="xml">...
<session-config>
<session-timeout>15</session-timeout>
</session-config>
@@ -119,7 +119,7 @@
<para>To enable spring and set the spring security filter, add the
following lines:</para>
- <programlisting>...
+ <programlisting language="xml">...
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/security-context.xml</param-value>
@@ -139,7 +139,7 @@
just after the filter responsible of exo container
initialization.</para>
- <programlisting>...
+ <programlisting language="xml">...
<filter-mapping>
<filter-name>PortalContainerInitializedFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -164,7 +164,7 @@
purposes. Create a file named security-context.xml in 02portal.war
WEB-INF directory containing the following lines:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -260,7 +260,7 @@
the login action triggered when the user clicks the login form submit
button.</para>
- <programlisting>package org.exoplatform.loginportlet;
+ <programlisting language="java">package org.exoplatform.loginportlet;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
@@ -330,7 +330,7 @@
url. Edit the article, go to the default.js tab and apply the following
changes to the code:</para>
- <programlisting>function validateUser() {
+ <programlisting language="javascript">function validateUser() {
var user = eXo.env.portal.userName;
var rootObj = document.getElementById("classic-access");
@@ -437,7 +437,7 @@
ApplicationListener interface and listens to the
InteractiveAuthenticationSuccessEvent event.</para>
- <programlisting>package org.exoplatform.spring.security.web;
+ <programlisting language="java">package org.exoplatform.spring.security.web;
...
@@ -511,7 +511,7 @@
<para>Registering our bean is done the usual way in security-context.xml
file:</para>
- <programlisting>...
+ <programlisting language="xml">...
<beans:bean id="myEventHandler" class="org.exoplatform.spring.security.web.SpringSecurityEventHandler" />
...</programlisting>
</section>
@@ -539,7 +539,7 @@
<para>We will use the spring security extensible filter chain to plug in
our filter.</para>
- <programlisting>package org.exoplatform.spring.security.web;
+ <programlisting language="java">package org.exoplatform.spring.security.web;
...
@@ -575,7 +575,7 @@
<para>The following lines in the security-context file register our
custom filter in the chain at the last position.</para>
- <programlisting>...
+ <programlisting language="xml">...
<beans:bean id="myCustomFilter" class="org.exoplatform.spring.security.web.PortalSideSecurityContextFilter">
<custom-filter after="LAST" />
</beans:bean>
@@ -588,7 +588,7 @@
<para>In the portlet webapp we create a regular filter named
PortletSideSecurityContextFilter.</para>
- <programlisting>package org.exoplatform.spring.security.web;
+ <programlisting language="java">package org.exoplatform.spring.security.web;
...
@@ -643,7 +643,7 @@
<para>To register your filter simply add the following lines to your
portlet webapp web.xml file.</para>
- <programlisting>...
+ <programlisting language="xml">...
<filter>
<filter-name>portletSideSecurityContextFilter</filter-name>
<filter-class>org.exoplatform.spring.security.web.PortletSideSecurityContextFilter</filter-class>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/tika-document-reader-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/tika-document-reader-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core/tika-document-reader-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -41,7 +41,8 @@
<title>Configuration</title>
<para>How TikaDocumentReaderService Impl configuration looks
- like:<programlisting><component>
+ like:</para>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.document.DocumentReaderService</key>
<type>org.exoplatform.services.document.impl.tika.TikaDocumentReaderServiceImpl</type>
@@ -147,9 +148,10 @@
</init-params>
</component>
-</configuration></programlisting></para>
+</configuration></programlisting>
- <para>tika-config.xml example:<programlisting><properties>
+ <para>tika-config.xml example:</para>
+ <programlisting language="xml"><properties>
<mimeTypeRepository magic="false"/>
<parsers>
@@ -291,7 +293,7 @@
</parsers>
-</properties></programlisting></para>
+</properties></programlisting>
</section>
<section>
@@ -318,42 +320,57 @@
<para>You can make you own DocumentReader in two ways.</para>
<para><emphasis role="bold">Old-Style Document
- Reader</emphasis>:<itemizedlist>
- <listitem>
- <para>extend BaseDocumentReader <programlisting>public class MyDocumentReader extends BaseDocumentReader
+ Reader</emphasis>:</para>
+ <itemizedlist>
+ <listitem>
+ <para>extend BaseDocumentReader</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting language="java">public class MyDocumentReader extends BaseDocumentReader
{
public String[] getMimeTypes()
{
return new String[]{"mymimetype"};
}
...
-}</programlisting></para>
+}</programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>register it as component-plugin</para>
</listitem>
-
- <listitem>
- <para>register it as component-plugin<programlisting><component-plugin>
+ </itemizedlist>
+ <programlisting language="xml"><component-plugin>
<name>my.DocumentReader</name>
<set-method>addDocumentReader</set-method>
<type>com.mycompany.document.MyDocumentReader</type>
<description>to read my own file format</description>
-</component-plugin></programlisting></para>
- </listitem>
- </itemizedlist></para>
+</component-plugin></programlisting>
+
+
- <para><emphasis role="bold">Tika Parser</emphasis>:<itemizedlist>
- <listitem>
- <para>implement Parser<programlisting>public class MyParser implements Parser
+ <para><emphasis role="bold">Tika Parser</emphasis>:</para>
+ <itemizedlist>
+ <listitem>
+ <para>implement Parser</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting language="java">public class MyParser implements Parser
{
...
-}</programlisting></para>
+}</programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>register it in tika-config.xml</para>
</listitem>
-
- <listitem>
- <para>register it in tika-config.xml<programlisting> <parser name="parse-mydocument" class="com.mycompany.document.MyParser">
+ </itemizedlist>
+<programlisting language="xml"> <parser name="parse-mydocument" class="com.mycompany.document.MyParser">
<mime>mymimetype</mime>
- </parser></programlisting></para>
- </listitem>
- </itemizedlist></para>
+ </parser>
+</programlisting>
+
+
</section>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq/jcr-faq.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq/jcr-faq.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq/jcr-faq.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -15,7 +15,7 @@
<title>What is the best, standardized way to get the instance of a
service ?</title>
- <programlisting>container.getComponentInstanceOfType(ServiceName.class);</programlisting>
+ <programlisting language="java">container.getComponentInstanceOfType(ServiceName.class);</programlisting>
</section>
</section>
@@ -209,7 +209,7 @@
'check-sns-new-connection' with 'false' value is required for each
workspace data container:</para>
- <programlisting><container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <programlisting language="xml"><container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
<property name="dialect" value="auto" />
@@ -226,7 +226,7 @@
<title>How to open and close a session properly to avoid memory
leaks?</title>
- <programlisting>Session session = repository.login(credentials);
+ <programlisting language="java">Session session = repository.login(credentials);
try
{
// here your code
@@ -274,7 +274,7 @@
Transaction Service and JBossCache Transaction Manager, as shown
below.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>
</component>
@@ -303,7 +303,7 @@
<listitem>
<para><cache> configuration should look like this:</para>
- <programlisting><cache enabled="true"
+ <programlisting language="xml"><cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
<property name="jbosscache-configuration" value="test-jbosscache-data.xml" />
@@ -349,13 +349,13 @@
<para>You must replace or add in <query-handler> block
the "changesfilter-class" parameter equals with:</para>
- <programlisting><property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"/></programlisting>
+ <programlisting language="xml"><property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"/></programlisting>
</listitem>
<listitem>
<para>add JBossCache-oriented configuration:</para>
- <programlisting><property name="jbosscache-configuration" value="test-jbosscache-indexer.xml" />
+ <programlisting language="xml"><property name="jbosscache-configuration" value="test-jbosscache-indexer.xml" />
<property name="jgroups-configuration" value="udp-mux.xml" />
<property name="jgroups-multiplexer-stack" value="true" />
<property name="jbosscache-cluster-name" value="JCR-cluster-indexer-db1-ws" />
@@ -379,7 +379,7 @@
have to define access to DB where locks will be stored. Replace
exsiting lock-manager configuration with shown below.</para>
- <programlisting>
+ <programlisting language="xml">
<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
@@ -476,7 +476,7 @@
<para>Enable lucene spellchecker in jcr QueryHandler
configuration:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
@@ -491,7 +491,7 @@
<para>Execute query with rep:spellcheck function and word that is
checked:</para>
- <programlisting>Query query = qm.createQuery("select rep:spellcheck() from nt:base where " + "jcr:path = '/' and spellcheck('word that is checked')", Query.SQL);
+ <programlisting language="java">Query query = qm.createQuery("select rep:spellcheck() from nt:base where " + "jcr:path = '/' and spellcheck('word that is checked')", Query.SQL);
RowIterator rows = query.execute().getRows();</programlisting>
</listitem>
</itemizedlist>
@@ -500,7 +500,7 @@
<listitem>
<para>Fetch a result:</para>
- <programlisting>Row r = rows.nextRow();
+ <programlisting language="java">Row r = rows.nextRow();
Value v = r.getValue("rep:spellcheck()");</programlisting>
</listitem>
</itemizedlist>
@@ -525,7 +525,7 @@
<listitem>
<para>Search for more popular suggestions;</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
@@ -574,39 +574,39 @@
<orderedlist>
<listitem>
- <para>Remove existing repository, use :</para>
+ <para>Remove existing repository, use:</para>
- <programlisting>RepositoryService.removeRepository(String repositoryName)</programlisting>
+ <programlisting language="java">RepositoryService.removeRepository(String repositoryName)</programlisting>
</listitem>
<listitem>
<para>Restore repository, use</para>
- <programlisting>BackupManager.restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous)</programlisting>
+ <programlisting language="java">BackupManager.restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous)</programlisting>
</listitem>
</orderedlist>
</section>
<section>
- <title>How to restore workspace to existing worksapce ?</title>
+ <title>How to restore workspace to existing worksapce?</title>
<orderedlist>
<listitem>
- <para>Remove existing workspace, use :</para>
+ <para>Remove existing workspace, use:</para>
- <programlisting>ManageableRepository.removeWorkspace(String workspaceName)</programlisting>
+ <programlisting language="java">ManageableRepository.removeWorkspace(String workspaceName)</programlisting>
</listitem>
<listitem>
- <para>Restore workspace, use :</para>
+ <para>Restore workspace, use:</para>
- <programlisting>BackupManager.restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous)</programlisting>
+ <programlisting language="java">BackupManager.restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous)</programlisting>
</listitem>
</orderedlist>
</section>
<section>
- <title>Does JCR support hot backup ?</title>
+ <title>Does JCR support hot backup?</title>
<para>Yes, JCR is support hot backup. Will use
org.exoplatform.services.jcr.ext.backup.BackupManager.</para>
@@ -641,7 +641,7 @@
files for 5 minutes (300 sec.) and other text/\* files for 10 minutes
(600 sec.), use the next configuration:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</type>
<init-params>
<value-param>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -117,7 +117,7 @@
org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean
:</para>
- <programlisting>{"incrementalRepetitionNumber":<Integer>,"incrementalBackupJobConfig":<JSON to BackupJobConfig>,
+ <programlisting language="javascript">{"incrementalRepetitionNumber":<Integer>,"incrementalBackupJobConfig":<JSON to BackupJobConfig>,
"backupType":<Integer>,"fullBackupJobConfig":<JSON to BackupJobConfig>,
"incrementalJobPeriod":<Long>,"backupDir":"<String>"}</programlisting>
@@ -147,7 +147,7 @@
org.exoplatform.services.jcr.ext.backup.server.bean.response.Pair
:</para>
- <programlisting>{"name":"<String>","value":"<String>"}</programlisting>
+ <programlisting language="java">{"name":"<String>","value":"<String>"}</programlisting>
<para>Where:</para>
@@ -915,7 +915,7 @@
org.exoplatform.services.jcr.ext.backup.BackupManager to services
configuration :</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.ext.backup.server.HTTPBackupAgent</type>
</component>
@@ -942,7 +942,7 @@
RepositoryServiceConfiguration in order to save the changes of the
repository configuration. For example</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
<init-params>
@@ -1563,7 +1563,10 @@
status code = 200</programlisting>The
/home/rainf0x/java/exo-working/JCR-839/exo-jcr-config_backup.xml
content the configuration for restored workspace <emphasis
- role="bold">"backup"</emphasis> :<programlisting><repository-service default-repository="repository">
+ role="bold">"backup"</emphasis>:</para></listitem>
+ </itemizedlist>
+
+ <programlisting language="xml"><repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
<security-domain>exo-domain</security-domain>
@@ -1612,9 +1615,8 @@
</workspaces>
</repository>
</repositories>
-</repository-service></programlisting></para>
- </listitem>
- </itemizedlist>
+</repository-service>
+</programlisting>
</section>
<section>
@@ -1647,9 +1649,11 @@
</note>
<para>This usecase needs RestRepositoryService enabled. (Deleting the
- repository needs it)<programlisting><component>
+ repository needs it)</para>
+
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.ext.repository.RestRepositoryService</type>
-</component></programlisting></para>
+</component></programlisting>
<section>
<title>Creating backup</title>
@@ -1709,7 +1713,7 @@
<itemizedlist>
<listitem>
<para>Delete/clean the database for workspace <emphasis
- role="bold">"repository"</emphasis> : When we use "single-db", then
+ role="bold">"repository"</emphasis>: When we use "single-db", then
we will run the SQL queries for clean database :<programlisting> drop table JCR_SREF;
drop table JCR_SVALUE;
drop table JCR_SITEM;</programlisting></para>
@@ -1731,7 +1735,11 @@
status code = 200</programlisting>The
/home/rainf0x/exo-jcr-config_backup.xml content the configuration
for restored repository <emphasis
- role="bold">"repository"</emphasis> :<programlisting><repository-service default-repository="repository">
+ role="bold">"repository"</emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml"><repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
<security-domain>exo-domain</security-domain>
@@ -1864,9 +1872,8 @@
</repository>
</repositories>
</repository-service>
-</programlisting></para>
- </listitem>
- </itemizedlist>
+</programlisting>
+
</section>
<section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -202,9 +202,9 @@
configuration</emphasis>.</para>
<para>The following is an example configuration compatible with JCR 1.9.3
- and later :</para>
+ and later:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
<type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
<init-params>
@@ -255,7 +255,7 @@
Full + Incrementals mode, then we ask the BackupManager to start the
backup process.</para>
- <programlisting>// Obtaining the backup service from the eXo container.
+ <programlisting language="java">// Obtaining the backup service from the eXo container.
BackupManager backup = (BackupManager) container.getComponentInstanceOfType(BackupManager.class);
// And prepare the BackupConfig instance with custom parameters.
@@ -278,7 +278,7 @@
<para>To stop the backup operation, you have to use the BackupChain
instance.</para>
- <programlisting>// stop backup
+ <programlisting language="java">// stop backup
backup.stopBackup(chain);</programlisting>
</section>
@@ -290,7 +290,7 @@
following snippet shows the typical sequence for restoring a workspace
:</para>
- <programlisting>// find BackupChain using the repository and workspace names (return null if not found)
+ <programlisting language="java">// find BackupChain using the repository and workspace names (return null if not found)
BackupChain chain = backup.findBackup("db1", "ws1");
// Get the RepositoryEntry and WorkspaceEntry
@@ -318,13 +318,16 @@
</note>
<para>To restore a backup over an existing workspace, you are required
- to clear its data. Your backup process should follow these steps :
- <itemizedlist>
+ to clear its data. Your backup process should follow these steps:</para>
+ <itemizedlist>
<listitem>
- <para>Remove workspace<programlisting>ManageableRepository repo = repositoryService.getRepository(repository);
-repo.removeWorkspace(workspace);</programlisting></para>
+ <para>Remove workspace</para>
</listitem>
-
+ </itemizedlist>
+ <programlisting language="java">ManageableRepository repo = repositoryService.getRepository(repository);
+repo.removeWorkspace(workspace);</programlisting>
+
+ <itemizedlist>
<listitem>
<para>Clean database, value storage, index</para>
</listitem>
@@ -332,7 +335,7 @@
<listitem>
<para>Restore (see snippet above)</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
</section>
<section>
@@ -346,7 +349,7 @@
<para>Restoring the JCR System workspace requires to shutdown the
system and use of a special initializer.</para>
- <para>Follow these steps (this will also work for normal workspaces) :
+ <para>Follow these steps (this will also work for normal workspaces): </para>
<itemizedlist>
<listitem>
<para>Stop repository (or portal)</para>
@@ -359,8 +362,10 @@
<listitem>
<para>In configuration, the workspace set
BackupWorkspaceInitializer to refer to your backup.</para>
-
- <para>For example :<programlisting><workspaces>
+ </listitem>
+ </itemizedlist>
+ <para>For example:</para>
+ <programlisting language="xml"><workspaces>
<workspace name="production" ... >
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
...
@@ -371,13 +376,14 @@
</properties>
</initializer>
...
-</workspace></programlisting></para>
- </listitem>
-
+</workspace>
+</programlisting>
+
+ <itemizedlist>
<listitem>
<para>Start repository (or portal).</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
</section>
</section>
@@ -399,7 +405,7 @@
<para>Restoring the repository or workspace requires to shutdown the
repository.</para>
- <para>Follow these steps : <itemizedlist>
+ <para>Follow these steps: <itemizedlist>
<listitem>
<para>Stop repository (will be skipped this step if repository or
workace is not exists)</para>
@@ -425,7 +431,7 @@
<para>Example of configuration initializer to restore workspace "backup"
over BackupWorkspaceInitializer:</para>
- <programlisting><workspaces>
+ <programlisting language="xml"><workspaces>
<workspace name="backup" ... >
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
...
@@ -442,7 +448,8 @@
<title>Restore the Workspace over BackupWorksaceInitializer</title>
<para>Example of configuration initializer to resore the workspace
- "backup" over BackupWorkspaceInitializer :<itemizedlist>
+ "backup" over BackupWorkspaceInitializer:</para>
+ <itemizedlist>
<listitem>
<para>Stop repository (will be skipped this step if workspace is
not exists)</para>
@@ -452,11 +459,13 @@
<para>Clean database, value storage, index; (will be skipped
this step if workspace is new)</para>
</listitem>
-
- <listitem>
+ </itemizedlist>
+
<para>In configuration, the workspace/-s set
BackupWorkspaceInitializer to refer to your
- backup<programlisting><workspaces>
+ backup.</para>
+
+ <programlisting language="xml"><workspaces>
<workspace name="backup" ... >
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
...
@@ -467,20 +476,21 @@
</properties>
</initializer>
...
-</workspace></programlisting></para>
- </listitem>
-
- <listitem>
- <para>Start repository</para>
- </listitem>
- </itemizedlist></para>
+</workspace></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Start repository</para>
+ </listitem>
+ </itemizedlist>
</section>
<section>
<title>Restore the Repository over BackupWorksaceInitializer</title>
<para>Example of configuration initializers to restore the repository
- "repository" over BackupWorkspaceInitializer : <itemizedlist>
+ "repository" over BackupWorkspaceInitializer:</para>
+
+ <itemizedlist>
<listitem>
<para>Stop repository (will be skipped this step if repository
is not exists)</para>
@@ -490,12 +500,15 @@
<para>Clean database, value storage, index; (will be skipped
this step if repository is new)</para>
</listitem>
-
- <listitem>
+ </itemizedlist>
+
<para>In configuration of repository will be configured
initializers of workspace to refer to your backup.</para>
+
- <para>For example :<programlisting>...
+ <para>For example:</para>
+
+ <programlisting language="xml">...
<workspaces>
<workspace name="system" ... >
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
@@ -533,13 +546,14 @@
</initializer>
...
</workspace>
-</workspaces></programlisting></para>
- </listitem>
+</workspaces>
+</programlisting>
+ <itemizedlist>
<listitem>
<para>Start repository.</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
</section>
</section>
</section>
@@ -590,7 +604,7 @@
</listitem>
</itemizedlist>
- <programlisting>// geting the scheduler from the BackupManager
+ <programlisting language="java">// geting the scheduler from the BackupManager
BackupScheduler scheduler = backup.getScheduler();
// schedule backup using a ready configuration (Full + Incrementals) to run from startTime
@@ -649,7 +663,7 @@
<para>For restore will be used spacial methods:</para>
- <programlisting> /**
+ <programlisting language="java"> /**
* Restore existing workspace. Previous data will be deleted.
* For getting status of workspace restore can use
* BackupManager.getLastRestore(String repositoryName, String workspaceName) method
@@ -755,7 +769,7 @@
<para>The Backup manager allows you to restore a repository or a workspace
using the original configuration stored into the backup log:</para>
- <programlisting>/**
+ <programlisting language="java">/**
* Restore existing workspace. Previous data will be deleted.
* For getting status of workspace restore can use
* BackupManager.getLastRestore(String repositoryName, String workspaceName) method
@@ -934,7 +948,7 @@
</listitem>
</itemizedlist>Configuration:</para>
- <para><programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
<type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
<init-params>
@@ -947,6 +961,6 @@
</properties-param>
</init-params>
</component>
-</programlisting></para>
+</programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -22,7 +22,8 @@
<listitem>
<para>Configure JAAS by inserting XML fragment shown below into
<%jboss_home%/server/default/conf/login-config.xml></para>
- <programlisting><application-policy name="exo-domain">
+
+ <programlisting language="xml"><application-policy name="exo-domain">
<authentication>
<login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
</authentication>
@@ -32,7 +33,8 @@
<para>Ensure that you use JBossTS <link linkend="Kernel.TransactionService">Transaction Service</link> and
JBossCache <link linkend="JCR.JBossTransactionsService">Transaction Manager</link>. Your exo-configuration.xml must contain such
parts:</para>
- <programlisting><component>
+
+ <programlisting language="xml"><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>^
</component>
@@ -73,7 +75,8 @@
<para>To manually configure repository, create a new configuration
file (e.g., exo-jcr-configuration.xml). For details, see <link linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
configuration must look like:</para>
- <programlisting><repository-service default-repository="repository1">
+
+ <programlisting language="xml"><repository-service default-repository="repository1">
<repositories>
<repository name="repository1" system-workspace="ws1" default-workspace="ws1">
<security-domain>exo-domain</security-domain>
@@ -122,7 +125,9 @@
</listitem>
<listitem>
<para>Then, update RepositoryServiceConfiguration configuration in
- exo-configuration.xml to use this file:<programlisting><component>
+ exo-configuration.xml to use this file:</para>
+
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
<init-params>
@@ -132,7 +137,7 @@
<value>exo-jcr-configuration.xml</value>
</value-param>
</init-params>
-</component></programlisting></para>
+</component></programlisting>
</listitem>
</itemizedlist>
</section>
@@ -167,7 +172,8 @@
<itemizedlist>
<listitem id="conf_value_storage">
<para>Value Storage configuration:</para>
- <programlisting><value-storages>
+
+ <programlisting language="xml"><value-storages>
<value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
@@ -180,7 +186,8 @@
</listitem>
<listitem id="conf_cache">
<para>Cache configuration:</para>
- <programlisting><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+
+ <programlisting language="xml"><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
<property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
<property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
@@ -191,7 +198,8 @@
</listitem>
<listitem id="conf_indexer">
<para>Indexer configuration:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
<property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
@@ -204,7 +212,8 @@
</listitem>
<listitem id="conf_lock_manager">
<para>Lock Manager configuration:</para>
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+
+ <programlisting language="xml"><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-extensions.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-extensions.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-extensions.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -121,7 +121,7 @@
addProperty, changeProperty, removeProperty, removeNode, addMixin,
removeMixin, lock, unlock, checkin, checkout, read.</emphasis></para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
<component-plugins>
<component-plugin>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -5,18 +5,18 @@
<para>Since version 1.11, eXo JCR implementation supports namespaces altering.</para>
<section>
<title>Adding new namespace</title>
- <programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
+ <programlisting language="java">ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");</programlisting>
</section>
<section>
<title>Changing existing namespace</title>
- <programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
+ <programlisting language="java">ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");</programlisting>
</section>
<section>
<title>Removing existing namespace</title>
- <programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
+ <programlisting language="java">ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
namespaceRegistry.unregisterNamespace("newMapping");</programlisting>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-registry-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-registry-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-registry-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -48,7 +48,7 @@
parameter to component to ignore reading parameters initialization from
RegistryService and to use file instead:</para>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>force-xml-configuration</name>
<value>true</value>
</value-param></programlisting>
@@ -61,7 +61,7 @@
straightforward, it is described in the Registry abstract class as the
following:</para>
- <programlisting>public abstract class Registry {
+ <programlisting language="java">public abstract class Registry {
/**
* Returns the Registry object which wraps the Node of the "exo:registry" type
@@ -107,7 +107,7 @@
<para>Example of RegistryService using:</para>
- <programlisting> RegistryService regService = (RegistryService) container
+ <programlisting language="java"> RegistryService regService = (RegistryService) container
.getComponentInstanceOfType(RegistryService.class);
RegistryEntry registryEntry = regService.getEntry(sessionProvider,
@@ -128,7 +128,7 @@
a repository name and its value as a workspace name (a system workspace by
default).</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
<init-params>
<properties-param>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-usage.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-usage.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-usage.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -12,35 +12,51 @@
<section>
<title>Obtaining a Repository object</title>
- <para>A javax.jcr.Repository object can be obtained by:<itemizedlist>
+ <para>A javax.jcr.Repository object can be obtained by:</para>
+ <itemizedlist>
<listitem>
<para>Using the eXo Container "native" mechanism. All Repositories
are kept with a single RepositoryService component. So it can be
obtained from eXo Container, described as the
- following:<programlisting> RepositoryService repositoryService = (RepositoryService) container.getComponentInstanceOfType(RepositoryService.class);
- Repository repository = repositoryService.getRepository("repositoryName"); </programlisting></para>
+ following:</para>
</listitem>
-
+ </itemizedlist>
+
+ <programlisting language="java">
+ RepositoryService repositoryService = (RepositoryService) container.getComponentInstanceOfType(RepositoryService.class);
+ Repository repository = repositoryService.getRepository("repositoryName");
+ </programlisting>
+
+ <itemizedlist>
<listitem>
<para>Using the eXo Container "native" mechanism with a thread
local saved "current" repository (especially if you plan to use a
single repository which covers more than 90% of use
- cases)<programlisting> // set current repository at initial time
+ cases)</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="java"> // set current repository at initial time
RepositoryService repositoryService = (RepositoryService) container.getComponentInstanceOfType(RepositoryService.class);
repositoryService.setCurrentRepositoryName("repositoryName");
....
// retrieve and use this repository
- Repository repository = repositoryService.getCurrentRepository();</programlisting></para>
- </listitem>
-
+ Repository repository = repositoryService.getCurrentRepository();
+ </programlisting>
+
+ <itemizedlist>
<listitem>
<para>Using JNDI as specified in JSR-170. This way you have to
configure the reference (see eXo <link
linkend="Kernel.JNDINaming">JNDI Naming configuration</link>
- )<programlisting> Context ctx = new InitialContext();
- Repository repository =(Repository) ctx.lookup("repositoryName");</programlisting></para>
+ )</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
+
+ <programlisting language="java"> Context ctx = new InitialContext();
+ Repository repository =(Repository) ctx.lookup("repositoryName");</programlisting>
+
+
</section>
<section>
@@ -93,7 +109,7 @@
is responsible for caching/obtaining your JCR Sessions and closing all
opened sessions at once.</para>
- <programlisting>public class SessionProvider {
+ <programlisting language="java">public class SessionProvider {
/**
* Creates a SessionProvider for a certain identity
@@ -131,7 +147,7 @@
operations, use it to obtain the Sessions and close at the end of an
application session(request). See the following example:</para>
- <programlisting>// (1) obtain current javax.jcr.Credentials, for example get it from AuthenticationService
+ <programlisting language="groovy">// (1) obtain current javax.jcr.Credentials, for example get it from AuthenticationService
Credentials cred = ....
// (2) create SessionProvider for current user
@@ -164,7 +180,7 @@
<para>The org.exoplatform.services.jcr.ext.app.SessionProviderService
interface is defined as follows:</para>
- <programlisting>public interface SessionProviderService {
+ <programlisting language="java">public interface SessionProviderService {
void setSessionProvider(Object key, SessionProvider sessionProvider);
SessionProvider getSessionProvider(Object key);
void removeSessionProvider(Object key);
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -18,7 +18,7 @@
<title>ExtendedNodeTypeManager</title>
<para>The ExtendedNodeTypeManager (from JCR 1.11) interface provides the
following methods related to registering node types:</para>
- <programlisting>public static final int IGNORE_IF_EXISTS = 0;
+ <programlisting language="java">public static final int IGNORE_IF_EXISTS = 0;
public static final int FAIL_IF_EXISTS = 2;
@@ -71,7 +71,7 @@
structure used to define node types which are then registered through
the ExtendedNodeTypeManager.registerNodeType method. The implementation of
this interface does not contain any validation logic.</para>
- <programlisting>/**
+ <programlisting language="java">/**
* @return Returns the declaredSupertypeNames.
*/
public List<String> getDeclaredSupertypeNames();
@@ -154,7 +154,7 @@
the addition of writing methods, enabling the characteristics of a child
node definition to be set, after that the NodeDefinitionValue is added
to a NodeTypeValue.</para>
- <programlisting>/**
+ <programlisting language="java">/**
* @return Returns the declaredSupertypeNames.
*/
public List<String> getDeclaredSupertypeNames();
@@ -239,7 +239,7 @@
with the addition of writing methods, enabling the characteristics of a
child property definition to be set, after that the
PropertyDefinitionValue is added to a NodeTypeValue.</para>
- <programlisting>/**
+ <programlisting language="java">/**
* @return Returns the defaultValues.
*/
public List<String> getDefaultValueStrings();
@@ -281,7 +281,7 @@
</section>
<section>
<title>ItemDefinitionValue</title>
- <programlisting> /**
+ <programlisting language="java"> /**
* @return Returns the autoCreate.
*/
public boolean isAutoCreate();
@@ -338,14 +338,14 @@
registration.</para>
<section>
<title>Run time registration from xml file.</title>
- <programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
+ <programlisting language="java">ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.IGNORE_IF_EXISTS );</programlisting>
</section>
<section>
<title>Run time registration using NodeTypeValue.</title>
- <programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
+ <programlisting language="java">ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
NodeTypeValue testNValue = new NodeTypeValue();
@@ -374,7 +374,7 @@
<para>If you want to replace existing node type definition, you should
pass ExtendedNodeTypeManager.REPLACE_IF_EXISTS as a second parameter for
the method ExtendedNodeTypeManager.registerNodeType.</para>
- <programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
+ <programlisting language="java">ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
.....
@@ -386,13 +386,13 @@
<para>Node type is only possibly removed when the repository does not
contain this node type.</para>
</note>
- <programlisting>nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
+ <programlisting language="java">nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
</section>
<section>
<title>Practical How to</title>
<section>
<title>Adding new PropertyDefinition</title>
- <programlisting>
+ <programlisting language="java">
NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
props.add(new PropertyDefinitionValue("tt",
@@ -410,7 +410,7 @@
</section>
<section>
<title>Adding new child NodeDefinition</title>
- <programlisting>NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
+ <programlisting language="java">NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<NodeDefinitionValue> nodes = new ArrayList<NodeDefinitionValue>();
nodes.add(new NodeDefinitionValue("child",
@@ -467,7 +467,7 @@
</section>
<section>
<title>Changing the list of super types</title>
- <programlisting>NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
+ <programlisting language="java">NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
List<String> superType = testNValue.getDeclaredSupertypeNames();
superType.add("mix:versionable");
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetypes-and-namespaces.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetypes-and-namespaces.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetypes-and-namespaces.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -30,7 +30,7 @@
configuration file thanks to eXo component plugin mechanism, described as
follows:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
<component-plugin>
<name>add.nodeType</name>
@@ -65,7 +65,7 @@
<para>Node type definition file format:</para>
- <programlisting> <?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nodeTypes [
<!ELEMENT nodeTypes (nodeType)*>
<!ELEMENT nodeType (supertypes?|propertyDefinitions?|childNodeDefinitions?)>
@@ -127,7 +127,7 @@
application specific ones, declaring it in service's configuration file
thanks to eXo component plugin mechanism, described as follows:</para>
- <programlisting> <component-plugin>
+ <programlisting language="xml"> <component-plugin>
<name>add.namespaces</name>
<set-method>addPlugin</set-method>
<type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/configuration-persister.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/configuration-persister.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/configuration-persister.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -13,7 +13,7 @@
<classname>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</classname>
component to read its configuration.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
<init-params>
@@ -44,7 +44,9 @@
case, it uses the provided <classname>ConfigurationPersister</classname>
implementation class to instantiate the persister object.</para>
- <para>Configuration with persister:<programlisting><component>
+ <para>Configuration with persister:</para>
+
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
<init-params>
@@ -61,7 +63,8 @@
<property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister" />
</properties-param>
</init-params>
- </component></programlisting></para>
+ </component>
+ </programlisting>
<para>Where:<itemizedlist>
<listitem>
@@ -87,7 +90,9 @@
</listitem>
</itemizedlist></para>
- <para>ConfigurationPersister interface:<programlisting>/**
+ <para>ConfigurationPersister interface:</para>
+
+ <programlisting language="java">/**
* Init persister.
* Used by RepositoryServiceConfiguration on init.
* @return - config data stream
@@ -110,7 +115,8 @@
* Tell if the config exists.
* @return - flag
*/
- boolean hasConfig() throws RepositoryConfigurationException;</programlisting></para>
+ boolean hasConfig() throws RepositoryConfigurationException;
+ </programlisting>
<para>JCR Core implementation contains a persister which stores the
repository configuration in the relational database using JDBC calls -
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -87,7 +87,7 @@
<para>JCR service configuration looks like:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.RepositoryService</key>
<type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
</component>
@@ -408,7 +408,7 @@
configuration parameter.</para>
</note>
- <programlisting><!ELEMENT repository-service (repositories)>
+ <programlisting language="xml"><!ELEMENT repository-service (repositories)>
<!ATTLIST repository-service default-repository NMTOKEN #REQUIRED>
<!ELEMENT repositories (repository)>
<!ELEMENT repository (security-domain,access-control,session-max-age,authentication-policy,workspaces)>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/external-value-storages.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/external-value-storages.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/external-value-storages.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -38,7 +38,7 @@
<para>A disadvantage is that it's a higher time on Value deletion due to
unused tree-nodes remove.</para>
- <programlisting><value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <programlisting language="xml"><value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="data/values"/>
</properties>
@@ -73,7 +73,7 @@
<property>min-value-size</property> and will be stored in the path
"data/20Mvalues", all other in "data/values".</para>
- <programlisting><value-storages>
+ <programlisting language="xml"><value-storages>
<value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="data/20Mvalues"/>
@@ -107,7 +107,7 @@
<para>Hold Values in flat FileSystem files. <property>path</property>
property points to root directory in order to store files</para>
- <programlisting><value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.SimpleFileValueStorage">
+ <programlisting language="xml"><value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.SimpleFileValueStorage">
<properties>
<property name="path" value="data/values"/>
</properties>
@@ -170,7 +170,7 @@
<para>To enable CAS support, just configure it in JCR Repositories
configuration as we do for other Value Storages.</para>
- <programlisting><workspaces>
+ <programlisting language="xml"><workspaces>
<workspace name="ws">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -105,7 +105,9 @@
<para>For example (standalone mode, two data containers
<parameter>jdbcjcr</parameter> - local HSQLDB,
- <parameter>jdbcjcr1</parameter> - remote MySQL):<programlisting><component>
+ <parameter>jdbcjcr1</parameter> - remote MySQL):</para>
+
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<component-plugins>
@@ -173,7 +175,8 @@
<value>org.exoplatform.services.naming.SimpleContextFactory</value>
</value-param>
</init-params>
- </component></programlisting></para>
+ </component>
+ </programlisting>
<para>We configure the database connection parameters:<itemizedlist>
<listitem>
@@ -222,8 +225,11 @@
repository service. Each workspace will be configured for its own data
container.</para>
- <para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr1):<programlisting><workspaces>
+ <para>For example (two workspaces
+ <parameter>ws</parameter> - jdbcjcr,
+ <parameter>ws1</parameter> - jdbcjcr1):</para>
+
+ <programlisting language="xml"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
@@ -284,7 +290,10 @@
</persister>
</lock-manager>
</workspace>
-</workspaces></programlisting><itemizedlist>
+</workspaces>
+</programlisting>
+
+ <itemizedlist>
<listitem>
<para><parameter>source-name</parameter>: A javax.sql.DataSource
name configured in InitialContextInitializer component (was
@@ -313,7 +322,7 @@
<para><parameter>swap-directory</parameter>: A path in the file
system used to swap the pending changes.</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
<para>In this way, we have configured two workspace which will be
persisted in two different databases (ws in HSQLDB, ws1 in MySQL).</para>
@@ -333,7 +342,9 @@
have to configure one naming resource.</para>
<para>For example (embedded mode for <parameter>jdbcjcr</parameter> data
- container):<programlisting><external-component-plugins>
+ container):</para>
+
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
<component-plugin>
<name>bind.datasource</name>
@@ -365,14 +376,17 @@
</properties-param>
</init-params>
</component-plugin>
- </external-component-plugins></programlisting></para>
+ </external-component-plugins>
+ </programlisting>
<para>And configure repository workspaces in repositories configuration
with this one database. Parameter "multi-db" must be switched off (set
value "false").</para>
<para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr):<programlisting><workspaces>
+ <parameter>ws1</parameter> - jdbcjcr):</para>
+
+ <programlisting language="xml"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
@@ -428,7 +442,8 @@
</persister>
</lock-manager>
</workspace>
-</workspaces></programlisting></para>
+</workspaces>
+</programlisting>
<para>In this way, we have configured two workspaces which will be
persisted in one database (PostgreSQL).</para>
@@ -462,7 +477,7 @@
use with JCR to prevent a database overload.</para>
</note>
- <programlisting><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
+ <programlisting language="xml"><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="dialect" value="hsqldb"/>
@@ -504,20 +519,25 @@
for reducing amount of database callings.</para>
<para>Simple queries will be used if you chose
- <classname>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</classname>:<programlisting><workspaces>
+ <classname>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</classname>:</para>
+
+ <programlisting language="xml"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
...
</workspace>
-</worksapces></programlisting></para>
+</worksapces>
+</programlisting>
<para>Complex queries will be used if you chose
- <classname>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</classname>:<programlisting><workspaces>
+ <classname>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</classname>:</para>
+
+ <programlisting language="xml"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
...
</workspace>
-</worksapces></programlisting></para>
+</worksapces></programlisting>
<para>Why we should use a Complex Queries?<simplelist>
<member>They are optimised to reduce amount of requests to
@@ -540,12 +560,14 @@
important queries.</para>
<para>To enable this option put next configuration
- property:<programlisting><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
+ property:</para>
+
+ <programlisting language="xml"><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="dialect" value="oracle"/>
<property name="force.query.hints" value="true" />
- ......</programlisting></para>
+ ......</programlisting>
<para>Query hints enabled by default.</para>
@@ -583,10 +605,12 @@
</listitem>
</itemizedlist></para>
- <para>A sample registry file is below:<programlisting>Windows Registry Editor Version 5.00
+ <para>A sample registry file is below:</para>
+
+ <programlisting>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:00001b58
-"TcpTimedWaitDelay"=dword:0000001e</programlisting></para>
+"TcpTimedWaitDelay"=dword:0000001e</programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multilanguage-support.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multilanguage-support.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multilanguage-support.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -65,7 +65,7 @@
<para>Create database with Unicode encoding and use Oracle dialect for the
Workspace Container:</para>
- <programlisting><workspace name="collaboration">
+ <programlisting language="xml"><workspace name="collaboration">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -89,7 +89,9 @@
<para>Example of UTF-8 database creation:<programlisting>DB2 CREATE DATABASE dbname USING CODESET UTF-8 TERRITORY US</programlisting></para>
<para>Create database with UTF-8 encoding and use db2 dialect for
- Workspace Container on DB2 v.9 and higher:<programlisting><workspace name="collaboration">
+ Workspace Container on DB2 v.9 and higher:</para>
+
+ <programlisting language="xml"><workspace name="collaboration">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -98,7 +100,7 @@
<property name="max-buffer-size" value="200k" />
<property name="swap-directory" value="target/temp/swap/ws" />
</properties>
- .....</programlisting></para>
+ .....</programlisting>
<note>
<para>For DB2 v.8.x support change the property "dialect" to
@@ -120,7 +122,9 @@
tested it only on latin1 database default charset.</para>
<para>Repository configuration, workspace container entry
- example:<programlisting><workspace name="collaboration">
+ example:</para>
+
+ <programlisting language="xml"><workspace name="collaboration">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -129,7 +133,7 @@
<property name="max-buffer-size" value="200k" />
<property name="swap-directory" value="target/temp/swap/ws" />
</properties>
- .....</programlisting></para>
+ .....</programlisting>
</section>
<section>
@@ -156,7 +160,9 @@
</itemizedlist></para>
<para>Create database with UTF-8 encoding and use PgSQL dialect for
- Workspace Container:<programlisting><workspace name="collaboration">
+ Workspace Container:</para>
+
+ <programlisting language="java"><workspace name="collaboration">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -165,6 +171,6 @@
<property name="max-buffer-size" value="200k" />
<property name="swap-directory" value="target/temp/swap/ws" />
</properties>
- .....</programlisting></para>
+ .....</programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/rest-services-on-groovy.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/rest-services-on-groovy.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/rest-services-on-groovy.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -29,7 +29,7 @@
<para>Component configuration enables Groovy services loader:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
<init-params>
<object-param>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/search-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/search-configuration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/search-configuration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -12,7 +12,7 @@
<para>JCR index configuration. You can find this file here:
<filename>.../portal/WEB-INF/conf/jcr/repository-configuration.xml</filename></para>
- <programlisting><repository-service default-repository="db1">
+ <programlisting language="xml"><repository-service default-repository="db1">
<repositories>
<repository name="db1" system-workspace="ws" default-workspace="ws">
....
@@ -382,7 +382,7 @@
(<filename>portal/WEB-INF/conf/jcr/repository-configuration.xml</filename>)
in the tag "query-handler".</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex"></programlisting>
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex"></programlisting>
<para>In fact, when using Lucene, you should always use the same
analyzer for indexing and for querying, otherwise the results are
@@ -399,14 +399,18 @@
<para>By default Exo JCR uses the Lucene standard Analyzer to index
contents. This analyzer uses some standard filters in the method that
- analyzes the content:<programlisting>public TokenStream tokenStream(String fieldName, Reader reader) {
+ analyzes the content:</para>
+
+ <programlisting language="java">public TokenStream tokenStream(String fieldName, Reader reader) {
StandardTokenizer tokenStream = new StandardTokenizer(reader, replaceInvalidAcronym);
tokenStream.setMaxTokenLength(maxTokenLength);
TokenStream result = new StandardFilter(tokenStream);
result = new LowerCaseFilter(result);
result = new StopFilter(result, stopSet);
return result;
- }</programlisting><itemizedlist>
+ }</programlisting>
+
+ <itemizedlist>
<listitem>
<para>The first one (StandardFilter) removes 's (as 's in
"Peter's") from the end of words and removes dots from
@@ -422,7 +426,7 @@
<para>The last one (StopFilter) removes stop words from a token
stream. The stop set is defined in the analyzer.</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
<para>For specific cases, you may wish to use additional filters like
<phrase>ISOLatin1AccentFilter</phrase>, which replaces accented
@@ -438,8 +442,10 @@
<para>The ISOLatin1AccentFilter is not present in the current Lucene
version used by eXo. You can use the attached file. You can also
- create your own filter, the relevant method is<programlisting>public final Token next(final Token reusableToken) throws java.io.IOException</programlisting>which
- defines how chars are read and used by the filter.</para>
+ create your own filter, the relevant method is</para>
+
+ <programlisting language="java">public final Token next(final Token reusableToken) throws java.io.IOException</programlisting>
+ <para>which defines how chars are read and used by the filter.</para>
</section>
<section>
@@ -447,9 +453,10 @@
<para>The analyzer has to extends
org.apache.lucene.analysis.standard.StandardAnalyzer, and overload the
- method<programlisting>public TokenStream tokenStream(String fieldName, Reader reader)</programlisting>to
- put your own filters. You can have a glance at the example analyzer
- attached to this article.</para>
+ method</para>
+
+ <programlisting language="java">public TokenStream tokenStream(String fieldName, Reader reader)</programlisting>
+ <para>to put your own filters. You can have a glance at the example analyzer attached to this article.</para>
</section>
<section>
@@ -459,9 +466,11 @@
which will use the analyzer. Your have to extends
org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex. You
have to write the constructor, to set the right analyzer, and the
- method<programlisting>public Analyzer getAnalyzer() {
+ method</para>
+ <programlisting language="java">public Analyzer getAnalyzer() {
return MyAnalyzer;
- }</programlisting>to return your analyzer. You can see the attached
+ }</programlisting>
+ <para>to return your analyzer. You can see the attached
SearchIndex.</para>
<note>
@@ -476,8 +485,14 @@
<para>In
<filename>portal/WEB-INF/conf/jcr/repository-configuration.xml</filename>,
- you have to replace each<programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex"></programlisting>by
- your own class<programlisting><query-handler class="mypackage.indexation.MySearchIndex"></programlisting></para>
+ you have to replace each</para>
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ </programlisting>
+ <para>by your own class</para>
+
+ <programlisting language="xml"><query-handler class="mypackage.indexation.MySearchIndex">
+ </programlisting>
</section>
<section>
@@ -486,13 +501,16 @@
<para>In
<filename>portal/WEB-INF/conf/jcr/repository-configuration.xml</filename>,
you have to add parameter "analyzer" to each query-handler
- config:<programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ config:</para>
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="analyzer" value="org.exoplatform.services.jcr.impl.core.MyAnalyzer"/>
...
</properties>
-</query-handler></programlisting></para>
+</query-handler>
+</programlisting>
<para>When you start exo, your SearchIndex will start to index
contents with the specified filters.</para>
@@ -518,7 +536,7 @@
parameter to the query-handler element in your configuration
file.</para>
- <programlisting><param name="indexing-configuration-path" value="/indexing_configuration.xml"/></programlisting>
+ <programlisting language="xml"><param name="indexing-configuration-path" value="/indexing_configuration.xml"/></programlisting>
</section>
<section>
@@ -535,7 +553,7 @@
indexed for nodes of type nt:unstructured. This configuration also
applies to all nodes whose type extends from nt:unstructured.</para>
- <programlisting><?xml version="1.0"?>
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured">
@@ -556,7 +574,7 @@
1.0. Higher boost values (a reasonable range is 1.0 - 5.0) will yield
a higher score value and appear as more relevant.</para>
- <programlisting><?xml version="1.0"?>
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured"
@@ -567,14 +585,17 @@
<para>If you do not wish to boost the complete node but only certain
properties, you can also provide a boost value for the listed
- properties:<programlisting><?xml version="1.0"?>
+ properties:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured">
<property boost="3.0">Title</property>
<property boost="1.5">Text</property>
</index-rule>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
</section>
<section>
@@ -583,7 +604,9 @@
<para>You may also add a <phrase>condition</phrase> to the index rule
and have multiple rules with the same nodeType. The first index rule
that matches will apply and all remain ones are
- ignored:<programlisting><?xml version="1.0"?>
+ ignored:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured"
@@ -594,7 +617,8 @@
<index-rule nodeType="nt:unstructured">
<property>Text</property>
</index-rule>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
<para>In the above example, the first rule only applies if the
nt:unstructured node has a priority property with a value 'high'. The
@@ -602,7 +626,9 @@
literal.</para>
<para>You may also refer properties in the condition that are not on
- the current node:<programlisting><?xml version="1.0"?>
+ the current node:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured"
@@ -623,14 +649,15 @@
<index-rule nodeType="nt:unstructured">
<property>Text</property>
</index-rule>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
<para>The indexing configuration also allows you to specify the type
of a node in the condition. Please note however that the type match
must be exact. It does not consider sub types of the specified node
type.</para>
- <programlisting><?xml version="1.0"?>
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured"
@@ -649,13 +676,16 @@
scope search finds normally all nodes of an index. That is, the select
jcr:contains(., 'foo') returns all nodes that have a string property
containing the word 'foo'. You can exclude explicitly a property from
- the node scope index:<programlisting><?xml version="1.0"?>
+ the node scope index:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<index-rule nodeType="nt:unstructured">
<property nodeScopeIndex="false">Text</property>
</index-rule>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
</section>
</section>
@@ -670,38 +700,48 @@
path patterns and primary node types.</para>
<para>The following example creates an indexed aggregate on nt:file that
- includes the content of the jcr:content node:<programlisting><?xml version="1.0"?>
+ includes the content of the jcr:content node:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<aggregate primaryType="nt:file">
<include>jcr:content</include>
</aggregate>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
<para>You can also restrict the included nodes to a certain
- type:<programlisting><?xml version="1.0"?>
+ type:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<aggregate primaryType="nt:file">
<include primaryType="nt:resource">jcr:content</include>
</aggregate>
-</configuration></programlisting></para>
+</configuration></programlisting>
- <para>You may also use the * to match all child nodes:<programlisting><?xml version="1.0"?>
+ <para>You may also use the * to match all child nodes:</para>
+
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<aggregate primaryType="nt:file">http://wiki.exoplatform.com/xwiki/bin/edit/JCR/Search+Configuration
<include primaryType="nt:resource">*</include>
</aggregate>
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>If you wish to include nodes up to a certain depth below the
current node, you can add multiple include elements. E.g. the nt:file
node may contain a complete XML document under
- jcr:content:<programlisting><?xml version="1.0"?>
+ jcr:content:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
@@ -710,7 +750,8 @@
<include>*/*</include>
<include>*/*/*</include>
</aggregate>
-</configuration></programlisting></para>
+</configuration>
+</programlisting>
</section>
<section>
@@ -722,7 +763,9 @@
<para>In this configuration section, you define how a property has to
be analyzed. If there is an analyzer configuration for a property,
this analyzer is used for indexing and searching of this property. For
- example:<programlisting><?xml version="1.0"?>
+ example:</para>
+
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
<analyzers>
@@ -733,7 +776,7 @@
<property>mytext2</property>
</analyzer>
</analyzers>
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>The configuration above means that the property "mytext" for the
entire workspace is indexed (and searched) with the Lucene
@@ -758,28 +801,43 @@
for the property "mytext" (and not changed the default analyzer in
SearchIndex).</para>
- <para>If your query is for example:<programlisting>xpath = "//*[jcr:contains(mytext,'analyzer')]"</programlisting></para>
+ <para>If your query is for example:</para>
+
+ <programlisting>xpath = "//*[jcr:contains(mytext,'analyzer')]"
+ </programlisting>
<para>This xpath does not return a hit in the node with the property
above and default analyzers.</para>
- <para>Also a search on the node scope<programlisting>xpath = "//*[jcr:contains(.,'analyzer')]"</programlisting>won't
- give a hit. Realize that you can only set specific analyzers on a node
- property, and that the node scope indexing/analyzing is always done
- with the globally defined analyzer in the SearchIndex element.</para>
+ <para>Also a search on the node scope</para>
+
+ <programlisting>xpath = "//*[jcr:contains(.,'analyzer')]"</programlisting>
+
+ <para>won't give a hit. Realize that you can only set specific analyzers
+ on a node property, and that the node scope indexing/analyzing is always
+ done with the globally defined analyzer in the SearchIndex element.</para>
<para>Now, if you change the analyzer used to index the "mytext"
- property above to<programlisting><analyzer class="org.apache.lucene.analysis.Analyzer.GermanAnalyzer">
+ property above to</para>
+
+ <programlisting language="xml"><analyzer class="org.apache.lucene.analysis.Analyzer.GermanAnalyzer">
<property>mytext</property>
-</analyzer></programlisting>and you do the same search again, then
- for<programlisting>xpath = "//*[jcr:contains(mytext,'analyzer')]"</programlisting>you
+</analyzer>
+</programlisting>
+
+ <para>and you do the same search again, then for
+ <programlisting>xpath = "//*[jcr:contains(mytext,'analyzer')]"</programlisting>you
would get a hit because of the word stemming (analyzers -
analyzer).</para>
- <para>The other search,<programlisting>xpath = "//*[jcr:contains(.,'analyzer')]"</programlisting>still
- would not give a result, since the node scope is indexed with the
- global analyzer, which in this case does not take into account any
- word stemming.</para>
+ <para>The other search,</para>
+
+ <programlisting>xpath = "//*[jcr:contains(.,'analyzer')]"
+ </programlisting>
+
+ <para>still would not give a result, since the node scope is indexed
+ with the global analyzer, which in this case does not take into
+ account any word stemming.</para>
<para>In conclusion, be aware that when using analyzers for specific
properties, you might find a hit in a property for some search text,
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -16,7 +16,7 @@
org.exoplatform.services.jcr.storage.WorkspaceDataContainer subclass
like</para>
- <programlisting><container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <programlisting language="xml"><container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr1"/>
<property name="dialect" value="hsqldb"/>
@@ -55,7 +55,7 @@
Container will try to read or write Value using underlying value storage
plugin if the filter criteria (see below) match the current property.</para>
- <programlisting><value-storages>
+ <programlisting language="xml"><value-storages>
<value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="data/values"/>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container-howto.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container-howto.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container-howto.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -89,7 +89,7 @@
<para>Assuming that our new implementation class name is <emphasis
role="bold">org.project.jcr.impl.storage.MyWorkspaceDataContainer</emphasis>.</para>
- <programlisting> <repository-service default-repository="repository">
+ <programlisting language="xml"> <repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
.............
@@ -123,7 +123,7 @@
role="bold">ValueStoragePluginProvider</emphasis> (e.g. via constructor),
it's just a few methods to manipulate external Values data.</para>
- <programlisting>// get channel for ValueData write (add or update)
+ <programlisting language="java">// get channel for ValueData write (add or update)
ValueIOChannel channel = valueStorageProvider.getApplicableChannel(data, i);
if (channel == null) {
// write
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -49,7 +49,7 @@
</listitem>
</itemizedlist>
- <programlisting>WorkspaceStorageConnection openConnection() throws RepositoryException;
+ <programlisting language="java">WorkspaceStorageConnection openConnection() throws RepositoryException;
</programlisting>
<itemizedlist>
@@ -59,7 +59,7 @@
</listitem>
</itemizedlist>
- <programlisting>WorkspaceStorageConnection openConnection(boolean readOnly) throws RepositoryException;
+ <programlisting language="java">WorkspaceStorageConnection openConnection(boolean readOnly) throws RepositoryException;
</programlisting>
<note>
@@ -81,7 +81,7 @@
</listitem>
</itemizedlist>
- <programlisting>WorkspaceStorageConnection reuseConnection(WorkspaceStorageConnection original) throws RepositoryException;
+ <programlisting language="java">WorkspaceStorageConnection reuseConnection(WorkspaceStorageConnection original) throws RepositoryException;
</programlisting>
<itemizedlist>
@@ -93,7 +93,7 @@
</listitem>
</itemizedlist>
- <programlisting>boolean isCheckSNSNewConnection();
+ <programlisting language="java">boolean isCheckSNSNewConnection();
</programlisting>
<para>Container initialization is only based on a configuration. After
@@ -163,7 +163,7 @@
</listitem>
</itemizedlist>
- <programlisting>ItemData getItemData(String identifier) throws RepositoryException, IllegalStateException;
+ <programlisting language="java">ItemData getItemData(String identifier) throws RepositoryException, IllegalStateException;
</programlisting>
<itemizedlist>
@@ -173,7 +173,7 @@
</listitem>
</itemizedlist>
- <programlisting>ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,IllegalStateException;
+ <programlisting language="java">ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -183,7 +183,7 @@
</listitem>
</itemizedlist>
- <programlisting>List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException, IllegalStateException;
+ <programlisting language="java">List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
<itemizedlist>
@@ -193,7 +193,7 @@
</listitem>
</itemizedlist>
- <programlisting>List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
+ <programlisting language="java">List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
<itemizedlist>
@@ -206,7 +206,7 @@
<para>This methiod specially dedicated for non-content modification
operations (e.g. Items delete).</para>
- <programlisting>List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
+ <programlisting language="java">List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
<itemizedlist>
@@ -219,7 +219,7 @@
<para>It's REFERENCE type: Properties referencing Node with given
nodeIdentifier. See more in javax.jcr.Node.getReferences()</para>
- <programlisting>List<PropertyData> getReferencesData(String nodeIdentifier) throws RepositoryException,IllegalStateException,UnsupportedOperationException;
+ <programlisting language="java">List<PropertyData> getReferencesData(String nodeIdentifier) throws RepositoryException,IllegalStateException,UnsupportedOperationException;
</programlisting>
</section>
@@ -232,7 +232,7 @@
</listitem>
</itemizedlist>
- <programlisting>void add(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void add(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -241,7 +241,7 @@
</listitem>
</itemizedlist>
- <programlisting>void add(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void add(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -250,7 +250,7 @@
</listitem>
</itemizedlist>
- <programlisting>void update(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void update(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -259,7 +259,7 @@
</listitem>
</itemizedlist>
- <programlisting>void update(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void update(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -269,7 +269,7 @@
</listitem>
</itemizedlist>
- <programlisting>void rename(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void rename(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -278,7 +278,7 @@
</listitem>
</itemizedlist>
- <programlisting>void delete(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void delete(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -287,7 +287,7 @@
</listitem>
</itemizedlist>
- <programlisting>void delete(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
+ <programlisting language="java">void delete(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
<itemizedlist>
@@ -297,7 +297,7 @@
</listitem>
</itemizedlist>
- <programlisting>void commit() throws IllegalStateException, RepositoryException;
+ <programlisting language="java">void commit() throws IllegalStateException, RepositoryException;
</programlisting>
<itemizedlist>
@@ -307,7 +307,7 @@
</listitem>
</itemizedlist>
- <programlisting>void rollback() throws IllegalStateException, RepositoryException;
+ <programlisting language="java">void rollback() throws IllegalStateException, RepositoryException;
</programlisting>
<para>All methods throw IllegalStateException if connection is closed.
@@ -325,7 +325,7 @@
</listitem>
</itemizedlist>
- <programlisting>boolean isOpened();
+ <programlisting language="java">boolean isOpened();
</programlisting>
</section>
@@ -427,7 +427,7 @@
</listitem>
</itemizedlist>
- <programlisting>ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException;
+ <programlisting language="java">ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException;
</programlisting>
<itemizedlist>
@@ -436,7 +436,7 @@
</listitem>
</itemizedlist>
- <programlisting>ValueIOChannel getChannel(String storageId) throws IOException, ValueStorageNotFoundException;
+ <programlisting language="java">ValueIOChannel getChannel(String storageId) throws IOException, ValueStorageNotFoundException;
</programlisting>
<para>There is also method for consistency check, but this method
@@ -458,7 +458,7 @@
</listitem>
</itemizedlist>
- <programlisting>public abstract void init(Properties props, ValueDataResourceHolder resources) throws RepositoryConfigurationException, IOException;
+ <programlisting language="java">public abstract void init(Properties props, ValueDataResourceHolder resources) throws RepositoryConfigurationException, IOException;
</programlisting>
<itemizedlist>
@@ -469,7 +469,7 @@
</listitem>
</itemizedlist>
- <programlisting>public abstract ValueIOChannel openIOChannel() throws IOException;
+ <programlisting language="java">public abstract ValueIOChannel openIOChannel() throws IOException;
</programlisting>
<itemizedlist>
@@ -478,7 +478,7 @@
</listitem>
</itemizedlist>
- <programlisting>public abstract boolean isSame(String valueDataDescriptor);
+ <programlisting language="java">public abstract boolean isSame(String valueDataDescriptor);
</programlisting>
</section>
@@ -494,7 +494,7 @@
</listitem>
</itemizedlist>
- <programlisting>ValueData read(String propertyId, int orderNumber, int maxBufferSize) throws IOException;
+ <programlisting language="java">ValueData read(String propertyId, int orderNumber, int maxBufferSize) throws IOException;
</programlisting>
<itemizedlist>
@@ -503,7 +503,7 @@
</listitem>
</itemizedlist>
- <programlisting>void write(String propertyId, ValueData data) throws IOException;
+ <programlisting language="java">void write(String propertyId, ValueData data) throws IOException;
</programlisting>
<itemizedlist>
@@ -512,7 +512,7 @@
</listitem>
</itemizedlist>
- <programlisting>void delete(String propertyId) throws IOException;
+ <programlisting language="java">void delete(String propertyId) throws IOException;
</programlisting>
</section>
@@ -528,7 +528,7 @@
</listitem>
</itemizedlist>
- <programlisting>void commit() throws IOException;
+ <programlisting language="java">void commit() throws IOException;
</programlisting>
<itemizedlist>
@@ -537,7 +537,7 @@
</listitem>
</itemizedlist>
- <programlisting>void rollback() throws IOException;
+ <programlisting language="java">void rollback() throws IOException;
</programlisting>
</section>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbosscache-configuration-templates.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbosscache-configuration-templates.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbosscache-configuration-templates.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -17,7 +17,7 @@
other parameters. The simplest way to configure them is to define their
own configuration files for each component in each workspace:</para>
- <programlisting><property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock-db1-ws1.xml" /></programlisting>
+ <programlisting language="xml"><property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock-db1-ws1.xml" /></programlisting>
<para>But if there are few workspaces, configuring them in such a way can
be painful and hard-manageable. eXo JCR offers a template-based
@@ -30,14 +30,14 @@
<para>Template:</para>
- <programlisting>...
+ <programlisting language="xml">...
<clustering mode="replication" clusterName="${jbosscache-cluster-name}">
<stateRetrieval timeout="20000" fetchInMemoryState="false" />
...</programlisting>
<para>and JCR configuration file:</para>
- <programlisting>...
+ <programlisting language="xml">...
<property name="jbosscache-configuration" value="jar:/conf/portal/jbosscache-lock.xml" />
<property name="jbosscache-cluster-name" value="JCR-cluster-locks-db1-ws" />
...</programlisting>
@@ -51,7 +51,7 @@
is defined in component configuration, it will be injected into the JBoss
Cache instance on startup.</para>
- <programlisting><property name="jgroups-configuration" value="your/path/to/modified-udp.xml" /></programlisting>
+ <programlisting language="xml"><property name="jgroups-configuration" value="your/path/to/modified-udp.xml" /></programlisting>
<para>As mentioned above, each component (lock manager, data container and
query handler) for each workspace requires its own clustered environment.
@@ -65,7 +65,7 @@
pre-shipped one with eXo JCR) and set "jgroups-multiplexer-stack" into
"true".</para>
- <programlisting><property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" />
+ <programlisting language="xml"><property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" />
<property name="jgroups-multiplexer-stack" value="true" /></programlisting>
</section>
@@ -83,7 +83,7 @@
container configuration) by setting the property "jbosscache-shareable" to
true as below:</para>
- <programlisting><property name="jbosscache-shareable" value="true" /></programlisting>
+ <programlisting language="xml"><property name="jbosscache-shareable" value="true" /></programlisting>
<para>Once enabled this feature will allow the JBoss Cache instance used
by the component to be re-used by another components of the same type
@@ -111,7 +111,7 @@
<para>Data container template is "jbosscache-data.xml":</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
@@ -160,7 +160,7 @@
<para>It's template name is "jbosscache-lock.xml"</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
@@ -256,7 +256,7 @@
<para>Have a look at "jbosscache-indexer.xml"</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
lockAcquisitionTimeout="20000" />
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -26,7 +26,7 @@
<para>Example configuration:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.transaction.TransactionService</key>
<type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
<init-params>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -23,7 +23,7 @@
<para>You can enable LockManager by adding lock-manager-configuration to
workspace-configuration.</para>
<para>For example:</para>
- <programlisting><workspace name="ws">
+ <programlisting language="xml"><workspace name="ws">
...
<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
@@ -51,7 +51,7 @@
<para>Both of the implementations support to remove Expired Locks. LockRemover separates threads, that periodically ask LockManager to remove Locks
that live so long. So, the timeout for LockRemover may be set
as follows, the default value is 30m.</para>
- <programlisting><properties>
+ <programlisting language="xml"><properties>
<property name="time-out" value="10m" />
...
</properties></programlisting>
@@ -92,13 +92,15 @@
configuration.</para>
</note></para>
<para>Configuration is as follows:</para>
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <programlisting language="xml"><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
</properties>
</lock-manager></programlisting>
- <para><filename>test-jbosscache-lock-config.xml</filename><programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <para><filename>test-jbosscache-lock-config.xml</filename></para>
+
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
@@ -154,7 +156,8 @@
</loaders>
-</jbosscache></programlisting></para>
+</jbosscache>
+</programlisting>
<para>Configuration requirements:</para>
<itemizedlist>
<listitem>
@@ -179,7 +182,7 @@
LockManagers.</para>
<para><citetitle>Lock template configuration</citetitle></para>
<para><filename>test-jbosscache-lock.xml</filename></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
@@ -219,7 +222,7 @@
</jbosscache></programlisting>
<para>As you see, all configurable parameters are filled by templates
and will be replaced by LockManagers configuration parameters:</para>
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <programlisting language="xml"><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
@@ -254,7 +257,9 @@
we can still create our own configuration.</para>
</listitem>
</itemizedlist></para>
- <para><filename>our-udp-mux.xml</filename><programlisting><protocol_stacks>
+ <para><filename>our-udp-mux.xml</filename></para>
+
+ <programlisting language="xml"><protocol_stacks>
<stack name="jcr.stack">
<config>
<UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
@@ -286,7 +291,7 @@
<!-- pbcast.FLUSH /-->
</config>
</stack>
-</protocol_stacks> </programlisting></para>
+</protocol_stacks> </programlisting>
</section>
<section id="datatypes">
<title id="datatypes.title">Data Types in Different Databases</title>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -56,7 +56,7 @@
<para>Action's Configuration may look like as the following:</para>
- <programlisting><value>
+ <programlisting language="xml"><value>
<object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
<field name="eventTypes"><string>addNode,read</string></field>
<field name="workspace"><string>production</string></field >
@@ -72,7 +72,7 @@
current Item, the current ExoContainer and the current EventType is like
below:</para>
- <programlisting>public interface InvocationContext extends ContextBase {
+ <programlisting language="java">public interface InvocationContext extends ContextBase {
Item getCurrentItem();
@@ -93,7 +93,7 @@
role="bold">access-manager</emphasis> element inside <emphasis
role="bold">workspace</emphasis> as follows:</para>
- <programlisting><workspace name="ws">
+ <programlisting language="xml"><workspace name="ws">
...
<!-- after query-handler element -->
<access-manager class="org.exoplatform.services.jcr.CustomAccessManagerImpl">
@@ -135,7 +135,7 @@
SetAccessContextAction should be configured in the way mentioned in
<emphasis role="bold">Access Context Action.</emphasis></para>
- <programlisting>public class CustomAccessManagerImpl extends AccessManager {
+ <programlisting language="java">public class CustomAccessManagerImpl extends AccessManager {
private String property;
private DecisionMakingService theService;
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -123,7 +123,7 @@
<para>A privilegeable node defines the permissions required for
actions on this node. For this purpose, it contains an ACL.</para>
<para>At JCR level, this is implemented by an <emphasis role="bold">exo:privilegeable</emphasis> mixin.</para>
- <programlisting><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <programlisting language="xml"><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
<propertyDefinition name="exo:permissions" requiredType="Permission" autoCreated="true" mandatory="true"
onParentVersion="COPY" protected="true" multiple="true">
@@ -161,7 +161,7 @@
permissions set by exo:permissions. At JCR level, the ownership is
implemented by an <emphasis role="bold">exo:owneable</emphasis> mixin.
This mixin holds an owner property.</para>
- <programlisting><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <programlisting language="xml"><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
<propertyDefinition name="exo:owner" requiredType="String" autoCreated="true" mandatory="true" onParentVersion="COPY"
protected="true" multiple="false">
@@ -242,7 +242,7 @@
separated by a whitespace, each whitespace is escaped by
<emphasis>x0020</emphasis>.</para>
</note>
- <programlisting><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
+ <programlisting language="xml"><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
exo:dateModified="2009-10-08T18:02:43.703+02:00"
exo:owner="root"
exo:permissions="any_x0020_read *:/platform/administrators_x0020_read *:/platform/administrators_x0020_add_node *:/platform/administrators_x0020_set_property *:/platform/administrators_x0020_remove">
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/binary-values-processing.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/binary-values-processing.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/binary-values-processing.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -51,7 +51,7 @@
<para>An example of a specification usage.</para>
- <programlisting>// Set the property value with given stream content.
+ <programlisting language="java">// Set the property value with given stream content.
Property binProp = node.setProperty("BinData", myDataStream);
// Get the property value stream.
InputStream binStream = binProp.getStream();
@@ -88,7 +88,7 @@
<para>ReadableBinaryValue value can be casted from any value, i.e. String,
Binary, Date etc.</para>
- <programlisting>// get the property value of type PropertyType.STRING
+ <programlisting language="java">// get the property value of type PropertyType.STRING
ReadableBinaryValue extValue = (ReadableBinaryValue) node.getProperty("LargeText").getValue();
// read 200 bytes to a destStream from the position 1024 in the value content
OutputStream destStream = new FileOutputStream("MyTextFile.txt");
@@ -110,7 +110,7 @@
and return (set) the value to the property after the content will be
done.</para>
- <programlisting>// get the property value for PropertyType.BINARY Property
+ <programlisting language="java">// get the property value for PropertyType.BINARY Property
EditableBinaryValue extValue = (EditableBinaryValue) node.getProperty("BinData").getValue();
// update length bytes from the stream starting from the position 1024 in existing Value data
@@ -127,7 +127,7 @@
update is done, the value will be applied to the property and be visible
during the session.</para>
- <programlisting>// update length bytes from the stream starting from the particular
+ <programlisting language="java">// update length bytes from the stream starting from the particular
// position in the existing Value data
int dpos = 1024;
while (source.dataAvailable()) {
@@ -153,7 +153,7 @@
<para>Read length bytes is counted from the binary value to the given
position into the stream.</para>
- <programlisting>long read(OutputStream stream, long length, long position) throws IOException, RepositoryException ;</programlisting>
+ <programlisting language="java">long read(OutputStream stream, long length, long position) throws IOException, RepositoryException ;</programlisting>
<para>EditableBinaryValue has two methods to edit value.</para>
@@ -163,7 +163,7 @@
length, the Value length will be increased at first to the size of
position and length bytes will be added after the position.</para>
- <programlisting>void update(InputStream stream, long length, long position) throws IOException;</programlisting>
+ <programlisting language="java">void update(InputStream stream, long length, long position) throws IOException;</programlisting>
<para>Set the length of the Value in bytes to the specified size. If the
size is lower than 0, the IOException exception will be thrown. This
@@ -171,7 +171,7 @@
used internally in the update operation in case of extending the size to
the given position.</para>
- <programlisting>void setLength(long size) throws IOException;</programlisting>
+ <programlisting language="java">void setLength(long size) throws IOException;</programlisting>
<para>An application can perform JCR binary operations more flexibly and
will have less I/O and CPU usage using these methods.</para>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/link-producer.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/link-producer.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/link-producer.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -14,7 +14,7 @@
<para>Link Producer has a simple configuration like described below:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.webdav.lnkproducer.LnkProducer</key>
<type>org.exoplatform.services.webdav.lnkproducer.LnkProducer</type>
</component></programlisting>
@@ -78,7 +78,7 @@
<para>Also the Link Producer can be referenced to from an HTML page. If page
contains code like</para>
- <programlisting><a href="http://localhost:8080/rest/lnkproducer/openit.lnk?path=/repository/worksp...">somefile.extention</a></programlisting>
+ <programlisting language="html"><a href="http://localhost:8080/rest/lnkproducer/openit.lnk?path=/repository/worksp...">somefile.extention</a></programlisting>
<para>the file "somefile.extention" will open directly.</para>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/performance-tuning-guide.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/performance-tuning-guide.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/performance-tuning-guide.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -314,10 +314,14 @@
<para>Some operations may take too much time. So if you get
<exceptionname>ReplicationTimeoutException</exceptionname> try
- increasing replication timeout:<programlisting> <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
+ increasing replication timeout:</para>
+
+ <programlisting language="xml"> <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
...
<sync replTimeout="60000" />
- </clustering></programlisting>value is set in miliseconds.</para>
+ </clustering>
+ </programlisting>
+ <para>value is set in miliseconds.</para>
</section>
<section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/ftp.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/ftp.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/ftp.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -23,7 +23,7 @@
<section>
<title>command-port:</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>command-port</name>
<value>21</value>
</value-param></programlisting>
@@ -39,12 +39,12 @@
<section>
<title>data-min-port & data-max-port</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>data-min-port</name>
<value>52000</value>
</value-param></programlisting>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>data-max-port</name>
<value>53000</value>
</value-param></programlisting>
@@ -59,7 +59,7 @@
<section>
<title>system</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>system</name>
<value>Windows_NT</value>
@@ -74,7 +74,7 @@
<section>
<title>client-side-encoding</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>client-side-encoding</name>
<value>windows-1251</value>
@@ -90,7 +90,7 @@
<section>
<title>def-folder-node-type</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>def-folder-node-type</name>
<value>nt:folder</value>
</value-param></programlisting>
@@ -102,7 +102,7 @@
<section>
<title>def-file-node-type</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>def-file-node-type</name>
<value>nt:file</value>
</value-param></programlisting>
@@ -114,7 +114,7 @@
<section>
<title>def-file-mime-type</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>def-file-mime-type</name>
<value>application/zip</value>
</value-param></programlisting>
@@ -127,7 +127,7 @@
<section>
<title>cache-folder-name</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>cache-folder-name</name>
<value>../temp/ftp_cache</value>
</value-param></programlisting>
@@ -138,7 +138,7 @@
<section>
<title>upload-speed-limit</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>upload-speed-limit</name>
<value>20480</value>
</value-param></programlisting>
@@ -149,7 +149,7 @@
<section>
<title>download-speed-limit</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>download-speed-limit</name>
<value>20480</value>
</value-param></programlisting>
@@ -160,7 +160,7 @@
<section>
<title>timeout</title>
- <programlisting><value-param>
+ <programlisting language="xml"><value-param>
<name>timeout</name>
<value>60</value>
</value-param></programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -53,7 +53,7 @@
</section>
<section>
<title>Configuration</title>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
<type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
<init-params>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -92,7 +92,9 @@
<section>
<title>Query-handler configuration overview</title>
- <para>Configuration example:<programlisting><workspace name="ws">
+ <para>Configuration example:</para>
+
+ <programlisting language="xml"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="shareddir/index/db1/ws" />
@@ -108,7 +110,9 @@
<property name="index-recovery-mode" value="from-coordinator" />
</properties>
</query-handler>
-</workspace></programlisting> <table>
+</workspace>
+</programlisting>
+ <table>
<title>Config properties description</title>
<tgroup cols="2">
@@ -194,7 +198,7 @@
</row>
</tbody>
</tgroup>
- </table></para>
+ </table>
</section>
<section>
@@ -203,7 +207,9 @@
<para>When running JCR in standalone usually standalone indexing is used
also. Such parameters as "changesfilter-class", "jgroups-configuration"
and all the "jbosscache-*" must be skipped and not defined. Like the
- configuration below.<programlisting><workspace name="ws">
+ configuration below.</para>
+
+ <programlisting language="xml"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="shareddir/index/db1/ws" />
@@ -213,7 +219,7 @@
<property name="index-recovery-mode" value="from-coordinator" />
</properties>
</query-handler>
-</workspace></programlisting> </para>
+</workspace></programlisting>
</section>
<section>
@@ -225,7 +231,9 @@
SMB or etc). Indexing directory ("indexDir" value) must point to it.
Setting "changesfilter-class" to
"org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
- will enable shared index implementation.<programlisting><workspace name="ws">
+ will enable shared index implementation.</para>
+
+ <programlisting language="xml"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="/mnt/nfs_drive/index/db1/ws" />
@@ -241,14 +249,16 @@
<property name="index-recovery-mode" value="from-coordinator" />
</properties>
</query-handler>
-</workspace></programlisting> In order to use cluster-ready strategy
+</workspace></programlisting>
+
+ <para>In order to use cluster-ready strategy
based on local indexes, when each node has own copy of index on local
file system, the following configuration must be applied. Indexing
directory must point to any folder on local file system and
"changesfilter-class" must be set to
"org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter".</para>
- <para><programlisting><workspace name="ws">
+ <programlisting language="xml"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="/mnt/nfs_drive/index/db1/ws" />
@@ -264,7 +274,8 @@
<property name="index-recovery-mode" value="from-coordinator" />
</properties>
</query-handler>
-</workspace></programlisting></para>
+</workspace>
+</programlisting>
</section>
<section>
@@ -273,7 +284,9 @@
<para>JBoss-Cache template configuration for query handler is about the
same for both clustered strategies.</para>
- <para>jbosscache-indexer.xml<programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <para>jbosscache-indexer.xml</para>
+
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
@@ -294,7 +307,7 @@
</default>
</eviction>
-</jbosscache></programlisting></para>
+</jbosscache></programlisting>
<para>See more about template configurations <link
linkend="JCR.JBossCacheConfigurationTemplates">here</link>.</para>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/repository-creation-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/repository-creation-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/repository-creation-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -80,7 +80,7 @@
<para>RepositoryCreationService configuration</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
<type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
<init-params>
@@ -146,7 +146,7 @@
<section>
<title>Repsitory Interface</title>
- <programlisting>public interface RepositoryCreationService
+ <programlisting language="java">public interface RepositoryCreationService
{
/**
* Reserves, validates and creates repository in a simplified form.
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/aggregation-rule.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/aggregation-rule.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/aggregation-rule.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -18,7 +18,7 @@
<para>So, change indexing-configuration.xml:</para>
- <programlisting><?xml version="1.0"?>
+ <programlisting language="xml"><?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.2.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
@@ -86,7 +86,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:file WHERE CONTAINS(*,'cats')";
@@ -96,7 +96,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:file)[jcr:contains(.,'cats')]";
@@ -110,7 +110,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -121,7 +121,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/and-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/and-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/and-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -50,7 +50,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE jcr:description = 'fairytale' AND prop_pagecount > 90";
@@ -60,7 +60,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[@jcr:description='fairytale' and @prop_pagecount > 90]";
@@ -74,7 +74,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -85,7 +85,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/child-node-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/child-node-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/child-node-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -62,7 +62,7 @@
"/". This way child nodes are included but descendant nodes are
excluded.</para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:folder WHERE jcr:path LIKE '/folder1/folder2/%' AND NOT jcr:path LIKE '/folder1/folder2/%/%'";
@@ -72,7 +72,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "/jcr:root/folder1[1]/folder2[1]/element(*,nt:folder)";
@@ -86,7 +86,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -97,7 +97,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/date-property-comparison.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/date-property-comparison.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/date-property-comparison.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -72,7 +72,7 @@
<para>You will see that it can be a date only (YYYY-MM-DD) but also a
complete date and time with a timezone designator (TZD).</para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
StringBuffer sb = new StringBuffer();
@@ -96,7 +96,7 @@
brackets: xs:dateTime('datetime'). The actual format of the datetime also
conforms with the ISO date standard.</para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
StringBuffer sb = new StringBuffer();
@@ -117,7 +117,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -128,7 +128,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/escaping-like-statements.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/escaping-like-statements.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/escaping-like-statements.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -56,7 +56,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE jcr:title LIKE 'P#%ri%' ESCAPE '#'";
@@ -66,7 +66,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[jcr:like(@jcr:title, 'P\\%ri%')]";
@@ -80,7 +80,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -91,7 +91,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/exact-path-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/exact-path-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/exact-path-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -54,7 +54,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// we want find 'document1'
String sqlStatement = "SELECT * FROM nt:file WHERE jcr:path = '/folder1/folder2/document1'";
@@ -65,7 +65,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// we want to find 'document1'
String xpathStatement = "/jcr:root/folder1[1]/folder2[1]/element(document1,nt:file)[1]";
@@ -84,7 +84,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -95,7 +95,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-descendant-nodes.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-descendant-nodes.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-descendant-nodes.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -56,7 +56,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:folder WHERE jcr:path LIKE '/folder1/folder2/%'";
@@ -66,7 +66,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "/jcr:root/folder1[1]/folder2[1]//element(*,nt:folder)";
@@ -80,7 +80,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -92,7 +92,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-nodes.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-nodes.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-all-nodes.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -51,7 +51,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:base";
@@ -61,7 +61,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:base)";
@@ -75,7 +75,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -88,7 +88,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-mixin-type.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-mixin-type.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-mixin-type.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -42,7 +42,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title";
@@ -52,7 +52,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)";
@@ -66,7 +66,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -77,7 +77,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-primary-type.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-primary-type.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-by-primary-type.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -41,7 +41,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:file";
@@ -51,7 +51,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:file)";
@@ -65,7 +65,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -76,7 +76,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-case-insensitive.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-case-insensitive.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-nodes-case-insensitive.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -45,7 +45,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE UPPER(jcr:title) = 'CASESENSITIVE'";
@@ -55,7 +55,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[fn:upper-case(@jcr:title)='CASESENSITIVE']";
@@ -71,7 +71,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE LOWER(jcr:title) = 'casesensitive'";
@@ -81,7 +81,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[fn:lower-case(@jcr:title)='casesensitive']";
@@ -95,7 +95,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -107,7 +107,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-similar-nodes.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-similar-nodes.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/find-similar-nodes.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -19,7 +19,7 @@
<para>Higlighting support must be added to configuration.
test-jcr-config.xml:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="java"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="support-highlighting" value="true" />
@@ -101,7 +101,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:resource WHERE SIMILAR(.,'/baseFile/jcr:content')";
@@ -111,7 +111,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*, nt:resource)[rep:similar(., '/testroot/baseFile/jcr:content')]";
@@ -125,7 +125,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -140,7 +140,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-and-settings.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-and-settings.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-and-settings.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -263,7 +263,7 @@
the lazy dogs" will be transformed to set {[the] [quick] [brown] [fox]
[jumped] [over] [the] [lazy] [dogs] }</para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
String sqlStatement = "SELECT * FROM mix:title WHERE CONTAINS(jcr:description, 'the')";
// create query
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-all-properties.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-all-properties.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-all-properties.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -44,7 +44,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
String sqlStatement = "SELECT * FROM mix:title WHERE CONTAINS(*,'break')";
// create query
@@ -54,7 +54,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// we want find 'document1'
String xpathStatement = "//element(*,mix:title)[jcr:contains(.,'break')]";
@@ -69,7 +69,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
while(it.hasNext())
{
@@ -80,7 +80,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-property.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-property.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/fulltext-search-by-property.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -48,7 +48,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// we want find document which contains "forest" word
String sqlStatement = "SELECT \* FROM mix:title WHERE CONTAINS(jcr:description, 'forest')";
@@ -59,7 +59,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// we want find document which contains "forest" word
String xpathStatement = "//element(*,mix:title)[jcr:contains(@jcr:description, 'forest')]";
@@ -74,7 +74,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -85,7 +85,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/higlight.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/higlight.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/higlight.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -18,7 +18,7 @@
<para>High-lighting is not default feature so we must set it in
jcr-config.xml, also excerpt provider must be defined:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="support-highlighting" value="true" />
@@ -36,7 +36,7 @@
property as highlightable. Indexing-configuration.xml must containt the
next rule:</para>
- <programlisting><index-rule nodeType="nt:unstructured" condition="@rule='excerpt'">
+ <programlisting language="xml"><index-rule nodeType="nt:unstructured" condition="@rule='excerpt'">
<property useInExcerpt="false">title</property>
<property>text</property>
</index-rule></programlisting>
@@ -73,7 +73,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT rep:excerpt() FROM nt:unstructured WHERE CONTAINS(*, 'eXo implementation')";
@@ -83,7 +83,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:unstructured)[jcr:contains(., 'eXo implementation')]/rep:excerpt(.)";
@@ -97,7 +97,7 @@
<para>Now let's see on the result table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
@@ -140,7 +140,7 @@
<para>Also, we can get exactly "rep:excerpt" value:</para>
- <programlisting>RowIterator rows = result.getRows();
+ <programlisting language="java">RowIterator rows = result.getRows();
Value excerpt = rows.nextRow().getValue("rep:excerpt(.)");
// excerpt will be equal to "<div><span\><strong>eXo</strong> is a JCR <strong>implementation</strong></span></div>"</programlisting>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/ignore-accent-symbols.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/ignore-accent-symbols.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/ignore-accent-symbols.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -40,7 +40,7 @@
</listitem>
</itemizedlist>
- <programlisting>public class MyAnalyzer extends Analyzer
+ <programlisting language="java">public class MyAnalyzer extends Analyzer
{
@Override
public TokenStream tokenStream(String fieldName, Reader reader)
@@ -64,7 +64,7 @@
</listitem>
</itemizedlist>
- <programlisting><workspace name="ws">
+ <programlisting language="xml"><workspace name="ws">
...
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -109,7 +109,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE CONTAINS(jcr:title, 'tr\u00E8ma na\u00EFve')";
@@ -119,7 +119,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[jcr:contains(@jcr:title, 'tr\u00E8ma na\u00EFve')]";
@@ -133,7 +133,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -146,7 +146,7 @@
<para>Also, we can get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/index-boost-value.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/index-boost-value.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/index-boost-value.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -25,7 +25,7 @@
<para>indexing-config.xml:</para>
- <programlisting><!--
+ <programlisting language="xml"><!--
This rule actualy do nothing. 'text' property has default boost value.
-->
<index-rule nodeType="nt:unstructured" condition="@rule='boost1'">
@@ -86,7 +86,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:unstructured WHERE CONTAINS(text, 'quick') ORDER BY jcr:score() DESC";
@@ -96,7 +96,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:unstructured)[jcr:contains(@text, 'quick')] order by @jcr:score descending";
@@ -110,7 +110,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/jcr-query-usecases.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/jcr-query-usecases.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/jcr-query-usecases.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -23,7 +23,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// get QueryManager
+ <programlisting language="java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make SQL query
Query query = queryManager.createQuery("SELECT * FROM nt:base ", Query.SQL);
@@ -32,7 +32,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// get QueryManager
+ <programlisting language="java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make XPath query
Query query = queryManager.createQuery("//element(*,nt:base)", Query.XPATH);
@@ -43,16 +43,16 @@
<section>
<title>Query Result Processing</title>
- <programlisting>// fetch query result
+ <programlisting language="java">// fetch query result
QueryResult result = query.execute();</programlisting>
<para>Now we can get result in an iterator of nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();</programlisting>
+ <programlisting language="java">NodeIterator it = result.getNodes();</programlisting>
<para>or we get the result in a table:</para>
- <programlisting>// get column names
+ <programlisting language="java">// get column names
String[] columnNames = result.getColumnNames();
// get column rows
RowIterator rowIterator = result.getRows();
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/like-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/like-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/like-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -47,7 +47,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE jcr:title LIKE 'P%'";
@@ -57,7 +57,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[jcr:like(@jcr:title, 'P%')]";
@@ -71,7 +71,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -82,7 +82,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/multivalue-property-comparison.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/multivalue-property-comparison.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/multivalue-property-comparison.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -40,7 +40,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:unstructured WHERE multiprop = 'one' AND multiprop = 'two'";
@@ -50,7 +50,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:unstructured)[@multiprop = 'one' and @multiprop = 'two']";
@@ -64,7 +64,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -75,7 +75,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-name-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-name-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-name-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -43,7 +43,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:file WHERE fn:name() = 'document'";
@@ -53,7 +53,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:file)[fn:name() = 'document']";
@@ -67,7 +67,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -79,7 +79,7 @@
<para>Also we can get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-scope-index.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-scope-index.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/node-scope-index.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -10,7 +10,7 @@
<para>First of all, add rules to indexing-configuration.xml:</para>
- <programlisting><index-rule nodeType="nt:unstructured" condition="@rule='nsiTrue'">
+ <programlisting language="xml"><index-rule nodeType="nt:unstructured" condition="@rule='nsiTrue'">
<!-- default value for nodeScopeIndex is true -->
<property>text</property>
</index-rule>
@@ -60,7 +60,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:unstructured WHERE CONTAINS(*,'quick')";
@@ -70,7 +70,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:unstructured)[jcr:contains(., 'quick')]";
@@ -84,7 +84,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -96,7 +96,7 @@
<para>Also, we can get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/not-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/not-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/not-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -42,7 +42,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE NOT jcr:title LIKE 'P%'";
@@ -52,7 +52,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[not(jcr:like(@jcr:title, 'P%'))]";
@@ -66,7 +66,7 @@
<para>Let's get the nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -77,7 +77,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/offset-and-limit.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/offset-and-limit.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/offset-and-limit.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -71,7 +71,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:unstructured";
@@ -89,7 +89,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/or-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/or-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/or-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -46,7 +46,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE jcr:title = 'Cinderella' OR jcr:description = 'novel'";
@@ -56,7 +56,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[@jcr:title='Cinderella' or @jcr:description = 'novel']";
@@ -70,7 +70,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -81,7 +81,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-descendant.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-descendant.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-descendant.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -89,7 +89,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "/jcr:root/* order by a/b/c/@prop descending;
@@ -103,7 +103,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -115,7 +115,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -42,7 +42,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title ORDER BY prop_pagecount ASC";
@@ -52,7 +52,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title) order by @prop_pagecount ascending";
@@ -66,7 +66,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -78,7 +78,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-score.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-score.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-score.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -66,7 +66,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE CONTAINS(*, 'brown OR fox OR jumps') ORDER BY jcr:score() ASC";
@@ -76,7 +76,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[jcr:contains(., 'brown OR fox OR jumps')] order by jcr:score()";
@@ -90,7 +90,7 @@
<para>Let's get nodes</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -102,7 +102,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-comparison.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-comparison.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-comparison.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -43,7 +43,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT jcr:title FROM mix:title WHERE prop_pagecount < 90";
@@ -53,7 +53,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[@prop_pagecount < 90]/@jcr:title";
@@ -67,7 +67,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -78,7 +78,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-existance-constraint.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-existance-constraint.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/property-existance-constraint.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -42,7 +42,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE jcr:description IS NULL";
@@ -52,7 +52,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = ""//element(*,mix:title)[not(@jcr:description)]"";
@@ -66,7 +66,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -77,7 +77,7 @@
<para>We can also get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/regexp-indexing-rule.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/regexp-indexing-rule.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/regexp-indexing-rule.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -9,7 +9,7 @@
properties whoes names ends with 'Text' string. First of all, add rules to
indexing-configuration.xml:</para>
- <programlisting><index-rule nodeType="nt:unstructured"">
+ <programlisting language="xml"><index-rule nodeType="nt:unstructured"">
<property isRegexp="true">.*Text</property>
</index-rule></programlisting>
@@ -57,7 +57,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM nt:unstructured WHERE CONTAINS(*,'quick')";
@@ -67,7 +67,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,nt:unstructured)[jcr:contains(., 'quick')]";
@@ -81,7 +81,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
@@ -93,7 +93,7 @@
<para>Also, we can get a table:</para>
- <programlisting>String[] columnNames = result.getColumnNames();
+ <programlisting language="java">String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/searching-repository-content.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/searching-repository-content.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/searching-repository-content.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -38,7 +38,7 @@
<para>TwoWayRangeIterator interface:</para>
- <programlisting>/**
+ <programlisting language="java">/**
* Skip a number of elements in the iterator.
*
* @param skipNum the non-negative number of elements to skip
@@ -49,7 +49,7 @@
<para>Usage:</para>
- <programlisting>NodeIterator iter = queryResult.getNodes();
+ <programlisting language="java">NodeIterator iter = queryResult.getNodes();
while (iter.hasNext()) {
if (skipForward) {
iter.skip(10); // Skip 10 nodes in forward direction
@@ -71,7 +71,7 @@
<para>To use it, you have to form a query like the one described
below:</para>
- <programlisting>QueryManager qman = session.getWorkspace().getQueryManager();
+ <programlisting language="java">QueryManager qman = session.getWorkspace().getQueryManager();
Query q = qman.createQuery("select * from nt:base where contains(field, 'ccccc~')", Query.SQL);
QueryResult res = q.execute();</programlisting>
</section>
@@ -92,10 +92,10 @@
configuration parameter to the query-handler element in your jcr
configuration file to enable it.</para>
- <programlisting><param name="synonymprovider-config-path" value="..you path to configuration file....."/>
+ <programlisting language="xml"><param name="synonymprovider-config-path" value="..you path to configuration file....."/>
<param name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"/></programlisting>
- <programlisting>/**
+ <programlisting language="xml">/**
* <code>SynonymProvider</code> defines an interface for a component that
* returns synonyms for a given term.
*/
@@ -139,14 +139,14 @@
to the query-handler element in your jcr configuration file to enable
it.</para>
- <programlisting><param name="support-highlighting" value="true"/></programlisting>
+ <programlisting language="xml"><param name="support-highlighting" value="true"/></programlisting>
<para>Additionally, there is a parameter that controls the format of the
excerpt created. In JCR 1.9, the default is set to
org.exoplatform.services.jcr.impl.core.query.lucene.DefaultHTMLExcerpt.
The configuration parameter for this setting is:</para>
- <programlisting><param name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.DefaultXMLExcerpt"/></programlisting>
+ <programlisting language="xml"><param name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.DefaultXMLExcerpt"/></programlisting>
<section>
<title>DefaultXMLExcerpt</title>
@@ -154,7 +154,7 @@
<para>This excerpt provider creates an XML fragment of the following
form:</para>
- <programlisting><excerpt>
+ <programlisting language="xml"><excerpt>
<fragment>
<highlight>exoplatform</highlight> implements both the mandatory
XPath and optional SQL <highlight>query</highlight> syntax.
@@ -172,7 +172,7 @@
<para>This excerpt provider creates an HTML fragment of the following
form:</para>
- <programlisting><div>
+ <programlisting language="html"><div>
<span>
<strong>exoplatform</strong> implements both the mandatory XPath
and optional SQL <strong>query</strong> syntax.
@@ -190,7 +190,7 @@
<para>If you are using XPath, you must use the rep:excerpt() function in
the last location step, just like you would select properties:</para>
- <programlisting>QueryManager qm = session.getWorkspace().getQueryManager();
+ <programlisting language="java">QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("//*[jcr:contains(., 'exoplatform')]/(@Title|rep:excerpt(.))", Query.XPATH);
QueryResult result = q.execute();
for (RowIterator it = result.getRows(); it.hasNext(); ) {
@@ -215,7 +215,7 @@
but the column in the RowIterator will nonetheless be labled
rep:excerpt(.)!</para>
- <programlisting>QueryManager qm = session.getWorkspace().getQueryManager();
+ <programlisting language="java">QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("select excerpt(.) from nt:resource where contains(., 'exoplatform')", Query.SQL);
QueryResult result = q.execute();
for (RowIterator it = result.getRows(); it.hasNext(); ) {
@@ -288,7 +288,7 @@
<para>You can spell check a fulltext statement either with an XPath or a
SQL query:</para>
- <programlisting>// rep:spellcheck('explatform') will always evaluate to true
+ <programlisting language="java">// rep:spellcheck('explatform') will always evaluate to true
Query query = qm.createQuery("/jcr:root[rep:spellcheck('explatform')]/(rep:spellcheck())", Query.XPATH);
RowIterator rows = query.execute().getRows();
// the above query will always return the root node no matter what string we check
@@ -304,7 +304,7 @@
<para>And the same using SQL:</para>
- <programlisting>// SPELLCHECK('exoplatform') will always evaluate to true
+ <programlisting language="java">// SPELLCHECK('exoplatform') will always evaluate to true
Query query = qm.createQuery("SELECT rep:spellcheck() FROM nt:base WHERE jcr:path = '/' AND SPELLCHECK('explatform')", Query.SQL);
RowIterator rows = query.execute().getRows();
// the above query will always return the root node no matter what string we check
@@ -350,7 +350,7 @@
Hightlighting is enabled. Please make sure that you have the following
parameter set for the query handler in your workspace.xml.</para>
- <programlisting><param name="support-highlighting" value="true"/></programlisting>
+ <programlisting language="xml"><param name="support-highlighting" value="true"/></programlisting>
<para>The functions are called rep:similar() (in XPath) and similar() (in
SQL) and have two arguments:</para>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/spell-checker.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/spell-checker.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/spell-checker.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -17,7 +17,7 @@
<para>test-jcr-config.xml:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
@@ -53,7 +53,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT rep:spellcheck() FROM nt:base WHERE jcr:path = '/' AND SPELLCHECK('quik OR (-foo bar)')";
@@ -63,7 +63,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "/jcr:root[rep:spellcheck('quik OR (-foo bar)')]/(rep:spellcheck())";
@@ -77,7 +77,7 @@
<para>Get suggestion of coorect spelling our phrase:</para>
- <programlisting>RowIterator it = result.getRows();
+ <programlisting language="java">RowIterator it = result.getRows();
Row r = rows.nextRow();
Value v = r.getValue("rep:spellcheck()");
String correctPhrase = v.getString();</programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/synonim-provider.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/synonim-provider.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/synonim-provider.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -16,7 +16,7 @@
<para>Synonim provider must be configured in indexing-configuration.xml
:</para>
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
@@ -56,7 +56,7 @@
<para><emphasis role="bold">SQL</emphasis></para>
- <programlisting>// make SQL query
+ <programlisting language="java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
String sqlStatement = "SELECT * FROM mix:title WHERE CONTAINS(jcr:title, '~fast')";
@@ -66,7 +66,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// make XPath query
+ <programlisting language="java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
String xpathStatement = "//element(*,mix:title)[jcr:contains(@jcr:title, '~fast')]";
@@ -80,7 +80,7 @@
<para>Let's get nodes:</para>
- <programlisting>NodeIterator it = result.getNodes();
+ <programlisting language="java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/tip-nodename-with-number.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/tip-nodename-with-number.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/tip-nodename-with-number.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -8,7 +8,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// get QueryManager
+ <programlisting language="java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make XPath query
Query query = queryManager.createQuery("/jcr:root/Documents/Publie/2010//element(*, exo:article)", Query.XPATH);</programlisting>
@@ -35,7 +35,7 @@
<para><emphasis role="bold">XPath</emphasis></para>
- <programlisting>// get QueryManager
+ <programlisting language="java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make XPath query
Query query = queryManager.createQuery("/jcr:root/Documents/Publie/_x0032_010//element(*, exo:article)", Query.XPATH);</programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/statistics.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/statistics.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/statistics.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -269,7 +269,7 @@
into the list of parameter values of the init param called
<emphasis>targetInterfaces</emphasis>.</para>
- <programlisting><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"
+ <programlisting language="xml"><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>
@@ -293,7 +293,7 @@
JCR API calls from the exoplatform packages are took into account, don't
hesistate to modify this filter to add your own package names.</para>
- <programlisting><aspectj>
+ <programlisting language="xml"><aspectj>
<aspects>
<concrete-aspect name="org.exoplatform.services.jcr.statistics.JCRAPIAspectImpl" extends="org.exoplatform.services.jcr.statistics.JCRAPIAspect">
<pointcut name="JCRAPIPointcut"
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/transaction-manager-lookup.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/transaction-manager-lookup.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/transaction-manager-lookup.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -12,7 +12,7 @@
<para>It's JBossCache class registered as eXo container component in
configuration.xml file. </para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
</component></programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -267,12 +267,12 @@
</listitem>
</itemizedlist>
- <para>A init task is defined as below:</para>
+ <para>An init task is defined as below:</para>
<note>
<title>PortalContainerPreInitTask</title>
- <programlisting> /**
+ <programlisting language="java"> /**
* This interface is used to define a task that needs to be launched at a given state during the
* initialization of a portal container
*/
@@ -346,7 +346,7 @@
<note>
<title>Old GadgetRegister.java</title>
- <programlisting>...
+ <programlisting language="java">...
public class GadgetRegister implements ServletContextListener
{
...
@@ -369,7 +369,7 @@
<note>
<title>New GadgetRegister.java</title>
- <programlisting>...
+ <programlisting language="java">...
public class GadgetRegister implements ServletContextListener {
...
public void contextInitialized(ServletContextEvent event)
@@ -591,7 +591,7 @@
file that define and register a
PortalContainerDefinition:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -757,7 +757,7 @@
<para><emphasis role="underline">See below an example</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -944,7 +944,7 @@
<para>See an example of a web.xml below:</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1" ?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
@@ -1018,7 +1018,7 @@
file that add the portal extension "portal-ext" to the dependency list
of the portal "portal":</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -1197,7 +1197,7 @@
<para><emphasis role="underline">See an example below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -1333,7 +1333,7 @@
<emphasis>WEB-INF/conf/configuration.xml</emphasis> of the product
"sample-ext".</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
@@ -1358,7 +1358,7 @@
<emphasis>\-$portal.container.name</emphasis>. <emphasis
role="underline">See an example below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
@@ -1416,7 +1416,7 @@
<para><emphasis role="underline">See an example of jcr-configuration.xml
below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
@@ -1444,7 +1444,7 @@
<para>See an example of repository-configuration.xml below:</para>
- <programlisting><repository-service default-repository="repository">
+ <programlisting language="xml"><repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="system" default-workspace="portal-system">
<security-domain>exo-domain</security-domain>
@@ -1526,7 +1526,7 @@
<para><emphasis role="underline">See an example below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
@@ -1648,7 +1648,7 @@
<para><emphasis role="underline">See an example below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<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"
@@ -1740,7 +1740,7 @@
<para><emphasis role="underline">See an example of configuration
below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -1782,7 +1782,7 @@
<note>
<title>SampleFilter.java</title>
- <programlisting>...
+ <programlisting language="java">...
import org.exoplatform.web.filter.Filter;
import java.io.IOException;
@@ -1864,7 +1864,7 @@
<para><emphasis role="underline">See an example of configuration
below:</emphasis></para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -1912,7 +1912,7 @@
<note>
<title>SampleHttpSessionCreatedListener.java</title>
- <programlisting>..
+ <programlisting language="java">..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
@@ -1935,7 +1935,7 @@
<note>
<title>SampleContextInitializedListener.java</title>
- <programlisting>..
+ <programlisting language="java">..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
@@ -2211,7 +2211,7 @@
</listitem>
</itemizedlist>
- <programlisting> <application-policy name="exo-domain-sample-portal">
+ <programlisting language="xml"> <application-policy name="exo-domain-sample-portal">
<authentication>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
<module-option name="portalContainerName">sample-portal</module-option>
@@ -2337,7 +2337,7 @@
<note>
<title>tomcat/conf/Catalina/localhost/sample-portal.xml</title>
- <programlisting><Context path='/sample-portal' docBase='sample-portal' debug='0' reloadable='true' crossContext='true' privileged='true'>
+ <programlisting language="xml"><Context path='/sample-portal' docBase='sample-portal' debug='0' reloadable='true' crossContext='true' privileged='true'>
<Logger className='org.apache.catalina.logger.SystemOutLogger'
prefix='localhost_portal_log.' suffix='.txt' timestamp='true'/>
<Manager className='org.apache.catalina.session.PersistentManager' saveOnRestart='false'/>
@@ -2362,7 +2362,7 @@
<note>
<title>tomcat/conf/Catalina/localhost/rest-sample-portal.xml</title>
- <programlisting><Context path="/rest-sample-portal" docBase="rest-sample-portal" reloadable="true" crossContext="false">
+ <programlisting language="xml"><Context path="/rest-sample-portal" docBase="rest-sample-portal" reloadable="true" crossContext="false">
<Logger className='org.apache.catalina.logger.SystemOutLogger'
prefix='localhost_portal_log.' suffix='.txt' timestamp='true'/>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/managed-datasources-under-jboss-as.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/managed-datasources-under-jboss-as.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/managed-datasources-under-jboss-as.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -26,7 +26,8 @@
jdbcjcr_portal, jdbcjcr_portal-sample, jdbcidm_portal &
jdbcidm_sample-portal).</para>
- <para>Example:<programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <para>Example:</para>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?>
<datasources>
<no-tx-datasource>
<jndi-name>jdbcjcr_portal</jndi-name>
@@ -59,7 +60,7 @@
<user-name>sa</user-name>
<password></password>
</no-tx-datasource>
-</datasources></programlisting></para>
+</datasources></programlisting>
<para>Which properties can be set for datasource can be found here:
<ulink
@@ -89,7 +90,7 @@
<para>In jcr-configuration.xml and idm-configuration.xml comment out the
plugin InitialContextInitializer.</para>
- <programlisting><!-- Commented because, Datasources are declared and bound by AS, not in eXo -->
+ <programlisting language="xml"><!-- Commented because, Datasources are declared and bound by AS, not in eXo -->
<!--
<external-component-plugins>
[...]
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -19,7 +19,9 @@
<envar>org.exoplatform.services.cache.ExoCacheConfig</envar> in order to
create new <envar>ExoCache</envar> instances. See the below example of
<envar>org.exoplatform.services.cache.CacheService</envar>
- definition:<programlisting> <component>
+ definition:</para>
+
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.cache.CacheService</key>
<jmx-name>cache:type=CacheService</jmx-name>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
@@ -36,16 +38,19 @@
</object>
</object-param>
</init-params>
- </component></programlisting></para>
+ </component></programlisting>
- <para><note>
+ <note>
<para>The <envar>ExoCacheConfig</envar> which name is
<envar>default</envar>, will be the default configuration of all the
<envar>ExoCache</envar> instances that don't have dedicated
configuration.</para>
- </note>See the below example about how to define a new
+ </note>
+ <para> See the below example about how to define a new
<envar>ExoCacheConfig</envar> thanks to a
- <emphasis>external-component-plugin</emphasis>:<programlisting> <external-component-plugins>
+ <emphasis>external-component-plugin</emphasis>:</para>
+
+ <programlisting language="xml"> <external-component-plugins>
<target-component>org.exoplatform.services.cache.CacheService</target-component>
<component-plugin>
<name>addExoCacheConfig</name>
@@ -66,7 +71,7 @@
</object-param>
</init-params>
</component-plugin>
- </external-component-plugins></programlisting></para>
+ </external-component-plugins></programlisting>
<table>
<title>Descriptions of the fields of
@@ -152,7 +157,9 @@
eXo Products.</para>
<para>You just need to implement your own <envar>ExoCacheFactory</envar>
- and register it in an eXo container, as described below:<programlisting>package org.exoplatform.services.cache;
+ and register it in an eXo container, as described below:</para>
+
+ <programlisting language="java">package org.exoplatform.services.cache;
...
public interface ExoCacheFactory {
@@ -163,27 +170,32 @@
* @exception ExoCacheInitException if an exception happens while initializing the cache
*/
public ExoCache createCache(ExoCacheConfig config) throws ExoCacheInitException;
-}</programlisting></para>
+}</programlisting>
<para>As you can see, there is only one method to implement which can be
seen as a converter of an <envar>ExoCacheConfig</envar> to get an instance
of <envar>ExoCache</envar>. Once, you created your own implementation, you
can simply register your factory by adding a file
<emphasis>conf/portal/configuration.xml</emphasis> with a content of the
- following type:<programlisting><configuration>
+ following type:</para>
+
+ <programlisting language="xml"><configuration>
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.tutorial.MyExoCacheFactoryImpl</type>
...
</component>
-</configuration></programlisting><note>
+</configuration>
+</programlisting>
+
+<note>
<para>Since kernel 2.3.0-CR1, if the configuration is not a sub class
of <envar>ExoCacheConfig</envar> and the implementation given in the
configuration is the full qualified name of an existing implementation
of eXo Cache, we will assume that the user expects to have an instance
of this eXo Cache type so we won't use the configured cache
factory.</para>
- </note></para>
+ </note>
</section>
<section>
@@ -197,7 +209,9 @@
itself but of course you can still redefined the configuration if you
wish as you can do with any components.</para>
- <para>The default configuration of the factory is:<programlisting><configuration>
+ <para>The default configuration of the factory is:</para>
+
+ <programlisting language="xml"><configuration>
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
@@ -212,7 +226,7 @@
</value-param>
</init-params>
</component>
-</configuration></programlisting></para>
+</configuration></programlisting>
<table>
<title>Fields description</title>
@@ -263,7 +277,9 @@
<para>If for a given reason, you need to use a specific configuration
for a cache, you can register one thanks to an "<emphasis>external
- plugin</emphasis>", see an example below:<programlisting><configuration>
+ plugin</emphasis>", see an example below:</para>
+
+ <programlisting language="xml"><configuration>
...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
@@ -281,7 +297,7 @@
</component-plugin>
</external-component-plugins>
...
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>In the example above, I call the method
<emphasis>addConfig(ExoCacheFactoryConfigPlugin plugin)</emphasis> on
@@ -308,7 +324,9 @@
<para>The factory for jboss cache, delegates the cache creation to
<envar>ExoCacheCreator</envar> that is defined as
- below:<programlisting>package org.exoplatform.services.cache.impl.jboss;
+ below:</para>
+
+ <programlisting language="java">package org.exoplatform.services.cache.impl.jboss;
...
public interface ExoCacheCreator {
@@ -331,7 +349,7 @@
* @return the expected by the creator
*/
public String getExpectedImplementation();
-}</programlisting></para>
+}</programlisting>
<para>The <envar>ExoCacheCreator</envar> allows you to define any kind
of jboss cache instance that you would like to have. It has been
@@ -349,7 +367,7 @@
</listitem>
<listitem>
- <para><emphasis>getExpectedConfigType</emphasis> : this method is
+ <para><emphasis>getExpectedConfigType</emphasis>: this method is
used to indicate the factory the subtype of
<envar>ExoCacheConfig</envar> supported by the creator.</para>
</listitem>
@@ -370,7 +388,9 @@
<para>You can register any cache creator that you want thanks to an
<emphasis>"external plugin"</emphasis>, see an example
- below:<programlisting> <external-component-plugins>
+ below:</para>
+
+ <programlisting language="xml"> <external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
<component-plugin>
<name>addCreator</name>
@@ -388,7 +408,7 @@
</object-param>
</init-params>
</component-plugin>
- </external-component-plugins></programlisting></para>
+ </external-component-plugins></programlisting>
<para>In the example above, I call the method
<emphasis>addCreator(ExoCacheCreatorPlugin plugin)</emphasis> on the
@@ -413,7 +433,7 @@
<section>
<title>LRU Cache Creator - Least Recently Used</title>
- <programlisting>..
+ <programlisting language="xml">..
<object-param>
<name>LRU</name>
<description>The lru cache creator</description>
@@ -456,31 +476,33 @@
<section>
<title>FIFO Cache Creator - First In, First Out</title>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>FIFO</name>
<description>The fifo cache creator</description>
<object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheCreator"></object>
</object-param>
...</programlisting>
+
</section>
<section>
<title>MRU Cache Creator - Most Recently Used</title>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>MRU</name>
<description>The mru cache creator</description>
<object type="org.exoplatform.services.cache.impl.jboss.mru.MRUExoCacheCreator"></object>
</object-param>
...</programlisting>
+
</section>
<section>
<title>LFU Cache Creator - Least Frequently Used</title>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>LFU</name>
<description>The lfu cache creator</description>
@@ -512,7 +534,7 @@
<section>
<title>EA Cache Creator - Expiration Algorithm</title>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>EA</name>
<description>The ea cache creator</description>
@@ -564,7 +586,7 @@
<section>
<title>At <envar>CacheService</envar> initialization</title>
- <programlisting>...
+ <programlisting language="xml">...
<component>
<key>org.exoplatform.services.cache.CacheService</key>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
@@ -593,7 +615,7 @@
<section>
<title>With an <emphasis>"external plugin"</emphasis></title>
- <programlisting>...
+ <programlisting language="xml">...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.CacheService</target-component>
<component-plugin>
@@ -668,8 +690,10 @@
<itemizedlist>
<listitem>
<para>New configuration</para>
+ </listitem>
+ </itemizedlist>
- <para><programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>lru</name>
<description>The lru cache configuration</description>
@@ -681,7 +705,9 @@
<field name="timeToLive"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting><table>
+...</programlisting>
+
+<table>
<title>Fields description</title>
<tgroup cols="2">
@@ -721,13 +747,16 @@
</row>
</tbody>
</tgroup>
- </table></para>
- </listitem>
+ </table>
+
+ <itemizedlist>
<listitem>
<para>Old configuration</para>
+ </listitem>
+ </itemizedlist>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>lru-with-old-config</name>
<description>The lru cache configuration</description>
@@ -765,13 +794,13 @@
</tgroup>
</table>
- <para><note>
+ <note>
<para>For the fields <emphasis>maxAge</emphasis> and
<emphasis>timeToLive</emphasis> needed by JBoss cache, we will
use the default values provided by the creator.</para>
- </note></para>
- </listitem>
- </itemizedlist>
+ </note>
+
+
</section>
<section>
@@ -779,7 +808,11 @@
<itemizedlist>
<listitem>
- <para>New configuration<programlisting>...
+ <para>New configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>fifo</name>
<description>The fifo cache configuration</description>
@@ -789,7 +822,7 @@
<field name="minTimeToLive"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -816,10 +849,13 @@
</tbody>
</tgroup>
</table>
- </listitem>
-
- <listitem>
- <para>Old configuration<programlisting>...
+ <itemizedlist>
+ <listitem>
+ <para>Old configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>fifo-with-old-config</name>
<description>The fifo cache configuration</description>
@@ -830,7 +866,7 @@
<field name="implementation"><string>FIFO</string></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -856,8 +892,6 @@
</tbody>
</tgroup>
</table>
- </listitem>
- </itemizedlist>
</section>
<section>
@@ -865,7 +899,11 @@
<itemizedlist>
<listitem>
- <para>New configuration<programlisting>...
+ <para>New configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>mru</name>
<description>The mru cache configuration</description>
@@ -875,7 +913,7 @@
<field name="minTimeToLive"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -902,10 +940,14 @@
</tbody>
</tgroup>
</table>
+
+ <itemizedlist>
+ <listitem>
+ <para>Old configuration</para>
</listitem>
-
- <listitem>
- <para>Old configuration<programlisting>...
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>mru-with-old-config</name>
<description>The mru cache configuration</description>
@@ -916,7 +958,7 @@
<field name="implementation"><string>MRU</string></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -942,8 +984,6 @@
</tbody>
</tgroup>
</table>
- </listitem>
- </itemizedlist>
</section>
<section>
@@ -951,7 +991,11 @@
<itemizedlist>
<listitem>
- <para>New configuration<programlisting>...
+ <para>New configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>lfu</name>
<description>The lfu cache configuration</description>
@@ -962,7 +1006,7 @@
<field name="minTimeToLive"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -1000,10 +1044,13 @@
</tbody>
</tgroup>
</table>
- </listitem>
-
- <listitem>
- <para>Old configuration<programlisting>...
+ <itemizedlist>
+ <listitem>
+ <para>Old configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>lfu-with-old-config</name>
<description>The lfu cache configuration</description>
@@ -1014,7 +1061,7 @@
<field name="implementation"><string>LFU</string></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -1047,8 +1094,6 @@
<emphasis>timeToLive</emphasis> needed by JBoss cache, we will
use the default values provided by the creator.</para>
</note></para>
- </listitem>
- </itemizedlist>
</section>
<section>
@@ -1056,7 +1101,11 @@
<itemizedlist>
<listitem>
- <para>New configuration<programlisting>...
+ <para>New configuration</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>ea</name>
<description>The ea cache configuration</description>
@@ -1067,7 +1116,7 @@
<field name="expirationTimeout"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -1101,10 +1150,14 @@
</tbody>
</tgroup>
</table>
+
+ <itemizedlist>
+ <listitem>
+ <para>Old configuration</para>
</listitem>
-
- <listitem>
- <para>Old configuration<programlisting>...
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>ea-with-old-config</name>
<description>The ea cache configuration</description>
@@ -1115,7 +1168,7 @@
<field name="implementation"><string>EA</string></field>
</object>
</object-param>
-...</programlisting></para>
+...</programlisting>
<table>
<title>Fields description</title>
@@ -1148,8 +1201,7 @@
needed by JBoss cache, we will use the default values provided
by the creator.</para>
</note></para>
- </listitem>
- </itemizedlist>
+
</section>
</section>
</section>
@@ -1165,7 +1217,9 @@
library itself but of course you can still redefined the configuration
if you wish as you can do with any components.</para>
- <para>The default configuration of the factory is:<programlisting><configuration>
+ <para>The default configuration of the factory is:</para>
+
+ <programlisting language="xml"><configuration>
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.infinispan.ExoCacheFactoryImpl</type>
@@ -1176,7 +1230,7 @@
</value-param>
</init-params>
</component>
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>As you can see the factory requires one single parameter which is
<emphasis>cache.config.template</emphasis>, this parameter allows you to
@@ -1187,11 +1241,12 @@
<para>The default configuration template aims to be the skeleton from
which we will create any type of infinispan cache instance, thus it must
- be very generic. <note>
+ be very generic.</para>
+ <note>
<para>All the cache instances that will rely on this cache
configuration will share the same
<envar>EmbeddedCacheManager.</envar></para>
- </note></para>
+ </note>
</section>
<section>
@@ -1199,7 +1254,9 @@
<para>If for a given reason, you need to use a specific configuration
for a cache, you can register one thanks to an "<emphasis>external
- plugin</emphasis>", see an example below:<programlisting><configuration>
+ plugin</emphasis>", see an example below:</para>
+
+ <programlisting language="xml"><configuration>
...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
@@ -1217,7 +1274,7 @@
</component-plugin>
</external-component-plugins>
...
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>In the example above, I call the method
<emphasis>addConfig(ExoCacheFactoryConfigPlugin plugin)</emphasis> on
@@ -1250,7 +1307,9 @@
<para>The factory for infinispan, delegates the cache creation to
<envar>ExoCacheCreator</envar> that is defined as
- below:<programlisting>package org.exoplatform.services.cache.impl.infinispan;
+ below:</para>
+
+ <programlisting language="java">package org.exoplatform.services.cache.impl.infinispan;
...
public interface ExoCacheCreator {
@@ -1274,7 +1333,7 @@
* @return the expected by the creator
*/
public Set<String> getExpectedImplementations();
-}</programlisting></para>
+}</programlisting>
<para>The <envar>ExoCacheCreator</envar> allows you to define any kind
of infinispan cache instance that you would like to have. It has been
@@ -1316,7 +1375,9 @@
<para>You can register any cache creator you want thanks to an
<emphasis>"external plugin"</emphasis>, see an example
- below:<programlisting> <external-component-plugins>
+ below:</para>
+
+ <programlisting language="xml"> <external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
<component-plugin>
<name>addCreator</name>
@@ -1331,7 +1392,7 @@
</object-param>
</init-params>
</component-plugin>
- </external-component-plugins></programlisting></para>
+ </external-component-plugins></programlisting>
<para>In the example above, I call the method
<emphasis>addCreator(ExoCacheCreatorPlugin plugin)</emphasis> on the
@@ -1359,7 +1420,7 @@
<para>This is the generic cache creator that allows you to use any
eviction strategies defined by default in Infinispan.</para>
- <programlisting>..
+ <programlisting language="xml">..
<object-param>
<name>GENERIC</name>
<description>The generic cache creator</description>
@@ -1472,8 +1533,10 @@
<itemizedlist>
<listitem>
<para>New configuration</para>
-
- <para><programlisting>...
+ </listitem>
+ </itemizedlist>
+
+ <programlisting language="xml">...
<object-param>
<name>myCache</name>
<description>My cache configuration</description>
@@ -1486,7 +1549,8 @@
<field name="wakeUpInterval"><long>${my-value}</long></field>
</object>
</object-param>
-...</programlisting><table>
+...</programlisting>
+ <table>
<title>Fields description</title>
<tgroup cols="2">
@@ -1538,13 +1602,15 @@
</row>
</tbody>
</tgroup>
- </table></para>
- </listitem>
-
+ </table>
+
+ <itemizedlist>
<listitem>
<para>Old configuration</para>
+ </listitem>
+ </itemizedlist>
- <programlisting>...
+ <programlisting language="xml">...
<object-param>
<name>myCache</name>
<description>My cache configuration</description>
@@ -1597,8 +1663,7 @@
<emphasis>wakeUpInterval</emphasis> needed by infinispan, we
will use the default values provided by the creator.</para>
</note></para>
- </listitem>
- </itemizedlist>
+
</section>
</section>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/component-plugin-priority.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/component-plugin-priority.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/component-plugin-priority.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -18,7 +18,7 @@
<para>Simple example of fragment of a <emphasis
role="bold">configuration.xml</emphasis>.</para>
- <programlisting>...
+ <programlisting language="xml">...
<component>
<type>org.exoplatform.services.Component1</type>
</component>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/container-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/container-configuration.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/container-configuration.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -33,7 +33,7 @@
<uri>http://www.exoplaform.org/xml/ns/kernel_1_2.xsd</uri> must be target
namespace of the XML configuration file.</para>
- <programlisting><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ <programlisting language="xml"><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
@@ -46,7 +46,7 @@
variables since the eXo kernel resolves them, for example the following
configuration will be well interpreted:</para>
- <programlisting><configuration
+ <programlisting language="xml"><configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
@@ -162,8 +162,10 @@
<itemizedlist>
<listitem>
<para>if configuration URL was initialized to be added to
- services defaults, as below:<programlisting>// add configuration to the default services configurations from JARs/WARs
-StandaloneContainer.addConfigurationURL(containerConf);</programlisting></para>
+ services defaults, as below:</para>
+
+ <programlisting language="java">// add configuration to the default services configurations from JARs/WARs
+StandaloneContainer.addConfigurationURL(containerConf);</programlisting>
<para>Configuration from added URL
<emphasis>containerConf</emphasis> will override only services
@@ -366,7 +368,7 @@
<envar>PortalContainer</envar> simply add the following lines in your
<emphasis>web.xml</emphasis> file.</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1" ?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
@@ -416,7 +418,7 @@
<envar>PortalContainerConfig</envar> has been defined at the
<envar>RootContainer</envar> level, see an example below:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<!-- The full qualified name of the PortalContainerConfig -->
<type>org.exoplatform.container.definition.PortalContainerConfig</type>
<init-params>
@@ -571,7 +573,9 @@
<para>A new <envar>PortalContainerDefinition</envar> can be defined at
the <envar>RootContainer</envar> level thanks to an external plugin,
- see an example below:<programlisting> <external-component-plugins>
+ see an example below:</para>
+
+ <programlisting language="xml"> <external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -664,7 +668,7 @@
</object-param>
</init-params>
</component-plugin>
- </external-component-plugins></programlisting></para>
+ </external-component-plugins></programlisting>
<table>
<title>Descriptions of the fields of a
@@ -1053,7 +1057,9 @@
</table>
<para>You can find below an example of how to use the
- variables:<programlisting><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"
+ variables:</para>
+
+ <programlisting language="xml"><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.container.TestPortalContainer$MyComponent</type>
@@ -1083,7 +1089,7 @@
</value-param>
</init-params>
</component>
-</configuration></programlisting></para>
+</configuration></programlisting>
<para>In the properties file corresponding to the external settings,
you can reuse variables previously defined (in the external settings
@@ -1126,7 +1132,7 @@
portal container and to the portal containers called
<envar>foo1</envar> and <envar>foo2</envar>:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1305,7 +1311,7 @@
the end of the dependency list of the default portal
container:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1381,7 +1387,7 @@
before <envar>foo2</envar> in the dependency list of the default
portal container:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1461,7 +1467,7 @@
<envar>foo2</envar> in the dependency list of the default portal
container:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1528,7 +1534,7 @@
<envar>string</envar> and <envar>stringX</envar> to the settings
of the default portal container:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1584,7 +1590,7 @@
the example below, we disable the portal container named
<envar>foo</envar>:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
<component-plugin>
@@ -1634,7 +1640,7 @@
make sure that the following Http Filter (or a sub class of it) has
been added to your web.xml in first position as below:</para>
- <programlisting><filter>
+ <programlisting language="xml"><filter>
<filter-name>PortalContainerFilter</filter-name>
<filter-class>org.exoplatform.container.web.PortalContainerFilter</filter-class>
</filter>
@@ -1669,7 +1675,7 @@
<para>The properties init param takes a property declared to configure
various properties.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>PropertyManagerConfigurator</key>
<type>org.exoplatform.container.PropertyConfigurator</type>
<init-params>
@@ -1691,7 +1697,7 @@
property declarations are loaded in the order in which the properties
are declared sequentially in the file.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>PropertyManagerConfigurator</key>
<type>org.exoplatform.container.PropertyConfigurator</type>
<init-params>
@@ -1809,7 +1815,7 @@
will shadow any element with the same key declared before in the
same configuration file:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>Component</key>
<type>Component</type>
</component>
@@ -1827,7 +1833,7 @@
configuration of a given component. Thanks to the profiles the
component-plugins could be enabled or disabled:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>Component</target-component>
<component-plugin profiles="foo">
<name>foo</name>
@@ -1849,7 +1855,7 @@
<para>The import element imports a referenced configuration file
when activated:</para>
- <programlisting><import>empty</import>
+ <programlisting language="xml"><import>empty</import>
<import profiles="foo">foo</import>
<import profiles="bar">bar</import></programlisting>
</section>
@@ -1860,7 +1866,7 @@
<para>The init param element configures the parameter argument of
the construction of a component service:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>Component</key>
<type>ComponentImpl</type>
<init-params>
@@ -1886,7 +1892,7 @@
<para>The value collection element configures one of the value of
collection data:</para>
- <programlisting><object type="org.exoplatform.container.configuration.ConfigParam">
+ <programlisting language="xml"><object type="org.exoplatform.container.configuration.ConfigParam">
<field name="role">
<collection type="java.util.ArrayList">
<value><string>manager</string></value>
@@ -1903,7 +1909,7 @@
<para>The field configuration element configures the field of an
object:</para>
- <programlisting><object-param>
+ <programlisting language="xml"><object-param>
<name>test.configuration</name>
<object type="org.exoplatform.container.configuration.ConfigParam">
<field name="role">
@@ -1936,7 +1942,9 @@
<para>The component request life cycle is an interface that defines a
contract for a component for being involved into a
- request:<programlisting>public interface ComponentRequestLifecycle
+ request:</para>
+
+ <programlisting language="java">public interface ComponentRequestLifecycle
{
/**
* Start a request.
@@ -1949,7 +1957,7 @@
* @param container the related container
*/
void endRequest(ExoContainer container);
-}</programlisting></para>
+}</programlisting>
<para>The container passed is the container to which the component is
related. This contract is often used to setup a thread local based
@@ -1973,7 +1981,7 @@
<section>
<title>Scheduling a component request life cycle</title>
- <programlisting>RequestLifeCycle.begin(component);
+ <programlisting language="java">RequestLifeCycle.begin(component);
try
{
// Do something
@@ -1994,7 +2002,8 @@
scheduled again. When the local value is true, then the looked
components will be those of the container, when it is false then the
scheduler will also look at the components in the ancestor
- containers.<programlisting>RequestLifeCycle.begin(container, local);
+ containers.</para>
+ <programlisting language="java">RequestLifeCycle.begin(container, local);
try
{
// Do something
@@ -2002,7 +2011,7 @@
finally
{
RequestLifeCycle.end();
-}</programlisting></para>
+}</programlisting>
</section>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/initialcontext-binder-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/initialcontext-binder-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/initialcontext-binder-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -18,7 +18,7 @@
<para>Service provide methods for binding reference.</para>
- <programlisting>public void bind(String bindName, String className, String factory, String factoryLocation, Map<String, String> refAddr) throws NamingException, FileNotFoundException, XMLStreamExcept</programlisting>
+ <programlisting language="java">public void bind(String bindName, String className, String factory, String factoryLocation, Map<String, String> refAddr) throws NamingException, FileNotFoundException, XMLStreamExcept</programlisting>
<itemizedlist>
<listitem>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/inversion-of-control.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/inversion-of-control.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/inversion-of-control.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -54,16 +54,16 @@
<para>Using a constructor:</para>
- <programlisting>public ServiceA(ServiceB serviceB)</programlisting>
+ <programlisting language="java">public ServiceA(ServiceB serviceB)</programlisting>
<para>Using setter methods:</para>
- <programlisting>public void setServiceB(ServiceB serviceB)</programlisting>
+ <programlisting language="java">public void setServiceB(ServiceB serviceB)</programlisting>
<para>When a client service can not be stored in the container then the
service locator pattern is used:</para>
- <programlisting>public ServiceA(){
+ <programlisting language="java">public ServiceA(){
this.serviceB =Container.getSInstance().getService(ServiceB.class);
}</programlisting>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -118,7 +118,7 @@
<para>The <envar>InitialContextInitializer</envar> configuration
example:</para>
- <para><programlisting> <component>
+ <programlisting language="xml"> <component>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
<properties-param>
@@ -136,7 +136,7 @@
<value>bind-references.xml</value>.
</value-param>.
</init-params>
- </component></programlisting></para>
+ </component></programlisting>
<para>where</para>
@@ -146,7 +146,7 @@
<para>The <envar>BindReferencePlugin</envar> component plugin
configuration example (for JDBC datasource):</para>
- <para><programlisting> <component-plugins>
+ <programlisting language="xml"> <component-plugins>
<component-plugin>
<name>bind.datasource</name>
<set-method>addPlugin</set-method>
@@ -173,7 +173,7 @@
<property name="password" value=""/>
</properties-param>
</init-params>
- </component-plugin></programlisting></para>
+ </component-plugin></programlisting>
</section>
<section>
@@ -201,7 +201,7 @@
<para>Service provides methods for binding reference.</para>
- <programlisting>
+ <programlisting language="java">
public void bind(String bindName,
String className,
String factory,
@@ -237,7 +237,7 @@
<para>Example of usage:</para>
- <programlisting>
+ <programlisting language="java">
// obtain InitialContextInitializer instance from ExoContainer (e.g. PortalContainer)
InitialContextInitializer initContext = (InitialContextInitializer)container.getComponentInstanceOfType(InitialContextInitializer.class);
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -100,7 +100,7 @@
<classname>QuartzSheduler</classname> and
<classname>QueueTasks</classname>, you also have to configure these two
components.</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
@@ -149,7 +149,7 @@
</listitem>
</itemizedlist>
<para>Edit the pom.xml as follows:</para>
- <programlisting><project
+ <programlisting language="xml"><project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@@ -175,7 +175,7 @@
<title>Define a job</title>
<para>To define a job, do as follows:</para>
<para>Define your job to be performed. For example, the job <emphasis role="italic">DumbJob</emphasis> is defined as follows:</para>
- <programlisting>package org.exoplatform.samples.scheduler.jobs;
+ <programlisting language="java">package org.exoplatform.samples.scheduler.jobs;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -208,9 +208,9 @@
<section>
<title>Job configuration</title>
<para>After defining the "job", the only next step is to configure it by using <emphasis role="italic">external-component-plugin</emphasis> configuration for <emphasis role="italic">org.exoplatform.services.scheduler.JobSchedulerService</emphasis>. You can use these methods below for setting component plugin:</para>
- <programlisting>public void addPeriodJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addPeriodJob(ComponentPlugin plugin) throws Exception;</programlisting>
<para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.PeriodJob</emphasis>. This type of job is used to perform actions that are executed in a period of time. You have to define when this job is performed, when it ends, when it performs the first action, how many times it is executed and the period of time to perform the action. See the configuration sample below to understand more clearly:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
<component-plugin>
<name>PeriodJob Plugin</name>
@@ -232,9 +232,9 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
- <programlisting>public void addCronJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addCronJob(ComponentPlugin plugin) throws Exception;</programlisting>
<para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.CronJob</emphasis>. This type of job is used to perform actions at specified time with Unix 'cron-like' definitions. The plugin uses "expression" field for specifying the 'cron-like' definitions to execute the job. This is considered as the most powerful and flexible job to define when it will execute. For example, at 12pm every day => "0 0 12 * * ?"; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday => "0 15 10 ? * MON-FRI". To see more about Cron expression, please refer to this article: <para><ulink url="http://en.wikipedia.org/wiki/CRON_expression">CRON expression</ulink>.</para>See the configuration sample below to understand more clearly:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
<component-plugin>
<name>CronJob Plugin</name>
@@ -254,17 +254,17 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
- <programlisting>public void addGlobalJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
- <programlisting>public void addJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addGlobalJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
<para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.JobListener.</emphasis> This job listener is used so that it will be informed when a <emphasis role="italic">org.quartz.JobDetail</emphasis> executes.</para>
- <programlisting>public void addGlobalTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
- <programlisting>public void addTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addGlobalTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting language="java">public void addTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
<para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.TriggerListener</emphasis>. This trigger listener is used so that it will be informed when a <emphasis role="italic">org.quartz.Trigger</emphasis> fires.</para>
</section>
<section>
<title>Run the project</title>
<para>Create <emphasis role="italic">conf.portal</emphasis> package in your sample project. Add the configuration.xml file with the content as follows:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-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"
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/listener-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/listener-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/listener-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -25,7 +25,7 @@
<para>- It's very simple, just mark your Listener implementation as
<classname>@Asynchronous</classname>.</para>
- <programlisting>@Asynchronous
+ <programlisting language="java">@Asynchronous
class AsynchListenerWithException<S,D> extends Listener<S,D>
{
@Override
@@ -39,7 +39,9 @@
<classname>ExecutorService</classname>.</para>
<para>By default, <classname>ExecutoreService</classname> configured with
- thread pool size 1, you can change it in configuration:<programlisting> <component>
+ thread pool size 1, you can change it in configuration:</para>
+
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.listener.ListenerService</key>
<type>org.exoplatform.services.listener.ListenerService</type>
@@ -50,6 +52,6 @@
</value-param>
</init-params>
- </component></programlisting></para>
+ </component></programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/logging.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/logging.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/logging.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -81,7 +81,8 @@
<para><ulink url="http://logging.apache.org/log4j/">Log4J</ulink> is a
very popular and flexible logging system. It is a good option for
- JBoss.<programlisting> <component>
+ JBoss.</para>
+ <programlisting language="xml"> <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
<value-param>
@@ -105,33 +106,48 @@
<property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
</properties-param >
</init-params>
- </component></programlisting></para>
+ </component></programlisting>
<section>
<title>Assigning logger level for classes or components</title>
<para>You can set logger level for class or group of classes by
- setting next property:<programlisting><property name="log4j.category.{component or class name}" value="DEBUG"/></programlisting></para>
+ setting next property:</para>
+
+ <programlisting language="xml"><property name="log4j.category.{component or class name}" value="DEBUG"/></programlisting>
- <para>For example:<itemizedlist>
+ <para>For example:</para>
+ <itemizedlist>
<listitem>
<para>We want to log all debug messages for class
<classname>org.exoplatform.services.jcr.impl.core.SessionDataManager</classname>,
that lies in <package>exo.jcr.component.core</package>
- component<programlisting><property name="log4j.category.exo.jcr.component.core.SessionDataManager" value="DEBUG"/></programlisting></para>
+ component</para>
</listitem>
-
+ </itemizedlist>
+
+ <programlisting language="xml"><property name="log4j.category.exo.jcr.component.core.SessionDataManager" value="DEBUG"/></programlisting>
+
+ <itemizedlist>
<listitem>
- <para>Or we want to log all debug messages for all classes in in
+ <para>Or we want to log all debug messages for all classes in
<package>exo.jcr.component.core</package>
- component<programlisting><property name="log4j.category.exo.jcr.component.core" value="DEBUG"/></programlisting></para>
+ component</para>
</listitem>
-
+ </itemizedlist>
+
+ <programlisting language="xml"><property name="log4j.category.exo.jcr.component.core" value="DEBUG"/></programlisting>
+
+ <itemizedlist>
<listitem>
<para>Or we want to log all messages for all kernel
- components<programlisting><property name="log4j.category.exo.kernel" value="DEBUG"/></programlisting></para>
+ components</para>
</listitem>
- </itemizedlist></para>
+ </itemizedlist>
+
+ <programlisting language="xml"><property name="log4j.category.exo.kernel" value="DEBUG"/></programlisting>
+
+
</section>
</section>
@@ -139,16 +155,22 @@
<title>JDK Logging</title>
<para>JDK logging (aka JUL) is the builtin logging framework introduced
- in JDK 1.4. It is a good option for Tomcat AS.<itemizedlist>
+ in JDK 1.4. It is a good option for Tomcat AS.</para>
+ <itemizedlist>
<listitem>
<para>Edit the variable <varname>LOG_OPTS</varname> in your
<filename>eXo.sh</filename> or <filename>eXo.bat</filename>
- :<programlisting>LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger"</programlisting></para>
+ :</para>
</listitem>
-
+ </itemizedlist>
+ <programlisting>LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger"</programlisting>
+
+ <itemizedlist>
<listitem>
- <para>Edit your <filename>logs-configuration.xml</filename>
- :<programlisting><component>
+ <para>Edit your <filename>logs-configuration.xml:</filename></para>
+ </listitem>
+ </itemizedlist>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
<value-param>
@@ -167,9 +189,8 @@
<property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
</properties-param>
</init-params>
- </component></programlisting></para>
- </listitem>
- </itemizedlist></para>
+ </component></programlisting>
+
</section>
<section>
@@ -177,7 +198,8 @@
<para>SimpleLog is a minimal logging system distributed with Commons
Logging. To be used when nothing else is available or when you seek
- simplicity.<programlisting> <component>
+ simplicity.</para>
+ <programlisting language="xml"> <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
<value-param>
@@ -195,7 +217,7 @@
<property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
</properties-param>
</init-params>
- </component></programlisting></para>
+ </component></programlisting>
</section>
</section>
@@ -206,21 +228,26 @@
<title>JBoss tips</title>
<para>If you use log4j configuration, you can change the log
- configuration directly at runtime in:
- <filename>JBOSS_HOME/server/default/conf/jboss-log4j.xml</filename>.<itemizedlist>
+ configuration directly at runtime in:</para>
+ <filename>JBOSS_HOME/server/default/conf/jboss-log4j.xml</filename>.
+ <itemizedlist>
+ <listitem>
+ <para>To enable debug logs:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting language="xml"> <param name="Threshold" value="DEBUG"/> </programlisting>
+
+ <itemizedlist>
<listitem>
- <para>To enable debug logs :<programlisting> <param name="Threshold" value="DEBUG"/> </programlisting></para>
- </listitem>
-
- <listitem>
<para>To exclude messages from unnecessary classes (server's
internal) modify the threshold of these classes to "FATAL".</para>
</listitem>
- </itemizedlist><tip>
+ </itemizedlist>
+ <tip>
<para>If you see only ERROR level logs while starting ear on jboss
(4.2.2), you have to remove log4j*.jar from your ear and
application.xml.</para>
- </tip></para>
+ </tip>
</section>
<section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/manageability.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/manageability.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/manageability.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -111,7 +111,7 @@
registration time of a managed object to create the JMX object name.
The template is formed of properties.</para>
- <programlisting>@NameTemplate({
+ <programlisting language="java">@NameTemplate({
@Property(key="container", value="workspace"),
@Property(key="name", value="{Name}")})</programlisting>
</section>
@@ -127,7 +127,7 @@
different instances of the same class that would have the same object
name otherwise.</para>
- <programlisting>@NamingContext(@Property(key="workspace", value="{Name}"))</programlisting>
+ <programlisting language="java">@NamingContext(@Property(key="workspace", value="{Name}"))</programlisting>
</section>
</section>
</section>
@@ -143,7 +143,7 @@
when a new cache is created, it calls the CacheServiceManaged class in
order to let the CacheServiceManaged object register the cache.</para>
- <programlisting>@ManagedBy(CacheServiceManaged.class)
+ <programlisting language="java">@ManagedBy(CacheServiceManaged.class)
public class CacheServiceImpl implements CacheService {
CacheServiceManaged managed;
@@ -161,7 +161,7 @@
The @NameTemplate is used to produce object name values when ExoCache
instance are registered.</para>
- <programlisting>@Managed
+ <programlisting language="java">@Managed
@NameTemplate({@Property(key="service", value="cache"), @Property(key="name", value="{Name}")})
@ManagedDescription("Exo Cache")
public interface ExoCache {
@@ -192,7 +192,7 @@
receive a context to perform further registration of managed
objects.</para>
- <programlisting>@Managed
+ <programlisting language="java">@Managed
public class CacheServiceManaged implements ManagementAware {
/** . */
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/rpc-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -64,7 +64,7 @@
<para>See an example below:</para>
- <programlisting>public class MyService implements Startable
+ <programlisting language="java">public class MyService implements Startable
{
private RPCService rpcService;
private RemoteCommand sayHelloCommand;
@@ -131,7 +131,7 @@
added only in a cluster environment. See below an example of
configuration</para>
- <programlisting><configuration>
+ <programlisting language="xml"><configuration>
....
<component>
<key>org.exoplatform.services.rpc.RPCService</key>
@@ -230,7 +230,7 @@
proposed by default. This command will dynamically execute a method on a
given object.</para>
- <programlisting>// Register the command first (to be done before that the RPCService has been started)
+ <programlisting language="java">// Register the command first (to be done before that the RPCService has been started)
RemoteCommand commandGetName = rpcService.registerCommand(new SingleMethodCallCommand(myService, "getName"));
...
// Execute the command on the coordinator (can be done only after having started the RPCService)
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-for-beginners.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-for-beginners.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-for-beginners.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -150,7 +150,7 @@
<package>exo.kernel.component.cache-2.0.5.jar</package> file and inside
this jar open /conf/portal/configuration.xml. You will see:</para>
- <programlisting>
+ <programlisting language="xml">
<component>
<key>org.exoplatform.services.cache.CacheService</key>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
@@ -264,14 +264,16 @@
for a service can be defined as you see in the next chapter.</para>
<note>
- <para>"In your java code you have to use <programlisting>ExoContainer myContainer = ExoContainerContext.getCurrentContainer()</programlisting>
- in order to access to the current container. It doesn't greatly matter
+ <para>"In your java code you have to use</para>
+
+ <programlisting language="java">ExoContainer myContainer = ExoContainerContext.getCurrentContainer();</programlisting>
+ <para>in order to access to the current container. It doesn't greatly matter
to your application if the current container is a
<classname>PortalContainer</classname> or a
<classname>StandaloneContainer</classname>. Once you have your container
- you may access to any service registered in this container using
- <programlisting>MyService myService = (MyService) myContainer.getComponentInstance(MyService.class)</programlisting>
- You easily realize that <classname>MyService.class</classname> is the
+ you may access to any service registered in this container using</para>
+ <programlisting language="java">MyService myService = (MyService) myContainer.getComponentInstance(MyService.class);</programlisting>
+ <para> You easily realize that <classname>MyService.class</classname> is the
name of the service interface.</para>
</note>
</section>
@@ -464,7 +466,7 @@
empty hashtable and not any bit of previous configuration is used.
Apply the following code to do this:</para>
- <programlisting>StandaloneContainer.setConfigurationURL(containerConf);</programlisting>
+ <programlisting language="java">StandaloneContainer.setConfigurationURL(containerConf);</programlisting>
</listitem>
<listitem>
@@ -474,7 +476,7 @@
configuration file that is provided by the URL is used to replace
some of the service configurations.The code looks like this:</para>
- <programlisting>StandaloneContainer.addConfigurationURL(containerConf);</programlisting>
+ <programlisting language="java">StandaloneContainer.addConfigurationURL(containerConf);</programlisting>
<orderedlist>
<listitem>
@@ -554,7 +556,7 @@
<para>This JDBC implementation of BaseOrganizationService interface has
only one constructor:</para>
- <para><programlisting>public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService)</programlisting></para>
+ <programlisting language="java">public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService);</programlisting>
<para>You see this service depends on two other services. In order to be
able to call this constructor the container first needs a
@@ -685,7 +687,7 @@
create an interface. In this case the configuration looks like
this:</para>
- <programlisting><key>org.exoplatform.services.database.jdbc.DBSchemaCreator</key>
+ <programlisting language="xml"><key>org.exoplatform.services.database.jdbc.DBSchemaCreator</key>
<type>org.exoplatform.services.database.jdbc.DBSchemaCreator</type></programlisting>
<para>The key and type tags contain equally the qualified class
@@ -700,7 +702,7 @@
it is possible to resolve properties at runtime instead of providing a
value at packaging time.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
...
<init-params>
<value-param>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-in-detail.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-in-detail.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/service-configuration-in-detail.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -67,14 +67,14 @@
your service, so that you should define an <emphasis
role="bold">interface</emphasis> that defines your service.</para>
- <programlisting>package com.laverdad.services;
+ <programlisting language="java">package com.laverdad.services;
public interface ArticleStatsService {
public abstract int calcSentences(String article);
}</programlisting>
<para>A very simple implementation:</para>
- <programlisting>public class ArticleStatsServiceImpl implements ArticleStatsService {
+ <programlisting language="java">public class ArticleStatsServiceImpl implements ArticleStatsService {
public int calcSentences(String article) {
throw new RuntimeException("Not implemented");
}
@@ -99,7 +99,7 @@
of your service base folder. As you already know the container looks for
a "/conf/configuration.xml" file in each jar-file.</para>
- <programlisting><?xml version="1.0" encoding="UTF8"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF8"?>
<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"
@@ -136,7 +136,7 @@
For the exact method, you wish to configure more details for the
service. Let's enhance the word service configuration file:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>com.laverdad.services.ArticleStatsService</key>
<type>com.laverdad.services.ArticleStatsServiceImpl</type>
<init-params>
@@ -168,7 +168,7 @@
example. It's up to your imagination to implement the exact
method.</para>
- <programlisting>public class ArticleStatsServiceImpl implements ArticleStatsService {
+ <programlisting language="java">public class ArticleStatsServiceImpl implements ArticleStatsService {
private String calcMethod = "fast";
private String variant = "French";
@@ -250,7 +250,7 @@
<para>Recapitulation:</para>
- <programlisting>package com.laverdad.common;
+ <programlisting language="java">package com.laverdad.common;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
@@ -289,7 +289,7 @@
<para>There is an value-param example:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.exoplatform.portal.config.UserACL</key>
<type>org.exoplatform.portal.config.UserACL</type>
<init-params>
@@ -305,7 +305,7 @@
<para>The UserACL class accesses to the <emphasis
role="bold">value-param</emphasis> in its constructor.</para>
- <programlisting>package org.exoplatform.portal.config;
+ <programlisting language="java">package org.exoplatform.portal.config;
public class UserACL {
public UserACL(InitParams params) {
@@ -323,7 +323,7 @@
<para>Here you see the hibernate configuration example:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.database.HibernateService</key>
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
<init-params>
@@ -343,7 +343,7 @@
you will find that the name "hibernate.properties" of the
properties-param is used to access the properties.</para>
- <programlisting>package org.exoplatform.services.database.impl;
+ <programlisting language="java">package org.exoplatform.services.database.impl;
public class HibernateServiceImpl implements HibernateService, ComponentRequestLifecycle {
public HibernateServiceImpl(InitParams initParams, CacheService cacheService) {
@@ -358,7 +358,7 @@
<para>Let's have a look at the configuration of the LDAPService. It's
not important to know LDAP, we only discuss the parameters.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<key>org.exoplatform.services.ldap.LDAPService</key>
<type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
<init-params>
@@ -389,7 +389,7 @@
<para>Here you see how the service accesses the object:</para>
- <programlisting>package org.exoplatform.services.ldap.impl;
+ <programlisting language="java">package org.exoplatform.services.ldap.impl;
public class LDAPServiceImpl implements LDAPService {
...
@@ -405,7 +405,7 @@
bean and calls all setters whose values are configured in the
configuration file.</para>
- <programlisting>package org.exoplatform.services.ldap.impl;
+ <programlisting language="java">package org.exoplatform.services.ldap.impl;
public class LDAPConnectionConfig {
private String providerURL = "ldap://127.0.0.1:389";
@@ -452,7 +452,7 @@
<para>The second collection is a <emphasis
role="bold">HashSet</emphasis> that is a set of strings.</para>
- <programlisting> <component-plugin>
+ <programlisting language="xml"> <component-plugin>
<name>new.user.event.listener</name>
<set-method>addListenerPlugin</set-method>
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
@@ -489,7 +489,7 @@
<para>Let's look at the
org.exoplatform.services.organization.impl.NewUserConfig bean:</para>
- <programlisting>public class NewUserConfig {
+ <programlisting language="java">public class NewUserConfig {
private List role;
private List group;
private HashSet ignoredUser;
@@ -538,7 +538,7 @@
<para>Let's have a look at the configuration of the TaxonomyPlugin of the
CategoriesService:</para>
- <programlisting> <external-component-plugins>
+ <programlisting language="xml"> <external-component-plugins>
<target-component>org.exoplatform.services.cms.categories.CategoriesService</target-component>
<component-plugin>
<name>predefinedTaxonomyPlugin</name>
@@ -653,12 +653,14 @@
<para>If you open the
"portal/trunk/web/portal/src/main/webapp/WEB-INF/conf.configuration.xml"
- you will see that it consists only of imports: <programlisting><import>war:/conf/common/common-configuration.xml</import>
+ you will see that it consists only of imports:</para>
+
+ <programlisting language="xml"><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>
-... </programlisting></para>
+... </programlisting>
</section>
<section>
@@ -673,7 +675,7 @@
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.tmpl.xml
you find an example for system properties:</para>
- <programlisting> <component>
+ <programlisting language="xml"> <component>
<key>org.exoplatform.services.database.HibernateService</key>
<jmx-name>database:type=HibernateService</jmx-name>
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/services-wiring.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/services-wiring.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/services-wiring.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -57,7 +57,7 @@
implementation. Note that the key tag is not mandatory, but it improves
performance.</para>
- <programlisting><!-- Portlet container hooks -->
+ <programlisting language="xml"><!-- Portlet container hooks -->
<component>
<key>org.exoplatform.services.portletcontainer.persistence.PortletPreferencesPersister</key>
<type>org.exoplatform.services.portal.impl.PortletPreferencesPersisterImpl</type>
@@ -68,7 +68,7 @@
hibernate service to which we can add hbm mapping files even if those are
deployed in an other maven artifact.</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.database.HibernateService</target-component>
<component-plugin>
<name>add.hibernate.mapping</name>
@@ -96,7 +96,7 @@
code where a listener is added to the OrganisationService and will be
called each time a new user is created:</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
<component-plugin>
<name>portal.new.user.event.listener</name>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/understanding-listnerservice.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/understanding-listnerservice.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/understanding-listnerservice.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -53,7 +53,7 @@
<para>To register a listener, you need to call the addListener()
method.</para>
- <programlisting>/**
+ <programlisting language="java">/**
* This method is used to register a listener with the service. The method
* should: 1. Check to see if there is a list of listener with the listener
* name, create one if the listener list doesn't exit 2. Add the new listener
@@ -75,7 +75,7 @@
<para>To trigger an event, an application can call one of the
broadcast() methods of ListenerService.</para>
- <programlisting>/**
+ <programlisting language="java">/**
* This method is used to broadcast an event. This method should: 1. Check if
* there is a list of listener that listen to the event name. 2. If there is a
* list of listener, create the event object with the given name , source and
@@ -116,7 +116,7 @@
<para>Each listener is a class that extends
org.exoplatform.services.listener.Listener, as you can see below:</para>
- <programlisting>public abstract class Listener<S, D> extends BaseComponentPlugin {
+ <programlisting language="java">public abstract class Listener<S, D> extends BaseComponentPlugin {
/**
* This method should be invoked when an event with the same name is
@@ -137,7 +137,7 @@
given in the configuration file, for more details see the next
section.</para>
- <programlisting>public interface ComponentPlugin {
+ <programlisting language="java">public interface ComponentPlugin {
public String getName();
public void setName(String name);
@@ -155,7 +155,7 @@
<para>All listeners are in fact a ComponentPlugin so it must be configured
as below:</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
...
<external-component-plugins>
@@ -183,7 +183,7 @@
application. For example, when a new user signs in, the following code is
called:</para>
- <programlisting>listenerService.broadcast("exo.core.security.ConversationRegistry.register", this, state);</programlisting>
+ <programlisting language="java">listenerService.broadcast("exo.core.security.ConversationRegistry.register", this, state);</programlisting>
<para>This code will in fact create a new Event which name is
"exo.core.security.ConversationRegistry.register", which source is the
@@ -196,7 +196,7 @@
<para>In the example below, we define a Listener that will listen the
event "exo.core.security.ConversationRegistry.register".</para>
- <programlisting><?xml version="1.0" encoding="ISO-8859-1"?>
+ <programlisting language="xml"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
...
<external-component-plugins>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/framework-for-cross-domain-ajax.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/framework-for-cross-domain-ajax.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/framework-for-cross-domain-ajax.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -92,12 +92,12 @@
<para>3). Declare xda.js in the main page.</para>
- <programlisting><script type="text/javascript" src="xda.js"></script></programlisting>
+ <programlisting language="html"><script type="text/javascript" src="xda.js"></script></programlisting>
<para>4). Create JS function which performs cross domain call as in the
following example:</para>
- <programlisting><script type="text/javascript">
+ <programlisting language="javascript"><script type="text/javascript">
function test(){
var facade = xdaInit();
facade.clientURI = "http://localhost/cross-domain-ajax/client/client.html";
@@ -115,6 +115,6 @@
<para>5). Use this function (here it is bound to a button's onclick
event).</para>
- <programlisting><button onclick='test()'>test cross-domain</button></programlisting>
+ <programlisting language="html"><button onclick='test()'>test cross-domain</button></programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -54,7 +54,7 @@
org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoaderPlugin.
This is simple configuration example.</para>
- <programlisting><external-component-plugins>
+ <programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</target-component>
<component-plugin>
<name>test</name>
@@ -124,7 +124,7 @@
source code. It has possibility inject component from Container in Groovy
Class constructor. Configuration example:</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.script.groovy.GroovyScriptInstantiator</type>
</component></programlisting>
</section>
@@ -140,7 +140,7 @@
<para>Example of configuration.</para>
- <programlisting><component>
+ <programlisting language="xml"><component>
<type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
<init-params>
<object-param>
@@ -248,7 +248,7 @@
Then, configure GroovyScript2RestLoaderPlugin as described in section Load
script at startup time.</para>
- <programlisting>import javax.jcr.Node
+ <programlisting language="java">import javax.jcr.Node
import javax.jcr.Session
import javax.ws.rs.GET
import javax.ws.rs.Path
@@ -308,7 +308,7 @@
Open script from local source code /home/andrew/JcrGroovyTest.groovy, add
following code and save file.</para>
- <programlisting>@POST
+ <programlisting language="java">@POST
@Path("{path:.*}")
public void addReferenceableMixin(@PathParam("repository") String repository,
@PathParam("workspace") String workspace,
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/overwrite-default-providers.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/overwrite-default-providers.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/overwrite-default-providers.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -176,7 +176,7 @@
<para>Create subclass of javax.ws.rs.core.Application with code as bellow
and add it to the eXo Container configuration.</para>
- <programlisting>package org.exoplatform.test.jackson;
+ <programlisting language="java">package org.exoplatform.test.jackson;
import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/restservicelist-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/restservicelist-service.xml 2011-06-01 07:56:47 UTC (rev 4469)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws/restservicelist-service.xml 2011-06-01 12:12:35 UTC (rev 4470)
@@ -45,7 +45,7 @@
<para>To get the list of services in HTML format use listHTML()
method:</para>
- <programlisting>@GET
+ <programlisting language="java">@GET
@Produces({MediaType.TEXT_HTML})
public byte[] listHTML()
{
@@ -58,7 +58,7 @@
<para>f.e. curl -u root:exo http://localhost:8080/rest/ will return such
HTML code:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+ <programlisting language="xml"><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>eXo JAXRS Implementation</title>
@@ -168,7 +168,7 @@
<para>To get the list of services in HTML format use listJSON()
method:</para>
- <programlisting>@GET
+ <programlisting language="java">@GET
@Produces({MediaType.APPLICATION_JSON})
public RootResourcesList listJSON()
{
12 years, 11 months
exo-jcr SVN: r4469 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2011-06-01 03:56:47 -0400 (Wed, 01 Jun 2011)
New Revision: 4469
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java
Log:
EXOJCR-1103: empty pattern support added
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java 2011-06-01 07:25:19 UTC (rev 4468)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java 2011-06-01 07:56:47 UTC (rev 4469)
@@ -245,6 +245,12 @@
IllegalStateException
{
checkIfOpened();
+
+ if (pattern.isEmpty())
+ {
+ return new ArrayList<NodeData>();
+ }
+
ResultSet resultSet = null;
try
{
12 years, 11 months
exo-jcr SVN: r4468 - in jcr/trunk/exo.jcr.component.webdav/src: test/java/org/exoplatform/services/jcr/webdav/command and 1 other directory.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2011-06-01 03:25:19 -0400 (Wed, 01 Jun 2011)
New Revision: 4468
Modified:
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestCopy.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestLock.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMkCol.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMove.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
Log:
EXOJCR-1358: fixed MOVE, MKCOL, COPY and some other methods responses statuses when trying to access non-existing workspaces
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -528,14 +528,13 @@
}
else
{
- Session session = session(repoName, workspaceName(repoPath), null);
+ Session session = session(repoName, srcWorkspace, null);
if (session.getRootNode().hasNode(TextUtil.relativizePath(repoPath)))
{
return Response.status(HTTPStatus.PRECON_FAILED)
.entity("Item exists on destination path, while overwriting is forbidden").build();
}
-
}
if (depth.getStringValue().equalsIgnoreCase("infinity"))
@@ -545,14 +544,12 @@
{
Session session = session(repoName, destWorkspace, lockTokens);
return new CopyCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).copy(
- session,
- srcNodePath, destNodePath);
+ session, srcNodePath, destNodePath);
}
Session destSession = session(repoName, destWorkspace, lockTokens);
return new CopyCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).copy(
- destSession,
- srcWorkspace, srcNodePath, destNodePath);
+ destSession, srcWorkspace, srcNodePath, destNodePath);
}
else if (depth.getIntValue() == 0)
@@ -577,6 +574,11 @@
{
return Response.status(HTTPStatus.BAD_REQUEST).entity(exc.getMessage()).build();
}
+ catch (NoSuchWorkspaceException e)
+ {
+ log.error("NoSuchWorkspaceException " + e.getMessage(), e);
+ return Response.status(HTTPStatus.CONFLICT).entity(e.getMessage()).build();
+ }
catch (Exception exc)
{
log.error(exc.getMessage(), exc);
@@ -774,7 +776,7 @@
catch (NoSuchWorkspaceException exc)
{
log.error("NoSuchWorkspaceException " + exc.getMessage(), exc);
- return Response.status(HTTPStatus.NOT_FOUND).entity(exc.getMessage()).build();
+ return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();
}
catch (Exception exc)
@@ -864,7 +866,7 @@
catch (NoSuchWorkspaceException exc)
{
log.error("NoSuchWorkspaceException " + exc.getMessage(), exc);
- return Response.status(HTTPStatus.NOT_FOUND).entity(exc.getMessage()).build();
+ return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();
}
catch (Exception exc)
{
@@ -886,7 +888,7 @@
{
// to trace if an item on destination path exists
boolean itemExisted = false;
-
+
if (log.isDebugEnabled())
{
log.debug("MOVE " + repoName + "/" + repoPath);
@@ -915,7 +917,7 @@
{
return Response.status(HTTPStatus.BAD_GATEWAY).entity("Bad Gateway").build();
}
-
+
destPath = normalizePath(repoIndex == -1 ? destPath : destPath.substring(repoIndex + repoName.length() + 1));
String destWorkspace = workspaceName(destPath);
@@ -937,10 +939,9 @@
}
else
{
- Session session = session(repoName, workspaceName(repoPath), null);
+ Session session = session(repoName, srcWorkspace, null);
String uri =
- uriInfo.getBaseUriBuilder().path(getClass()).path(repoName).path(workspaceName(repoPath)).build()
- .toString();
+ uriInfo.getBaseUriBuilder().path(getClass()).path(repoName).path(srcWorkspace).build().toString();
Response prpfind = new PropFindCommand().propfind(session, destNodePath, body, depth.getIntValue(), uri);
if (prpfind.getStatus() != HTTPStatus.NOT_FOUND)
{
@@ -954,14 +955,14 @@
if (srcWorkspace.equals(destWorkspace))
{
Session session = session(repoName, srcWorkspace, lockTokens);
- return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(session,
- srcNodePath, destNodePath);
+ return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(
+ session, srcNodePath, destNodePath);
}
Session srcSession = session(repoName, srcWorkspace, lockTokens);
Session destSession = session(repoName, destWorkspace, lockTokens);
- return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(srcSession,
- destSession, srcNodePath, destNodePath);
+ return new MoveCommand(uriInfo.getBaseUriBuilder().path(getClass()).path(repoName), itemExisted).move(
+ srcSession, destSession, srcNodePath, destNodePath);
}
else
{
@@ -969,6 +970,11 @@
}
}
+ catch (NoSuchWorkspaceException e)
+ {
+ log.error("NoSuchWorkspaceException " + e.getMessage(), e);
+ return Response.status(HTTPStatus.CONFLICT).entity(e.getMessage()).build();
+ }
catch (Exception exc)
{
log.error(exc.getMessage(), exc);
@@ -1058,7 +1064,7 @@
}
catch (NoSuchWorkspaceException exc)
{
- return Response.status(HTTPStatus.NOT_FOUND).entity(exc.getMessage()).build();
+ return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();
}
catch (PreconditionException exc)
{
@@ -1176,7 +1182,7 @@
catch (NoSuchWorkspaceException exc)
{
log.error("NoSuchWorkspaceException " + exc.getMessage(), exc);
- return Response.status(HTTPStatus.NOT_FOUND).entity(exc.getMessage()).build();
+ return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();
}
catch (NoSuchNodeTypeException exc)
@@ -1373,7 +1379,8 @@
* @return current session
* @throws Exception {@link Exception}
*/
- protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception
+ protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception,
+ NoSuchWorkspaceException
{
ManageableRepository repo = this.repositoryService.getRepository(repoName);
SessionProvider sp = sessionProviderService.getSessionProvider(null);
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestCopy.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestCopy.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestCopy.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -349,6 +349,66 @@
assertEquals(content, getContentBase);
}
+ /**
+ * Here we're testing the case when we are trying to copy a resource C to a path /A/B/C
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html#rfc.section.9.8.5>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testCopyResourceToNonExistingWorkspace() throws Exception
+ {
+ String folderName = "new folder";
+ session.getRootNode().addNode(folderName, "nt:folder");
+ session.save();
+
+ String content = TestUtils.getFileContent();
+ String filename = TestUtils.getFileName();
+ InputStream inputStream = new ByteArrayInputStream(content.getBytes());
+ TestUtils.addContent(session, filename, inputStream, defaultFileNodeType, "");
+ String destFilename = TextUtil.unescape("/" + folderName + TestUtils.getFileName(), '%');
+
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ // add destination header with incorrect data
+ headers.add(ExtHttpHeaders.DESTINATION, WORKSPACE + "_" + destFilename);
+
+ ContainerResponse response = service(WebDAVMethods.COPY, getPathWS() + filename, host, headers, null);
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+
+ // add overwrite header to check the behavior
+ headers.add(ExtHttpHeaders.OVERWRITE, "T");
+ response = service(WebDAVMethods.COPY, getPathWS() + filename, host, headers, null);
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+
+ // clean up
+ session.getRootNode().getNode(folderName).remove();
+ }
+
+ /**
+ * Here we're testing the case when we are trying to copy a collection B to a path /A/B
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html#rfc.section.9.8.5>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testCopyCollectionToNonExistingWorkspace() throws Exception
+ {
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ // add destination header with incorrect data
+ headers.add(ExtHttpHeaders.DESTINATION, WORKSPACE + "_" + "/" + "test");
+
+ ContainerResponse response =
+ service(WebDAVMethods.COPY, getPathWS() + TestUtils.getFolderName(), host, headers, null);
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+
+ // add overwrite header to check the behavior
+ headers.add(ExtHttpHeaders.OVERWRITE, "T");
+ response = service(WebDAVMethods.COPY, getPathWS() + TestUtils.getFolderName(), host, headers, null);
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestLock.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestLock.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestLock.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -191,6 +191,20 @@
((Node)session.getItem(path)).unlock();
}
+ /**
+ * Here we're testing the case when we are trying to lock a resource C at a path /A/B/C
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testLockForNonExistingWorkspace() throws Exception
+ {
+ ContainerResponse response =
+ service(WebDAVMethods.LOCK, getPathWS() + "_" + path, "", null, lockRequestBody.getBytes());
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMkCol.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMkCol.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMkCol.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -81,10 +81,17 @@
}
- @Override
- protected String getRepositoryName()
+ /**
+ * Here we're testing the case when we are trying to create a collection B at a path /A/B
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html#rfc.section.9.3.1>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testMkColInNonExistingWorkspace() throws Exception
{
- return null;
+ String folder = TestUtils.getFolderName();
+ ContainerResponse response = service(WebDAVMethods.MKCOL, getPathWS() + "_" + folder, "", null, null);
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
}
public void testConflict() throws Exception
@@ -94,4 +101,9 @@
assertEquals(HTTPStatus.CONFLICT, response.getStatus());
}
+ @Override
+ protected String getRepositoryName()
+ {
+ return null;
+ }
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMove.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMove.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestMove.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -304,6 +304,25 @@
assertFalse(session.getRootNode().hasNode(TextUtil.relativizePath(filename)));
}
+ /**
+ * Here we're testing the case when we are trying to move a resource C to a path /A/B/C
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html#rfc.section.9.3.1>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testMoveToNonCollectionToNonExistingWorkspace() throws Exception
+ {
+ String filename = TestUtils.getFileName();
+ String destFilename = TestUtils.getFileName();
+
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(ExtHttpHeaders.DESTINATION, host + getPathWS() + destFilename);
+
+ ContainerResponse response = service(WebDAVMethods.MOVE, getPathWS() + "_" + filename, host, headers, null);
+
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -469,6 +469,21 @@
}
+ /**
+ * Here we're testing the case when we are trying to get some resource C property to a path /A/B/C
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testPropFindForNonExistingWorkspace() throws Exception
+ {
+ String file = TestUtils.getFileName();
+
+ ContainerResponse response =
+ service(WebDAVMethods.PROPFIND, getPathWS() + "_" + file, "", null, null);
+ assertEquals(HTTPStatus.CONFLICT, response.getStatus());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2011-06-01 06:42:07 UTC (rev 4467)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2011-06-01 07:25:19 UTC (rev 4468)
@@ -62,6 +62,22 @@
}
+ /**
+ * Here we're testing the case when we are trying to put some resource C to a path /A/B/C
+ * and a A collection does not exist. According to the <a href=http://www.webdav.org/specs/rfc4918.html>
+ * RFC 4918</a> section we are to receive 409(conflict) HTTP status.
+ * @throws Exception
+ */
+ public void testPutToNonExistingWorkspace() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+ ContainerResponse containerResponse =
+ service(WebDAVMethods.PUT, getPathWS() + "_" + path, "", null, content.getBytes());
+ assertEquals(HTTPStatus.CONFLICT, containerResponse.getStatus());
+
+ }
+
public void testPutFileContentTypeHeader() throws Exception
{
String content = TestUtils.getFileContent();
12 years, 11 months
exo-jcr SVN: r4467 - core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2011-06-01 02:42:07 -0400 (Wed, 01 Jun 2011)
New Revision: 4467
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-1366 : Changes from patch COR-237.patch was reverted.
Modified: core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2011-06-01 05:39:20 UTC (rev 4466)
+++ core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2011-06-01 06:42:07 UTC (rev 4467)
@@ -86,17 +86,6 @@
// TODO move it in configuration ?
env.put("com.sun.jndi.ldap.connect.timeout", "60000");
- if (config.getMinConnection() > 0)
- {
- env.put("com.sun.jndi.ldap.connect.pool.initsize", Integer.toString(config.getMinConnection()));
- env.put("com.sun.jndi.ldap.connect.pool.prefsize", Integer.toString(config.getMinConnection()));
- }
-
- if (config.getMaxConnection() > 0)
- {
- env.put("com.sun.jndi.ldap.connect.pool.maxsize", Integer.toString(config.getMaxConnection()));
- }
-
env.put("com.sun.jndi.ldap.connect.pool", "true");
env.put("java.naming.ldap.version", config.getVerion());
env.put("java.naming.ldap.attributes.binary", "tokenGroups");
12 years, 11 months
exo-jcr SVN: r4466 - core/branches/2.3.x/patch/2.3.10/COR-34.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-06-01 01:39:20 -0400 (Wed, 01 Jun 2011)
New Revision: 4466
Modified:
core/branches/2.3.x/patch/2.3.10/COR-34/COR-34.patch
Log:
COR-34: patch updated
Modified: core/branches/2.3.x/patch/2.3.10/COR-34/COR-34.patch
===================================================================
--- core/branches/2.3.x/patch/2.3.10/COR-34/COR-34.patch 2011-05-31 14:59:54 UTC (rev 4465)
+++ core/branches/2.3.x/patch/2.3.10/COR-34/COR-34.patch 2011-06-01 05:39:20 UTC (rev 4466)
@@ -1,3 +1,190 @@
+Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/CacheHandler.java
+===================================================================
+--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/CacheHandler.java (revision 0)
++++ exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/CacheHandler.java (revision 0)
+@@ -0,0 +1,182 @@
++/*
++ * Copyright (C) 2011 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.organization.ldap;
++
++import org.exoplatform.services.cache.CacheService;
++import org.exoplatform.services.cache.ExoCache;
++import org.exoplatform.services.organization.Group;
++import org.exoplatform.services.organization.Membership;
++import org.exoplatform.services.organization.MembershipType;
++import org.exoplatform.services.organization.User;
++
++import java.io.Serializable;
++
++/**
++ * @author <a href="abazko(a)exoplatform.com">Anatoliy Bazko</a>
++ * @version $Id: CacheHandler.java 34360 2009-07-22 23:58:59Z tolusha $
++ */
++public class CacheHandler
++{
++ public static final String MEMBERSHIPTYPE_PREFIX = "mt=";
++
++ public static final String GROUP_PREFIX = "g=";
++
++ public static final String USER_PREFIX = "u=";
++
++ /**
++ * The cache service.
++ */
++ private final CacheService cservice;
++
++ /**
++ * Cache for Users.
++ */
++ private final ExoCache<Serializable, User> userCache;
++
++ /**
++ * Cache for MembershipTypes.
++ */
++ private final ExoCache<Serializable, MembershipType> membershipTypeCache;
++
++ /**
++ * Cache for Memberships.
++ */
++ private final ExoCache<Serializable, Membership> membershipCache;
++
++ /**
++ * Cache for Groups.
++ */
++ private final ExoCache<Serializable, Group> groupCache;
++
++ /**
++ * Constructor CacheHandler.
++ *
++ * @param cservice
++ * The cache handler
++ */
++ public CacheHandler(CacheService cservice)
++ {
++ this.cservice = cservice;
++ this.userCache = cservice.getCacheInstance(this.getClass().getName() + "userCache");
++ this.membershipTypeCache = cservice.getCacheInstance(this.getClass().getName() + "membershipTypeCache");
++ this.groupCache = cservice.getCacheInstance(this.getClass().getName() + "groupCache");
++ this.membershipCache = cservice.getCacheInstance(this.getClass().getName() + "membershipCache");
++ }
++
++ public void put(Serializable key, Object value, CacheType cacheType)
++ {
++ if (cacheType == CacheType.USER)
++ {
++ userCache.put(key, (User)value);
++ }
++ else if (cacheType == CacheType.GROUP)
++ {
++ groupCache.put(key, (Group)value);
++ }
++ else if (cacheType == CacheType.MEMBERSHIP)
++ {
++ membershipCache.put(key, (Membership)value);
++ }
++ else if (cacheType == CacheType.MEMBERSHIPTYPE)
++ {
++ membershipTypeCache.put(key, (MembershipType)value);
++ }
++ }
++
++ public Object get(Serializable key, CacheType cacheType)
++ {
++ if (cacheType == CacheType.USER)
++ {
++ return userCache.get(key);
++ }
++ else if (cacheType == CacheType.GROUP)
++ {
++ return groupCache.get(key);
++ }
++ else if (cacheType == CacheType.MEMBERSHIP)
++ {
++ return membershipCache.get(key);
++ }
++ else if (cacheType == CacheType.MEMBERSHIPTYPE)
++ {
++ return membershipTypeCache.get(key);
++ }
++
++ return null;
++ }
++
++ public void remove(Serializable key, CacheType cacheType)
++ {
++ if (cacheType == CacheType.USER)
++ {
++ userCache.remove(key);
++ }
++ else if (cacheType == CacheType.GROUP)
++ {
++ groupCache.remove(key);
++ }
++ else if (cacheType == CacheType.MEMBERSHIP)
++ {
++ try
++ {
++ String tKey = ((String)key).toUpperCase();
++ for (Membership m : membershipCache.getCachedObjects())
++ {
++ String mkey = getMembershipKey(m);
++ if (mkey.toUpperCase().indexOf(tKey) >= 0)
++ {
++ membershipCache.remove(mkey);
++ }
++ }
++ }
++ catch (Exception e)
++ {
++ }
++ }
++ else if (cacheType == CacheType.MEMBERSHIPTYPE)
++ {
++ membershipTypeCache.remove(key);
++ }
++ }
++
++ public String getMembershipKey(Membership m)
++ {
++ StringBuilder key = new StringBuilder();
++ key.append(GROUP_PREFIX + m.getGroupId());
++ key.append(MEMBERSHIPTYPE_PREFIX + m.getMembershipType());
++ key.append(USER_PREFIX + m.getUserName());
++
++ return key.toString();
++ }
++
++ public String getMembershipKey(String username, String groupId, String type)
++ {
++ StringBuilder key = new StringBuilder();
++ key.append(GROUP_PREFIX + groupId);
++ key.append(MEMBERSHIPTYPE_PREFIX + type);
++ key.append(USER_PREFIX + username);
++
++ return key.toString();
++ }
++
++ static enum CacheType
++ {
++ USER, GROUP, MEMBERSHIP, MEMBERSHIPTYPE
++ }
++}
Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/MembershipDAOImpl.java
===================================================================
--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/MembershipDAOImpl.java (revision 4450)
@@ -469,28 +656,6 @@
Attributes attrs = sr.getAttributes();
Attribute attr = attrs.get("tokenGroups");
for (int x = 0; x < attr.size(); x++)
-Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java
-===================================================================
---- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java (revision 4450)
-+++ exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java (working copy)
-@@ -48,12 +48,14 @@
- * items
- * @param ldapService {@link LDAPService}
- * @param ad See {@link ADSearchBySID}
-+ * @param cacheHandler
-+ * The Cache Handler
- * @throws Exception if any errors occurs
- */
-- public ADGroupDAOImpl(LDAPAttributeMapping ldapAttrMapping, LDAPService ldapService, ADSearchBySID ad)
-- throws Exception
-+ public ADGroupDAOImpl(LDAPAttributeMapping ldapAttrMapping, LDAPService ldapService, ADSearchBySID ad,
-+ CacheHandler cacheHandler) throws Exception
- {
-- super(ldapAttrMapping, ldapService);
-+ super(ldapAttrMapping, ldapService, cacheHandler);
- adSearch = ad;
- }
-
Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/OrganizationServiceImpl.java
===================================================================
--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/OrganizationServiceImpl.java (revision 4450)
@@ -530,6 +695,28 @@
ValueParam param = params.getValueParam("ldap.userDN.key");
if (param != null)
+Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java
+===================================================================
+--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java (revision 4450)
++++ exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/ADGroupDAOImpl.java (working copy)
+@@ -48,12 +48,14 @@
+ * items
+ * @param ldapService {@link LDAPService}
+ * @param ad See {@link ADSearchBySID}
++ * @param cacheHandler
++ * The Cache Handler
+ * @throws Exception if any errors occurs
+ */
+- public ADGroupDAOImpl(LDAPAttributeMapping ldapAttrMapping, LDAPService ldapService, ADSearchBySID ad)
+- throws Exception
++ public ADGroupDAOImpl(LDAPAttributeMapping ldapAttrMapping, LDAPService ldapService, ADSearchBySID ad,
++ CacheHandler cacheHandler) throws Exception
+ {
+- super(ldapAttrMapping, ldapService);
++ super(ldapAttrMapping, ldapService, cacheHandler);
+ adSearch = ad;
+ }
+
Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java
===================================================================
--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java (revision 4450)
12 years, 11 months