exo-jcr SVN: r3690 - in core/trunk/exo.core.component.document: src/main/java/org/exoplatform/services/document/impl and 2 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-21 03:56:24 -0500 (Tue, 21 Dec 2010)
New Revision: 3690
Added:
core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xls
core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xlsb
core/trunk/exo.core.component.document/src/test/resources/testPPT.potm
core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsm
core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsx
core/trunk/exo.core.component.document/src/test/resources/testPPT.pptm
core/trunk/exo.core.component.document/src/test/resources/testRTF.rtf
core/trunk/exo.core.component.document/src/test/resources/testWORD.docm
core/trunk/exo.core.component.document/src/test/resources/testWORD.dotm
core/trunk/exo.core.component.document/src/test/resources/testWORD.dotx
core/trunk/exo.core.component.document/src/test/resources/testXHTML.html
Modified:
core/trunk/exo.core.component.document/pom.xml
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java
Log:
EXOJCR-1114: provided support for more MIME types
Modified: core/trunk/exo.core.component.document/pom.xml
===================================================================
--- core/trunk/exo.core.component.document/pom.xml 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/pom.xml 2010-12-21 08:56:24 UTC (rev 3690)
@@ -129,6 +129,15 @@
<include>**/*.msg</include>
<include>**/*.pst</include>
<include>**/*.policy</include>
+ <include>**/*.rtf</include>
+ <include>**/*.dotx</include>
+ <include>**/*.docm</include>
+ <include>**/*.dotm</include>
+ <include>**/*.xlsb</include>
+ <include>**/*.pptm</include>
+ <include>**/*.ppsx</include>
+ <include>**/*.ppsm</include>
+ <include>**/*.potm</include>
</includes>
</testResource>
</testResources>
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -53,7 +53,7 @@
public HTMLDocumentReader()
{
}
-
+
/**
* Get the text/html,application/x-groovy+html mime type.
*
@@ -61,7 +61,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"text/html", "application/x-groovy+html"};
+ return new String[]{"text/html", "application/x-groovy+html", "application/xhtml+xml"};
}
/**
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -53,7 +53,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/excel", "application/xls"};
+ return new String[]{"application/excel", "application/xls", "application/vnd.ms-excel"};
}
/**
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -53,6 +53,15 @@
*/
public String[] getMimeTypes()
{
+ //Supported mimetypes:
+ // "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - "x.xlsx"
+ //
+ //Unsupported mimetypes:
+ // "application/vnd.ms-excel.sheet.binary.macroenabled.12" - "*.xlsb"; There is exceptions at parsing
+ // "application/vnd.openxmlformats-officedocument.spreadsheetml.template" - "x.xltx"; Not tested
+ // "application/vnd.ms-excel.sheet.macroenabled.12" - "x.xlsm"; Not tested
+ // "application/vnd.ms-excel.template.macroenabled.12" - "x.xltm"; Not tested
+ // "application/vnd.ms-excel.addin.macroenabled.12" - "x.xlam"; Not tested
return new String[]{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};
}
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -51,7 +51,21 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/vnd.openxmlformats-officedocument.presentationml.presentation"};
+ //Supported mimetypes:
+ // "application/vnd.openxmlformats-officedocument.presentationml.presentation" -"x.pptx";
+ // "application/vnd.openxmlformats-officedocument.presentationml.slideshow" - "x.ppsx";
+ // "application/vnd.ms-powerpoint.presentation.macroenabled.12" - "testPPT.pptm";
+ // "application/vnd.ms-powerpoint.slideshow.macroenabled.12" - "testPPT.ppsm";
+ //
+ //Not supported mimetypes:
+ // "application/vnd.ms-powerpoint.template.macroenabled.12" - "testPPT.potm"; Has errors
+ // "application/vnd.openxmlformats-officedocument.presentationml.template" - "x.potx"; Not tested
+ // "application/vnd.ms-powerpoint.addin.macroenabled.12" - "x.ppam"; Not tested
+
+ return new String[]{"application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12"};
}
/**
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -47,7 +47,15 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};
+ //Supported document types:
+ // "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - "x.docx"
+ // "application/vnd.openxmlformats-officedocument.wordprocessingml.template" - "x.dotx"
+ // "application/vnd.ms-word.document.macroenabled.12" - "x.docm"
+ // "application/vnd.ms-word.template.macroenabled.12" - "x.dotm"
+
+ return new String[]{"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
+ "application/vnd.ms-word.document.macroenabled.12", "application/vnd.ms-word.template.macroenabled.12"};
}
/**
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -43,7 +43,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/powerpoint", "application/ppt"};
+ return new String[]{"application/powerpoint", "application/ppt", "application/vnd.ms-powerpoint"};
}
/**
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -67,10 +67,10 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"text/plain","script/groovy",
- "application/x-groovy","application/x-javascript",
- "application/javascript","text/javascript",
- "application/x-jaxrs+groovy"};
+ return new String[]{"text/plain", "script/groovy", "application/x-groovy", "application/x-javascript",
+ "application/javascript", "text/javascript", "application/x-jaxrs+groovy"};
+ // "text/rtf", "application/rtf" excluded since there must be RTF parser - because plain text contains a lot formatting tags.
+
}
/**
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -58,4 +58,20 @@
is.close();
}
}
+
+ public void testXHTMLGetContentAsString() throws Exception
+ {
+ InputStream is = TestHtmlDocumentReader.class.getResourceAsStream("/testXHTML.html");
+ try
+ {
+ DocumentReader dr = service.getDocumentReader("application/xhtml+xml");
+ String text = dr.getContentAsText(is);
+ assertTrue(text
+ .contains("This document tests the ability of Apache Tika to extract content from an XHTML document."));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -46,6 +46,24 @@
service.addDocumentReader(new MSExcelDocumentReader());
}
+ public void testClassicExcelGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXExcelDocumentReader.class.getResourceAsStream("/testEXCEL.xls");
+ try
+ {
+ String content = service.getDocumentReader("application/vnd.ms-excel").getContentAsText(is);
+ assertTrue(content.contains("Sample Excel Worksheet"));
+ assertTrue(content.contains("Numbers and their Squares"));
+ assertTrue(content.contains("Number"));
+ assertTrue(content.contains("9"));
+ assertFalse(content.contains("9.0"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
public void testGetContentAsString() throws Exception
{
InputStream is = TestMSExcelDocumentReader.class.getResourceAsStream("/test.xls");
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -61,4 +61,72 @@
is.close();
}
}
+
+ public void testPPSXGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.ppsx");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.openxmlformats-officedocument.presentationml.slideshow")
+ .getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testPPTMGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.pptm");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.ms-powerpoint.presentation.macroenabled.12")
+ .getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testPPSMGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.ppsm");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.ms-powerpoint.slideshow.macroenabled.12").getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java 2010-12-21 08:26:13 UTC (rev 3689)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java 2010-12-21 08:56:24 UTC (rev 3690)
@@ -40,7 +40,7 @@
service.addDocumentReader(new MSXWordDocumentReader());
}
- public void testGetContentAsStringDoc() throws Exception
+ public void testDOCXGetContentAsStringDoc() throws Exception
{
InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/test.docx");
try
@@ -56,4 +56,50 @@
is.close();
}
}
+
+ public void testDOTXGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.dotx");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.openxmlformats-officedocument.wordprocessingml.template")
+ .getContentAsText(is);
+ assertTrue(text.contains("template"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testDOCMGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.docm");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.ms-word.document.macroenabled.12").getContentAsText(is);
+ assertTrue(text.contains("template"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testDOTMGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.dotm");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.ms-word.template.macroenabled.12").getContentAsText(is);
+ assertTrue(text.contains("Template with macros"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Added: core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xls
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xlsb
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testEXCEL.xlsb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testPPT.potm
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testPPT.potm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsm
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsx
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testPPT.ppsx
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testPPT.pptm
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testPPT.pptm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testRTF.rtf
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testRTF.rtf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testWORD.docm
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testWORD.docm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testWORD.dotm
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testWORD.dotm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testWORD.dotx
===================================================================
(Binary files differ)
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testWORD.dotx
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/trunk/exo.core.component.document/src/test/resources/testXHTML.html
===================================================================
--- core/trunk/exo.core.component.document/src/test/resources/testXHTML.html (rev 0)
+++ core/trunk/exo.core.component.document/src/test/resources/testXHTML.html 2010-12-21 08:56:24 UTC (rev 3690)
@@ -0,0 +1,29 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
\ No newline at end of file
Property changes on: core/trunk/exo.core.component.document/src/test/resources/testXHTML.html
___________________________________________________________________
Name: svn:eol-style
+ native
15 years, 5 months
exo-jcr SVN: r3689 - in jcr/trunk/applications/exo.jcr.applications.backupconsole.dist: src/main/doc and 1 other directory.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-12-21 03:26:13 -0500 (Tue, 21 Dec 2010)
New Revision: 3689
Modified:
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
Log:
JCR-1499 : Backup console binary distribution was updated.
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2010-12-20 15:57:29 UTC (rev 3688)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2010-12-21 08:26:13 UTC (rev 3689)
@@ -27,7 +27,7 @@
echo " stop <backup_id> "
echo " status <backup_id> "
echo " restores <repo[/ws]> "
-echo " restore <repo[/ws]> <backup_id> <pathToConfigFile> "
+echo " restore [remove-exists] [<repo[/ws]>] {<backup_id>|<backup_set_path>} [<pathToConfigFile>] "
echo " list [completed] "
echo " info "
echo " drop [force-close-session] <repo[/ws]> "
@@ -49,6 +49,7 @@
echo " <backup_id> : the identifier for backup "
echo " <incr> : incremental job period "
echo " <pathToConfigFile> : path (local) to repository or workspace configuration "
+echo " remove-exists : remove fully (db, value storage, index) exists repository/workspace "
echo " force-close-session : close opened sessions on repository or workspace "
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2010-12-20 15:57:29 UTC (rev 3688)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2010-12-21 08:26:13 UTC (rev 3689)
@@ -13,7 +13,7 @@
echo " stop <backup_id> "
echo " status <backup_id> "
echo " restores <repo[/ws]> "
-echo " restore <repo[/ws]> <backup_id> <pathToConfigFile> "
+echo " restore [remove-exists] [<repo[/ws]>] {<backup_id>|<backup_set_path>} [<pathToConfigFile>] "
echo " list [completed] "
echo " info "
echo " drop [force-close-session] <repo[/ws]> "
@@ -35,6 +35,7 @@
echo " <backup_id> : the identifier for backup "
echo " <incr> : incremental job period "
echo " <pathToConfigFile> : path (local) to repository or workspace configuration "
+echo " remove-exists : remove fully (db, value storage, index) exists repository/workspace "
echo " force-close-session : close opened sessions on repository or workspace "
exit 1
fi
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2010-12-20 15:57:29 UTC (rev 3688)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2010-12-21 08:26:13 UTC (rev 3689)
@@ -15,7 +15,7 @@
stop <backup_id>
status <backup_id>
restores <repo[/ws]>
- restore <repo[/ws]> <backup_id> <pathToConfigFile>
+ restore [remove-exists] [<repo[/ws]>] {<backup_id>|<backup_set_path>} [<pathToConfigFile>]
list [completed]
info
drop [force-close-session] <repo[/ws]>
@@ -37,6 +37,7 @@
<backup_id> : the identifier for backup
<incr> : incremental job period
<pathToConfigFile> : path (local) to repository or workspace configuration
+ remove-exists : remove fully (db, value storage, index) exists repository/workspace
force-close-session : close opened sessions on repository or workspace
@@ -51,7 +52,7 @@
stop <backup_id>
status <backup_id>
restores <repo[/ws]>
- restore <repo[/ws]> <backup_id> <pathToConfigFile>
+ restore [remove-exists] [<repo[/ws]>] {<backup_id>|<backup_set_path>} [<pathToConfigFile>]
list [completed]
info
drop [force-close-session] <repo[/ws]>
@@ -73,4 +74,5 @@
<backup_id> : the identifier for backup
<incr> : incremental job period
<pathToConfigFile> : path (local) to repository or workspace configuration
+ remove-exists : remove fully (db, value storage, index) exists repository/workspace
force-close-session : close opened sessions on repository or workspace
15 years, 5 months
exo-jcr SVN: r3688 - in core/branches/2.3.x/exo.core.component.document: src/main/java/org/exoplatform/services/document/impl and 2 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 10:57:29 -0500 (Mon, 20 Dec 2010)
New Revision: 3688
Added:
core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xls
core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xlsb
core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.potm
core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsm
core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsx
core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.pptm
core/branches/2.3.x/exo.core.component.document/src/test/resources/testRTF.rtf
core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.docm
core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotm
core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotx
core/branches/2.3.x/exo.core.component.document/src/test/resources/testXHTML.html
Modified:
core/branches/2.3.x/exo.core.component.document/pom.xml
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java
core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestTextPlainDocumentReader.java
Log:
COR-218: provided support for more MIME types
Modified: core/branches/2.3.x/exo.core.component.document/pom.xml
===================================================================
--- core/branches/2.3.x/exo.core.component.document/pom.xml 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/pom.xml 2010-12-20 15:57:29 UTC (rev 3688)
@@ -1,122 +1,132 @@
-
- <!--
-
- 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.exoplatform.core</groupId>
- <artifactId>core-parent</artifactId>
- <version>2.3.7-GA-SNAPSHOT</version>
- </parent>
- <artifactId>exo.core.component.document</artifactId>
- <name>eXo Core :: Component :: Demo Service</name>
- <description>eXo demo service Impl</description>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.pdfbox</groupId>
- <artifactId>pdfbox</artifactId>
- </dependency>
- <dependency>
- <groupId>com.lowagie</groupId>
- <artifactId>itext</artifactId>
- </dependency>
- <dependency>
- <groupId>org.htmlparser</groupId>
- <artifactId>htmlparser</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi</artifactId>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-scratchpad</artifactId>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-ooxml</artifactId>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
- <build>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*.properties</include>
- <include>**/*.xml</include>
- <include>**/*.drl</include>
- <include>**/*.vm</include>
- <include>**/*.doc</include>
- <include>**/*.docx</include>
- <include>**/*.dot</include>
- <include>**/*.xls</include>
- <include>**/*.xlsx</include>
- <include>**/*.ppt</include>
- <include>**/*.pptx</include>
- <include>**/*.txt</include>
- <include>**/*.tiff</include>
- <include>**/*.pdf</include>
- <include>**/*.odt</include>
- <include>**/*.html</include>
- <include>**/*.msg</include>
- <include>**/*.pst</include>
- </includes>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/exoplatform/services/document/**/Test*.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+
+ <!--
+
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>core-parent</artifactId>
+ <version>2.3.7-GA-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.core.component.document</artifactId>
+ <name>eXo Core :: Component :: Demo Service</name>
+ <description>eXo demo service Impl</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.pdfbox</groupId>
+ <artifactId>pdfbox</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.lowagie</groupId>
+ <artifactId>itext</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.htmlparser</groupId>
+ <artifactId>htmlparser</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi-scratchpad</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi-ooxml</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.rtf</include>
+ <include>**/*.xml</include>
+ <include>**/*.drl</include>
+ <include>**/*.vm</include>
+ <include>**/*.doc</include>
+ <include>**/*.docx</include>
+ <include>**/*.dotx</include>
+ <include>**/*.docm</include>
+ <include>**/*.dotm</include>
+ <include>**/*.dot</include>
+ <include>**/*.xls</include>
+ <include>**/*.xlsx</include>
+ <include>**/*.xlsb</include>
+ <include>**/*.xltx</include>
+ <include>**/*.ppt</include>
+ <include>**/*.pptm</include>
+ <include>**/*.pptx</include>
+ <include>**/*.ppsx</include>
+ <include>**/*.ppsm</include>
+ <include>**/*.potm</include>
+ <include>**/*.txt</include>
+ <include>**/*.tiff</include>
+ <include>**/*.pdf</include>
+ <include>**/*.odt</include>
+ <include>**/*.html</include>
+ <include>**/*.msg</include>
+ <include>**/*.pst</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/exoplatform/services/document/**/Test*.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -53,7 +53,7 @@
public HTMLDocumentReader()
{
}
-
+
/**
* Get the text/html,application/x-groovy+html mime type.
*
@@ -61,7 +61,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"text/html", "application/x-groovy+html"};
+ return new String[]{"text/html", "application/x-groovy+html", "application/xhtml+xml"};
}
/**
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSExcelDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -43,7 +43,7 @@
{
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSSZ";
-
+
/**
* Get the application/excel mime type.
*
@@ -51,7 +51,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/excel", "application/xls"};
+ return new String[]{"application/excel", "application/xls", "application/vnd.ms-excel"};
}
/**
@@ -68,7 +68,7 @@
}
StringBuilder builder = new StringBuilder("");
-
+
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
try
@@ -77,7 +77,7 @@
{
return "";
}
-
+
HSSFWorkbook wb;
try
{
@@ -116,7 +116,7 @@
}
else
{
- builder.append(d).append(" ");
+ builder.append(d).append(" ");
}
break;
}
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXExcelDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -51,7 +51,17 @@
*/
public String[] getMimeTypes()
{
+ //Supported mimetypes:
+ // "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - "x.xlsx"
+ //
+ //Unsupported mimetypes:
+ // "application/vnd.ms-excel.sheet.binary.macroenabled.12" - "*.xlsb"; There is exceptions at parsing
+ // "application/vnd.openxmlformats-officedocument.spreadsheetml.template" - "x.xltx"; Not tested
+ // "application/vnd.ms-excel.sheet.macroenabled.12" - "x.xlsm"; Not tested
+ // "application/vnd.ms-excel.template.macroenabled.12" - "x.xltm"; Not tested
+ // "application/vnd.ms-excel.addin.macroenabled.12" - "x.xlam"; Not tested
return new String[]{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};
+
}
/**
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXPPTDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -47,7 +47,21 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/vnd.openxmlformats-officedocument.presentationml.presentation"};
+ //Supported mimetypes:
+ // "application/vnd.openxmlformats-officedocument.presentationml.presentation" -"x.pptx";
+ // "application/vnd.openxmlformats-officedocument.presentationml.slideshow" - "x.ppsx";
+ // "application/vnd.ms-powerpoint.presentation.macroenabled.12" - "testPPT.pptm";
+ // "application/vnd.ms-powerpoint.slideshow.macroenabled.12" - "testPPT.ppsm";
+ //
+ //Not supported mimetypes:
+ // "application/vnd.ms-powerpoint.template.macroenabled.12" - "testPPT.potm"; Has errors
+ // "application/vnd.openxmlformats-officedocument.presentationml.template" - "x.potx"; Not tested
+ // "application/vnd.ms-powerpoint.addin.macroenabled.12" - "x.ppam"; Not tested
+
+ return new String[]{"application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12"};
}
/**
@@ -68,7 +82,7 @@
{
return "";
}
-
+
XSLFPowerPointExtractor ppe;
try
{
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/MSXWordDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -44,7 +44,15 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};
+ //Supported document types:
+ // "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - "x.docx"
+ // "application/vnd.openxmlformats-officedocument.wordprocessingml.template" - "x.dotx"
+ // "application/vnd.ms-word.document.macroenabled.12" - "x.docm"
+ // "application/vnd.ms-word.template.macroenabled.12" - "x.dotm"
+
+ return new String[]{"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
+ "application/vnd.ms-word.document.macroenabled.12", "application/vnd.ms-word.template.macroenabled.12"};
}
/**
@@ -66,7 +74,7 @@
{
return "";
}
-
+
XWPFDocument doc;
try
{
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/PPTDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -43,7 +43,7 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"application/powerpoint", "application/ppt"};
+ return new String[]{"application/powerpoint", "application/ppt", "application/vnd.ms-powerpoint"};
}
/**
@@ -60,12 +60,12 @@
}
try
{
-
+
if (is.available() == 0)
{
return "";
}
-
+
PowerPointExtractor ppe;
try
{
Modified: core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/TextPlainDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -67,10 +67,9 @@
*/
public String[] getMimeTypes()
{
- return new String[]{"text/plain","script/groovy",
- "application/x-groovy","application/x-javascript",
- "application/javascript","text/javascript",
- "application/x-jaxrs+groovy"};
+ return new String[]{"text/plain", "script/groovy", "application/x-groovy", "application/x-javascript",
+ "application/javascript", "text/javascript", "application/x-jaxrs+groovy"};
+ // "text/rtf", "application/rtf" excluded since there must be RTF parser - because plain text contains a lot formatting tags.
}
/**
Modified: core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestHtmlDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -56,4 +56,20 @@
is.close();
}
}
+
+ public void testXHTMLGetContentAsString() throws Exception
+ {
+ InputStream is = TestHtmlDocumentReader.class.getResourceAsStream("/testXHTML.html");
+ try
+ {
+ DocumentReader dr = service.getDocumentReader("application/xhtml+xml");
+ String text = dr.getContentAsText(is);
+ assertTrue(text
+ .contains("This document tests the ability of Apache Tika to extract content from an XHTML document."));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Modified: core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSExcelDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -34,9 +34,9 @@
public class TestMSExcelDocumentReader extends BaseStandaloneTest
{
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
-
+
DocumentReaderService service;
-
+
@Override
public void setUp() throws Exception
{
@@ -108,7 +108,24 @@
{
is.close();
}
+ }
+ public void testClassicExcelGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXExcelDocumentReader.class.getResourceAsStream("/testEXCEL.xls");
+ try
+ {
+ String content = service.getDocumentReader("application/vnd.ms-excel").getContentAsText(is);
+ assertTrue(content.contains("Sample Excel Worksheet"));
+ assertTrue(content.contains("Numbers and their Squares"));
+ assertTrue(content.contains("Number"));
+ assertTrue(content.contains("9"));
+ assertFalse(content.contains("9.0"));
+ }
+ finally
+ {
+ is.close();
+ }
}
public String getDate(int year, int month, int day)
Modified: core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXPPTDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -59,4 +59,72 @@
is.close();
}
}
+
+ public void testPPSXGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.ppsx");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.openxmlformats-officedocument.presentationml.slideshow")
+ .getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testPPTMGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.pptm");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.ms-powerpoint.presentation.macroenabled.12")
+ .getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testPPSMGetContentAsString() throws Exception
+ {
+ InputStream is = TestMSXPPTDocumentReader.class.getResourceAsStream("/testPPT.ppsm");
+ try
+ {
+ String content =
+ service.getDocumentReader("application/vnd.ms-powerpoint.slideshow.macroenabled.12").getContentAsText(is);
+ assertTrue(content
+ .contains("This is a test file data with the same content as every other file being tested for"));
+ assertTrue(content.contains("Different words to test against"));
+ assertTrue(content.contains("Quest"));
+ assertTrue(content.contains("Hello"));
+ assertTrue(content.contains("Watershed"));
+ assertTrue(content.contains("Avalanche"));
+ assertTrue(content.contains("Black Panther"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Modified: core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestMSXWordDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -38,7 +38,7 @@
service = (DocumentReaderService)getComponentInstanceOfType(DocumentReaderService.class);
}
- public void testGetContentAsStringDoc() throws Exception
+ public void testDOCXGetContentAsStringDoc() throws Exception
{
InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/test.docx");
try
@@ -54,4 +54,50 @@
is.close();
}
}
+
+ public void testDOTXGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.dotx");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.openxmlformats-officedocument.wordprocessingml.template")
+ .getContentAsText(is);
+ assertTrue(text.contains("template"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testDOCMGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.docm");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.ms-word.document.macroenabled.12").getContentAsText(is);
+ assertTrue(text.contains("template"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void testDOTMGetContentAsStringDoc() throws Exception
+ {
+ InputStream is = TestMSXWordDocumentReader.class.getResourceAsStream("/testWORD.dotm");
+ try
+ {
+ String text =
+ service.getDocumentReader("application/vnd.ms-word.template.macroenabled.12").getContentAsText(is);
+ assertTrue(text.contains("Template with macros"));
+ }
+ finally
+ {
+ is.close();
+ }
+ }
}
Modified: core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestTextPlainDocumentReader.java
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestTextPlainDocumentReader.java 2010-12-20 14:32:26 UTC (rev 3687)
+++ core/branches/2.3.x/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestTextPlainDocumentReader.java 2010-12-20 15:57:29 UTC (rev 3688)
@@ -68,5 +68,4 @@
is.close();
}
}
-
}
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xls
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xlsb
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testEXCEL.xlsb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.potm
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.potm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsm
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsx
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.ppsx
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.pptm
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testPPT.pptm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testRTF.rtf
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testRTF.rtf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.docm
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.docm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotm
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotx
===================================================================
(Binary files differ)
Property changes on: core/branches/2.3.x/exo.core.component.document/src/test/resources/testWORD.dotx
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: core/branches/2.3.x/exo.core.component.document/src/test/resources/testXHTML.html
===================================================================
--- core/branches/2.3.x/exo.core.component.document/src/test/resources/testXHTML.html (rev 0)
+++ core/branches/2.3.x/exo.core.component.document/src/test/resources/testXHTML.html 2010-12-20 15:57:29 UTC (rev 3688)
@@ -0,0 +1,493 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>XHTML test document</title>
+ <meta name="Author" content="Tika Developers"/>
+ <meta http-equiv="refresh" content="5"/>
+ </head>
+ <body>
+ <p>
+ This document tests the ability of Apache Tika to extract content
+ from an <a href="http://www.w3.org/TR/xhtml1/">XHTML document</a>.
+ </p>
+ </body>
+</html>
15 years, 5 months
exo-jcr SVN: r3687 - jcr/tags/1.12.6-GA.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-12-20 09:32:26 -0500 (Mon, 20 Dec 2010)
New Revision: 3687
Added:
jcr/tags/1.12.6-GA/readme.txt
Log:
JCR-1546: add release notes
Added: jcr/tags/1.12.6-GA/readme.txt
===================================================================
--- jcr/tags/1.12.6-GA/readme.txt (rev 0)
+++ jcr/tags/1.12.6-GA/readme.txt 2010-12-20 14:32:26 UTC (rev 3687)
@@ -0,0 +1,450 @@
+JCR 1.12.6-GA release notes
+===========================
+
+eXoPlatform Java Content Repository (JSR-170) implementation and Extension services with clustering support.
+
+Features of this version:
+- Support uploading files via MacOs client
+
+Changes of 1.12.6-GA
+=====================
+
+Bug
+ * [JCR-1497] - Backup console throws NPE if backup agent isn't deployed on server
+ * [JCR-1522] - Not correct MBean components registration when PortalContainer contains more then one repository
+ * [JCR-1527] - Create Group personnal folder should be after Group creation
+ * [JCR-1530] - Wrong Content-Type header for files over a certain size
+ * [JCR-1532] - MySQL-UTF8 dialect default collation can be case-insensitive - need case-sensitive set explicitly
+ * [JCR-1533] - Remove permission on child isn't used
+ * [JCR-1534] - Problem with uploading files via MacOS client
+ * [JCR-1539] - Webdav doesn't work on JBoss
+
+Improvement
+ * [JCR-1506] - Reduce contention on read in NodeTypeDataHierarchyHolder if possible
+ * [JCR-1523] - Avoid iterating over a List thanks to its iterator when it is possible [Part #2]
+
+Task
+ * [JCR-1521] - Adopt webdav-clients to eXo JCR 1.12.6-GA
+ * [JCR-1524] - Move JCR framework commands list configuration to it right place
+ * [JCR-1525] - Publish the reference guide in docbook format
+
+
+Changes of 1.12.6-CR02
+=====================
+
+Bug
+ * [JCR-1468] - Index already present error during cluster start
+ * [JCR-1504] - Indexer doesn't fully release resources on stop
+ * [JCR-1509] - Access Denied in jcr:content with anonim__ permission
+ * [JCR-1511] - WEBDav view in a webbrowser has hardcoded image links
+ * [JCR-1513] - Problems when start backup-console
+
+Improvement
+ * [JCR-1505] - Avoid iterating over a List thanks to its iterator when it is possible
+
+Task
+ * [JCR-1488] - Limit the total amount of WorkerThreads: apply patch
+
+Changes of 1.12.6-CR01
+=====================
+
+Bug
+ * [JCR-1470] - refresh breaks webdav published files
+ * [JCR-1482] - Corrupted Data if the server is stopped while somebobdy is editing a document in ECMS
+ * [JCR-1485] - Unknown error and strange behavior when mary edits a webcontent
+ * [JCR-1490] - Some Unit Tests on DB2 related to the CAS plugin fail
+ * [JCR-1494] - FTP server doesn't show list of workspaces after repository restoring
+
+Documentation
+ * [JCR-1433] - jcr backup/restore
+
+Improvement
+ * [KER-164] - Allow to use variables to define the realm, the rest context and the portal container name of a PortalContainerDefinition
+ * [WS-256] - Allow to use a String as entity for a JSON response
+ * [JCR-1459] - Whole Repository backup support in Backup Console tool
+ * [JCR-1469] - JCR clustering consumes lot of native threads
+ * [JCR-1491] - The result of the method getReferencesData is never stored into the cache
+
+Task
+ * [JCR-1489] - eXo JCR doesn't work with Oracle 11g R2 RAC
+ * [JCR-1495] - Bind slf4j-log4j and log4j dependencies onto the test phase of the various modules of JCR [part #2]
+
+Sub-task
+ * [JCR-1481] - Adding support form authentication in backup console
+
+Changes of 1.12.5-GA
+=====================
+
+Bug
+ * [KER-162] - Simple skin from examples folder doesn't appear at list
+ * [KER-163] - CachingContainer returns unregistered components
+ * [COR-213] - User logged-out and cannot login after some inactivity
+ * [WS-254] - Add org.exoplatform.services.rest.ext.method.filter.MethodAccessFilter in container configuration by default
+ * [JCR-1438] - Problem with JCR versionning
+ * [JCR-1449] - Can't get property of a node if it has a child node with the same name with the property
+ * [JCR-1450] - JCROrganizationService contains nodetype with same name as in CS
+ * [JCR-1453] - Missed nodetypes in cluster testing configuration
+ * [JCR-1462] - Problems during testing of backup on jcr 1.12.5-GA-SNAPSHOT
+ * [JCR-1466] - RepositoryException: URI is not hierarchical on remove workspace via backup console
+ * [JCR-1474] - NPE when try to import data via WorkspaceContentImporter
+
+Improvement
+ * [KER-160] - Prevent the JobSchedulerServiceImpl to launch jobs that rely on non started services in JBoss AS
+ * [KER-161] - Make the JobSchedulerServiceImpl support multi portal containers
+
+Task
+ * [JCR-1455] - Doc's title should be rename from eXoJCR Reference Manual to eXo JCR Developer Guide
+ * [JCR-1461] - Remove timestamp from names of jar-files in application bundles
+ * [JCR-1467] - Cannot use webdav service with a version of jcr:content
+ * [JCR-1471] - Updating eXo JCR version in ra.xml automatically
+ * [JCR-1472] - Adopt Backup client article
+ * [JCR-1473] - merge performance improvements
+
+Changes of 1.12.4-GA
+=====================
+
+Bug
+ * [EXOJCR-688] - Some entries in the eXo JCR cache are not evicted properly
+ * [EXOJCR-843] - Exceptions after importing file with version history
+ * [EXOJCR-849] - "Permission denied" on client side, when trying to move file(s) to another workspace through FTP
+ * [EXOJCR-856] - Problems while recopying same files via webdav
+ * [EXOJCR-865] - Data corrupt after restore a node which has been imported with version history
+ * [EXOJCR-878] - WebDAV doesn't work with nt:file
+ * [EXOJCR-879] - TestCaching.testNotModifiedSince failed in same cases
+ * [EXOJCR-888] - The problems with restore version node
+ * [EXOJCR-890] - JSON framework don't work with beans created in groovy
+ * [EXOJCR-891] - Snaphosts IDs make the applications build improperly
+ * [EXOJCR-908] - Used wrong delimiter during parsing permission value
+ * [EXOJCR-909] - In LDAPService, InitialContext is not safely closed in authenticate method
+ * [EXOJCR-912] - Unable to convert the JCR documentation to pdf
+ * [EXOJCR-916] - Duplicate instantiation of some services
+ * [EXOJCR-921] - Workspace.copy(srcWS, srcAbsPath, destAbsPath) can not copy root child to another workspace root child
+ * [EXOJCR-924] - Unable to coerce 'Event' into a LONG: java.lang.NumberFormatException: For input string: "Event"
+ * [EXOJCR-933] - Determine property type from nodetype definition in DocumentViewImport for version history.
+ * [EXOJCR-936] - Avoid converting binary value to String in tests
+
+Feature Request
+ * [EXOJCR-842] - Allow to disable a given PortalContainer
+ * [EXOJCR-880] - Determine property is multi or single value from nodetype definition in import.
+ * [EXOJCR-886] - Update the document handler to manage MS Office 2007 meta data extraction (docx, ...)
+ * [EXOJCR-934] - Decouple event name from listener name in ListenerService.
+ * [EXOJCR-935] - Add "dav:isreadonly" property management
+
+Task
+ * [EXOJCR-896] - Port Manageability article into docbook
+ * [EXOJCR-905] - Merge the reference guide and the user guide in one single guide
+ * [EXOJCR-913] - Abuse of INFO level logging for DocNumberCache.get()
+ * [EXOJCR-914] - excessive INFO logging by IndexMerger.run()
+ * [EXOJCR-915] - excessive INFO logging by IndexMerger.run()
+ * [EXOJCR-917] - core.packaging.module.js error when in deploy phase
+ * [EXOJCR-919] - maxVolatileTime should be checked on checkFlush()
+ * [EXOJCR-927] - Add "application/x-groovy+html" to HTMLDocumentReader and "application/x-jaxrs+groovy" to TextPlainDocumentReader
+ * [EXOJCR-892] - Remove Fake Chapters
+
+Changes of 1.12.3-GA
+=====================
+
+Bug
+ * [EXOJCR-754] - JDBC Statements left open : Use of Datasources instead of DBCP and C3P0 pools
+ * [EXOJCR-763] - Reordering samename sibling nodes does not update path of child nodes
+ * [EXOJCR-766] - QPath isDescendantOf returns wrong result on samename siblings
+ * [EXOJCR-774] - If-Modified-Since doesn't seem to be well managed in the Wevdav
+ * [EXOJCR-781] - LockManagerImpl should call InitialContextInitializer.recall
+ * [EXOJCR-784] - DOC : wrong examples in profiles section
+ * [EXOJCR-785] - Parameter maxVolatileTime is not working correctly
+ * [EXOJCR-788] - Inconsistency issue cans occur on default portal container parameters
+ * [EXOJCR-795] - Unexpected behavior of the method PortalContainer.isScopeValid()
+ * [EXOJCR-796] - Data corruption
+ * [EXOJCR-804] - "No such file or directory" exception for value storage when using MySQL or Postgres DB in WCM demo 2.0
+ * [EXOJCR-806] - Problems while copying "ftp-ftp"
+ * [EXOJCR-810] - TestRemoveFromValueStorage failed in configuration without ValueStorage
+ * [EXOJCR-813] - ItemImpl.getParent method must return session pooled parent
+ * [EXOJCR-817] - max-buffer-size from configuration should be use to TransientValueData in import (docview and sysview)
+ * [EXOJCR-835] - TestMultiDbJDBCConnection and TestSingleDbJDBCConnection must drop also JCR_xCONTAINER table on tearDown
+ * [EXOJCR-857] - Exception during PROPFIND request if some property content "%" and after not hex chracters
+ * [EXOJCR-865] - Data corrupt after restore a node which has been imported with version history
+ * [EXOJCR-882] - TestCaching fails on Windows XP SP 2 with Russian locale
+
+Feature Request
+ * [EXOJCR-230] - Refactore and move in main part of exo.ws.rest.core project class AbstractResourceTest
+ * [EXOJCR-782] - No longer force extension developers to redefine the whole dependencies list
+ * [EXOJCR-783] - Use cached table for HSLQLDB tables
+ * [EXOJCR-797] - Unable see error message from ProxyService if remote server does not provide Content-Type header.
+
+Task
+ * [EXOJCR-392] - Siblings reordering may update not all the child-items in cache
+ * [EXOJCR-751] - Prepare maintenance branch for jcr 1.12
+ * [EXOJCR-808] - For Sybase DB "check-sns-new-connection" should be set to false by default
+ * [EXOJCR-809] - OrganizationService's tests should not be excluded
+ * [EXOJCR-815] - Document how to use AS Managed DataSource
+ * [EXOJCR-867] - Port documentation for Kernel from wiki to docbook
+ * [EXOJCR-868] - Port documentation for Core from wiki to docbook
+ * [EXOJCR-869] - Port documentation for JCR from wiki to docbook
+ * [EXOJCR-870] - Cleanup WS documentation
+ * [EXOJCR-871] - Document RestServicesList service
+ * [EXOJCR-881] - Port functionality of EXOJCR-482 in jcr-1.12.x
+ * [EXOJCR-884] - Rename JCR documentation artifacts to exo.jcr.* form
+
+Changes of 1.12.2-GA
+====================
+
+Bug
+ * [EXOJCR-497] - JCR serialization test wrong logic with CASable storage
+ * [EXOJCR-730] - Restored repository not accessible after restart Tomcat
+ * [EXOJCR-731] - Deploy error (500 - Unexpected error. null) of REST Service with annotation inheritance.
+ * [EXOJCR-735] - JCR repositories created in runtime is not available after eXo Social restart
+ * [EXOJCR-736] - Problems with anonymous entrance on FTP and NPE
+ * [EXOJCR-743] - InitialContextBinder bind twice same datasource in some case
+ * [EXOJCR-762] - Check whether the repository with the given name doesn't exists before starting restore from backup
+
+Feature Request
+ * [EXOJCR-640] - Migrate to newer version of Apache PDFBox ( and FontBox ) if possible;
+
+Task
+ * [EXOJCR-596] - Upload eXoJCR documentation on jboss.org
+ * [EXOJCR-668] - Validate format of the default values of the property definition during the nodetype registration
+ * [EXOJCR-738] - Search does not work with source in CDATA tag in XML document
+ * [EXOJCR-740] - Constrains ranges are not used in NodeTypeImpl.canSetProperty() validation
+ * [EXOJCR-741] - Backupconsole build improvements
+ * [EXOJCR-765] - Use StringBuilder instead of String concatenation in MSExcelDocumentReader.getContentAsText
+ * [EXOJCR-681] - Decreasing perfomance while running WebdavReadWriteTest tests several times in row
+
+
+
+Changes of 1.12.2-CR1
+=====================
+
+Bug
+ * [EXOJCR-175] - Problems with HTTPBackupAgent - Cyrillic symbols aren't showing after restore
+ * [EXOJCR-683] - java.io.IOException: Socket read failed on heavy loaded WebdavAddBLOBTest benchmark test
+ * [EXOJCR-697] - SQL search by date doesn't work
+ * [EXOJCR-698] - URL encoding in SEARCH and PROPFIND responces differs.
+ * [EXOJCR-700] - Problem in user search with MySql and PostgresDB
+ * [EXOJCR-704] - JCR testuite hangs on sybase
+ * [EXOJCR-708] - Problem with full text searching in text files with non-latin content.
+ * [EXOJCR-712] - Concurrent service creation leads to duplicate service instantiation
+ * [EXOJCR-724] - Bad URL in the error message when a component cannot be instantiated
+ * [EXOJCR-726] - Improper conversion of jboss.server.config.url system property value into File (spaces in filename problem)
+ * [EXOJCR-729] - The FileNotFoundException in restore workspace over BackupWorkspaceinitializer
+ * [EXOJCR-734] - The binary values was not stored in incremental backup.
+
+Feature Request
+ * [EXOJCR-705] - Expose listeners in OrganizationService
+ * [EXOJCR-707] - Check repository management operations on thread safety
+ * [EXOJCR-718] - Allow to get the complete configuration at runtime
+ * [EXOJCR-719] - Better debugging of components loaded
+ * [EXOJCR-721] - Add possibility to use customized GroovyClassLoader in org.exoplatform.services.script.groovy.GroovyScriptInstantiator
+ * [EXOJCR-722] - Make it possible to use other then org.exoplatform.services.rest.impl.method.DefaultMethodInvoker
+
+Task
+ * [EXOJCR-354] - Invoke post read after permissions check
+ * [EXOJCR-663] - Make possibility extends classes RequestDispatcher and ResourceBinder.
+ * [EXOJCR-691] - Fix your missing dependencies
+ * [EXOJCR-692] - Find the reason why the method of type Node.hasNodes is much slower since beta5
+ * [EXOJCR-694] - Change JBC dependencies to use 3.2.4.GA
+ * [EXOJCR-696] - Reduce the concurrency Level in the JBoss Cache Config
+ * [EXOJCR-711] - Misleading error message appears when the external settings cannot be found
+ * [EXOJCR-714] - Improve the usability of the ContainerLifecyclePlugin
+ * [EXOJCR-715] - Ensure that the ExoContainer is fully ThreadSafe
+ * [EXOJCR-716] - Prevent the JobSchedulerServiceImpl to launch jobs that rely on non started services
+ * [EXOJCR-717] - Add to RestRegistryService method without repositoryName in PathParam, insted use current repository. Methods with repositoryName in PathParam marks as Deprecated.
+ * [EXOJCR-720] - Make possibility extends classe GroovyScript2RestLoader
+ * [EXOJCR-723] - JCR Statistics: Describe the arguments of the methods exposed through JMX
+ * [EXOJCR-728] - implementing RequestLifecycle for REST services
+
+
+Changes of 1.12.1-GA
+=====================
+
+Bug
+ * [EXOJCR-612] - JBoss Cache Implementation for the Cache Service test TestAbstractExoCache fails
+ * [EXOJCR-638] - get mixin types through the NodeTypeUtil class
+ * [EXOJCR-661] - Cannot access to the MBeans through the JConsole in Standalone mode
+ * [EXOJCR-662] - Processing SQLException may cause infinite loop.
+ * [EXOJCR-664] - org.exoplatform.services.jcr.impl.storage.value.fs.TestFileIOChannel.testConcurrentRead fail with MSSQL and DB2
+ * [EXOJCR-667] - Temporary spooled file can be not found on save
+ * [EXOJCR-671] - ConcurrentModificationException in FileCleaner with heavy load
+ * [EXOJCR-672] - An eXoCache clear should be local
+ * [EXOJCR-687] - Some JCR parameters that are time parameter are retrieved as number instead of time
+
+Feature Request
+ * [EXOJCR-498] - Provide more details when a JCR query is invalid
+ * [EXOJCR-634] - Upload of a file with special characters like " ' " in filename is not supported by the FTPservice
+ * [EXOJCR-645] - Add ExtHttpHeaders.JAXRS_BODY_PROVIDED header for unhandled exception in REST services and set error message to body responce
+
+Task
+ * [EXOJCR-578] - Use Fisheye in SCM urls used in maven
+ * [EXOJCR-611] - Provide a way to collect statistics around the JCR API accesses
+ * [EXOJCR-639] - Find the reason why the methods of type Property.setValue are much slower since beta5
+ * [EXOJCR-685] - Change JBC dependencies to use 3.2.3.GA
+ * [EXOJCR-689] - Standartize eXo JCR docnmentation projects description.
+ * [EXOJCR-690] - Apply changes in the eXo JCR project in order to be able to publish artifacts in the nexus of JBoss
+ * [EXOJCR-545] - Checking performance on SearchNodesByPropertyTest
+ * [EXOJCR-643] - Improve the performances of the lucene indexing in a cluster by removing contention for read operations
+
+
+Changes of 1.12.1-CR1
+=====================
+
+Bug
+ * [EXOJCR-256] - There are server errors "500 Internal Server Error:" during creation repository or workspace by RestRepositoryService
+ * [EXOJCR-348] - Test problem: TestCleanableFileStreamValueData failed
+ * [EXOJCR-519] - DAILY TESTS are going too long (avg time=5hours)
+ * [EXOJCR-531] - Problems with Lock operations
+ * [EXOJCR-546] - TESTING: Performance testing problems. LockUnlockOwnNodeTest - TPS fell down
+ * [EXOJCR-548] - problem with import & export node
+ * [EXOJCR-555] - NPE with cache eviction at startup
+ * [EXOJCR-557] - Problem while uploading *.pdf to WebDAV server using Mac OS Finder
+ * [EXOJCR-558] - Files uploaded by Mac OS finder are displayed with size "0"
+ * [EXOJCR-559] - Problems with daily performance testing - on PostgreSQL 8.2.9
+ * [EXOJCR-567] - The REST servlet dump errors when the client cut the socket too early should be only a debug log
+ * [EXOJCR-572] - Can not create workspace with default configuration of lock manager
+ * [EXOJCR-581] - Listing the directory in TreeFile may return null during race condition, causing NPE.
+ * [EXOJCR-584] - User's research is case sensitive
+ * [EXOJCR-586] - Missed slf4j dependency for jcr applications on tomcat AS
+ * [EXOJCR-587] - session.save() throws NPE after node reordering
+ * [EXOJCR-588] - Tests errors in eXo XML Processing Services on MACOS
+ * [EXOJCR-591] - Problem with ObservationManager
+ * [EXOJCR-599] - deadlock during dashboard editing
+ * [EXOJCR-600] - Concurrency problem (java.util.HashMap.put called from CacheableLockManagerImpl.getSessionLockManager(CacheableLockManagerImpl.java:473))
+ * [EXOJCR-601] - gatein sample extension should not be required
+ * [EXOJCR-602] - StackOverflow on JsonGeneratorImpl
+ * [EXOJCR-603] - impossible to change user password
+ * [EXOJCR-607] - Sybase Issue with GateIn
+ * [EXOJCR-608] - XaSessionImpl as XA resource should be unique per user, workspace and repository
+ * [EXOJCR-614] - Node.getReferences fail in some cases
+ * [EXOJCR-615] - Need check nodedata to avoid exception in method NodeImpl.isNodeType(String).
+ * [EXOJCR-619] - Log record forging (Security Issue)
+ * [EXOJCR-621] - Conflict between symlink feature and Jbosscache
+ * [EXOJCR-623] - Unable to get a version of document using WebDAV (HTTP Response 404 returned).
+ * [EXOJCR-633] - Problems with manual testing - tomcat-server on ftp -.IndexOutOfBoundsException
+
+Feature Request
+ * [EXOJCR-549] - Backup and Restore of a whole Repository
+ * [EXOJCR-571] - Change PersitedValueDataReader/Writer
+ * [EXOJCR-573] - Create database and bind DataSource in runtime
+ * [EXOJCR-582] - DB script modification for oracle11 compatibility
+ * [EXOJCR-585] - Allow to get statistics on Database Access without using a Profiler
+ * [EXOJCR-616] - Remove repository container from repositoryContainers map when repository container start fail.
+ * [EXOJCR-617] - Map environment parameters for all String fields in Repository configuration
+
+Task
+ * [EXOJCR-150] - Ftp client tests failute
+ * [EXOJCR-250] - Add human readable message in case Workspace creation error via HTTPBackupAgent
+ * [EXOJCR-393] - Create indexer load test
+ * [EXOJCR-523] - Upgrade to JBoss Cache 3.2.3.GA
+ * [EXOJCR-550] - Bind slf4j-log4j and log4j dependencies onto the test phase of the various modules of JCR
+ * [EXOJCR-552] - Allow to Test eXo JCR 1.12 on EC2
+ * [EXOJCR-575] - Remove unused PairChangesLog class
+ * [EXOJCR-589] - Limit network traffic and thread blocking for the Lucene Indexer in a cluster
+ * [EXOJCR-590] - DO NOT exclude tests from a parent pom
+ * [EXOJCR-598] - Allow to disable the hints used for the Complex Queries on oracle
+ * [EXOJCR-605] - Normalize logging categories
+ * [EXOJCR-631] - Find a reason, why functional tests fails under Tornado.MySQL with "Cannot create PoolableConnectionFactory (Too many connections)" message.
+ * [EXOJCR-632] - svn: File 'jcr.packaging.module/1.12.0-CP01/jcr.packaging.module-1.12.0-CP01.js' has inconsistent newlines
+
+
+Features of eXoJCR 1.12 comparing to 1.11
+=========================================
+
+- Repository clustering based on JBossCache and JBoss Transactions.
+- Lazy-load option for child nodes and properties read, improved items dataflow for read/write operations
+- Alternative data container optimized for read operations (consuming less database queries)
+- Database dialect can be autodetected (if not pointed in the configuration)
+- Support for Values large of 2GiB
+- Portal container configuration improvements (default definitions, link and externaly loaded parameters)
+- Concurrency improvements for Session registry and Values stroage
+- Concurrency improvements for XA transactions support (Repository login and logout faster now)
+- Improved serach based on Lucene 2.4
+- Support of MySQL/InnoDB database for multi-language content
+- Standalone container can use configuration stored in JBossAS server configuration directory by default
+- WebDAV server update-policy can be configured to different versioning behaviour
+- Lot of WebDAV server bugfixes
+- HTTP (RESTful) Backup agent with concole client
+- HTTP (RESTful) Repository management service
+- Support of Java6 and Java5 runtime and development environment
+
+Since version of 1.12 eXoJCR available under LGPL license (version 2.1).
+
+eXoJCR 1.12 tested in on the databases:
+ MySQL 5.1 MYSQL Connector/J 5.1.8
+ Oracle DB 10g (10.2.0.1) Oracle 10g (10.2.0.1)
+ PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-605
+ DB2 9,7 IBM Data Server Driver for JDBC and SQLJ (JCC Driver) Version: 9.1 (fixpack 3a)
+ MS SQL Server 2005 SP3 JDBC Driver 2.0
+ MS SQL Server 2008 SP1 JDBC Driver 2.0
+ Sybase 15.0.2 JConnect v6.0.5 (Build 26564 / 11 Jun 2009)
+
+
+Release includes:
+* eXo Kernel 2.2.6-GA
+* eXo Core 2.3.6-GA
+* eXo WS 2.1.6-GA
+* eXo JCR 1.12.6-GA
+
+1.12.6-GA tasks:
+* http://jira.exoplatform.org/browse/JCR/fixforversion/12180
+
+JCR Samples
+===========
+
+1. Start Up (Tomcat)
+ Tomcat 6 bundled can be started by executing the following commands:
+
+ $CATALINA_HOME\bin\eXo.bat run (Windows)
+
+ $CATALINA_HOME/bin/eXo.sh run (Unix)
+
+2. After startup, the sample applications will be available by visiting:
+
+ http://localhost:8080/browser - Simple JCR browser
+ Browse the JCR repository that was started with Tomcat
+ http://localhost:8080/fckeditor - FCK editor sample
+ Edits the sample node using FCKEditor and browse it JCR browser
+ http://localhost:8080/rest/jcr/repository/production - WebDAV service,
+ Open in Microsoft Explorer, File-Open-OpenAsWebFolder with url http://localhost:8080/rest/jcr/repository/production
+ Add/read/remove files there and browse it in the JCR browser or FTP.
+ User name/password: root/exo
+ ftp://localhost:2121 - FTP server
+ Open the repository in FTP client and browse the JCR repository started with Tomcat as FTP content,
+ add/read/remove files there and browse it in the JCR browser or WebDAV.
+
+EAR deploy
+==========
+
+eXo JCR was tested under JBoss-5.1.0.GA application server
+
+JBoss-5.1.0.GA
+
+ 1. Configuration
+
+ * Copy jcr.ear into $jboss_home/server/default/deploy
+ * Create $jboss_home/server/default/conf/exo-conf folder if it doesn't exist.
+ * Put exo-configuration.xml into $jboss_home/server/default/conf/exo-conf/exo-configuration.xml
+ * Configure JAAS by inserting XML fragment shown below into $jboss_home/server/default/conf/login-config.xml
+
+---------
+<application-policy name="exo-domain">
+ <authentication>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ </authentication>
+ </application-policy>
+---------
+
+ 2. Start Up
+
+ Execute
+ * bin/run.bat on Windows
+ or
+ * bin/run.sh on Unix
+
+Resources
+=========
+
+ Company site http://www.exoplatform.com
+ Documentation wiki http://wiki.exoplatform.org
+ Community JIRA https://jira.jboss.org/jira/browse/EXOJCR, http://jira.exoplatform.org
+ Comminity site http://www.exoplatform.org
+ Community forum http://www.exoplatform.com/portal/public/en/forum
+ JavaDoc site http://docs.exoplatform.org
+
\ No newline at end of file
15 years, 5 months
exo-jcr SVN: r3686 - jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 08:29:54 -0500 (Mon, 20 Dec 2010)
New Revision: 3686
Modified:
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml
Log:
JCR-1519: Updated XPath query ordering chapter in jcr documents
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml 2010-12-20 13:11:43 UTC (rev 3685)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/searching/order-by-property.xml 2010-12-20 13:29:54 UTC (rev 3686)
@@ -55,7 +55,7 @@
<programlisting>// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
-String xpathStatement = "//element(*,mix:title) order by prop_pagecount ascending";
+String xpathStatement = "//element(*,mix:title) order by @prop_pagecount ascending";
Query query = queryManager.createQuery(xpathStatement, Query.XPATH);
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
15 years, 5 months
exo-jcr SVN: r3685 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 08:11:43 -0500 (Mon, 20 Dec 2010)
New Revision: 3685
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
Log:
EXOJCR-1113: SessionDataManager.listChildPropertiesData(NodeData parent) now does not return ValueDatas
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-20 12:54:25 UTC (rev 3684)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-20 13:11:43 UTC (rev 3685)
@@ -984,7 +984,7 @@
try
{
- return (List<PropertyData>)mergeProps(parent, transactionableManager);
+ return (List<PropertyData>)mergeProps(parent, false, transactionableManager);
}
finally
{
@@ -1010,7 +1010,7 @@
try
{
- return (List<PropertyData>)mergeProps(parent, transactionableManager);
+ return (List<PropertyData>)mergeProps(parent, true, transactionableManager);
}
finally
{
@@ -1982,9 +1982,11 @@
* from outgoing list WARN. THIS METHOD HAS SIBLING - mergeList, see below.
*
* @param rootData
+ * @param listOnly
* @return
*/
- protected List<? extends ItemData> mergeProps(ItemData rootData, DataManager dataManager) throws RepositoryException
+ protected List<? extends ItemData> mergeProps(ItemData rootData, boolean listOnly, DataManager dataManager)
+ throws RepositoryException
{
// 1 get all transient descendants
Collection<ItemState> transientDescendants = changesLog.getLastChildrenStates(rootData, false);
@@ -1993,7 +1995,7 @@
{
// 2 get ALL persisted descendants
Map<String, ItemData> descendants = new LinkedHashMap<String, ItemData>();
- traverseStoredDescendants(rootData, dataManager, MERGE_PROPS, descendants, false, transientDescendants);
+ traverseStoredDescendants(rootData, dataManager, MERGE_PROPS, descendants, listOnly, transientDescendants);
// merge data
for (ItemState state : transientDescendants)
15 years, 5 months
exo-jcr SVN: r3684 - jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 07:54:25 -0500 (Mon, 20 Dec 2010)
New Revision: 3684
Modified:
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
Log:
JCR-1540: The Last-modified property in the HTTP header is now passed correctly
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2010-12-20 12:41:58 UTC (rev 3683)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2010-12-20 12:54:25 UTC (rev 3684)
@@ -18,6 +18,27 @@
*/
package org.exoplatform.services.jcr.webdav.command;
+import org.exoplatform.common.http.HTTPStatus;
+import org.exoplatform.common.util.HierarchicalProperty;
+import org.exoplatform.services.jcr.webdav.Range;
+import org.exoplatform.services.jcr.webdav.WebDavConst;
+import org.exoplatform.services.jcr.webdav.resource.CollectionResource;
+import org.exoplatform.services.jcr.webdav.resource.FileResource;
+import org.exoplatform.services.jcr.webdav.resource.Resource;
+import org.exoplatform.services.jcr.webdav.resource.ResourceUtil;
+import org.exoplatform.services.jcr.webdav.resource.VersionResource;
+import org.exoplatform.services.jcr.webdav.resource.VersionedFileResource;
+import org.exoplatform.services.jcr.webdav.resource.VersionedResource;
+import org.exoplatform.services.jcr.webdav.util.MultipartByterangesEntity;
+import org.exoplatform.services.jcr.webdav.util.RangedInputStream;
+import org.exoplatform.services.jcr.webdav.util.TextUtil;
+import org.exoplatform.services.jcr.webdav.xml.WebDavNamespaceContext;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.ExtHttpHeaders;
+import org.exoplatform.services.rest.ext.provider.XSLTStreamingOutput;
+import org.exoplatform.services.rest.impl.header.MediaTypeHelper;
+
import java.io.InputStream;
import java.net.URI;
import java.text.DateFormat;
@@ -39,27 +60,6 @@
import javax.ws.rs.core.Response;
import javax.xml.transform.stream.StreamSource;
-import org.exoplatform.common.http.HTTPStatus;
-import org.exoplatform.common.util.HierarchicalProperty;
-import org.exoplatform.services.jcr.webdav.Range;
-import org.exoplatform.services.jcr.webdav.WebDavConst;
-import org.exoplatform.services.jcr.webdav.resource.CollectionResource;
-import org.exoplatform.services.jcr.webdav.resource.FileResource;
-import org.exoplatform.services.jcr.webdav.resource.Resource;
-import org.exoplatform.services.jcr.webdav.resource.ResourceUtil;
-import org.exoplatform.services.jcr.webdav.resource.VersionResource;
-import org.exoplatform.services.jcr.webdav.resource.VersionedFileResource;
-import org.exoplatform.services.jcr.webdav.resource.VersionedResource;
-import org.exoplatform.services.jcr.webdav.util.MultipartByterangesEntity;
-import org.exoplatform.services.jcr.webdav.util.RangedInputStream;
-import org.exoplatform.services.jcr.webdav.util.TextUtil;
-import org.exoplatform.services.jcr.webdav.xml.WebDavNamespaceContext;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.ExtHttpHeaders;
-import org.exoplatform.services.rest.ext.provider.XSLTStreamingOutput;
-import org.exoplatform.services.rest.impl.header.MediaTypeHelper;
-
/**
* Created by The eXo Platform SAS Author : <a
* href="gavrikvetal(a)gmail.com">Vitaly Guly</a>.
@@ -190,10 +190,12 @@
RangedInputStream rangedInputStream = new RangedInputStream(istream, start, end);
- return Response.status(HTTPStatus.PARTIAL).header(HttpHeaders.CONTENT_LENGTH,
- Long.toString(returnedContentLength)).header(ExtHttpHeaders.ACCEPT_RANGES, "bytes").header(
- ExtHttpHeaders.CONTENTRANGE, "bytes " + start + "-" + end + "/" + contentLength).entity(
- rangedInputStream).type(contentType).build();
+ return Response.status(HTTPStatus.PARTIAL)
+ .header(HttpHeaders.CONTENT_LENGTH, Long.toString(returnedContentLength))
+ .header(ExtHttpHeaders.ACCEPT_RANGES, "bytes")
+ .header(ExtHttpHeaders.LAST_MODIFIED, lastModifiedProperty.getValue())
+ .header(ExtHttpHeaders.CONTENTRANGE, "bytes " + start + "-" + end + "/" + contentLength)
+ .entity(rangedInputStream).type(contentType).build();
}
// multipart byte ranges as byte:0-100,80-150,210-300
@@ -209,8 +211,9 @@
MultipartByterangesEntity mByterangesEntity =
new MultipartByterangesEntity(resource, ranges, contentType, contentLength);
- return Response.status(HTTPStatus.PARTIAL).header(ExtHttpHeaders.ACCEPT_RANGES, "bytes").entity(
- mByterangesEntity).type(ExtHttpHeaders.MULTIPART_BYTERANGES + WebDavConst.BOUNDARY).build();
+ return Response.status(HTTPStatus.PARTIAL).header(ExtHttpHeaders.ACCEPT_RANGES, "bytes")
+ .header(ExtHttpHeaders.LAST_MODIFIED, lastModifiedProperty.getValue()).entity(mByterangesEntity)
+ .type(ExtHttpHeaders.MULTIPART_BYTERANGES + WebDavConst.BOUNDARY).build();
}
else
{
15 years, 5 months
exo-jcr SVN: r3683 - in jcr/branches/1.12.x: exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access and 1 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 07:41:58 -0500 (Mon, 20 Dec 2010)
New Revision: 3683
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access/TestAccessUpdateMixin.java
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
Log:
JCR-1544: now we check permission on node itself in SessionDataManager.validateAccessPermissions(ItemState changedItem) for state "isMixinChanged"
Modified: jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-20 10:35:46 UTC (rev 3682)
+++ jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-20 12:41:58 UTC (rev 3683)
@@ -1546,6 +1546,10 @@
{
validateRemoveAccessPermission(changedItem);
}
+ else if (changedItem.isMixinChanged())
+ {
+ validateMixinChangedPermission(changedItem);
+ }
else
{
NodeData parent = (NodeData)getItemData(changedItem.getData().getParentIdentifier());
@@ -1564,17 +1568,6 @@
+ " item owner " + parent.getACL().getOwner());
}
}
- else if (changedItem.isMixinChanged())
- {
- if (!accessManager.hasPermission(parent.getACL(), new String[]{PermissionType.ADD_NODE,
- PermissionType.SET_PROPERTY}, session.getUserState().getIdentity()))
- {
- throw new AccessDeniedException("Access denied: ADD_NODE or SET_PROPERTY"
- + changedItem.getData().getQPath().getAsString() + " for: " + session.getUserID()
- + " item owner " + parent.getACL().getOwner());
- }
- }
-
}
else if (changedItem.isAdded() || changedItem.isUpdated())
{
@@ -1616,6 +1609,17 @@
}
}
+ private void validateMixinChangedPermission(ItemState changedItem) throws AccessDeniedException
+ {
+ if (!accessManager.hasPermission(((NodeData)changedItem.getData()).getACL(), new String[]{
+ PermissionType.ADD_NODE, PermissionType.SET_PROPERTY}, session.getUserState().getIdentity()))
+ {
+ throw new AccessDeniedException("Access denied: ADD_NODE or SET_PROPERTY"
+ + changedItem.getData().getQPath().getAsString() + " for: " + session.getUserID() + " item owner "
+ + ((NodeData)changedItem.getData()).getACL().getOwner());
+ }
+ }
+
/**
* Validate ItemState which represents the add node, for it's all mandatory items
*
Added: jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access/TestAccessUpdateMixin.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access/TestAccessUpdateMixin.java (rev 0)
+++ jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access/TestAccessUpdateMixin.java 2010-12-20 12:41:58 UTC (rev 3683)
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.access;
+
+import org.exoplatform.services.jcr.BaseStandaloneTest;
+import org.exoplatform.services.jcr.access.PermissionType;
+import org.exoplatform.services.jcr.access.SystemIdentity;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.NodeImpl;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Node;
+import javax.jcr.Session;
+
+/**
+* Created by The eXo Platform SAS.
+*
+* <br/>Date:
+*
+* @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+* @version $Id: TestAccessUpdateMixin.java 111 2008-11-11 11:11:11Z serg $
+*/
+public class TestAccessUpdateMixin extends BaseStandaloneTest
+{
+
+ @Override
+ public String getRepositoryName()
+ {
+ return "db1";
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ //create nodes with "john" user
+ Session sessJohn = repository.login(new CredentialsImpl("john", "exo".toCharArray()));
+ Node testRoot = sessJohn.getRootNode().addNode("testRoot");
+ testRoot.addMixin("exo:privilegeable");
+ testRoot.setProperty("prop", "value");
+ sessJohn.save();
+ sessJohn.logout();
+ }
+
+ public void tearDown() throws Exception
+ {
+ Session sysSession = this.repository.getSystemSession(session.getWorkspace().getName());
+ if (sysSession.getRootNode().hasNode("testRoot"))
+ {
+ Node testRoot = sysSession.getRootNode().getNode("testRoot");
+ testRoot.remove();
+ sysSession.save();
+ }
+ super.tearDown();
+ }
+
+ public void testUpdateWhenParentHasRightsButChildNot() throws Exception
+ {
+ Session sessJohn = repository.login(new CredentialsImpl("john", "exo".toCharArray()));
+ NodeImpl subNode = (NodeImpl)sessJohn.getRootNode().getNode("testRoot").addNode("testNode");
+ subNode.addMixin("exo:privilegeable");
+ sessJohn.save();
+
+ NodeImpl testRoot = (NodeImpl)sessJohn.getRootNode().getNode("testRoot");
+
+ testRoot.setPermission("mary", PermissionType.ALL);
+ testRoot.setPermission("john", PermissionType.ALL);
+ testRoot.removePermission(SystemIdentity.ANY);
+
+ subNode.setPermission("mary", new String[]{PermissionType.READ, PermissionType.SET_PROPERTY});
+ subNode.removePermission(SystemIdentity.ANY);
+ sessJohn.save();
+ sessJohn.logout();
+
+ // login as Mary with no rights, and try to addmixin
+ Session sessMary = repository.login(new CredentialsImpl("mary", "exo".toCharArray()));
+ subNode = (NodeImpl)sessMary.getRootNode().getNode("testRoot").getNode("testNode");
+
+ try
+ {
+ subNode.addMixin("mix:referenceable");
+ sessMary.save();
+ fail();
+ }
+ catch (AccessDeniedException e)
+ {
+ //ok
+ }
+ finally
+ {
+ sessMary.logout();
+ }
+ }
+
+ public void testUpdateWhenChildHasRightsButParentNot() throws Exception
+ {
+ Session sessJohn = repository.login(new CredentialsImpl("john", "exo".toCharArray()));
+
+ NodeImpl subNode = (NodeImpl)sessJohn.getRootNode().getNode("testRoot").addNode("testNode");
+ subNode.addMixin("exo:privilegeable");
+ sessJohn.save();
+
+ NodeImpl testRoot = (NodeImpl)sessJohn.getRootNode().getNode("testRoot");
+
+ testRoot.setPermission("mary", new String[]{PermissionType.READ});
+ testRoot.setPermission("john", PermissionType.ALL);
+ testRoot.removePermission(SystemIdentity.ANY);
+
+ subNode.setPermission("mary", PermissionType.ALL);
+ subNode.removePermission(SystemIdentity.ANY);
+ sessJohn.save();
+ sessJohn.logout();
+
+ // login as Mary with no rights, and try to addmixin
+ Session sessMary = repository.login(new CredentialsImpl("mary", "exo".toCharArray()));
+ subNode = (NodeImpl)sessMary.getRootNode().getNode("testRoot").getNode("testNode");
+
+ try
+ {
+ subNode.addMixin("mix:referenceable");
+ sessMary.save();
+ }
+ catch (AccessDeniedException e)
+ {
+ fail("There must not be access denied exception.");
+ }
+ finally
+ {
+ sessMary.logout();
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/access/TestAccessUpdateMixin.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2010-12-20 10:35:46 UTC (rev 3682)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2010-12-20 12:41:58 UTC (rev 3683)
@@ -450,21 +450,41 @@
role="bold">node1</emphasis>/myprop property - jcr will check
"remove" permission on "node1".</para>
</listitem>
+
+ <listitem>
+ <para><emphasis role="bold">add mixin</emphasis>: check "add_node"
+ and "set_property" permission on target node</para>
+
+ <para>For example. Try add mixin to /node1/<emphasis
+ role="bold">subnode</emphasis> node - jcr will check "add_node"
+ and "set_property" permission on "subnode".</para>
+ </listitem>
</itemizedlist>
- <para>Behavior of the permission "remove" has changed since JCR
- 1.12.6-GA. The old behavior is:</para>
+ <note>
+ <para>Behavior of the permission "remove" and "add mixin" validation
+ has changed since JCR 1.12.6-GA. The old behavior is:</para>
- <para><itemizedlist>
- <listitem>
- <para><emphasis role="bold">remove node</emphasis>: check remove
- permission on parent node</para>
+ <para><itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">remove node</emphasis>: check
+ remove permission on parent node</para>
- <para>For example. Try to remove /<emphasis
- role="bold">node1</emphasis>/subnode node - jcr will check
- "remove" permission on "node1".</para>
- </listitem>
- </itemizedlist></para>
+ <para>For example. Try to remove /<emphasis
+ role="bold">node1</emphasis>/subnode node - jcr will check
+ "remove" permission on "node1".</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">add mixin</emphasis>: check
+ "add_node" and "set_property" permission on parent node</para>
+
+ <para>For example. Try add mixin to /<emphasis
+ role="bold">node1</emphasis>/subnode node - jcr will check
+ "add_node" and "set_property" permission on "node1".</para>
+ </listitem>
+ </itemizedlist></para>
+ </note>
</section>
</section>
15 years, 5 months
exo-jcr SVN: r3682 - in jcr/branches/1.12.x/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/api/lock and 1 other directory.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2010-12-20 05:35:46 -0500 (Mon, 20 Dec 2010)
New Revision: 3682
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockPermissions.java
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
Log:
JCR-1463: now lock operations does check any permission
Modified: jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-12-20 10:25:55 UTC (rev 3681)
+++ jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-12-20 10:35:46 UTC (rev 3682)
@@ -1543,6 +1543,15 @@
if (!isNodeType(Constants.MIX_LOCKABLE))
throw new LockException("Node is not lockable " + getPath());
+ // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
+ // is wrapped into AccessControlException
+ if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
+ session.getUserState().getIdentity()))
+ {
+ throw new AccessDeniedException("Access denied: unlock operation " + getPath() + " for: "
+ + session.getUserID() + " item owner " + getACL().getOwner());
+ }
+
if (dataManager.hasPendingChanges(getInternalPath()))
throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
@@ -1579,6 +1588,15 @@
if (!isNodeType(Constants.MIX_LOCKABLE))
throw new LockException("Node is not lockable " + getPath());
+ // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
+ // is wrapped into AccessControlException
+ if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
+ session.getUserState().getIdentity()))
+ {
+ throw new AccessDeniedException("Access denied: unlock operation " + getPath() + " for: "
+ + session.getUserID() + " item owner " + getACL().getOwner());
+ }
+
if (dataManager.hasPendingChanges(getInternalPath()))
throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
@@ -2263,6 +2281,15 @@
if (dataManager.hasPendingChanges(getInternalPath()))
throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());
+ // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
+ // is wrapped into AccessControlException
+ if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
+ session.getUserState().getIdentity()))
+ {
+ throw new AccessDeniedException("Access denied: unlock operation " + getPath() + " for: "
+ + session.getUserID() + " item owner " + getACL().getOwner());
+ }
+
doUnlock();
session.getActionHandler().postUnlock(this);
Added: jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockPermissions.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockPermissions.java (rev 0)
+++ jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockPermissions.java 2010-12-20 10:35:46 UTC (rev 3682)
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.api.lock;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.access.PermissionType;
+import org.exoplatform.services.jcr.core.CredentialsImpl;
+import org.exoplatform.services.jcr.impl.core.NodeImpl;
+
+import java.security.AccessControlException;
+import java.util.HashMap;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.lock.Lock;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestLockPermissions.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestLockPermissions extends JcrAPIBaseTest
+{
+
+ private Node lockedNode = null;
+
+ public void setUp() throws Exception
+ {
+
+ super.setUp();
+
+ if (lockedNode == null)
+ try
+ {
+ lockedNode = root.addNode("rootLockPermissionsTest");
+ // if (lockedNode.canAddMixin("mix:lockable"))
+ // lockedNode.addMixin("mix:lockable");
+ root.save();
+ }
+ catch (RepositoryException e)
+ {
+ fail("Child node must be accessible and readable. But error occurs: " + e);
+ }
+ }
+
+ public void testLockAccessDeniedException() throws RepositoryException
+ {
+ Session session1 = repository.login(new CredentialsImpl("admin", "admin".toCharArray()), "ws");
+ NodeImpl nodeToLockSession1 =
+ (NodeImpl)session1.getRootNode().getNode("rootLockPermissionsTest").addNode("testLockSesssionScoped");
+ nodeToLockSession1.addMixin("mix:lockable");
+ nodeToLockSession1.addMixin("exo:owneable");
+ nodeToLockSession1.addMixin("exo:privilegeable");
+
+ // change permission
+ HashMap<String, String[]> perm = new HashMap<String, String[]>();
+ perm.put("john", new String[]{PermissionType.READ});
+ nodeToLockSession1.setPermissions(perm);
+ session1.save();
+
+ nodeToLockSession1.lock(true, false);// boolean isSessionScoped=false
+ assertTrue(nodeToLockSession1.isLocked());
+ nodeToLockSession1.unlock();
+ assertFalse(nodeToLockSession1.isLocked());
+
+ Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.READ);
+ try
+ {
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.SET_PROPERTY);
+ fail("AccessControlException should have been thrown ");
+ }
+ catch (AccessControlException e)
+ {
+ //ok
+ }
+
+ Node nodeToLockSession2 =
+ session2.getRootNode().getNode("rootLockPermissionsTest").getNode("testLockSesssionScoped");
+ assertFalse(nodeToLockSession2.isLocked());
+ try
+ {
+ try
+ {
+ // trying to lock
+ nodeToLockSession2.lock(true, false);
+ fail("Node locked. An AccessDeniedException should be thrown on set property but doesn't");
+ }
+ catch (AccessDeniedException e)
+ {
+ // ok
+ }
+ }
+ finally
+ {
+ if (nodeToLockSession1.isLocked())
+ {
+ nodeToLockSession1.unlock();
+ }
+ session1.logout();
+ session2.logout();
+ }
+ }
+
+ public void testLockTimedAccessDeniedException() throws RepositoryException
+ {
+ Session session1 = repository.login(new CredentialsImpl("admin", "admin".toCharArray()), "ws");
+ NodeImpl nodeToLockSession1 =
+ (NodeImpl)session1.getRootNode().getNode("rootLockPermissionsTest").addNode("testLockTimed");
+ nodeToLockSession1.addMixin("mix:lockable");
+ nodeToLockSession1.addMixin("exo:owneable");
+ nodeToLockSession1.addMixin("exo:privilegeable");
+
+ // change permission
+ HashMap<String, String[]> perm = new HashMap<String, String[]>();
+ perm.put("john", new String[]{PermissionType.READ});
+ nodeToLockSession1.setPermissions(perm);
+ session1.save();
+
+ nodeToLockSession1.lock(true, 100000);
+ assertTrue(nodeToLockSession1.isLocked());
+ nodeToLockSession1.unlock();
+ assertFalse(nodeToLockSession1.isLocked());
+
+ Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.READ);
+ try
+ {
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.SET_PROPERTY);
+ fail("AccessControlException should have been thrown ");
+ }
+ catch (AccessControlException e)
+ {
+ //ok
+ }
+
+ NodeImpl nodeToLockSession2 =
+ (NodeImpl)session2.getRootNode().getNode("rootLockPermissionsTest").getNode("testLockTimed");
+ assertFalse(nodeToLockSession2.isLocked());
+ try
+ {
+ try
+ {
+ // trying to lock
+ nodeToLockSession2.lock(true, 100000);
+ fail("Node locked. An AccessDeniedException should be thrown on set property but doesn't");
+ }
+ catch (AccessDeniedException e)
+ {
+ // ok
+ }
+ }
+ finally
+ {
+ if (nodeToLockSession1.isLocked())
+ {
+ nodeToLockSession1.unlock();
+ }
+ session1.logout();
+ session2.logout();
+ }
+ }
+
+ public void testUnlockAccessDeniedException() throws RepositoryException
+ {
+ Session session1 = repository.login(new CredentialsImpl("admin", "admin".toCharArray()), "ws");
+ NodeImpl nodeToLockSession1 =
+ (NodeImpl)session1.getRootNode().getNode("rootLockPermissionsTest").addNode("testUnlock");
+ nodeToLockSession1.addMixin("mix:lockable");
+ nodeToLockSession1.addMixin("exo:owneable");
+ nodeToLockSession1.addMixin("exo:privilegeable");
+
+ // change permission
+ HashMap<String, String[]> perm = new HashMap<String, String[]>();
+ perm.put("john", new String[]{PermissionType.READ});
+ nodeToLockSession1.setPermissions(perm);
+ session1.save();
+
+ Lock lock = nodeToLockSession1.lock(true, 100000);
+ assertTrue(nodeToLockSession1.isLocked());
+
+ Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.READ);
+ try
+ {
+ session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.SET_PROPERTY);
+ fail("AccessControlException should have been thrown ");
+ }
+ catch (AccessControlException e)
+ {
+ //ok
+ }
+
+ NodeImpl nodeToLockSession2 =
+ (NodeImpl)session2.getRootNode().getNode("rootLockPermissionsTest").getNode("testUnlock");
+ assertTrue(nodeToLockSession2.isLocked());
+ try
+ {
+ try
+ {
+ session2.addLockToken(lock.getLockToken());
+
+ // trying to unlock
+ nodeToLockSession2.unlock();
+ fail("Node locked. An AccessDeniedException should be thrown on set property but doesn't");
+ }
+ catch (AccessDeniedException e)
+ {
+ // ok
+ }
+ }
+ finally
+ {
+ if (nodeToLockSession1.isLocked())
+ {
+ nodeToLockSession1.unlock();
+ }
+ session1.logout();
+ session2.logout();
+ }
+ }
+
+}
\ No newline at end of file
15 years, 5 months
exo-jcr SVN: r3681 - in jcr/trunk/exo.jcr.component.ext/src: test/java/org/exoplatform/services/jcr/ext/backup and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-12-20 05:25:55 -0500 (Mon, 20 Dec 2010)
New Revision: 3681
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupTestCase.java
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/BaseRDBMSBackupTest.java
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/TestRDBMSBackupManager.java
Log:
EXOJCR-1078: don't support backup of single workspace in case of mulit-db configuration
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-12-20 09:24:58 UTC (rev 3680)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-12-20 10:25:55 UTC (rev 3681)
@@ -65,6 +65,7 @@
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
import org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException;
import org.exoplatform.services.jcr.impl.storage.JCRItemExistsException;
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.SpoolFile;
import org.exoplatform.services.jcr.observation.ExtendedEvent;
@@ -767,6 +768,41 @@
{
validateBackupConfig(config);
+ try
+ {
+ // check if it is RDBMS backup of single workspace in case of multi-db configuration
+ if ((Class.forName(fullBackupType)
+ .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
+ {
+ WorkspaceEntry wEntry = null;
+ for (WorkspaceEntry entry : repoService.getRepository(config.getRepository()).getConfiguration()
+ .getWorkspaceEntries())
+ {
+ if (entry.getName().equals(config.getWorkspace()))
+ {
+ wEntry = entry;
+ break;
+ }
+ }
+
+ if (wEntry == null)
+ {
+ throw new WorkspaceRestoreException("Workspace " + config.getWorkspace()
+ + " did not found in current repository " + config.getRepository() + " configuration");
+ }
+
+ if (Boolean.parseBoolean(wEntry.getContainer().getParameterValue(JDBCWorkspaceDataContainer.MULTIDB)))
+ {
+ throw new BackupOperationException(
+ "Backup of single workspace in case of multi-db configuration is not supported");
+ }
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new BackupOperationException("Class " + fullBackupType + " is not found.", e);
+ }
+
BackupChain bchain =
new BackupChainImpl(config, logsDirectory, repoService.getRepository(config.getRepository()),
fullBackupType, incrementalBackupType, IdGenerator.generate(), logsDirectory);
@@ -905,9 +941,8 @@
}
private void fullRestoreOverInitializer(String pathBackupFile, String repositoryName, WorkspaceEntry workspaceEntry,
- String fBackupType)
- throws FileNotFoundException, IOException, RepositoryException,
- RepositoryConfigurationException, ClassNotFoundException
+ String fBackupType) throws FileNotFoundException, IOException, RepositoryException,
+ RepositoryConfigurationException, ClassNotFoundException
{
WorkspaceInitializerEntry wieOriginal = workspaceEntry.getInitializer();
@@ -1966,5 +2001,5 @@
}
}
-
+
}
Modified: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupTestCase.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupTestCase.java 2010-12-20 09:24:58 UTC (rev 3680)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupTestCase.java 2010-12-20 10:25:55 UTC (rev 3681)
@@ -77,7 +77,7 @@
protected ExtendedBackupManager backup;
- protected String repositoryNameToBackup = "db8";
+ protected String repositoryNameToBackup = "db7";
protected String workspaceNameToBackup = "ws1";
Modified: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2010-12-20 09:24:58 UTC (rev 3680)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2010-12-20 10:25:55 UTC (rev 3681)
@@ -1265,8 +1265,10 @@
fail("There are no backup files in " + backDir.getAbsolutePath());
}
- public void _testExistedWorkspaceRestoreMultiDB() throws Exception
+ public void testExistedWorkspaceRestoreMultiDB() throws Exception
{
+ String repositoryNameToBackup = "db8";
+
// backup
File backDir = new File("target/backup/" + getUUIndex());
backDir.mkdirs();
@@ -1330,7 +1332,7 @@
fail("There are no backup files in " + backDir.getAbsolutePath());
}
- public void testExistedWorkspaceRestoreSingleDB() throws Exception
+ public void testExistedWorkspaceRestore() throws Exception
{
SessionImpl ws1Session = (SessionImpl)repositoryService.getRepository("db7").login(credentials, "ws1");
@@ -1411,9 +1413,6 @@
public void testExistedWorkspaceRestoreAsync() throws Exception
{
- SessionImpl ws1Session = (SessionImpl)repositoryService.getRepository("db7").login(credentials, "ws1");
- String repositoryNameToBackup = "db7";
-
// backup
File backDir = new File("target/backup/" + getUUIndex());
backDir.mkdirs();
@@ -1499,8 +1498,6 @@
public void testExistedWorkspaceRestoreAsync2() throws Exception
{
- SessionImpl ws1Session = (SessionImpl)repositoryService.getRepository("db7").login(credentials, "ws1");
- String repositoryNameToBackup = "db7";
// backup
File backDir = new File("target/backup/" + getUUIndex());
@@ -1980,10 +1977,6 @@
public void testExistedWorkspaceRestoreWithConfig() throws Exception
{
- RepositoryImpl repositoryDB7 = (RepositoryImpl)repositoryService.getRepository(repositoryNameToBackupSingleDB);
- String repositoryNameToBackup = "db7";
- SessionImpl sessionWS = (SessionImpl)repositoryDB7.login(credentials, workspaceNameToBackup);
-
// backup
File backDir = new File("target/backup/" + getUUIndex());
backDir.mkdirs();
@@ -2124,9 +2117,6 @@
public void testWorkspaceRestoreWithConfig() throws Exception
{
- RepositoryImpl repositoryDB7 = (RepositoryImpl)repositoryService.getRepository(repositoryNameToBackupSingleDB);
- String repositoryNameToBackup = "db7";
-
// backup
File backDir = new File("target/backup/" + getUUIndex());
backDir.mkdirs();
Modified: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/BaseRDBMSBackupTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/BaseRDBMSBackupTest.java 2010-12-20 09:24:58 UTC (rev 3680)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/BaseRDBMSBackupTest.java 2010-12-20 10:25:55 UTC (rev 3681)
@@ -31,6 +31,7 @@
public class BaseRDBMSBackupTest
extends AbstractBackupTestCase
{
+ @Override
protected ExtendedBackupManager getBackupManager()
{
InitParams initParams = new InitParams();
Modified: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/TestRDBMSBackupManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/TestRDBMSBackupManager.java 2010-12-20 09:24:58 UTC (rev 3680)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/TestRDBMSBackupManager.java 2010-12-20 10:25:55 UTC (rev 3681)
@@ -20,6 +20,7 @@
import org.exoplatform.container.xml.PropertiesParam;
import org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl;
+import java.io.File;
/**
* Created by The eXo Platform SAS.
@@ -33,6 +34,7 @@
extends AbstractBackupUseCasesTest
{
+ @Override
protected ExtendedBackupManager getBackupManager()
{
InitParams initParams = new InitParams();
@@ -51,4 +53,30 @@
return backupManagerImpl;
}
+
+ @Override
+ public void testExistedWorkspaceRestoreMultiDB() throws Exception
+ {
+ String repositoryNameToBackup = "db8";
+
+ // backup
+ File backDir = new File("target/backup/" + System.currentTimeMillis());
+ backDir.mkdirs();
+
+ BackupConfig config = new BackupConfig();
+ config.setRepository(repositoryNameToBackup);
+ config.setWorkspace(workspaceNameToBackup);
+ config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
+
+ config.setBackupDir(backDir);
+
+ try
+ {
+ backup.startBackup(config);
+ fail("Exception should be thrown");
+ }
+ catch (BackupOperationException e)
+ {
+ }
+ }
}
15 years, 5 months