=
@@ -203,7 +207,9 @@
When running JCR in standalone usually standalone indexing is =
used
also. Such parameters as "changesfilter-class", "jgroups-configurati=
on"
and all the "jbosscache-*" must be skipped and not defined. Like the
- configuration below.<workspace name=3D"ws">
+ configuration below.
+ =
+ <workspace name=3D"ws">
<query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
<properties>
<property name=3D"index-dir" value=3D"shareddir/index/db1/ws" =
/>
@@ -213,7 +219,7 @@
<property name=3D"index-recovery-mode" value=3D"from-coordinat=
or" />
</properties>
</query-handler>
-</workspace>
+</workspace> =
=
@@ -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.JBossCacheI=
ndexChangesFilter"
- will enable shared index implementation.<workspac=
e name=3D"ws">
+ will enable shared index implementation.
+ =
+ <workspace name=3D"ws">
<query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
<properties>
<property name=3D"index-dir" value=3D"/mnt/nfs_drive/index/db1=
/ws" />
@@ -241,14 +249,16 @@
<property name=3D"index-recovery-mode" value=3D"from-coordinat=
or" />
</properties>
</query-handler>
-</workspace> In order to use cluster-ready strategy
+</workspace>
+
+ 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.LocalIndexC=
hangesFilter".
=
- <workspace name=3D"ws">
+ <workspace name=3D"ws">
<query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
<properties>
<property name=3D"index-dir" value=3D"/mnt/nfs_drive/index/db1=
/ws" />
@@ -264,7 +274,8 @@
<property name=3D"index-recovery-mode" value=3D"from-coordinat=
or" />
</properties>
</query-handler>
-</workspace>
+</workspace>
+
=
@@ -273,7 +284,9 @@
JBoss-Cache template configuration for query handler is about =
the
same for both clustered strategies.
=
- jbosscache-indexer.xml<?xml version=3D"1.0"=
encoding=3D"UTF-8"?>
+ jbosscache-indexer.xml
+ =
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml=
ns=3D"urn:jboss:jbosscache-core:config:3.1">
=
<locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPa=
rentForChildInsertRemove=3D"false"
@@ -294,7 +307,7 @@
</default>
</eviction>
=
-</jbosscache>
+</jbosscache>
=
See more about template configurations here.
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/repository-creation-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 4=
469)
+++ 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 4=
470)
@@ -80,7 +80,7 @@
=
RepositoryCreationService configuration
=
- <component>
+ <component>
<key>org.exoplatform.services.jcr.ext.backup.BackupManager</ke=
y>
<type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerI=
mpl</type>
<init-params>
@@ -146,7 +146,7 @@
Repsitory Interface
=
- public interface RepositoryCreationService
+ public interface RepositoryCreationS=
ervice
{
/**
* 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -18,7 +18,7 @@
=
So, change indexing-configuration.xml:
=
- <?xml version=3D"1.0"?>
+ <?xml version=3D"1.0"?>
<!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing=
-configuration-1.2.dtd">
<configuration xmlns:jcr=3D"http://www.jcp.org/jcr/1.0"
xmlns:nt=3D"http://www.jcp.org/jcr/nt/1.0">
@@ -86,7 +86,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:file WHERE CONTAINS(*,'cats')";
@@ -96,7 +96,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:file)[jcr:contains(.,'cats')]";
@@ -110,7 +110,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -121,7 +121,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE jcr:description =3D=
'fairytale' AND prop_pagecount > 90";
@@ -60,7 +60,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[@jcr:description=3D'fair=
ytale' and @prop_pagecount > 90]";
@@ -74,7 +74,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -85,7 +85,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (r=
ev 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 (r=
ev 4470)
@@ -62,7 +62,7 @@
"/". This way child nodes are included but descendant nodes are
excluded.
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:folder WHERE jcr:path LIKE '/fol=
der1/folder2/%' AND NOT jcr:path LIKE '/folder1/folder2/%/%'";
@@ -72,7 +72,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "/jcr:root/folder1[1]/folder2[1]/element(*,nt:fo=
lder)";
@@ -86,7 +86,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -97,7 +97,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
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).
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
StringBuffer sb =3D new StringBuffer();
@@ -96,7 +96,7 @@
brackets: xs:dateTime('datetime'). The actual format of the datetime a=
lso
conforms with the ISO date standard.
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
StringBuffer sb =3D new StringBuffer();
@@ -117,7 +117,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -128,7 +128,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE jcr:title LIKE 'P#%=
ri%' ESCAPE '#'";
@@ -66,7 +66,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[jcr:like(@jcr:title, 'P\=
\%ri%')]";
@@ -80,7 +80,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -91,7 +91,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (r=
ev 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 (r=
ev 4470)
@@ -54,7 +54,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// we want find 'document1'
String sqlStatement =3D "SELECT * FROM nt:file WHERE jcr:path =3D '/folder=
1/folder2/document1'";
@@ -65,7 +65,7 @@
=
XPath
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// we want to find 'document1'
String xpathStatement =3D "/jcr:root/folder1[1]/folder2[1]/element(documen=
t1,nt:file)[1]";
@@ -84,7 +84,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -95,7 +95,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 UT=
C (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 UT=
C (rev 4470)
@@ -56,7 +56,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:folder WHERE jcr:path LIKE '/fol=
der1/folder2/%'";
@@ -66,7 +66,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "/jcr:root/folder1[1]/folder2[1]//element(*,nt:f=
older)";
@@ -80,7 +80,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -92,7 +92,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:base";
@@ -61,7 +61,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:base)";
@@ -75,7 +75,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -88,7 +88,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title";
@@ -52,7 +52,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)";
@@ -66,7 +66,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -77,7 +77,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 U=
TC (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 U=
TC (rev 4470)
@@ -41,7 +41,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:file";
@@ -51,7 +51,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:file)";
@@ -65,7 +65,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -76,7 +76,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE UPPER(jcr:title) =
=3D 'CASESENSITIVE'";
@@ -55,7 +55,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[fn:upper-case(@jcr:title=
)=3D'CASESENSITIVE']";
@@ -71,7 +71,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE LOWER(jcr:title) =
=3D 'casesensitive'";
@@ -81,7 +81,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[fn:lower-case(@jcr:title=
)=3D'casesensitive']";
@@ -95,7 +95,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -107,7 +107,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
Higlighting support must be added to configuration.
test-jcr-config.xml:
=
- <query-handler class=3D"org.exoplatform.services.jcr.=
impl.core.query.lucene.SearchIndex">
+ <query-handler class=3D"org.exoplat=
form.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name=3D"support-highlighting" value=3D"true" />
@@ -101,7 +101,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:resource WHERE SIMILAR(.,'/baseF=
ile/jcr:content')";
@@ -111,7 +111,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*, nt:resource)[rep:similar(., '/test=
root/baseFile/jcr:content')]";
@@ -125,7 +125,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -140,7 +140,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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] }
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
String sqlStatement =3D "SELECT * FROM mix:title WHERE CONTAINS(jcr:descri=
ption, '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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
String sqlStatement =3D "SELECT * FROM mix:title WHERE CONTAINS(*,'break')=
";
// create query
@@ -54,7 +54,7 @@
=
XPath
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// we want find 'document1'
String xpathStatement =3D "//element(*,mix:title)[jcr:contains(.,'break')]=
";
@@ -69,7 +69,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
while(it.hasNext())
{
@@ -80,7 +80,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// we want find document which contains "forest" word
String sqlStatement =3D "SELECT \* FROM mix:title WHERE CONTAINS(jcr:descr=
iption, 'forest')";
@@ -59,7 +59,7 @@
=
XPath
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// we want find document which contains "forest" word
String xpathStatement =3D "//element(*,mix:title)[jcr:contains(@jcr:descri=
ption, 'forest')]";
@@ -74,7 +74,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -85,7 +85,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
High-lighting is not default feature so we must set it in
jcr-config.xml, also excerpt provider must be defined:
=
- <query-handler class=3D"org.exoplatform.services.jc=
r.impl.core.query.lucene.SearchIndex">
+ <query-handler class=3D"org.exopla=
tform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name=3D"support-highlighting" value=3D"true" />
@@ -36,7 +36,7 @@
property as highlightable. Indexing-configuration.xml must containt the
next rule:
=
- <index-rule nodeType=3D"nt:unstructured" condition=
=3D"@rule=3D'excerpt'">
+ <index-rule nodeType=3D"nt:unstruc=
tured" condition=3D"@rule=3D'excerpt'">
<property useInExcerpt=3D"false">title</property>
<property>text</property>
</index-rule>
@@ -73,7 +73,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT rep:excerpt() FROM nt:unstructured WHERE C=
ONTAINS(*, 'eXo implementation')";
@@ -83,7 +83,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:unstructured)[jcr:contains(., 'e=
Xo implementation')]/rep:excerpt(.)";
@@ -97,7 +97,7 @@
=
Now let's see on the result table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D result.getRows();
while (rit.hasNext())
{
@@ -140,7 +140,7 @@
=
Also, we can get exactly "rep:excerpt" value:
=
- RowIterator rows =3D result.getRows();
+ RowIterator rows =3D result.getRows(=
);
Value excerpt =3D rows.nextRow().getValue("rep:excerpt(.)");
// excerpt will be equal to "<div><span\><strong>eXo<=
/strong> is a JCR <strong>implementation</strong></span&g=
t;</div>"
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/searching/ignore-accent-symbols.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (r=
ev 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 (r=
ev 4470)
@@ -40,7 +40,7 @@
=
- public class MyAnalyzer extends Analyzer
+ public class MyAnalyzer extends Analyz=
er
{
@Override
public TokenStream tokenStream(String fieldName, Reader reader)
@@ -64,7 +64,7 @@
=
- <workspace name=3D"ws">
+ <workspace name=3D"ws">
...
<query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
<properties>
@@ -109,7 +109,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE CONTAINS(jcr:title,=
'tr\u00E8ma na\u00EFve')";
@@ -119,7 +119,7 @@
=
XPath
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[jcr:contains(@jcr:title,=
'tr\u00E8ma na\u00EFve')]";
@@ -133,7 +133,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -146,7 +146,7 @@
=
Also, we can get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 4=
469)
+++ 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 4=
470)
@@ -25,7 +25,7 @@
=
indexing-config.xml:
=
- <!-- =
+ <!-- =
This rule actualy do nothing. 'text' property has default boost value.
-->
<index-rule nodeType=3D"nt:unstructured" condition=3D"@rule=3D'boost1'"=
>
@@ -86,7 +86,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:unstructured WHERE CONTAINS(text=
, 'quick') ORDER BY jcr:score() DESC";
@@ -96,7 +96,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:unstructured)[jcr:contains(@text=
, 'quick')] order by @jcr:score descending";
@@ -110,7 +110,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // get QueryManager
+ // get QueryManager
QueryManager queryManager =3D workspace.getQueryManager();=C2=A0
// make SQL query
Query query =3D queryManager.createQuery("SELECT * FROM nt:base ", Query.S=
QL);
@@ -32,7 +32,7 @@
=
XPath
=
- // get QueryManager
+ // get QueryManager
QueryManager queryManager =3D workspace.getQueryManager(); =
// make XPath query
Query query =3D queryManager.createQuery("//element(*,nt:base)", Query.XPA=
TH);
@@ -43,16 +43,16 @@
Query Result Processing
=
- // fetch query result
+ // fetch query result
QueryResult result =3D query.execute();
=
Now we can get result in an iterator of nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNode=
s();
=
or we get the result in a table:
=
- // get column names
+ // get column names
String[] columnNames =3D result.getColumnNames();
// get column rows
RowIterator rowIterator =3D result.getRows();
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/searching/like-constraint.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 446=
9)
+++ 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 447=
0)
@@ -47,7 +47,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE jcr:title LIKE 'P%'=
";
@@ -57,7 +57,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[jcr:like(@jcr:title, 'P%=
')]";
@@ -71,7 +71,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -82,7 +82,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:unstructured WHERE multiprop =3D=
'one' AND multiprop =3D 'two'";
@@ -50,7 +50,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:unstructured)[@multiprop =3D 'on=
e' and @multiprop =3D 'two']";
@@ -64,7 +64,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -75,7 +75,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (re=
v 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 (re=
v 4470)
@@ -43,7 +43,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:file WHERE fn:name() =3D 'docume=
nt'";
@@ -53,7 +53,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:file)[fn:name() =3D 'document']";
@@ -67,7 +67,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -79,7 +79,7 @@
=
Also we can get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -10,7 +10,7 @@
=
First of all, add rules to indexing-configuration.xml:
=
- <index-rule nodeType=3D"nt:unstructured" condition=3D=
"@rule=3D'nsiTrue'">
+ <index-rule nodeType=3D"nt:unstructu=
red" condition=3D"@rule=3D'nsiTrue'">
<!-- default value for nodeScopeIndex is true -->
<property>text</property>
</index-rule>
@@ -60,7 +60,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:unstructured WHERE CONTAINS(*,'q=
uick')";
@@ -70,7 +70,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:unstructured)[jcr:contains(., 'q=
uick')]";
@@ -84,7 +84,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -96,7 +96,7 @@
=
Also, we can get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE NOT jcr:title LIKE =
'P%'";
@@ -52,7 +52,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[not(jcr:like(@jcr:title,=
'P%'))]";
@@ -66,7 +66,7 @@
=
Let's get the nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -77,7 +77,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -71,7 +71,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:unstructured";
@@ -89,7 +89,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE jcr:title =3D 'Cind=
erella' OR jcr:description =3D 'novel'";
@@ -56,7 +56,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[@jcr:title=3D'Cinderella=
' or @jcr:description =3D 'novel']";
@@ -70,7 +70,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -81,7 +81,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "/jcr:root/* order by a/b/c/@prop descending;
@@ -103,7 +103,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -115,7 +115,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 4=
469)
+++ 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 4=
470)
@@ -42,7 +42,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title ORDER BY prop_pagecount A=
SC";
@@ -52,7 +52,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title) order by @prop_pagecount=
ascending";
@@ -66,7 +66,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -78,7 +78,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE CONTAINS(*, 'brown =
OR fox OR jumps') ORDER BY jcr:score() ASC";
@@ -76,7 +76,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[jcr:contains(., 'brown O=
R fox OR jumps')] order by jcr:score()";
@@ -90,7 +90,7 @@
=
Let's get nodes
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -102,7 +102,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT jcr:title FROM mix:title WHERE prop_pageco=
unt < 90";
@@ -53,7 +53,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[@prop_pagecount < 90]=
/@jcr:title";
@@ -67,7 +67,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -78,7 +78,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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:4=
7 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:3=
5 UTC (rev 4470)
@@ -42,7 +42,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE jcr:description IS =
NULL";
@@ -52,7 +52,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D ""//element(*,mix:title)[not(@jcr:description)]"=
";
@@ -66,7 +66,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -77,7 +77,7 @@
=
We can also get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (re=
v 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 (re=
v 4470)
@@ -9,7 +9,7 @@
properties whoes names ends with 'Text' string. First of all, add rules =
to
indexing-configuration.xml:
=
- <index-rule nodeType=3D"nt:unstructured"">
+ <index-rule nodeType=3D"nt:unstructu=
red"">
<property isRegexp=3D"true">.*Text</property>
</index-rule>
=
@@ -57,7 +57,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM nt:unstructured WHERE CONTAINS(*,'q=
uick')";
@@ -67,7 +67,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,nt:unstructured)[jcr:contains(., 'q=
uick')]";
@@ -81,7 +81,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D result.getNodes(=
);
=
if(it.hasNext())
{
@@ -93,7 +93,7 @@
=
Also, we can get a table:
=
- String[] columnNames =3D result.getColumnNames();
+ String[] columnNames =3D result.getC=
olumnNames();
RowIterator rit =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
TwoWayRangeIterator interface:
=
- /**
+ /**
* Skip a number of elements in the iterator.
* =
* @param skipNum the non-negative number of elements to skip
@@ -49,7 +49,7 @@
=
Usage:
=
- NodeIterator iter =3D queryResult.getNodes();
+ NodeIterator iter =3D queryResult.ge=
tNodes();
while (iter.hasNext()) {
if (skipForward) {
iter.skip(10); // Skip 10 nodes in forward direction
@@ -71,7 +71,7 @@
To use it, you have to form a query like the one described
below:
=
- QueryManager qman =3D session.getWorkspace().getQueryM=
anager();
+ QueryManager qman =3D session.getWor=
kspace().getQueryManager();
Query q =3D qman.createQuery("select * from nt:base where contains(field, =
'ccccc~')", Query.SQL);
QueryResult res =3D q.execute();
@@ -92,10 +92,10 @@
configuration parameter to the query-handler element in your jcr
configuration file to enable it.
=
- <param name=3D"synonymprovider-config-path" value=
=3D"..you path to configuration file....."/>
+ <param name=3D"synonymprovider-co=
nfig-path" value=3D"..you path to configuration file....."/>
<param name=3D"synonymprovider-class" value=3D"org.exoplatform.service=
s.jcr.impl.core.query.lucene.PropertiesSynonymProvider"/>
=
- /**
+ /**
* <code>SynonymProvider</code> defines an interface for a com=
ponent that
* returns synonyms for a given term.
*/
@@ -139,14 +139,14 @@
to the query-handler element in your jcr configuration file to enable
it.
=
- <param name=3D"support-highlighting" value=3D"true"=
/>
+ <param name=3D"support-highlightin=
g" value=3D"true"/>
=
Additionally, there is a parameter that controls the format of t=
he
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:
=
- <param name=3D"excerptprovider-class" value=3D"org.=
exoplatform.services.jcr.impl.core.query.lucene.DefaultXMLExcerpt"/>
+ <param name=3D"excerptprovider-cla=
ss" value=3D"org.exoplatform.services.jcr.impl.core.query.lucene.DefaultXML=
Excerpt"/>
=
DefaultXMLExcerpt
@@ -154,7 +154,7 @@
This excerpt provider creates an XML fragment of the following
form:
=
- <excerpt>
+ <excerpt>
<fragment>
<highlight>exoplatform</highlight> implements both the=
mandatory
XPath and optional SQL <highlight>query</highlight> sy=
ntax.
@@ -172,7 +172,7 @@
This excerpt provider creates an HTML fragment of the following
form:
=
- <div>
+ <div>
<span>
<strong>exoplatform</strong> implements both the manda=
tory XPath
and optional SQL <strong>query</strong> syntax.
@@ -190,7 +190,7 @@
If you are using XPath, you must use the rep:excerpt() functio=
n in
the last location step, just like you would select properties:
=
- QueryManager qm =3D session.getWorkspace().getQueryM=
anager();
+ QueryManager qm =3D session.getWor=
kspace().getQueryManager();
Query q =3D qm.createQuery("//*[jcr:contains(., 'exoplatform')]/(@Title|re=
p:excerpt(.))", Query.XPATH);
QueryResult result =3D q.execute();
for (RowIterator it =3D result.getRows(); it.hasNext(); ) {
@@ -215,7 +215,7 @@
but the column in the RowIterator will nonetheless be labled
rep:excerpt(.)!
=
- QueryManager qm =3D session.getWorkspace().getQueryM=
anager();
+ QueryManager qm =3D session.getWor=
kspace().getQueryManager();
Query q =3D qm.createQuery("select excerpt(.) from nt:resource where conta=
ins(., 'exoplatform')", Query.SQL);
QueryResult result =3D q.execute();
for (RowIterator it =3D result.getRows(); it.hasNext(); ) {
@@ -288,7 +288,7 @@
You can spell check a fulltext statement either with an XPath =
or a
SQL query:
=
- // rep:spellcheck('explatform') will always evaluate=
to true
+ // rep:spellcheck('explatform') wi=
ll always evaluate to true
Query query =3D qm.createQuery("/jcr:root[rep:spellcheck('explatform')]/(r=
ep:spellcheck())", Query.XPATH);
RowIterator rows =3D query.execute().getRows();
// the above query will always return the root node no matter what string =
we check
@@ -304,7 +304,7 @@
=
And the same using SQL:
=
- // SPELLCHECK('exoplatform') will always evaluate to=
true
+ // SPELLCHECK('exoplatform') will =
always evaluate to true
Query query =3D qm.createQuery("SELECT rep:spellcheck() FROM nt:base WHERE=
jcr:path =3D '/' AND SPELLCHECK('explatform')", Query.SQL);
RowIterator rows =3D 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.
=
- <param name=3D"support-highlighting" value=3D"true"=
/>
+ <param name=3D"support-highlightin=
g" value=3D"true"/>
=
The functions are called rep:similar() (in XPath) and similar() =
(in
SQL) and have two arguments:
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/searching/spell-checker.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
test-jcr-config.xml:
=
- <query-handler class=3D"org.exoplatform.services.jcr.=
impl.core.query.lucene.SearchIndex">
+ <query-handler class=3D"org.exoplatf=
orm.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name=3D"spellchecker-class" value=3D"org.exoplatform.servi=
ces.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshI=
nterval" />
@@ -53,7 +53,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT rep:spellcheck() FROM nt:base WHERE jcr:pa=
th =3D '/' AND SPELLCHECK('quik OR (-foo bar)')";
@@ -63,7 +63,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "/jcr:root[rep:spellcheck('quik OR (-foo bar)')]=
/(rep:spellcheck())";
@@ -77,7 +77,7 @@
=
Get suggestion of coorect spelling our phrase:
=
- RowIterator it =3D result.getRows();
+ RowIterator it =3D result.getRows();
Row r =3D rows.nextRow();
Value v =3D r.getValue("rep:spellcheck()");
String correctPhrase =3D v.getString();
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/searching/synonim-provider.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -16,7 +16,7 @@
Synonim provider must be configured in indexing-configuration.xml
:
=
- <query-handler class=3D"org.exoplatform.services.jcr.=
impl.core.query.lucene.SearchIndex">
+ <query-handler class=3D"org.exoplatf=
orm.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
<property name=3D"synonymprovider-class" value=3D"org.exoplatform=
.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
@@ -56,7 +56,7 @@
=
SQL
=
- // make SQL query
+ // make SQL query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String sqlStatement =3D "SELECT * FROM mix:title WHERE CONTAINS(jcr:title,=
'~fast')";
@@ -66,7 +66,7 @@
=
XPath
=
- // make XPath query
+ // make XPath query
QueryManager queryManager =3D workspace.getQueryManager();
// create query
String xpathStatement =3D "//element(*,mix:title)[jcr:contains(@jcr:title,=
'~fast')]";
@@ -80,7 +80,7 @@
=
Let's get nodes:
=
- NodeIterator it =3D result.getNodes();
+ NodeIterator it =3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
XPath
=
- // get QueryManager
+ // get QueryManager
QueryManager queryManager =3D workspace.getQueryManager(); =
// make XPath query
Query query =3D queryManager.createQuery("/jcr:root/Documents/Publie/2010/=
/element(*, exo:article)", Query.XPATH);
@@ -35,7 +35,7 @@
=
XPath
=
- // get QueryManager
+ // get QueryManager
QueryManager queryManager =3D workspace.getQueryManager(); =
// make XPath query
Query query =3D queryManager.createQuery("/jcr:root/Documents/Publie/_x003=
2_010//element(*, exo:article)", Query.XPATH);
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/statistics.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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
targetInterfaces.
=
- <configuration xmlns:xsi=3D"http://www.w3.org/2001/=
XMLSchema-instance" xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/=
kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ <configuration xmlns:xsi=3D"http:/=
/www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http://www.exopl=
aform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0=
.xsd"
xmlns=3D"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.
=
- <aspectj>
+ <aspectj>
<aspects>
<concrete-aspect name=3D"org.exoplatform.services.jcr.statistics.JC=
RAPIAspectImpl" extends=3D"org.exoplatform.services.jcr.statistics.JCRAPIAs=
pect">
<pointcut name=3D"JCRAPIPointcut"
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/jcr/transaction-manager-lookup.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -12,7 +12,7 @@
It's JBossCache class registered as eXo container component in
configuration.xml file.
=
- <component>
+ <component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</k=
ey>
<type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLook=
up</type>
</component>
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
- A init task is defined as below:
+ An init task is defined as below:
=
PortalContainerPreInitTask
=
- /**
+ /**
* 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 @@
Old GadgetRegister.java
=
- ...
+ ...
public class GadgetRegister implements ServletContextListener
{
...
@@ -369,7 +369,7 @@
New GadgetRegister.java
=
- ...
+ ...
public class GadgetRegister implements ServletContextListener {
...
public void contextInitialized(ServletContextEvent event)
@@ -591,7 +591,7 @@
file that define and register a
PortalContainerDefinition:
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -757,7 +757,7 @@
=
See below an example=
para>
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -944,7 +944,7 @@
=
See an example of a web.xml below:
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1" ?&g=
t;
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Applicatio=
n 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 li=
st
of the portal "portal":
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1197,7 +1197,7 @@
=
See an example below:<=
/para>
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1333,7 +1333,7 @@
WEB-INF/conf/configuration.xml of the product
"sample-ext".
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1358,7 +1358,7 @@
\-$portal.container.name. See an example below:
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd h=
ttp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1416,7 +1416,7 @@
See an example of jcr-configurati=
on.xml
below:
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1444,7 +1444,7 @@
=
See an example of repository-configuration.xml below:
=
- <repository-service default-repository=3D"reposit=
ory">
+ <repository-service default-repo=
sitory=3D"repository">
<repositories>
<repository name=3D"repository" system-workspace=3D"system" default=
-workspace=3D"portal-system">
<security-domain>exo-domain</security-domain>
@@ -1526,7 +1526,7 @@
=
See an example below:<=
/para>
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1648,7 +1648,7 @@
=
See an example below:<=
/para>
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1740,7 +1740,7 @@
See an example of configuration
below:
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1782,7 +1782,7 @@
SampleFilter.java
=
- ...
+ ...
import org.exoplatform.web.filter.Filter;
=
import java.io.IOException;
@@ -1864,7 +1864,7 @@
See an example of configuration
below:
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ht=
tp://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -1912,7 +1912,7 @@
SampleHttpSessionCreatedListener.java
=
- ..
+ ..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
@@ -1935,7 +1935,7 @@
SampleContextInitializedListener.java
=
- ..
+ ..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
@@ -2211,7 +2211,7 @@
=
- <application-policy name=3D"exo-domain-sample=
-portal">
+ <application-policy name=3D"=
exo-domain-sample-portal">
<authentication>
<login-module code=3D"org.exoplatform.web.security.PortalLoginMod=
ule" flag=3D"required">
<module-option name=3D"portalContainerName">sample-portal<=
;/module-option>
@@ -2337,7 +2337,7 @@
tomcat/conf/Catalina/localhost/sample-portal.xml
=
- <Context path=3D'/sample-portal' docBase=3D's=
ample-portal' debug=3D'0' reloadable=3D'true' crossContext=3D'true' privile=
ged=3D'true'>
+ <Context path=3D'/sample-por=
tal' docBase=3D'sample-portal' debug=3D'0' reloadable=3D'true' crossContext=
=3D'true' privileged=3D'true'>
<Logger className=3D'org.apache.catalina.logger.SystemOutLogger'
prefix=3D'localhost_portal_log.' suffix=3D'.txt' timestamp=3D'tr=
ue'/>
<Manager className=3D'org.apache.catalina.session.PersistentManager' =
saveOnRestart=3D'false'/>
@@ -2362,7 +2362,7 @@
tomcat/conf/Catalina/localhost/rest-sample-portal.xml
=
- <Context path=3D"/rest-sample-portal" docBase=
=3D"rest-sample-portal" reloadable=3D"true" crossContext=3D"false">
+ <Context path=3D"/rest-sampl=
e-portal" docBase=3D"rest-sample-portal" reloadable=3D"true" crossContext=
=3D"false">
=
<Logger className=3D'org.apache.catalina.logger.SystemOutLogger'
prefix=3D'localhost_portal_log.' suffix=3D'.txt' timestamp=3D'=
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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).
=
- Example:<?xml version=3D"1.0" encoding=3D"U=
TF-8"?>
+ Example:
+ <?xml version=3D"1.0" encoding=
=3D"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>
+</datasources>
=
Which properties can be set for datasource can be found here:
In jcr-configuration.xml and idm-configuration.xml comment out=
the
plugin InitialContextInitializer.
=
- <!-- Commented because, Datasources are declared =
and bound by AS, not in eXo -->
+ <!-- Commented because, Datasour=
ces 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
org.exoplatform.services.cache.ExoCacheConfig in order =
to
create new ExoCache instances. See the below example of
org.exoplatform.services.cache.CacheService
- definition: <component>
+ definition:
+ =
+ <component>
<key>org.exoplatform.services.cache.CacheService</key>
<jmx-name>cache:type=3DCacheService</jmx-name>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</t=
ype>
@@ -36,16 +38,19 @@
</object>
</object-param>
</init-params>
- </component>
+ </component>
=
-
+ The ExoCacheConfig which name is
default, will be the default configuration of all t=
he
ExoCache instances that don't have dedicated
configuration.
- See the below example about how to define a new
+
+ See the below example about how to define a new
ExoCacheConfig thanks to a
- external-component-plugin: <e=
xternal-component-plugins>
+ external-component-plugin:
+ =
+ <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>
+ </external-component-plugins>
=
Descriptions of the fields of
@@ -152,7 +157,9 @@
eXo Products.
=
You just need to implement your own ExoCacheFactory
- and register it in an eXo container, as described below:package org.exoplatform.services.cache;
+ and register it in an eXo container, as described below:
+ =
+ package org.exoplatform.services.cac=
he;
...
public interface ExoCacheFactory {
=
@@ -163,27 +170,32 @@
* @exception ExoCacheInitException if an exception happens while initia=
lizing the cache
*/
public ExoCache createCache(ExoCacheConfig config) throws ExoCacheInitEx=
ception; =
-}
+}
=
As you can see, there is only one method to implement which can =
be
seen as a converter of an ExoCacheConfig to get an inst=
ance
of ExoCache. Once, you created your own implementation,=
you
can simply register your factory by adding a file
conf/portal/configuration.xml with a content of t=
he
- following type:<configuration>
+ following type:
+ =
+ <configuration>
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.tutorial.MyExoCacheFactoryImpl</type>
...
</component> =
-</configuration>
+</configuration>
+
+
+Since kernel 2.3.0-CR1, if the configuration is not a sub cl=
ass
of ExoCacheConfig and the implementation given in t=
he
configuration is the full qualified name of an existing implementa=
tion
of eXo Cache, we will assume that the user expects to have an inst=
ance
of this eXo Cache type so we won't use the configured cache
factory.
-
+
=
@@ -197,7 +209,9 @@
itself but of course you can still redefined the configuration if you
wish as you can do with any components.
=
- The default configuration of the factory is:&l=
t;configuration> =
+ The default configuration of the factory is:
+ =
+ <configuration> =
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryI=
mpl</type>
@@ -212,7 +226,7 @@
</value-param>
</init-params>
</component> =
-</configuration>
+</configuration>
=
Fields description
@@ -263,7 +277,9 @@
=
If for a given reason, you need to use a specific configuration
for a cache, you can register one thanks to an "external
- plugin", see an example below:<configu=
ration>
+ plugin", see an example below:
+ =
+ <configuration>
...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory=
</target-component>
@@ -281,7 +297,7 @@
</component-plugin> =
</external-component-plugins> =
... =
-</configuration>
+</configuration>
=
In the example above, I call the method
addConfig(ExoCacheFactoryConfigPlugin plugin) on
@@ -308,7 +324,9 @@
=
The factory for jboss cache, delegates the cache creation to
ExoCacheCreator that is defined as
- below:package org.exoplatform.services.cache.impl.=
jboss;
+ below:
+ =
+ package org.exoplatform.services=
.cache.impl.jboss;
...
public interface ExoCacheCreator {
=
@@ -331,7 +349,7 @@
* @return the expected by the creator
*/
public String getExpectedImplementation();
-}
+}
=
The ExoCacheCreator allows you to define any =
kind
of jboss cache instance that you would like to have. It has been
@@ -349,7 +367,7 @@
=
- getExpectedConfigType : this method=
is
+ getExpectedConfigType: this method =
is
used to indicate the factory the subtype of
ExoCacheConfig supported by the creator.
@@ -370,7 +388,9 @@
=
You can register any cache creator that you want thanks to an
"external plugin", see an example
- below: <external-component-plugins>
+ below:
+ =
+ <external-component-plugins&=
gt;
<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>
+ </external-component-plugins>
=
In the example above, I call the method
addCreator(ExoCacheCreatorPlugin plugin) on t=
he
@@ -413,7 +433,7 @@
LRU Cache Creator - Least Recently Used
=
- ..
+ ..
<object-param>
<name>LRU</name>
<description>The lru cache creator</description>
@@ -456,31 +476,33 @@
FIFO Cache Creator - First In, First Out
=
- ...
+ ...
<object-param>
<name>FIFO</name>
<description>The fifo cache creator</description>
<object type=3D"org.exoplatform.services.cache.impl.jboss.fifo.FIFOExo=
CacheCreator"></object>
</object-param>
...
+
=
MRU Cache Creator - Most Recently Used
=
- ...
+ ...
<object-param>
<name>MRU</name>
<description>The mru cache creator</description>
<object type=3D"org.exoplatform.services.cache.impl.jboss.mru.MRUExoC=
acheCreator"></object>
</object-param>
...
+
=
LFU Cache Creator - Least Frequently Used
=
- ...
+ ...
<object-param>
<name>LFU</name>
<description>The lfu cache creator</description>
@@ -512,7 +534,7 @@
EA Cache Creator - Expiration Algorithm
=
- ...
+ ...
<object-param>
<name>EA</name>
<description>The ea cache creator</description>
@@ -564,7 +586,7 @@
At CacheService initialization
=
- ...
+ ...
<component>
<key>org.exoplatform.services.cache.CacheService</key>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</t=
ype>
@@ -593,7 +615,7 @@
With an "external plugin"
=
- ...
+ ...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.CacheService<=
;/target-component>
<component-plugin>
@@ -668,8 +690,10 @@
New configuration
+
+
=
- ...
+ ...
<object-param>
<name>lru</name>
<description>The lru cache configuration</description>
@@ -681,7 +705,9 @@
<field name=3D"timeToLive"><long>${my-value}</lon=
g></field>
</object>
</object-param> =
-...
Fields description
@@ -1148,8 +1201,7 @@
needed by JBoss cache, we will use the default values prov=
ided
by the creator.
-
-
+ =
@@ -1165,7 +1217,9 @@
library itself but of course you can still redefined the configurati=
on
if you wish as you can do with any components.
=
- The default configuration of the factory is:&l=
t;configuration> =
+ The default configuration of the factory is:
+ =
+ <configuration> =
<component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.infinispan.ExoCacheFac=
toryImpl</type>
@@ -1176,7 +1230,7 @@
</value-param>
</init-params>
</component> =
-</configuration>
+</configuration>
=
As you can see the factory requires one single parameter which=
is
cache.config.template, this parameter allows yo=
u to
@@ -1187,11 +1241,12 @@
=
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.
+ be very generic. =
+ All the cache instances that will rely on this cache
configuration will share the same
EmbeddedCacheManager.
-
+
=
@@ -1199,7 +1254,9 @@
=
If for a given reason, you need to use a specific configuration
for a cache, you can register one thanks to an "external
- plugin", see an example below:<configu=
ration>
+ plugin", see an example below:
+ =
+ <configuration>
...
<external-component-plugins>
<target-component>org.exoplatform.services.cache.ExoCacheFactory=
</target-component>
@@ -1217,7 +1274,7 @@
</component-plugin> =
</external-component-plugins> =
... =
-</configuration>
+</configuration>
=
In the example above, I call the method
addConfig(ExoCacheFactoryConfigPlugin plugin) on
@@ -1250,7 +1307,9 @@
=
The factory for infinispan, delegates the cache creation to
ExoCacheCreator that is defined as
- below:package org.exoplatform.services.cache.impl.=
infinispan;
+ below:
+ =
+ package org.exoplatform.services=
.cache.impl.infinispan;
...
public interface ExoCacheCreator {
=
@@ -1274,7 +1333,7 @@
* @return the expected by the creator
*/
public Set<String> getExpectedImplementations();
-}
+}
=
The ExoCacheCreator allows you to define any =
kind
of infinispan cache instance that you would like to have. It has b=
een
@@ -1316,7 +1375,9 @@
=
You can register any cache creator you want thanks to an
"external plugin", see an example
- below: <external-component-plugins>
+ below:
+ =
+ <external-component-plugins&=
gt;
<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>
+ </external-component-plugins>
=
In the example above, I call the method
addCreator(ExoCacheCreatorPlugin plugin) on t=
he
@@ -1359,7 +1420,7 @@
This is the generic cache creator that allows you to use a=
ny
eviction strategies defined by default in Infinispan.
=
- ..
+ ..
<object-param>
<name>GENERIC</name>
<description>The generic cache creator</description>
@@ -1472,8 +1533,10 @@
New configuration
-
- ...
+
+
+ =
+ ...
<object-param>
<name>myCache</name>
<description>My cache configuration</description>
@@ -1486,7 +1549,8 @@
<field name=3D"wakeUpInterval"><long>${my-value}<=
/long></field>
</object>
</object-param> =
-...
+...
+
Fields description
=
@@ -1538,13 +1602,15 @@
-
-
-
+
+ =
+ Old configuration
+
+
=
- ...
+ ...
<object-param>
<name>myCache</name>
<description>My cache configuration</description>
@@ -1597,8 +1663,7 @@
wakeUpInterval needed by infinispan, =
we
will use the default values provided by the creator.
-
-
+ =
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/component-plugin-priority.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
Simple example of fragment of a configuration.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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -33,7 +33,7 @@
http://www.exoplaform.org/xml/ns/kernel_1_2.xsd must be tar=
get
namespace of the XML configuration file.
=
- <configuration xmlns:xsi=3D"http://www.w3.org/2001/=
XMLSchema-instance" =
+ <configuration xmlns:xsi=3D"http:/=
/www.w3.org/2001/XMLSchema-instance" =
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kern=
el_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
xmlns=3D"http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"&g=
t;
=
@@ -46,7 +46,7 @@
variables since the eXo kernel resolves them, for example the follow=
ing
configuration will be well interpreted:
=
- <configuration
+ <configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_2.xsd h=
ttp://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
xmlns=3D"http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
@@ -162,8 +162,10 @@
if configuration URL was initialized to be added to
- services defaults, as below:// add configu=
ration to the default services configurations from JARs/WARs
-StandaloneContainer.addConfigurationURL(containerConf);=
para>
+ services defaults, as below:
+ =
+ // add configuration to =
the default services configurations from JARs/WARs
+StandaloneContainer.addConfigurationURL(containerConf);
=
Configuration from added URL
containerConf will override only serv=
ices
@@ -366,7 +368,7 @@
PortalContainer simply add the following lines in y=
our
web.xml file.
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1" ?=
>
+ <?xml version=3D"1.0" encoding=
=3D"ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Applicatio=
n 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
@@ -416,7 +418,7 @@
PortalContainerConfig has been defined at the
RootContainer level, see an example below:
=
- <component>
+ <component>
<!-- The full qualified name of the PortalContainerConfig -->
<type>org.exoplatform.container.definition.PortalContainerConfig=
</type>
<init-params>
@@ -571,7 +573,9 @@
=
A new PortalContainerDefinition can be define=
d at
the RootContainer level thanks to an external plugi=
n,
- see an example below: <external-component-plug=
ins>
+ see an example below:
+ =
+ <external-component-plugins&=
gt;
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalCon=
tainerConfig</target-component>
<component-plugin>
@@ -664,7 +668,7 @@
</object-param>
</init-params>
</component-plugin>
- </external-component-plugins>
+ </external-component-plugins>
=
Descriptions of the fields of a
@@ -1053,7 +1057,9 @@
=
You can find below an example of how to use the
- variables:<configuration xmlns:xsi=3D"http://ww=
w.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http://www.exoplafo=
rm.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xs=
d"
+ variables:
+ =
+ <configuration xmlns:xsi=3D"ht=
tp://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http://www.e=
xoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel=
_1_1.xsd"
xmlns=3D"http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
<component>
<type>org.exoplatform.container.TestPortalContainer$MyComponent&=
lt;/type>
@@ -1083,7 +1089,7 @@
</value-param>
</init-params>
</component>
-</configuration>
+</configuration>
=
In the properties file corresponding to the external setting=
s,
you can reuse variables previously defined (in the external settin=
gs
@@ -1126,7 +1132,7 @@
portal container and to the portal containers called
foo1 and foo2:
=
- <external-component-plugins>
+ <external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</target-component>
<component-plugin>
@@ -1305,7 +1311,7 @@
the end of the dependency list of the default portal
container:
=
- <external-component-plugins>
+ <external-component-plugin=
s>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</target-component>
<component-plugin>
@@ -1381,7 +1387,7 @@
before foo2 in the dependency list of the defau=
lt
portal container:
=
- <external-component-plugins>
+ <external-component-plugin=
s>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</target-component>
<component-plugin>
@@ -1461,7 +1467,7 @@
foo2 in the dependency list of the default port=
al
container:
=
- <external-component-plugins>
+ <external-component-plugin=
s>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</target-component>
<component-plugin>
@@ -1528,7 +1534,7 @@
string and stringX to the settin=
gs
of the default portal container:
=
- <external-component-plugins>
+ <external-component-plugin=
s>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</target-component>
<component-plugin>
@@ -1584,7 +1590,7 @@
the example below, we disable the portal container named
foo:
=
- <external-component-plugins>
+ <external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalConta=
inerConfig</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:
=
- <filter>
+ <filter>
<filter-name>PortalContainerFilter</filter-name>
<filter-class>org.exoplatform.container.web.PortalContainerFilter&=
lt;/filter-class>
</filter> =
@@ -1669,7 +1675,7 @@
The properties init param takes a property declared to configu=
re
various properties.
=
- <component>
+ <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.
=
- <component>
+ <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:
=
- <component>
+ <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:
=
- <external-component-plugins>
+ <external-component-plugins&=
gt;
<target-component>Component</target-component>
<component-plugin profiles=3D"foo">
<name>foo</name>
@@ -1849,7 +1855,7 @@
The import element imports a referenced configuration file
when activated:
=
- <import>empty</import>
+ <import>empty</import&=
gt;
<import profiles=3D"foo">foo</import>
<import profiles=3D"bar">bar</import>
@@ -1860,7 +1866,7 @@
The init param element configures the parameter argument of
the construction of a component service:
=
- <component>
+ <component>
<key>Component</key>
<type>ComponentImpl</type>
<init-params>
@@ -1886,7 +1892,7 @@
The value collection element configures one of the value of
collection data:
=
- <object type=3D"org.exoplatform.container.con=
figuration.ConfigParam">
+ <object type=3D"org.exoplatf=
orm.container.configuration.ConfigParam">
<field name=3D"role">
<collection type=3D"java.util.ArrayList">
<value><string>manager</string></value>
@@ -1903,7 +1909,7 @@
The field configuration element configures the field of an
object:
=
- <object-param>
+ <object-param>
<name>test.configuration</name>
<object type=3D"org.exoplatform.container.configuration.ConfigParam"&=
gt;
<field name=3D"role">
@@ -1936,7 +1942,9 @@
=
The component request life cycle is an interface that defines a
contract for a component for being involved into a
- request:public interface ComponentRequestLifecycle
+ request:
+ =
+ public interface ComponentRequestL=
ifecycle
{
/**
* Start a request.
@@ -1949,7 +1957,7 @@
* @param container the related container
*/
void endRequest(ExoContainer container);
-}
+}
=
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 @@
Scheduling a component request life cycle
=
- RequestLifeCycle.begin(component);
+ 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 t=
he
scheduler will also look at the components in the ancestor
- containers.RequestLifeCycle.begin(container, local=
);
+ containers.
+ RequestLifeCycle.begin(container=
, local);
try
{
// Do something
@@ -2002,7 +2011,7 @@
finally
{
RequestLifeCycle.end();
-}
+}
=
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/initialcontext-binder-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
Service provide methods for binding reference.
=
- public void bind(String bindName, String className, St=
ring factory, String factoryLocation, Map<String, String> refAddr) th=
rows NamingException, FileNotFoundException, XMLStreamExcept
+ public void bind(String bindName, St=
ring className, String factory, String factoryLocation, Map<String, Stri=
ng> refAddr) throws NamingException, FileNotFoundException, XMLStreamExc=
ept
=
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/inversion-of-control.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
Using a constructor:
=
- public ServiceA(ServiceB serviceB)
+ public ServiceA(ServiceB serviceB)=
programlisting>
=
Using setter methods:
=
- public void setServiceB(ServiceB serviceB)
+ public void setServiceB(ServiceB ser=
viceB)
=
When a client service can not be stored in the container then the
service locator pattern is used:
=
- public ServiceA(){
+ public ServiceA(){
this.serviceB =3DContainer.getSInstance().getService(ServiceB.class);
}
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/jndi-naming.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
The InitialContextInitializer configuration
example:
=
- <component>
+ <component>
<type>org.exoplatform.services.naming.InitialContextInitializer&=
lt;/type>
<init-params>
<properties-param>
@@ -136,7 +136,7 @@
<value>bind-references.xml</value>.
</value-param>.
</init-params>
- </component>
+ </component>
=
where
=
@@ -146,7 +146,7 @@
The BindReferencePlugin component plugin
configuration example (for JDBC datasource):
=
- <component-plugins> =
+ <component-plugins> =
<component-plugin> =
<name>bind.datasource</name>
<set-method>addPlugin</set-method>
@@ -173,7 +173,7 @@
<property name=3D"password" value=3D""/>
</properties-param> =
</init-params> =
- </component-plugin>
+ </component-plugin>
=
@@ -201,7 +201,7 @@
=
Service provides methods for binding reference.
=
-
+
public void bind(String bindName, =
String className, =
String factory, =
@@ -237,7 +237,7 @@
=
Example of usage:
=
-
+
// obtain InitialContextInitializer instance from ExoContainer (e.g.=
PortalContainer)
InitialContextInitializer initContext =3D (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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
QuartzSheduler and
QueueTasks, you also have to configure these =
two
components.
- <?xml version=3D"1.0" encoding=3D"=
UTF-8"?>
+ <?xml version=3D"1.0" =
encoding=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.x=
sd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
@@ -149,7 +149,7 @@
Edit the pom.xml as follows:
- <project
+ <project
xmlns=3D"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 http://mave=
n.apache.org/maven-v4_0_0.xsd">
@@ -175,7 +175,7 @@
Define a jobTo define a job, do as follows:Define your job to be performed. For example, the job DumbJob is defined as follows:
- package org.exoplatform.samples.scheduler.jobs;
+ package org.exoplatform.samples.=
scheduler.jobs;
=
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -208,9 +208,9 @@
Job configurationAfter defining the "job", the only next step is to=
configure it by using external-component-plugin<=
/emphasis> configuration for org.exoplatform.serv=
ices.scheduler.JobSchedulerService. You can use these methods be=
low for setting component plugin:
- public void addPeriodJob(ComponentPlugin plugin) t=
hrows Exception;
+ public void addPeriodJob(Compone=
ntPlugin plugin) throws Exception;The component plugin for this method must be the type of org.exoplatform.services.scheduler.PeriodJob. This type of job is used to perform actions that are executed in a per=
iod of time. You have to define when this job is performed, when it ends, w=
hen it performs the first action, how many times it is executed and the per=
iod of time to perform the action. See the configuration sample below to un=
derstand more clearly:
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobScheduler=
Service</target-component>
<component-plugin>
<name>PeriodJob Plugin</name>
@@ -232,9 +232,9 @@
</init-params>
</component-plugin>
</external-component-plugins>
- public void addCronJob(ComponentPlugin plugin) thr=
ows Exception;
+ public void addCronJob(Component=
Plugin plugin) throws Exception;The component plugin for this method must be the type of org.exoplatform.services.scheduler.CronJob. This type of job is used to perform actions at specified time with Unix =
'cron-like' definitions. The plugin uses "expression" f=
ield for specifying the 'cron-like' definitions to execute the jo=
b. This is considered as the most powerful and flexible job to define when =
it will execute. For example, at 12pm every day =3D> "0 0 12 * * ?&=
quot;; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday =
=3D> "0 15 10 ? * MON-FRI". To see more about Cron expression,=
please refer to this article: CRON expression.See the configuration =
sample below to understand more clearly:
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobSchedule=
rService</target-component>
<component-plugin>
<name>CronJob Plugin</name>
@@ -254,17 +254,17 @@
</init-params>
</component-plugin>
</external-component-plugins>
- public void addGlobalJobListener(ComponentPlugin p=
lugin) throws Exception;
- public void addJobListener(ComponentPlugin plugin)=
throws Exception;
+ public void addGlobalJobListener=
(ComponentPlugin plugin) throws Exception;
+ public void addJobListener(Compo=
nentPlugin plugin) throws Exception;The component plugin for two methods above must be the type =
of org.quartz.JobListener. This job li=
stener is used so that it will be informed when a org.quartz.JobDetail executes.
- public void addGlobalTriggerListener(ComponentPlug=
in plugin) throws Exception;
- public void addTriggerListener(ComponentPlugin plu=
gin) throws Exception;
+ public void addGlobalTriggerList=
ener(ComponentPlugin plugin) throws Exception;
+ public void addTriggerListener(C=
omponentPlugin plugin) throws Exception;The component plugin for two methods above must be the type =
of org.quartz.TriggerListener. This tr=
igger listener is used so that it will be informed when a org.quartz.Trigger fires.Run the projectCreate conf.portal pack=
age in your sample project. Add the configuration.xml file with the content=
as follows:
- <?xml version=3D"1.0" encoding=3D&quo=
t;UTF-8"?>
+ <?xml version=3D"1.0"=
; encoding=3D"UTF-8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"http://www.exoplaform.org/xml/ns/kernel_1_0.x=
sd 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
- It's very simple, just mark your Listener implementation as
@Asynchronous.
=
- @Asynchronous
+ @Asynchronous
class AsynchListenerWithException<S,D> extends Listener<S,D>
{
@Override
@@ -39,7 +39,9 @@
ExecutorService.
=
By default, ExecutoreService configured w=
ith
- thread pool size 1, you can change it in configuration: <component>
+ thread pool size 1, you can change it in configuration:
+ =
+ <component>
<key>org.exoplatform.services.listener.ListenerService</key=
>
<type>org.exoplatform.services.listener.ListenerService</ty=
pe>
=
@@ -50,6 +52,6 @@
</value-param>
</init-params>
=
- </component>
+ </component>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/logging.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
Log4J =
is a
very popular and flexible logging system. It is a good option for
- JBoss. <component>
+ JBoss.
+ <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer&l=
t;/type>
<init-params>
<value-param>
@@ -105,33 +106,48 @@
<property name=3D"log4j.appender.file.layout.ConversionPattern"=
value=3D"%d{dd.MM.yyyy HH:mm:ss} %m (%F, line %L) %n"/>
</properties-param >
</init-params>
- </component>
+ </component>
=
Assigning logger level for classes or components
=
You can set logger level for class or group of classes by
- setting next property:<property name=3D"log4j.c=
ategory.{component or class name}" value=3D"DEBUG"/>
+ setting next property:
+ =
+ <property name=3D"log4j.catego=
ry.{component or class name}" value=3D"DEBUG"/>
=
- For example:
+ For example:
+ We want to log all debug messages for class
org.exoplatform.services.jcr.impl.core.SessionDat=
aManager,
that lies in exo.jcr.component.core
- component<property name=3D"log4j.category=
.exo.jcr.component.core.SessionDataManager" value=3D"DEBUG"/>
+ component
-
+
+ =
+ <property name=3D"log4j.=
category.exo.jcr.component.core.SessionDataManager" value=3D"DEBUG"/>
+ =
+
- Or we want to log all debug messages for all classes i=
n in
+ Or we want to log all debug messages for all classes in
exo.jcr.component.core
- component<property name=3D"log4j.category=
.exo.jcr.component.core" value=3D"DEBUG"/>
+ component
-
+ =
+ =
+ <property name=3D"log4j.=
category.exo.jcr.component.core" value=3D"DEBUG"/>
+ =
+ Or we want to log all messages for all kernel
- components<property name=3D"log4j.categor=
y.exo.kernel" value=3D"DEBUG"/>
+ components
-
+ =
+ =
+ <property name=3D"log4j.catego=
ry.exo.kernel" value=3D"DEBUG"/>
+ =
+ =
=
@@ -139,16 +155,22 @@
JDK Logging
=
JDK logging (aka JUL) is the builtin logging framework introdu=
ced
- in JDK 1.4. It is a good option for Tomcat AS.
+ in JDK 1.4. It is a good option for Tomcat AS.
+ Edit the variable LOG_OPTS in your
eXo.sh or eXo.bat
- :LOG_OPTS=3D"-Dorg.apache.commons.logging.Log=
=3Dorg.apache.commons.logging.impl.Jdk14Logger"
+ :
-
+
+ LOG_OPTS=3D"-Dorg.apache.commons.logging.Log=3Dorg=
.apache.commons.logging.impl.Jdk14Logger"
+ =
+
- Edit your logs-configuration.xml
- :<component>
+ Edit your logs-configuration.xml:=
para>
+
+
+ <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer&l=
t;/type>
<init-params>
<value-param>
@@ -167,9 +189,8 @@
<property name=3D"java.util.logging.ConsoleHandler.level" value=
=3D"FINE"/>
</properties-param>
</init-params>
- </component>
-
-
+ </component>
+ =
=
@@ -177,7 +198,8 @@
=
SimpleLog is a minimal logging system distributed with Commons
Logging. To be used when nothing else is available or when you seek
- simplicity. <component>
+ simplicity.
+ <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer&l=
t;/type>
<init-params>
<value-param>
@@ -195,7 +217,7 @@
<property name=3D"org.apache.commons.logging.simplelog.showdate=
time" value=3D"true"/>
</properties-param>
</init-params>
- </component>
+ </component>
=
@@ -206,21 +228,26 @@
JBoss tips
=
If you use log4j configuration, you can change the log
- configuration directly at runtime in:
- JBOSS_HOME/server/default/conf/jboss-log4j.xml.=
+ configuration directly at runtime in:
+ JBOSS_HOME/server/default/conf/jboss-log4j.xml.
+
+
+ To enable debug logs:
+
+ =
+ <param name=3D"Threshold" value=
=3D"DEBUG"/>
+ =
+
- To enable debug logs : <param name=3D=
"Threshold" value=3D"DEBUG"/>
-
-
- To exclude messages from unnecessary classes (server's
internal) modify the threshold of these classes to "FATAL".
-
+
+ If you see only ERROR level logs while starting ear on jbo=
ss
(4.2.2), you have to remove log4j*.jar from your ear and
application.xml.
-
+
=
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/manageability.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 nam=
e.
The template is formed of properties.
=
- @NameTemplate({
+ @NameTemplate({
@Property(key=3D"container", value=3D"workspace"),
@Property(key=3D"name", value=3D"{Name}")})
@@ -127,7 +127,7 @@
different instances of the same class that would have the same obj=
ect
name otherwise.
=
- @NamingContext(@Property(key=3D"workspace", value=
=3D"{Name}"))
+ @NamingContext(@Property(key=3D"=
workspace", value=3D"{Name}"))
@@ -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.
=
- @ManagedBy(CacheServiceManaged.class)
+ @ManagedBy(CacheServiceManaged.cla=
ss)
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.
=
- @Managed
+ @Managed
@NameTemplate({@Property(key=3D"service", value=3D"cache"), @Property(key=
=3D"name", value=3D"{Name}")})
@ManagedDescription("Exo Cache")
public interface ExoCache {
@@ -192,7 +192,7 @@
receive a context to perform further registration of managed
objects.
=
- @Managed
+ @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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
=
See an example below:
=
- public class MyService implements Startable
+ public class MyService implements St=
artable
{
private RPCService rpcService;
private RemoteCommand sayHelloCommand;
@@ -131,7 +131,7 @@
added only in a cluster environment. See below an example of
configuration
=
- <configuration>
+ <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.
=
- // Register the command first (to be done before that =
the RPCService has been started)
+ // Register the command first (to be=
done before that the RPCService has been started)
RemoteCommand commandGetName =3D rpcService.registerCommand(new SingleMeth=
odCallCommand(myService, "getName"));
...
// Execute the command on the coordinator (can be done only after having s=
tarted 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
exo.kernel.component.cache-2.0.5.jar file and inside
this jar open /conf/portal/configuration.xml. You will see:
=
- =
+ =
<component>
<key>org.exoplatform.services.cache.CacheService</key> =
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type&=
gt; =
@@ -264,14 +264,16 @@
for a service can be defined as you see in the next chapter.
=
- "In your java code you have to use ExoContaine=
r myContainer =3D ExoContainerContext.getCurrentContainer()
- in order to access to the current container. It doesn't greatly matt=
er
+ "In your java code you have to use
+
+ ExoContainer myContainer =3D ExoCo=
ntainerContext.getCurrentContainer();
+ in order to access to the current container. It doesn't greatl=
y matter
to your application if the current container is a
PortalContainer or a
StandaloneContainer. Once you have your conta=
iner
- you may access to any service registered in this container using
- MyService myService =3D (MyService) myContainer.getC=
omponentInstance(MyService.class)
- You easily realize that MyService.class is the
+ you may access to any service registered in this container using =
+ MyService myService =3D (MyService=
) myContainer.getComponentInstance(MyService.class);
+ You easily realize that MyService.class is the
name of the service interface.
@@ -464,7 +466,7 @@
empty hashtable and not any bit of previous configuration is use=
d.
Apply the following code to do this:
=
- StandaloneContainer.setConfigurationURL(containe=
rConf);
+ StandaloneContainer.setConfigu=
rationURL(containerConf);
=
@@ -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:
=
- StandaloneContainer.addConfigurationURL(containe=
rConf);
+ StandaloneContainer.addConfigu=
rationURL(containerConf);
=
@@ -554,7 +556,7 @@
This JDBC implementation of BaseOrganizationService interface has
only one constructor:
=
- public OrganizationServiceImpl(ListenerService l=
istenerService, DatabaseService dbService)
+ public OrganizationServiceImpl(Liste=
nerService listenerService, DatabaseService dbService);
=
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:
=
- <key>org.exoplatform.services.database.jdbc.DB=
SchemaCreator</key>
+ <key>org.exoplatform.services=
.database.jdbc.DBSchemaCreator</key>
<type>org.exoplatform.services.database.jdbc.DBSchemaCreator</typ=
e>
=
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.
=
- <component>
+ <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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 interface that defines your service.
=
- package com.laverdad.services; =
+ package com.laverdad.services; =
public interface ArticleStatsService {
public abstract int calcSentences(String article);
}
=
A very simple implementation:
=
- public class ArticleStatsServiceImpl implements Arti=
cleStatsService {
+ public class ArticleStatsServiceIm=
pl 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.
=
- <?xml version=3D"1.0" encoding=3D"UTF8"?>
+ <?xml version=3D"1.0" encoding=
=3D"UTF8"?>
<configuration
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=3D"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:
=
- <component>
+ <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.
=
- public class ArticleStatsServiceImpl implements Arti=
cleStatsService {
+ public class ArticleStatsServiceIm=
pl implements ArticleStatsService {
=
private String calcMethod =3D "fast";
private String variant =3D "French";
@@ -250,7 +250,7 @@
=
Recapitulation:
=
- package com.laverdad.common;
+ package com.laverdad.common;
=
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
@@ -289,7 +289,7 @@
=
There is an value-param example:
=
- <component>
+ <component>
<key>org.exoplatform.portal.config.UserACL</key>
<type>org.exoplatform.portal.config.UserACL</type> =
<init-params> =
@@ -305,7 +305,7 @@
The UserACL class accesses to the value-param in its constructor.
=
- package org.exoplatform.portal.config;
+ package org.exoplatform.portal.con=
fig;
public class UserACL {
=
public UserACL(InitParams params) {
@@ -323,7 +323,7 @@
=
Here you see the hibernate configuration example:
=
- <component>
+ <component>
<key>org.exoplatform.services.database.HibernateService</key&=
gt;
<type>org.exoplatform.services.database.impl.HibernateServiceImp=
l</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.
=
- package org.exoplatform.services.database.impl;
+ package org.exoplatform.services.d=
atabase.impl;
=
public class HibernateServiceImpl implements HibernateService, ComponentRe=
questLifecycle {
public HibernateServiceImpl(InitParams initParams, CacheService cacheSer=
vice) {
@@ -358,7 +358,7 @@
Let's have a look at the configuration of the LDAPService. It's
not important to know LDAP, we only discuss the parameters.
=
- <component>
+ <component>
<key>org.exoplatform.services.ldap.LDAPService</key>
<type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</typ=
e>
<init-params>
@@ -389,7 +389,7 @@
=
Here you see how the service accesses the object:
=
- package org.exoplatform.services.ldap.impl;
+ package org.exoplatform.services.l=
dap.impl;
=
public class LDAPServiceImpl implements LDAPService {
...
@@ -405,7 +405,7 @@
bean and calls all setters whose values are configured in the
configuration file.
=
- package org.exoplatform.services.ldap.impl;
+ package org.exoplatform.services.l=
dap.impl;
=
public class LDAPConnectionConfig {
private String providerURL =3D "ldap://127.0.0.1:389";
@@ -452,7 +452,7 @@
The second collection is a HashSet that is a set of strings.
=
- <component-plugin>
+ <component-plugin>
<name>new.user.event.listener</name>
<set-method>addListenerPlugin</set-method>
<type>org.exoplatform.services.organization.impl.NewUserEventL=
istener</type>
@@ -489,7 +489,7 @@
Let's look at the
org.exoplatform.services.organization.impl.NewUserConfig bean:
=
- public class NewUserConfig {
+ public class NewUserConfig {
private List role;
private List group;
private HashSet ignoredUser;
@@ -538,7 +538,7 @@
Let's have a look at the configuration of the TaxonomyPlugin of =
the
CategoriesService:
=
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.cms.categories.Catego=
riesService</target-component> =
<component-plugin>
<name>predefinedTaxonomyPlugin</name>
@@ -653,12 +653,14 @@
=
If you open the
"portal/trunk/web/portal/src/main/webapp/WEB-INF/conf.configuration.xm=
l"
- you will see that it consists only of imports: <imp=
ort>war:/conf/common/common-configuration.xml</import>
+ you will see that it consists only of imports:
+ =
+ <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</imp=
ort>
-...
+...
=
@@ -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:
=
- <component>
+ <component>
<key>org.exoplatform.services.database.HibernateService</key&=
gt;
<jmx-name>database:type=3DHibernateService</jmx-name>
<type>org.exoplatform.services.database.impl.HibernateServiceImp=
l</type>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/kernel/services-wiring.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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.
=
- <!-- Portlet container hooks -->
+ <!-- Portlet container hooks -->
<component>
<key>org.exoplatform.services.portletcontainer.persistence.Portl=
etPreferencesPersister</key>
<type>org.exoplatform.services.portal.impl.PortletPreferencesPer=
sisterImpl</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.
=
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.database.HibernateServi=
ce</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:
=
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.organization.Organizati=
onService</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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (r=
ev 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 (r=
ev 4470)
@@ -53,7 +53,7 @@
To register a listener, you need to call the addListener()
method.
=
- /**
+ /**
* 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 liste=
ner
@@ -75,7 +75,7 @@
To trigger an event, an application can call one of the
broadcast() methods of ListenerService.
=
- /**
+ /**
* 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 @@
Each listener is a class that extends
org.exoplatform.services.listener.Listener, as you can see below:
=
- public abstract class Listener<S, D> extends B=
aseComponentPlugin {
+ 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.
=
- public interface ComponentPlugin {
+ public interface ComponentPlugin {
public String getName();
=
public void setName(String name);
@@ -155,7 +155,7 @@
All listeners are in fact a ComponentPlugin so it must be config=
ured
as below:
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=3D"=
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:
=
- listenerService.broadcast("exo.core.security.Conversat=
ionRegistry.register", this, state);
+ listenerService.broadcast("exo.core.=
security.ConversationRegistry.register", this, state);
=
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 @@
In the example below, we define a Listener that will listen the
event "exo.core.security.ConversationRegistry.register".
=
- <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
+ <?xml version=3D"1.0" encoding=3D"=
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (re=
v 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 (re=
v 4470)
@@ -92,12 +92,12 @@
=
3). Declare xda.js in the main page.
=
- <script type=3D"text/javascript" src=3D"xda.js">=
</script>
+ <script type=3D"text/javascript" =
src=3D"xda.js"></script>
=
4). Create JS function which performs cross domain call as in the
following example:
=
- <script type=3D"text/javascript"> =
=
=
=
=
+ <script type=3D"text/javasc=
ript"> =
=
=
=
function test(){ =
=
=
var facade =3D xdaInit(); =
=
=
facade.clientURI =3D "http://localhost/cross-domain-ajax/c=
lient/client.html"; =
=
@@ -115,6 +115,6 @@
5). Use this function (here it is bound to a button's onclick
event).
=
- <button onclick=3D'test()'>test cross-domain<=
/button>
+ <button onclick=3D'test()'>tes=
t cross-domain</button>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook=
/en-US/modules/ws/groovy-scripts-as-rest-services.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 (re=
v 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 (re=
v 4470)
@@ -54,7 +54,7 @@
org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader=
Plugin.
This is simple configuration example.
=
- <external-component-plugins>
+ <external-component-plugins>
<target-component>org.exoplatform.services.jcr.ext.script.groovy.G=
roovyScript2RestLoader</target-component>
<component-plugin>
<name>test</name>
@@ -124,7 +124,7 @@
source code. It has possibility inject component from Container in Gro=
ovy
Class constructor. Configuration example:
=
- <component>
+ <component>
<type>org.exoplatform.services.script.groovy.GroovyScriptInstantia=
tor</type>
</component>
@@ -140,7 +140,7 @@
=
Example of configuration.
=
- <component>
+ <component>
<type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScrip=
t2RestLoader</type>
<init-params>
<object-param>
@@ -248,7 +248,7 @@
Then, configure GroovyScript2RestLoaderPlugin as described in section =
Load
script at startup time.
=
- import javax.jcr.Node
+ 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.
=
- @POST
+ @POST
@Path("{path:.*}")
public void addReferenceableMixin(@PathParam("repository") String reposito=
ry,
@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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 44=
69)
+++ 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 44=
70)
@@ -176,7 +176,7 @@
Create subclass of javax.ws.rs.core.Application with code as bel=
low
and add it to the eXo Container configuration.
=
- package org.exoplatform.test.jackson;
+ 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 @@
To get the list of services in HTML format use listHTML()
method:
=
- @GET
+ @GET
@Produces({MediaType.TEXT_HTML})
public byte[] listHTML()
{
@@ -58,7 +58,7 @@
f.e. curl -u root:exo http://localhost:8080/rest/ will return =
such
HTML code:
=
- <?xml version=3D"1.0" encoding=3D"UTF-8"?><=
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/=
TR/xhtml1/DTD/xhtml1-strict.dtd">
+ <?xml version=3D"1.0" encoding=
=3D"UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" =
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
<title>eXo JAXRS Implementation</title>
@@ -168,7 +168,7 @@
To get the list of services in HTML format use listJSON()
method:
=
- @GET
+ @GET
@Produces({MediaType.APPLICATION_JSON})
public RootResourcesList listJSON()
{
--===============3840983631077400209==--
From do-not-reply at jboss.org Thu Jun 2 10:24:29 2011
Content-Type: multipart/mixed; boundary="===============8095025967019682067=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4471 -
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms.
Date: Thu, 02 Jun 2011 10:24:29 -0400
Message-ID: <201106021424.p52EOTrJ002482@svn01.web.mwc.hst.phx2.redhat.com>
--===============8095025967019682067==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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/re=
store operation.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/se=
rvices/jcr/impl/backup/rdbms/DBRestore.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 =3D new String(readBuffer);
- insertNode.setBoolean(targetIndex + 1, value.equals("=
true"));
+ insertNode.setBoolean(targetIndex + 1, value.equalsIg=
noreCase("true"));
}
else if (columnType.get(i) =3D=3D Types.VARBINARY || col=
umnType.get(i) =3D=3D Types.LONGVARBINARY
|| columnType.get(i) =3D=3D Types.BLOB || columnType.=
get(i) =3D=3D Types.BINARY
--===============8095025967019682067==--
From do-not-reply at jboss.org Fri Jun 3 02:17:08 2011
Content-Type: multipart/mixed; boundary="===============3774339233948176271=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4472 -
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl.
Date: Fri, 03 Jun 2011 02:17:08 -0400
Message-ID: <201106030617.p536H8U7031715@svn01.web.mwc.hst.phx2.redhat.com>
--===============3774339233948176271==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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/j=
cr/ext/backup/impl/BackupManagerImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/j=
cr/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/ser=
vices/jcr/ext/backup/impl/BackupManagerImpl.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 447=
1)
+++ 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 447=
2)
@@ -310,6 +310,8 @@
class WorkspaceBackupAutoStopper extends Thread
{
=
+ private boolean isToBeStopped =3D false;
+
WorkspaceBackupAutoStopper(ExoContainerContext ctx)
{
super("WorkspaceBackupAutoStopper" + (ctx =3D=3D null ? "" : " " =
+ ctx.getName()));
@@ -321,7 +323,7 @@
@Override
public void run()
{
- while (true)
+ while (!isToBeStopped)
{
try
{
@@ -360,10 +362,16 @@
}
}
}
+
+ public void close()
+ {
+ isToBeStopped =3D true;
+ }
}
=
class RepositoryBackupAutoStopper extends Thread
{
+ boolean isToBeStopped =3D 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 =3D true;
+ }
}
=
/**
@@ -921,6 +934,10 @@
*/
public void stop()
{
+ workspaceBackupStopper.close();
+ repositoryBackupStopper.close();
+ scheduler.cancelTimer();
+
// 1. stop current backup chains
// for (Iterator iterator =3D currentBackups.iterator(); iterator.ha=
sNext();) {
// BackupChain bc =3D (BackupChain) iterator.next();
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/ser=
vices/jcr/ext/backup/impl/BackupScheduler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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();
+ }
}
--===============3774339233948176271==--
From do-not-reply at jboss.org Fri Jun 3 08:44:26 2011
Content-Type: multipart/mixed; boundary="===============8940724663378984978=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4473 - in
jcr/trunk/exo.jcr.component.core:
src/test/java/org/exoplatform/services/jcr/impl/core and 1 other directory.
Date: Fri, 03 Jun 2011 08:44:26 -0400
Message-ID: <201106031244.p53CiQK1009918@svn01.web.mwc.hst.phx2.redhat.com>
--===============8940724663378984978==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 06:17:06 UTC (rev 4=
472)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 12:44:26 UTC (rev 4=
473)
@@ -752,7 +752,6 @@
org/exoplatform/services/jcr/**/impl/**/T=
estWorkspaceManagement.javaorg/exoplatform/services/jcr/**/impl/**/T=
estWorkspaceRestore.java =
org/exoplatform/services/jcr/**/impl/**/T=
estRepositoryManagement.java
- org/exoplatform/services/jcr/**/impl/**/T=
estSaveConfiguration.javaorg/exoplatform/services/jcr/**/impl/**/V=
alueStoragePluginTest.javaorg/exoplatform/services/jcr/**/impl/**/T=
estSessionCleaner.javaorg/exoplatform/services/jcr/**/impl/**/B=
ase*.java
Deleted: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/ser=
vices/jcr/impl/core/TestSaveConfiguration.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 Sergey Kabashn=
yuk
- * @version $Id: TestSaveConfiguration.java 11907 2008-03-13 15:36:21Z ksm=
$
- */
-public class TestSaveConfiguration extends JcrImplBaseTest
-{
- protected static Log log =3D ExoLogger.getLogger("exo.jcr.component.cor=
e.SessionDataManager");
-
- private final TestRepositoryManagement rpm =3D new TestRepositoryManage=
ment();
-
- public void testSaveConfiguration() throws Exception
- {
- RepositoryService service =3D (RepositoryService)container.getCompon=
entInstanceOfType(RepositoryService.class);
-
- for (RepositoryEntry rEntry : service.getConfig().getRepositoryConfi=
gurations())
- {
- if (log.isDebugEnabled())
- log.debug("=3DRepository " + rEntry.getName());
- for (WorkspaceEntry wsEntry : rEntry.getWorkspaceEntries())
- {
- if (log.isDebugEnabled())
- log.debug("=3D=3D=3DWorkspace " + wsEntry.getName());
- }
- }
-
- rpm.createDafaultRepository("repository4TestRepositoryManagement1", =
"wsTestRepositoryManagement1");
- rpm.createDafaultRepository("repository4TestRepositoryManagement2", =
"wsTestRepositoryManagement2");
- rpm.createDafaultRepository("repository4TestRepositoryManagement3", =
"wsTestRepositoryManagement3");
-
- RepositoryServiceConfiguration repoConfig =3D
- (RepositoryServiceConfiguration)container.getComponentInstanceOfT=
ype(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();
-
- }
-}
--===============8940724663378984978==--
From do-not-reply at jboss.org Fri Jun 3 10:24:20 2011
Content-Type: multipart/mixed; boundary="===============4913150296733570693=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4474 - in
jcr/trunk/exo.jcr.component.core:
src/main/java/org/exoplatform/services/jcr/impl/core and 1 other directories.
Date: Fri, 03 Jun 2011 10:24:20 -0400
Message-ID: <201106031424.p53EOKBW031911@svn01.web.mwc.hst.phx2.redhat.com>
--===============4913150296733570693==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 12:44:26 UTC (rev 4=
473)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-06-03 14:24:20 UTC (rev 4=
474)
@@ -402,7 +402,6 @@
org/exoplatform/services/jcr/**/impl/**/TestWor=
kspaceManagement.javaorg/exoplatform/services/jcr/**/impl/**/TestWor=
kspaceRestore.javaorg/exoplatform/services/jcr/**/impl/**/TestRep=
ositoryManagement.java
- org/exoplatform/services/jcr/**/impl/**/TestSes=
sionCleaner.javaorg/exoplatform/services/jcr/**/impl/**/Base*.j=
avaorg/exoplatform/services/jcr/**/impl/**/TestJCR=
SerializationStream.javaorg/exoplatform/services/jcr/**/impl/**/TestJCR=
SerializationVersionRestore.java
@@ -740,30 +739,20 @@
org/apache/jackrabbit/test/api/version/*T=
est.java
-
org/exoplatform/services/jcr/**/TestQuery=
Usecases.java
- org/exoplatform/services/jcr/**/TestRollb=
ackBigFiles.java
- org/exoplatform/services/jcr/**/TestImpor=
t.java
- org/exoplatform/services/jcr/**/TestRollb=
ackBigFiles.java
- org/exoplatform/services/jcr/**/TestError=
Multithreading.javaorg/exoplatform/services/jcr/**/api/TestA=
ll.java
- org/exoplatform/services/jcr/**/api/**/Te=
stSameNameItems.java
- org/exoplatform/services/jcr/**/api/**/Te=
stSameNameItems.java
+ org/exoplatform/services/jcr/**/TestError=
Multithreading.java
+ org/exoplatform/services/jcr/**/TestRollb=
ackBigFiles.javaorg/exoplatform/services/jcr/**/impl/**/T=
estWorkspaceManagement.java
- org/exoplatform/services/jcr/**/impl/**/T=
estWorkspaceRestore.java =
+ org/exoplatform/services/jcr/**/impl/**/T=
estWorkspaceRestore.javaorg/exoplatform/services/jcr/**/impl/**/T=
estRepositoryManagement.java
- org/exoplatform/services/jcr/**/impl/**/V=
alueStoragePluginTest.java
- org/exoplatform/services/jcr/**/impl/**/T=
estSessionCleaner.javaorg/exoplatform/services/jcr/**/impl/**/B=
ase*.javaorg/exoplatform/services/jcr/**/impl/**/T=
estJCRSerializationStream.javaorg/exoplatform/services/jcr/**/impl/**/T=
estJCRSerializationVersionRestore.javaorg/exoplatform/services/jcr/**/usecases/=
**/RemoveSameNameSiblingTest.javaorg/exoplatform/services/jcr/**/usecases/=
**/TestQueryWithNumberAndSpace.javaorg/exoplatform/services/jcr/**/usecases/=
BaseUsecasesTest.java
- org/exoplatform/services/jcr/**/usecases/=
**/ExportWorkspaceSystemViewTest.java
- org/exoplatform/services/jcr/**/impl/**/T=
estLinkedWorkspaceStorageCacheMetrics.javaorg/exoplatform/services/jcr/**/impl/**/S=
QLBenchmarkTest.java
- org/exoplatform/services/jcr/**/impl/**/T=
estCleanableFileStreamValueData.javaorg/apache/jackrabbit/test/api/TestAll.ja=
vaorg/apache/jackrabbit/test/api/**/Abstrac=
t*.java
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/se=
rvices/jcr/impl/core/SessionRegistry.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 =3D=3D timeout)
+ {
+ return;
+ }
+
+ // disable the cleaner
+ this.sessionCleaner.halt();
+ this.sessionCleaner =3D null;
+
this.timeOut =3D timeout <=3D 0 ? 0 : timeout * 1000;
if (timeOut =3D=3D 0 && sessionCleaner !=3D null)
{
- // We set a time out to 0 so we disable the cleaner
- this.sessionCleaner.halt();
- this.sessionCleaner =3D 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 =3D=3D 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 =3D new SessionCleaner(repositoryId, DEFAULT_=
CLEANER_TIMEOUT, timeOut); =
if (log.isDebugEnabled())
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/se=
rvices/jcr/impl/core/TestSessionCleaner.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 Sergey Kabashn=
yuk
@@ -41,48 +34,42 @@
{
private final static int AGENT_COUNT =3D 10;
=
+ private final static int TEST_SESSION_TIMEOUT =3D 1; // seconds
+
private SessionRegistry sessionRegistry;
=
private long oldTimeOut;
=
- private final static long TEST_SESSION_TIMEOUT =3D 20000;
-
@Override
public void setUp() throws Exception
{
super.setUp();
sessionRegistry =3D (SessionRegistry)session.getContainer().getCompo=
nentInstanceOfType(SessionRegistry.class);
- oldTimeOut =3D sessionRegistry.timeOut;
- sessionRegistry.timeOut =3D TEST_SESSION_TIMEOUT;
- sessionRegistry.stop();
- Thread.yield();
- sessionRegistry.start();
+ oldTimeOut =3D sessionRegistry.getTimeOut();
+ sessionRegistry.setTimeOut(TEST_SESSION_TIMEOUT);
}
=
@Override
protected void tearDown() throws Exception
{
super.tearDown();
- sessionRegistry.stop();
- sessionRegistry.timeOut =3D oldTimeOut;
- Thread.yield();
- sessionRegistry.start();
+ sessionRegistry.setTimeOut(oldTimeOut);
}
=
public void testSessionRemove() throws LoginException, NoSuchWorkspaceE=
xception, RepositoryException,
InterruptedException
{
SessionImpl session2 =3D (SessionImpl)repository.login(credentials, =
"ws");
+ assertTrue(session2.isLive());
=
// Create a weak reference to the session
WeakReference ref =3D new WeakReference(se=
ssion2);
=
- 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 Ex=
ception
- {
- assertNotNull(sessionRegistry);
-
- class AgentLogin extends Thread
- {
-
- Random random =3D new Random();
-
- SessionImpl workSession;
-
- boolean sessionStarted =3D false;
-
- public AgentLogin()
- {
- }
-
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(SessionRegistry.DEFAULT_CLEANER_TIMEOUT - rand=
om.nextInt(200) + 200);
-
- workSession =3D (SessionImpl)repository.login(credentials, =
"ws");
- sessionStarted =3D true;
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("Exception should not be thrown");
- }
- }
- }
-
- class AgentLogout extends Thread
- {
- AgentLogin agentLogin;
-
- public AgentLogout(AgentLogin agentLogin)
- {
- this.agentLogin =3D 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 =3D (SessionImpl)repository.login(credentials, "=
ws");
- while (workSession.isLive())
- {
- Thread.sleep(100);
- }
-
- // start
- List
@@ -823,5 +836,62 @@
+
+ sjdbc
+
+ /conf/standalone/test-configurati=
on-sjdbc-jbc.xml
+
+ =
+
+ cluster
+
+ /conf/standalone/cluster/test-con=
figuration-jbc.xml
+
+ =
+
+ ispn
+
+ /conf/standalone/test-configurati=
on.xml
+ ${jbc.specific.1}
+ ${jbc.specific.2}
+
+
+
+ org.jgroups
+ jgroups
+ 2.11.1.Final
+
+
+ =
+
+ ispn-sjdbc
+
+ /conf/standalone/test-configurati=
on-sjdbc.xml
+ ${jbc.specific.1}
+ ${jbc.specific.2}
+
+
+
+ org.jgroups
+ jgroups
+ 2.11.1.Final
+
+
+ =
+
+ ispn-cluster
+
+ /conf/standalone/cluster/test-con=
figuration.xml
+ ${jbc.specific.1}
+ ${jbc.specific.2}
+
+
+
+ org.jgroups
+ jgroups
+ 2.11.1.Final
+
+
+ =
Modified: jcr/trunk/exo.jcr.component.ext/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.ext/pom.xml 2011-06-03 21:16:43 UTC (rev 44=
75)
+++ jcr/trunk/exo.jcr.component.ext/pom.xml 2011-06-03 21:18:48 UTC (rev 44=
76)
@@ -109,10 +109,6 @@
commons-chain
- org.jgroups
- jgroups
-
- javax.ws.rsjsr311-api
Modified: jcr/trunk/packaging/module/src/main/javascript/jcr.packaging.modu=
le.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/packaging/module/src/main/javascript/jcr.packaging.module.js =
2011-06-03 21:16:43 UTC (rev 4475)
+++ jcr/trunk/packaging/module/src/main/javascript/jcr.packaging.module.js =
2011-06-03 21:18:48 UTC (rev 4476)
@@ -21,9 +21,9 @@
addDependency(core.component.documents) .
addDependency(new Project("jcr", "jcr", "jar", "1.0")).
addDependency(new Project("concurrent", "concurrent", "jar", "1.3.4")).
- addDependency(new Project("org.jgroups", "jgroups", "jar", "2.11.1.Fin=
al")).
+ addDependency(new Project("org.jgroups", "jgroups", "jar", "2.6.20.Fin=
al")).
addDependency(new Project("commons-io", "commons-io", "jar", "1.3.2")).
- addDependency(new Project("org.jboss.cache","jbosscache-core","jar","3=
.2.6.GA")).
+ addDependency(new Project("org.jboss.cache","jbosscache-core","jar","3=
.2.7.GA")).
addDependency(new Project("jboss.jbossts","jbossjts","jar","4.6.1.GA")=
).
addDependency(new Project("jboss.jbossts","jbossts-common","jar","4.6.=
1.GA")).
addDependency(new Project("org.apache.ws.commons","ws-commons-util","j=
ar","1.0.1")).
Modified: jcr/trunk/pom.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/pom.xml 2011-06-03 21:16:43 UTC (rev 4475)
+++ jcr/trunk/pom.xml 2011-06-03 21:18:48 UTC (rev 4476)
@@ -344,11 +344,6 @@
2.0.0
- org.jgroups
- jgroups
- 2.11.1.Final
-
- commons-fileuploadcommons-fileupload1.2.1
@@ -371,7 +366,7 @@
org.jboss.cachejbosscache-core
- 3.2.6.GA
+ 3.2.7.GAjgroups
--===============7596595934199591889==--
From do-not-reply at jboss.org Mon Jun 6 04:48:55 2011
Content-Type: multipart/mixed; boundary="===============2593124212734564732=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4478 -
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils.
Date: Mon, 06 Jun 2011 04:48:55 -0400
Message-ID: <201106060848.p568mtq7016380@svn01.web.mwc.hst.phx2.redhat.com>
--===============2593124212734564732==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: tolusha
Date: 2011-06-06 04:48:55 -0400 (Mon, 06 Jun 2011)
New Revision: 4478
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/ut=
ils/SecurityHelper.java
Log:
EXOJCR-1365: commented out code: use privileged action only when SecurityMa=
nager is installed.
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/com=
mons/utils/SecurityHelper.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/u=
tils/SecurityHelper.java 2011-06-06 08:10:53 UTC (rev 4477)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/u=
tils/SecurityHelper.java 2011-06-06 08:48:55 UTC (rev 4478)
@@ -281,12 +281,12 @@
*/
public static E doPrivilegedAction(PrivilegedAction action)
{
-// if (System.getSecurityManager() !=3D null)
+ if (System.getSecurityManager() !=3D null)
{
// A security manager has been established
return AccessController.doPrivileged(action);
}
-// return action.run();
+ return action.run();
}
=
/**
@@ -299,18 +299,18 @@
public static E doPrivilegedExceptionAction(PrivilegedExceptionActi=
on action)
throws PrivilegedActionException
{
-// if (System.getSecurityManager() !=3D null)
+ if (System.getSecurityManager() !=3D null)
{
// A security manager has been established
return AccessController.doPrivileged(action);
}
-/* try
+ try
{
return action.run();
}
catch (Exception e)
{
throw new PrivilegedActionException(e);
- }*/
+ }
}
}
--===============2593124212734564732==--
From do-not-reply at jboss.org Mon Jun 6 07:52:07 2011
Content-Type: multipart/mixed; boundary="===============5579116226759384821=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4480 - in
core/trunk/exo.core.component.document/src:
test/java/org/exoplatform/services/document/test and 1 other directories.
Date: Mon, 06 Jun 2011 07:52:06 -0400
Message-ID: <201106061152.p56Bq6UD020550@svn01.web.mwc.hst.phx2.redhat.com>
--===============5579116226759384821==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: sergiykarpenko
Date: 2011-06-06 07:52:05 -0400 (Mon, 06 Jun 2011)
New Revision: 4480
Added:
core/trunk/exo.core.component.document/src/test/resources/Trait_union.06=
.Mai_2009.pdf
Modified:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/ser=
vices/document/impl/PDFDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/ser=
vices/document/test/TestPropertiesExtracting.java
Log:
EXOJCR-1373: pdf documents metadata UTF-16 encoding support added
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatf=
orm/services/document/impl/PDFDocumentReader.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/se=
rvices/document/impl/PDFDocumentReader.java 2011-06-06 10:00:20 UTC (rev 44=
79)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/se=
rvices/document/impl/PDFDocumentReader.java 2011-06-06 11:52:05 UTC (rev 44=
80)
@@ -37,6 +37,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Calendar;
@@ -204,7 +205,7 @@
try
{
if (dc.getTitle() !=3D null)
- props.put(DCMetaData.TITLE, dc.getTitle());
+ props.put(DCMetaData.TITLE, fixEncoding(dc.g=
etTitle()));
}
catch (Exception e)
{
@@ -213,7 +214,7 @@
try
{
if (dc.getDescription() !=3D null)
- props.put(DCMetaData.DESCRIPTION, dc.getDesc=
ription());
+ props.put(DCMetaData.DESCRIPTION, fixEncodin=
g(dc.getDescription()));
}
catch (Exception e)
{
@@ -226,7 +227,7 @@
{
for (String creator : dc.getCreators())
{
- props.put(DCMetaData.CREATOR, creator);
+ props.put(DCMetaData.CREATOR, fixEncoding=
(creator));
}
}
}
@@ -257,7 +258,7 @@
try
{
if (pdf.getKeywords() !=3D null)
- props.put(DCMetaData.SUBJECT, pdf.getKeyword=
s());
+ props.put(DCMetaData.SUBJECT, fixEncoding(pd=
f.getKeywords()));
}
catch (Exception e)
{
@@ -267,7 +268,7 @@
try
{
if (pdf.getProducer() !=3D null)
- props.put(DCMetaData.PUBLISHER, pdf.getProdu=
cer());
+ props.put(DCMetaData.PUBLISHER, fixEncoding(=
pdf.getProducer()));
}
catch (Exception e)
{
@@ -296,18 +297,12 @@
{
log.warn("getModificationDate failed: " + e);
}
- // try
- // {
- // if (basic.getCreatorTool() !=3D null)
- // props.put(DCMetaData.PUBLISHER, basic.getCreato=
rTool());
- // }
- // catch (Exception e)
- // {
- // log.warn("getCreatorTool failed: " + e);
- // }
+
+ // DCMetaData.PUBLISHER - basic.getCreatorTool()
}
}
- else
+
+ if (props.isEmpty())
{
// The pdf doesn't contain any metadata, try to use t=
he document
// information instead
@@ -434,4 +429,87 @@
}
}
=
+ private String fixEncoding(String str)
+ {
+ try
+ {
+ String encoding =3D null;
+ int orderMaskOffset =3D 0;
+
+ if (str.startsWith("\\000\\000\\376\\377"))
+ {
+ encoding =3D "UTF-32BE";
+ orderMaskOffset =3D 16;
+ }
+ else if (str.startsWith("\\377\\376\\000\\000"))
+ {
+ encoding =3D "UTF-32LE";
+ orderMaskOffset =3D 16;
+ }
+ else if (str.startsWith("\\376\\377"))
+ {
+ encoding =3D "UTF-16BE";
+ orderMaskOffset =3D 8;
+ }
+ else if (str.startsWith("\\377\\376"))
+ {
+ encoding =3D "UTF-16LE";
+ orderMaskOffset =3D 8;
+ }
+
+ if (encoding =3D=3D null)
+ {
+ // return default
+ return str;
+ }
+ else
+ {
+ int i =3D orderMaskOffset, len =3D str.length();
+ char c;
+ StringBuilder sb =3D new StringBuilder(len);
+ while (i < len)
+ {
+ c =3D str.charAt(i++);
+ if (c =3D=3D '\\')
+ {
+ if (i + 3 <=3D len)
+ {
+ //extract octal-code
+ try
+ {
+ c =3D (char)Integer.parseInt(str.substring(i, i + =
3), 8);
+ i +=3D 3;
+ }
+ catch (NumberFormatException e)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug(
+ "PDF metadata exctraction warning: can not d=
ecode octal code - "
+ + str.substring(i - 1, i + 3) + ".", e);
+ }
+ }
+ }
+ else
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("PDF metadata exctraction warning: octal=
code is not complete - "
+ + str.substring(i - 1, len));
+ }
+ }
+ }
+ sb.append(c);
+ }
+
+ byte[] bytes =3D sb.toString().getBytes();
+ return new String(bytes, encoding);
+ }
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ log.warn("PDF metadata exctraction warning: can not convert metad=
ata string " + str, e);
+ return "";
+ }
+ }
}
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatf=
orm/services/document/test/TestPropertiesExtracting.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/se=
rvices/document/test/TestPropertiesExtracting.java 2011-06-06 10:00:20 UTC =
(rev 4479)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/se=
rvices/document/test/TestPropertiesExtracting.java 2011-06-06 11:52:05 UTC =
(rev 4480)
@@ -107,6 +107,24 @@
}
}
=
+ public void testPDFDocumentReaderServiceXMPUsecase1() throws Exception
+ {
+ InputStream is =3D TestPropertiesExtracting.class.getResourceAsStrea=
m("/Trait_union.06.Mai_2009.pdf");
+ try
+ {
+ DocumentReader rdr =3D service.getDocumentReader("application/pdf=
");
+ Properties testprops =3D rdr.getProperties(is);
+ Properties etalon =3D new Properties();
+ etalon.put(DCMetaData.TITLE, "journal interne mai 2009.qxp");
+ etalon.put(DCMetaData.CREATOR, "presse");
+ evalProps(etalon, testprops, false);
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
public void testWordDocumentReaderService() throws Exception
{
InputStream is =3D TestPropertiesExtracting.class.getResourceAsStrea=
m("/test.doc");
Added: core/trunk/exo.core.component.document/src/test/resources/Trait_unio=
n.06.Mai_2009.pdf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resour=
ces/Trait_union.06.Mai_2009.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
--===============5579116226759384821==--
From do-not-reply at jboss.org Tue Jun 7 02:15:09 2011
Content-Type: multipart/mixed; boundary="===============7866255946339797799=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r4481 - in
jcr/trunk/exo.jcr.component.core/src:
main/java/org/exoplatform/services/jcr/impl/storage/value/fs and 2 other
directories.
Date: Tue, 07 Jun 2011 02:15:09 -0400
Message-ID: <201106070615.p576F9r6018624@svn01.web.mwc.hst.phx2.redhat.com>
--===============7866255946339797799==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: tolusha
Date: 2011-06-07 02:15:08 -0400 (Tue, 07 Jun 2011)
New Revision: 4481
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/FileDigestOutputStream.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/FileValueStorage.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/SimpleFileIOChannel.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/TreeFile.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/TreeFileIOChannel.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/operations/CASableWriteValue.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/operations/DeleteValues.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/operations/ValueFileOperation.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/=
jcr/impl/storage/value/fs/operations/WriteValue.java
jcr/trunk/exo.jcr.component.core/src/test/resources/tsm-excludes.propert=
ies
Log:
EXOJCR-1365: reduce privileged blocks
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/se=
rvices/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services=
/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-06-06=
11:52:05 UTC (rev 4480)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services=
/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-06-07=
06:15:08 UTC (rev 4481)
@@ -480,7 +480,7 @@
* {@inheritDoc}
*/
@Override
- public int getChildNodesCount(NodeData parent) throws RepositoryExcepti=
on
+ public int getChildNodesCount(final NodeData parent) throws RepositoryE=
xception
{
if (cache.isEnabled())
{
@@ -490,8 +490,13 @@
return childCount;
}
}
-
- return super.getChildNodesCount(parent);
+ return executeAction(new PrivilegedExceptionAction()
+ {
+ public Integer run() throws RepositoryException
+ {
+ return CacheableWorkspaceDataManager.super.getChildNodesCount(=
parent);
+ }
+ });
}
=
/**
@@ -606,7 +611,13 @@
}
else
{
- return super.getItemData(parentData, name, itemType);
+ return executeAction(new PrivilegedExceptionAction()
+ {
+ public ItemData run() throws RepositoryException
+ {
+ return CacheableWorkspaceDataManager.super.getItemData(pare=
ntData, name, itemType);
+ }
+ });
}
}
=
@@ -663,7 +674,13 @@
}
else
{
- return super.getItemData(identifier);
+ return executeAction(new PrivilegedExceptionAction()
+ {
+ public ItemData run() throws RepositoryException
+ {
+ return CacheableWorkspaceDataManager.super.getItemData(iden=
tifier);
+ }
+ });
}
}
=
@@ -999,12 +1016,18 @@
}
}
=
- protected List getChildNodesDataByPattern(NodeData parentData=
, List patternFilters)
+ protected List getChildNodesDataByPattern(final NodeData pare=
ntData, final List patternFilters)
throws RepositoryException
{
if (!cache.isEnabled())
{
- return super.getChildNodesData(parentData, patternFilters);
+ return executeAction(new PrivilegedExceptionAction=
>()
+ {
+ public List run() throws RepositoryException
+ {
+ return CacheableWorkspaceDataManager.super.getChildNodesDat=
a(parentData, patternFilters);
+ }
+ });
}
=
if (!cache.isPatternSupported())
@@ -1020,9 +1043,9 @@
return childNodesList;
}
=
- Map childNodesMap =3D new HashMap();
+ final Map childNodesMap =3D new HashMap();
=
- Set uncachedPatterns =3D new HashSet();
+ final Set uncachedPatterns =3D new HashSet();
for (int i =3D 0; i < patternFilters.size(); i++)
{
if (patternFilters.get(i).isExactName())
@@ -1116,42 +1139,50 @@
// execute all patterns and put result in cache
if (!uncachedPatterns.isEmpty())
{
- List persistedItemList =3D
- super.getChildNodesData(parentData, new ArrayList(uncachedPatterns));
-
- if (persistedItemList.size() > 0)
+ executeAction(new PrivilegedExceptionAction()
{
- NodeData parent =3D (NodeData)getItemData(parentData.get=
Identifier());
- if (parent !=3D null)
+ public Void run() throws RepositoryException
{
- // filter nodes list for each exact name
- patternIterator =3D uncachedPatterns.iterator();
- while (patternIterator.hasNext())
+ List persistedItemList =3D
+ CacheableWorkspaceDataManager.super.getChildNodesD=
ata(parentData,
+ new ArrayList(uncachedPattern=
s));
+
+ if (persistedItemList.size() > 0)
{
- QPathEntryFilter pattern =3D patternIterator.next(=
);
- List persistedNodeData =3D (List)pattern.accept(persistedItemList);
- if (pattern.isExactName())
+ NodeData parent =3D (NodeData)getItemData(parentDa=
ta.getIdentifier());
+ if (parent !=3D null)
{
- if (persistedNodeData.isEmpty())
+ // filter nodes list for each exact name
+ Iterator patternIterator =3D =
uncachedPatterns.iterator();
+ while (patternIterator.hasNext())
{
- cache.put(new NullNodeData(parentData, patte=
rn.getQPathEntry()));
+ QPathEntryFilter pattern =3D patternIterator=
.next();
+ List persistedNodeData =3D (List)pattern.accept(persistedItemList);
+ if (pattern.isExactName())
+ {
+ if (persistedNodeData.isEmpty())
+ {
+ cache.put(new NullNodeData(parentData,=
pattern.getQPathEntry()));
+ }
+ else
+ {
+ cache.put(persistedNodeData.get(0));
+ }
+ }
+ else
+ {
+ cache.addChildNodes(parent, pattern, pers=
istedNodeData);
+ }
+ for (NodeData node : persistedItemList)
+ {
+ childNodesMap.put(node.getIdentifier(), n=
ode);
+ }
}
- else
- {
- cache.put(persistedNodeData.get(0));
- }
}
- else
- {
- cache.addChildNodes(parent, pattern, persistedN=
odeData);
- }
- for (NodeData node : persistedItemList)
- {
- childNodesMap.put(node.getIdentifier(), node);
- }
}
+ return null;
}
- }
+ });
}
}
finally
@@ -1286,12 +1317,18 @@
}
}
=
- protected List getChildPropertiesDataByPattern(NodeData n=
odeData, List patternFilters)
+ protected List getChildPropertiesDataByPattern(final Node=
Data nodeData, final List patternFilters)
throws RepositoryException
{
if (!cache.isEnabled())
{
- return super.getChildPropertiesData(nodeData, patternFilters);
+ return executeAction(new PrivilegedExceptionAction>()
+ {
+ public List run() throws RepositoryException
+ {
+ return CacheableWorkspaceDataManager.super.getChildProperti=
esData(nodeData, patternFilters);
+ }
+ });
}
=
if (!cache.isPatternSupported())
@@ -1306,9 +1343,9 @@
return childPropsList;
}
=
- Map childPropsMap =3D new HashMap();
+ final Map childPropsMap =3D new HashMap();
=
- Set uncachedPatterns =3D new HashSet();
+ final Set uncachedPatterns =3D new HashSet();
for (int i =3D 0; i < patternFilters.size(); i++)
{
if (patternFilters.get(i).isExactName())
@@ -1405,43 +1442,52 @@
// execute all patterns and put result in cache
if (!uncachedPatterns.isEmpty())
{
- List persistedItemList =3D
- super.getChildPropertiesData(nodeData, new ArrayList(uncachedPatterns));
-
- if (persistedItemList.size() > 0)
+ executeAction(new PrivilegedExceptionAction()
{
- NodeData parent =3D (NodeData)getItemData(nodeData.getId=
entifier());
- if (parent !=3D null)
+ public Void run() throws RepositoryException
{
- // filter properties list for each exact name
- patternIterator =3D uncachedPatterns.iterator();
- while (patternIterator.hasNext())
+ List persistedItemList =3D
+ CacheableWorkspaceDataManager.super.getChildProper=
tiesData(nodeData,
+ new ArrayList(uncachedPattern=
s));
+
+ if (persistedItemList.size() > 0)
{
- QPathEntryFilter pattern =3D patternIterator.next(=
);
- List persistedPropData =3D (List)pattern.accept(persistedItemList);
- if (pattern.isExactName())
+ NodeData parent =3D (NodeData)getItemData(nodeData=
.getIdentifier());
+ if (parent !=3D null)
{
- if (persistedPropData.isEmpty())
+ // filter properties list for each exact name
+ Iterator patternIterator =3D =
uncachedPatterns.iterator();
+ while (patternIterator.hasNext())
{
- cache.put(new NullPropertyData(parent, patte=
rn.getQPathEntry()));
+ QPathEntryFilter pattern =3D patternIterator=
.next();
+ List persistedPropData =3D
+ (List)pattern.accept(persis=
tedItemList);
+ if (pattern.isExactName())
+ {
+ if (persistedPropData.isEmpty())
+ {
+ cache.put(new NullPropertyData(parent,=
pattern.getQPathEntry()));
+ }
+ else
+ {
+ cache.put(persistedPropData.get(0));
+ }
+ }
+ else
+ {
+ cache.addChildProperties(parent, pattern,=
persistedPropData);
+ }
+
+ for (PropertyData node : persistedItemList)
+ {
+ childPropsMap.put(node.getIdentifier(), n=
ode);
+ }
}
- else
- {
- cache.put(persistedPropData.get(0));
- }
}
- else
- {
- cache.addChildProperties(parent, pattern, persi=
stedPropData);
- }
-
- for (PropertyData node : persistedItemList)
- {
- childPropsMap.put(node.getIdentifier(), node);
- }
}
+ return null;
}
- }
+ });
}
}
finally
@@ -1531,7 +1577,7 @@
* @throws RepositoryException
* Repository error
*/
- protected List listChildPropertiesData(NodeData nodeData,=
boolean forcePersistentRead)
+ protected List listChildPropertiesData(final NodeData nod=
eData, boolean forcePersistentRead)
throws RepositoryException
{
=
@@ -1559,18 +1605,25 @@
return propertiesList;
}
}
- propertiesList =3D super.listChildPropertiesData(nodeData);
- // TODO propertiesList.size() > 0 for SDB
- if (propertiesList.size() > 0 && cache.isEnabled())
+ return executeAction(new PrivilegedExceptionAction>()
{
- NodeData parentData =3D (NodeData)getItemData(nodeData.getIden=
tifier());
+ public List run() throws RepositoryException
+ {
+ List