From d90734915ecea27248c8217f108a898dd1fe926c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 14:37:07 +0000 Subject: [PATCH 001/271] JCR-4918: vfs-ext: update hadoop-hdfs-client dependency to 3.3.5 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908780 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-vfs-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 8f628dd012e..6b8ab7814a0 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -61,7 +61,7 @@ org.apache.hadoop hadoop-hdfs-client - 3.3.4 + 3.3.5 org.jetbrains.kotlin From c6feb5fed6439dd96aae8dbf9ccc86681f60f9e9 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 16:29:54 +0000 Subject: [PATCH 002/271] JCR-4917: spi-commons: NameParser is too picky (allow non-ASCII whitespace) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908783 13f79535-47bb-0310-9956-ffa450edef68 --- .../spi/commons/conversion/NameParser.java | 18 ++++++++++++++---- .../spi/commons/conversion/NameParserTest.java | 5 ++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java index f4b10ce9a8e..a33909a0cb6 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java @@ -96,7 +96,7 @@ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory trailingSpaces = true; } else if (c == '[' || c == ']' || c == '*' || c == '|') { throw new IllegalNameException(asDisplayableString(c) + " not allowed in name"); - } else if (Character.isWhitespace(c)) { + } else if (Character.isWhitespace(c) && c < 128) { throw new IllegalNameException("Whitespace character " + asDisplayableString(c) + " not allowed in name"); } else if (c == '/') { if (state == STATE_URI_START) { @@ -194,10 +194,20 @@ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory } private static String asDisplayableString(char c) { - if (Character.isWhitespace(c)) { - return String.format("'\\u%04x'", (int)c); + if (c >= ' ' && c < 127) { + return Character.toString(c); + } else if (c == '\b') { + return "\\b"; + } else if (c == '\f') { + return "\\f"; + } else if (c == '\n') { + return "\\n"; + } else if (c == '\r') { + return "\\r"; + } else if (c == '\t') { + return "\\t"; } else { - return "'" + c + "'"; + return String.format("\\u%04x", (int) c); } } diff --git a/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java b/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java index 6fe3b9ff03f..6dc0ec23537 100644 --- a/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java +++ b/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java @@ -110,6 +110,9 @@ public void testExpandedJcrNames() throws NamespaceException, IllegalNameExcepti valid.add(new String[] {"abc { }", "", "abc { }"}); valid.add(new String[] {"{ ab }", "", "{ ab }"}); valid.add(new String[] {"{ }abc", "", "{ }abc"}); + // see JCR-4917 + valid.add(new String[] {"a\u200ab", "", "a\u200ab"}); + valid.add(new String[] {"\u200ab\u200a", "", "\u200ab\u200a"}); // unknown uri -> but valid non-prefixed jcr-name valid.add(new String[] {"{test}abc", "", "{test}abc"}); valid.add(new String[] {"{ab}", "", "{ab}"}); @@ -243,7 +246,7 @@ public void testMessage() { NameParser.checkFormat("horizontal\ttab"); fail("should fail with IllegalNameException"); } catch (IllegalNameException ex) { - assertTrue("message should contain '\\u0009'", ex.getMessage().indexOf("'\\u0009'") >= 0); + assertTrue("message should contain '\\t'", ex.getMessage().indexOf("\\t") >= 0); } } From 944a7a6cc9fa5089e834b0f6fb08823ddf624f9f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 17:08:20 +0000 Subject: [PATCH 003/271] JCR-4919: Update tomcat dependency to 8.5.87 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908784 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index e18be693754..e7f4bfe1038 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 8.5.86 + 8.5.87 From a23c8350a9cb1b51e5c5c553e3efaedbd2412580 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 17:46:30 +0000 Subject: [PATCH 004/271] JCR-4920: Remove maven-assembly-plugin dependency (use the one provided by Apache parent pom) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908785 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9a876415bf9..bbc0b5a86ea 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -368,10 +368,6 @@ maven-war-plugin 3.3.2 - - maven-assembly-plugin - 3.4.2 - maven-idea-plugin 2.2.1 From cff11d46e25238d01e826ce4715b70ee7e659805 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 18:43:06 +0000 Subject: [PATCH 005/271] JCR-4921: remove surefire/failsafe dependencies (use the ones provided by Apache parent pom) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908786 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index bbc0b5a86ea..1eeb7fc5fb9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -344,14 +344,12 @@ maven-surefire-plugin - 2.22.2 ${test.opts} maven-failsafe-plugin - 2.22.2 ${test.opts} @@ -427,11 +425,6 @@ org.apache.maven.plugins maven-javadoc-plugin - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.22.2 - org.apache.maven.plugins maven-checkstyle-plugin From 2ff4911d4d24d8c9f90e7c965f726570d843aa34 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 29 Mar 2023 19:48:42 +0000 Subject: [PATCH 006/271] JCR-4922: Remove javadoc-plugin dependency (use the ones provided by Apache parent pom) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908788 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1eeb7fc5fb9..598aa7eddb9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -338,10 +338,6 @@ -Papache-release,pedantic ${arguments} - - maven-javadoc-plugin - 3.4.1 - maven-surefire-plugin From 27b3ab48fc3e1121ec917150b7582507db123270 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 30 Mar 2023 04:14:41 +0000 Subject: [PATCH 007/271] JCR-4923: Remove release-plugin dependency (use the one provided by Apache parent pom) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908795 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 598aa7eddb9..65d04a29a0d 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -324,14 +324,10 @@ - - - org.apache.maven.plugins maven-release-plugin - 2.5.3 false deploy From d30387e572e1a5fb06e5cef49106ad3413339d96 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 30 Mar 2023 04:40:56 +0000 Subject: [PATCH 008/271] JCR-4924: Release Jackrabbit 2.21.16 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908797 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 397e50f284e..b61a54a6664 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,45 +1,36 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.15 +Release Notes -- Apache Jackrabbit -- Version 2.21.16 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.15, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.16, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.15 is an unstable release cut directly from +Apache Jackrabbit 2.21.16 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.15 +Changes in Jackrabbit 2.21.16 ----------------------------- +Bug + + [JCR-4907] - Javadocs have incorrect copyright date + [JCR-4917] - spi-commons: NameParser is too picky (allow non-ASCII whitespace) + Task - [JCR-4878] - Javadoc fixes - [JCR-4879] - update checkstyle-plugin dependency to 3.2.0 - [JCR-4880] - Update javadoc-plugin dependency to 3.4.1 - [JCR-4881] - Update maven-jar-plugin to 3.3.0 - [JCR-4882] - Update animal-sniffer plugin dependency to 1.22 - [JCR-4883] - Update pmd-plugin dependency to 3.19.0 - [JCR-4884] - Update spotbugs-maven-plugin to 4.7.3.0 - [JCR-4885] - update Apache parent pom to version 28 - [JCR-4886] - Update Jackrabbit trunk to Oak 1.46.0 - [JCR-4888] - update Apache parent pom to version 29 - [JCR-4889] - Update javacc-maven-plugin to version 3.0.1 - [JCR-4891] - set baseline comparisonVersion to latest stable (2.20.8) - [JCR-4893] - Update mockito dependency to 4.11.0 - [JCR-4894] - webapp: update htmlunit dependency to 2.69.0 - [JCR-4895] - update aws java sdk version to 1.12.383 - [JCR-4896] - Update easymock dependency to 5.1.0 - [JCR-4897] - update kotlin-stdlib dependency to 1.8.0 - [JCR-4898] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.14 - [JCR-4899] - Update tomcat dependency to 8.5.85 - [JCR-4900] - Update oak-jackrabbit-api.version.implemented in trunk and 2.20 to Oak 1.48.0 - [JCR-4901] - webapp: update htmlunit dependency to 2.70.0 - [JCR-4903] - update checkstyle-plugin dependency to 3.2.1 - [JCR-4905] - Update pmd-plugin dependency to 3.20.0 + [JCR-4908] - Update commons file-upload dependency to 1.5 + [JCR-4909] - specify maven-rar-plugin dependency + [JCR-4910] - Update tomcat dependency to 8.5.86 + [JCR-4912] - set baseline comparisonVersion to latest stable (2.20.9) + [JCR-4913] - spi-commons: improve error messages for org.apache.jackrabbit.spi.commons.conversion.NameParser.parse + [JCR-4918] - vfs-ext: update hadoop-hdfs-client dependency to 3.3.5 + [JCR-4919] - Update tomcat dependency to 8.5.87 + [JCR-4922] - Remove javadoc-plugin dependency (use the one provided by Apache parent pom) + [JCR-4923] - Remove release-plugin dependency (use the one provided by Apache parent pom) For more detailed information about all the changes in this and other From dd2a033deda8a63e1721eedd847f32bd23d0f65e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 30 Mar 2023 18:01:19 +0000 Subject: [PATCH 009/271] [maven-release-plugin] prepare release jackrabbit-2.21.16 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908808 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++++++++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 34 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 09e77748a8e..33c37a83a13 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 09a4d8b2bc8..3cdbeeb0981 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index ea94ec3feed..da22afee41d 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index d7be5bf9289..a5f417a42a6 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index a22d43d9f90..bf7d0130ebe 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index a35b8e7da49..1fe8ae66df8 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index d61162c7b11..d4de90830d3 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index a21f7c55145..734a96eeda8 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 75b7aa1fe34..0b0b4d6a767 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 4cb502bec32..ef7a2fef266 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 8f632c79594..fe375af48c4 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 4ba010d4997..722a993e287 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 689b94b16ef..df1a7384d83 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 65d04a29a0d..38038f293ee 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.16-SNAPSHOT + 2.21.16 pom @@ -63,7 +63,7 @@ 0.0 - 10 + 1680197625 http://jackrabbit.apache.org/ @@ -729,4 +729,10 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index bb8d0e3b85c..df9089b4635 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 725d6bc3b85..d4d2ac0c627 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index e9505891a9d..d9913bd577d 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 9f3f6fcec94..3ad2feec8db 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e334155d169..c8d1eb26695 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 6e4cbf4f98a..8864b560682 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 6b8ab7814a0..1e64f981015 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index e7f4bfe1038..3c50830fc07 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index cf3f9ac6c37..1758fc1b57d 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index c0d93770267..776661e11d3 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16-SNAPSHOT + 2.21.16 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From cbac90c30cbf768ff31ce7853d95a9f3aeee29ac Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 30 Mar 2023 18:01:29 +0000 Subject: [PATCH 010/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1908810 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 33c37a83a13..2c90430a21d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 3cdbeeb0981..fd46ce4661a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index da22afee41d..c86d1ee371e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index a5f417a42a6..783c3055dc2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index bf7d0130ebe..3a041ac639e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 1fe8ae66df8..4b0ccabc98f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index d4de90830d3..82a71d4e9ed 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 734a96eeda8..040d2ea9c9a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 0b0b4d6a767..ab87e6629bf 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index ef7a2fef266..c33b4ab6657 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index fe375af48c4..4818345e716 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 722a993e287..f97a8352e6f 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index df1a7384d83..d4b0fe7e0b8 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 38038f293ee..6df365e46f5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.16 + 2.21.17-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1680197625 + 1680199282 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index df9089b4635..c220c9eeae5 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index d4d2ac0c627..b643a9e9438 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index d9913bd577d..3aba191ad33 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 3ad2feec8db..bb24843333b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index c8d1eb26695..3ef251409d6 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8864b560682..ed76d2d67d5 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 1e64f981015..4ea8b4fa337 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 3c50830fc07..cce8e48666f 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 1758fc1b57d..8c61cd082e3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 776661e11d3..6f8f32fc707 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.16 + 2.21.17-SNAPSHOT jackrabbit-parent/pom.xml From f90493cfa95b56c49961aa343fedccd7f1c27f65 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 7 Apr 2023 14:10:34 +0000 Subject: [PATCH 011/271] JCR-4925: Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.15 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1909016 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 6df365e46f5..aebf1f07819 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -49,7 +49,7 @@ 1.48.0 - 1.22.14 + 1.22.15 9.2.30.v20200428 2.4.1 ${project.build.sourceEncoding} From 9bb4ca974f0bdb363db3aa0329318b7d49b6922b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 8 May 2023 08:59:19 +0000 Subject: [PATCH 012/271] JRC-4931: set baseline comparisonVersion to latest stable (2.20.10) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1909676 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index aebf1f07819..8c2aa903e56 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -388,7 +388,7 @@ - 2.20.9 + 2.20.10 From 3ebe9cea63f5cef5f74c572b1dccc1aaacfb25a0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 17 May 2023 15:15:02 +0000 Subject: [PATCH 013/271] JCR-4932: Update commons-io dependency to 2.12.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1909875 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 8c2aa903e56..91ae2d82f70 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -469,7 +469,7 @@ commons-io commons-io - 2.11.0 + 2.12.0 javax.transaction From 7a6df87efd77dd12b39d80102e004fa88b1b2407 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 17 May 2023 15:58:11 +0000 Subject: [PATCH 014/271] JCR-4933: Update tomcat dependency to 8.5.88 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1909876 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index cce8e48666f..955945758fb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 8.5.87 + 8.5.88 From 1fd0ca5dc98b27a77bb37c352fb17554192acf4a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 1 Jun 2023 12:16:52 +0000 Subject: [PATCH 015/271] JCR-4936: Update tomcat dependency to 8.5.89 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910160 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 955945758fb..7aa2f81a622 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 8.5.88 + 8.5.89 From 587119d2a7dc0e381fe4dd42a79194d5abe1ca1a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 1 Jun 2023 13:14:49 +0000 Subject: [PATCH 016/271] JCR-4937: jcr-tests: get rid of duplicate XMLChar class git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910166 13f79535-47bb-0310-9956-ffa450edef68 --- .../jackrabbit/test/api/util/ISO9075.java | 2 + .../jackrabbit/test/api/util/XMLChar.java | 1027 ----------------- 2 files changed, 2 insertions(+), 1027 deletions(-) delete mode 100644 jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/XMLChar.java diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/ISO9075.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/ISO9075.java index b929648feab..17a8c9b364b 100644 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/ISO9075.java +++ b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/ISO9075.java @@ -21,6 +21,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.jackrabbit.test.XMLChar; + /** * Implements the encode and decode routines as specified for XML name to SQL * identifier conversion in ISO 9075-14:2003.
diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/XMLChar.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/XMLChar.java deleted file mode 100644 index c3aaca2a67a..00000000000 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/XMLChar.java +++ /dev/null @@ -1,1027 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.test.api.util; - -// JCR-714: Class copied from jcr-commons to avoid the extra dependency - -// Note: This file is a copy from org.apache.xerces.util. -// See http://issues.apache.org/jira/browse/JCR-367 - -import java.util.Arrays; - -/** - * This class defines the basic XML character properties. The data - * in this class can be used to verify that a character is a valid - * XML character or if the character is a space, name start, or name - * character. - *

- * A series of convenience methods are supplied to ease the burden - * of the developer. Because inlining the checks can improve per - * character performance, the tables of character properties are - * public. Using the character as an index into the CHARS - * array and applying the appropriate mask flag (e.g. - * MASK_VALID), yields the same results as calling the - * convenience methods. There is one exception: check the comments - * for the isValid method for details. - * - * @author Glenn Marcy, IBM - * @author Andy Clark, IBM - * @author Eric Ye, IBM - * @author Arnaud Le Hors, IBM - * @author Michael Glavassevich, IBM - * @author Rahul Srivastava, Sun Microsystems Inc. - * - * @version $Id: XMLChar.java 776776 2009-05-20 17:33:05Z jukka $ - */ -public class XMLChar { - - // - // Constants - // - - /** Character flags. */ - private static final byte[] CHARS = new byte[1 << 16]; - - /** Valid character mask. */ - public static final int MASK_VALID = 0x01; - - /** Space character mask. */ - public static final int MASK_SPACE = 0x02; - - /** Name start character mask. */ - public static final int MASK_NAME_START = 0x04; - - /** Name character mask. */ - public static final int MASK_NAME = 0x08; - - /** Pubid character mask. */ - public static final int MASK_PUBID = 0x10; - - /** - * Content character mask. Special characters are those that can - * be considered the start of markup, such as '<' and '&'. - * The various newline characters are considered special as well. - * All other valid XML characters can be considered content. - *

- * This is an optimization for the inner loop of character scanning. - */ - public static final int MASK_CONTENT = 0x20; - - /** NCName start character mask. */ - public static final int MASK_NCNAME_START = 0x40; - - /** NCName character mask. */ - public static final int MASK_NCNAME = 0x80; - - // - // Static initialization - // - - static { - - // Initializing the Character Flag Array - // Code generated by: XMLCharGenerator. - - CHARS[9] = 35; - CHARS[10] = 19; - CHARS[13] = 19; - CHARS[32] = 51; - CHARS[33] = 49; - CHARS[34] = 33; - Arrays.fill(CHARS, 35, 38, (byte) 49 ); // Fill 3 of value (byte) 49 - CHARS[38] = 1; - Arrays.fill(CHARS, 39, 45, (byte) 49 ); // Fill 6 of value (byte) 49 - Arrays.fill(CHARS, 45, 47, (byte) -71 ); // Fill 2 of value (byte) -71 - CHARS[47] = 49; - Arrays.fill(CHARS, 48, 58, (byte) -71 ); // Fill 10 of value (byte) -71 - CHARS[58] = 61; - CHARS[59] = 49; - CHARS[60] = 1; - CHARS[61] = 49; - CHARS[62] = 33; - Arrays.fill(CHARS, 63, 65, (byte) 49 ); // Fill 2 of value (byte) 49 - Arrays.fill(CHARS, 65, 91, (byte) -3 ); // Fill 26 of value (byte) -3 - Arrays.fill(CHARS, 91, 93, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[93] = 1; - CHARS[94] = 33; - CHARS[95] = -3; - CHARS[96] = 33; - Arrays.fill(CHARS, 97, 123, (byte) -3 ); // Fill 26 of value (byte) -3 - Arrays.fill(CHARS, 123, 183, (byte) 33 ); // Fill 60 of value (byte) 33 - CHARS[183] = -87; - Arrays.fill(CHARS, 184, 192, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 192, 215, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[215] = 33; - Arrays.fill(CHARS, 216, 247, (byte) -19 ); // Fill 31 of value (byte) -19 - CHARS[247] = 33; - Arrays.fill(CHARS, 248, 306, (byte) -19 ); // Fill 58 of value (byte) -19 - Arrays.fill(CHARS, 306, 308, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 308, 319, (byte) -19 ); // Fill 11 of value (byte) -19 - Arrays.fill(CHARS, 319, 321, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 321, 329, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[329] = 33; - Arrays.fill(CHARS, 330, 383, (byte) -19 ); // Fill 53 of value (byte) -19 - CHARS[383] = 33; - Arrays.fill(CHARS, 384, 452, (byte) -19 ); // Fill 68 of value (byte) -19 - Arrays.fill(CHARS, 452, 461, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 461, 497, (byte) -19 ); // Fill 36 of value (byte) -19 - Arrays.fill(CHARS, 497, 500, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 500, 502, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 502, 506, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 506, 536, (byte) -19 ); // Fill 30 of value (byte) -19 - Arrays.fill(CHARS, 536, 592, (byte) 33 ); // Fill 56 of value (byte) 33 - Arrays.fill(CHARS, 592, 681, (byte) -19 ); // Fill 89 of value (byte) -19 - Arrays.fill(CHARS, 681, 699, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 699, 706, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 706, 720, (byte) 33 ); // Fill 14 of value (byte) 33 - Arrays.fill(CHARS, 720, 722, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 722, 768, (byte) 33 ); // Fill 46 of value (byte) 33 - Arrays.fill(CHARS, 768, 838, (byte) -87 ); // Fill 70 of value (byte) -87 - Arrays.fill(CHARS, 838, 864, (byte) 33 ); // Fill 26 of value (byte) 33 - Arrays.fill(CHARS, 864, 866, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 866, 902, (byte) 33 ); // Fill 36 of value (byte) 33 - CHARS[902] = -19; - CHARS[903] = -87; - Arrays.fill(CHARS, 904, 907, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[907] = 33; - CHARS[908] = -19; - CHARS[909] = 33; - Arrays.fill(CHARS, 910, 930, (byte) -19 ); // Fill 20 of value (byte) -19 - CHARS[930] = 33; - Arrays.fill(CHARS, 931, 975, (byte) -19 ); // Fill 44 of value (byte) -19 - CHARS[975] = 33; - Arrays.fill(CHARS, 976, 983, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 983, 986, (byte) 33 ); // Fill 3 of value (byte) 33 - CHARS[986] = -19; - CHARS[987] = 33; - CHARS[988] = -19; - CHARS[989] = 33; - CHARS[990] = -19; - CHARS[991] = 33; - CHARS[992] = -19; - CHARS[993] = 33; - Arrays.fill(CHARS, 994, 1012, (byte) -19 ); // Fill 18 of value (byte) -19 - Arrays.fill(CHARS, 1012, 1025, (byte) 33 ); // Fill 13 of value (byte) 33 - Arrays.fill(CHARS, 1025, 1037, (byte) -19 ); // Fill 12 of value (byte) -19 - CHARS[1037] = 33; - Arrays.fill(CHARS, 1038, 1104, (byte) -19 ); // Fill 66 of value (byte) -19 - CHARS[1104] = 33; - Arrays.fill(CHARS, 1105, 1117, (byte) -19 ); // Fill 12 of value (byte) -19 - CHARS[1117] = 33; - Arrays.fill(CHARS, 1118, 1154, (byte) -19 ); // Fill 36 of value (byte) -19 - CHARS[1154] = 33; - Arrays.fill(CHARS, 1155, 1159, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 1159, 1168, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 1168, 1221, (byte) -19 ); // Fill 53 of value (byte) -19 - Arrays.fill(CHARS, 1221, 1223, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1223, 1225, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1225, 1227, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1227, 1229, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1229, 1232, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 1232, 1260, (byte) -19 ); // Fill 28 of value (byte) -19 - Arrays.fill(CHARS, 1260, 1262, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1262, 1270, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 1270, 1272, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1272, 1274, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1274, 1329, (byte) 33 ); // Fill 55 of value (byte) 33 - Arrays.fill(CHARS, 1329, 1367, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 1367, 1369, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[1369] = -19; - Arrays.fill(CHARS, 1370, 1377, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 1377, 1415, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 1415, 1425, (byte) 33 ); // Fill 10 of value (byte) 33 - Arrays.fill(CHARS, 1425, 1442, (byte) -87 ); // Fill 17 of value (byte) -87 - CHARS[1442] = 33; - Arrays.fill(CHARS, 1443, 1466, (byte) -87 ); // Fill 23 of value (byte) -87 - CHARS[1466] = 33; - Arrays.fill(CHARS, 1467, 1470, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[1470] = 33; - CHARS[1471] = -87; - CHARS[1472] = 33; - Arrays.fill(CHARS, 1473, 1475, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[1475] = 33; - CHARS[1476] = -87; - Arrays.fill(CHARS, 1477, 1488, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 1488, 1515, (byte) -19 ); // Fill 27 of value (byte) -19 - Arrays.fill(CHARS, 1515, 1520, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 1520, 1523, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 1523, 1569, (byte) 33 ); // Fill 46 of value (byte) 33 - Arrays.fill(CHARS, 1569, 1595, (byte) -19 ); // Fill 26 of value (byte) -19 - Arrays.fill(CHARS, 1595, 1600, (byte) 33 ); // Fill 5 of value (byte) 33 - CHARS[1600] = -87; - Arrays.fill(CHARS, 1601, 1611, (byte) -19 ); // Fill 10 of value (byte) -19 - Arrays.fill(CHARS, 1611, 1619, (byte) -87 ); // Fill 8 of value (byte) -87 - Arrays.fill(CHARS, 1619, 1632, (byte) 33 ); // Fill 13 of value (byte) 33 - Arrays.fill(CHARS, 1632, 1642, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 1642, 1648, (byte) 33 ); // Fill 6 of value (byte) 33 - CHARS[1648] = -87; - Arrays.fill(CHARS, 1649, 1720, (byte) -19 ); // Fill 71 of value (byte) -19 - Arrays.fill(CHARS, 1720, 1722, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1722, 1727, (byte) -19 ); // Fill 5 of value (byte) -19 - CHARS[1727] = 33; - Arrays.fill(CHARS, 1728, 1743, (byte) -19 ); // Fill 15 of value (byte) -19 - CHARS[1743] = 33; - Arrays.fill(CHARS, 1744, 1748, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[1748] = 33; - CHARS[1749] = -19; - Arrays.fill(CHARS, 1750, 1765, (byte) -87 ); // Fill 15 of value (byte) -87 - Arrays.fill(CHARS, 1765, 1767, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1767, 1769, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[1769] = 33; - Arrays.fill(CHARS, 1770, 1774, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 1774, 1776, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1776, 1786, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 1786, 2305, (byte) 33 ); // Fill 519 of value (byte) 33 - Arrays.fill(CHARS, 2305, 2308, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2308] = 33; - Arrays.fill(CHARS, 2309, 2362, (byte) -19 ); // Fill 53 of value (byte) -19 - Arrays.fill(CHARS, 2362, 2364, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2364] = -87; - CHARS[2365] = -19; - Arrays.fill(CHARS, 2366, 2382, (byte) -87 ); // Fill 16 of value (byte) -87 - Arrays.fill(CHARS, 2382, 2385, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2385, 2389, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 2389, 2392, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2392, 2402, (byte) -19 ); // Fill 10 of value (byte) -19 - Arrays.fill(CHARS, 2402, 2404, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2404, 2406, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2406, 2416, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2416, 2433, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 2433, 2436, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2436] = 33; - Arrays.fill(CHARS, 2437, 2445, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 2445, 2447, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2447, 2449, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2449, 2451, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2451, 2473, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2473] = 33; - Arrays.fill(CHARS, 2474, 2481, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2481] = 33; - CHARS[2482] = -19; - Arrays.fill(CHARS, 2483, 2486, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2486, 2490, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2490, 2492, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2492] = -87; - CHARS[2493] = 33; - Arrays.fill(CHARS, 2494, 2501, (byte) -87 ); // Fill 7 of value (byte) -87 - Arrays.fill(CHARS, 2501, 2503, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2503, 2505, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2505, 2507, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2507, 2510, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2510, 2519, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[2519] = -87; - Arrays.fill(CHARS, 2520, 2524, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2524, 2526, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2526] = 33; - Arrays.fill(CHARS, 2527, 2530, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2530, 2532, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2532, 2534, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2534, 2544, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2544, 2546, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2546, 2562, (byte) 33 ); // Fill 16 of value (byte) 33 - CHARS[2562] = -87; - Arrays.fill(CHARS, 2563, 2565, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2565, 2571, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 2571, 2575, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2575, 2577, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2577, 2579, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2579, 2601, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2601] = 33; - Arrays.fill(CHARS, 2602, 2609, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2609] = 33; - Arrays.fill(CHARS, 2610, 2612, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2612] = 33; - Arrays.fill(CHARS, 2613, 2615, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2615] = 33; - Arrays.fill(CHARS, 2616, 2618, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2618, 2620, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2620] = -87; - CHARS[2621] = 33; - Arrays.fill(CHARS, 2622, 2627, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 2627, 2631, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2631, 2633, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2633, 2635, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2635, 2638, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2638, 2649, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 2649, 2653, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[2653] = 33; - CHARS[2654] = -19; - Arrays.fill(CHARS, 2655, 2662, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 2662, 2674, (byte) -87 ); // Fill 12 of value (byte) -87 - Arrays.fill(CHARS, 2674, 2677, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2677, 2689, (byte) 33 ); // Fill 12 of value (byte) 33 - Arrays.fill(CHARS, 2689, 2692, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2692] = 33; - Arrays.fill(CHARS, 2693, 2700, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2700] = 33; - CHARS[2701] = -19; - CHARS[2702] = 33; - Arrays.fill(CHARS, 2703, 2706, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[2706] = 33; - Arrays.fill(CHARS, 2707, 2729, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2729] = 33; - Arrays.fill(CHARS, 2730, 2737, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2737] = 33; - Arrays.fill(CHARS, 2738, 2740, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2740] = 33; - Arrays.fill(CHARS, 2741, 2746, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 2746, 2748, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2748] = -87; - CHARS[2749] = -19; - Arrays.fill(CHARS, 2750, 2758, (byte) -87 ); // Fill 8 of value (byte) -87 - CHARS[2758] = 33; - Arrays.fill(CHARS, 2759, 2762, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2762] = 33; - Arrays.fill(CHARS, 2763, 2766, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2766, 2784, (byte) 33 ); // Fill 18 of value (byte) 33 - CHARS[2784] = -19; - Arrays.fill(CHARS, 2785, 2790, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 2790, 2800, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2800, 2817, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 2817, 2820, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2820] = 33; - Arrays.fill(CHARS, 2821, 2829, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 2829, 2831, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2831, 2833, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2833, 2835, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2835, 2857, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2857] = 33; - Arrays.fill(CHARS, 2858, 2865, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2865] = 33; - Arrays.fill(CHARS, 2866, 2868, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2868, 2870, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2870, 2874, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2874, 2876, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2876] = -87; - CHARS[2877] = -19; - Arrays.fill(CHARS, 2878, 2884, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 2884, 2887, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2887, 2889, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2889, 2891, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2891, 2894, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2894, 2902, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 2902, 2904, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2904, 2908, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2908, 2910, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2910] = 33; - Arrays.fill(CHARS, 2911, 2914, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2914, 2918, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2918, 2928, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2928, 2946, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 2946, 2948, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[2948] = 33; - Arrays.fill(CHARS, 2949, 2955, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 2955, 2958, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2958, 2961, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[2961] = 33; - Arrays.fill(CHARS, 2962, 2966, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2966, 2969, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2969, 2971, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2971] = 33; - CHARS[2972] = -19; - CHARS[2973] = 33; - Arrays.fill(CHARS, 2974, 2976, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2976, 2979, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2979, 2981, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2981, 2984, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2984, 2987, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2987, 2990, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2990, 2998, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[2998] = 33; - Arrays.fill(CHARS, 2999, 3002, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 3002, 3006, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3006, 3011, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 3011, 3014, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 3014, 3017, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3017] = 33; - Arrays.fill(CHARS, 3018, 3022, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3022, 3031, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[3031] = -87; - Arrays.fill(CHARS, 3032, 3047, (byte) 33 ); // Fill 15 of value (byte) 33 - Arrays.fill(CHARS, 3047, 3056, (byte) -87 ); // Fill 9 of value (byte) -87 - Arrays.fill(CHARS, 3056, 3073, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 3073, 3076, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3076] = 33; - Arrays.fill(CHARS, 3077, 3085, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3085] = 33; - Arrays.fill(CHARS, 3086, 3089, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3089] = 33; - Arrays.fill(CHARS, 3090, 3113, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3113] = 33; - Arrays.fill(CHARS, 3114, 3124, (byte) -19 ); // Fill 10 of value (byte) -19 - CHARS[3124] = 33; - Arrays.fill(CHARS, 3125, 3130, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 3130, 3134, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3134, 3141, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[3141] = 33; - Arrays.fill(CHARS, 3142, 3145, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3145] = 33; - Arrays.fill(CHARS, 3146, 3150, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3150, 3157, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3157, 3159, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3159, 3168, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 3168, 3170, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3170, 3174, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3174, 3184, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3184, 3202, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 3202, 3204, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3204] = 33; - Arrays.fill(CHARS, 3205, 3213, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3213] = 33; - Arrays.fill(CHARS, 3214, 3217, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3217] = 33; - Arrays.fill(CHARS, 3218, 3241, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3241] = 33; - Arrays.fill(CHARS, 3242, 3252, (byte) -19 ); // Fill 10 of value (byte) -19 - CHARS[3252] = 33; - Arrays.fill(CHARS, 3253, 3258, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 3258, 3262, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3262, 3269, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[3269] = 33; - Arrays.fill(CHARS, 3270, 3273, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3273] = 33; - Arrays.fill(CHARS, 3274, 3278, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3278, 3285, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3285, 3287, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3287, 3294, (byte) 33 ); // Fill 7 of value (byte) 33 - CHARS[3294] = -19; - CHARS[3295] = 33; - Arrays.fill(CHARS, 3296, 3298, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3298, 3302, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3302, 3312, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3312, 3330, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 3330, 3332, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3332] = 33; - Arrays.fill(CHARS, 3333, 3341, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3341] = 33; - Arrays.fill(CHARS, 3342, 3345, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3345] = 33; - Arrays.fill(CHARS, 3346, 3369, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3369] = 33; - Arrays.fill(CHARS, 3370, 3386, (byte) -19 ); // Fill 16 of value (byte) -19 - Arrays.fill(CHARS, 3386, 3390, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3390, 3396, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3396, 3398, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3398, 3401, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3401] = 33; - Arrays.fill(CHARS, 3402, 3406, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3406, 3415, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[3415] = -87; - Arrays.fill(CHARS, 3416, 3424, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 3424, 3426, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3426, 3430, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3430, 3440, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3440, 3585, (byte) 33 ); // Fill 145 of value (byte) 33 - Arrays.fill(CHARS, 3585, 3631, (byte) -19 ); // Fill 46 of value (byte) -19 - CHARS[3631] = 33; - CHARS[3632] = -19; - CHARS[3633] = -87; - Arrays.fill(CHARS, 3634, 3636, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3636, 3643, (byte) -87 ); // Fill 7 of value (byte) -87 - Arrays.fill(CHARS, 3643, 3648, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 3648, 3654, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 3654, 3663, (byte) -87 ); // Fill 9 of value (byte) -87 - CHARS[3663] = 33; - Arrays.fill(CHARS, 3664, 3674, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3674, 3713, (byte) 33 ); // Fill 39 of value (byte) 33 - Arrays.fill(CHARS, 3713, 3715, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3715] = 33; - CHARS[3716] = -19; - Arrays.fill(CHARS, 3717, 3719, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3719, 3721, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3721] = 33; - CHARS[3722] = -19; - Arrays.fill(CHARS, 3723, 3725, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[3725] = -19; - Arrays.fill(CHARS, 3726, 3732, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 3732, 3736, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[3736] = 33; - Arrays.fill(CHARS, 3737, 3744, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[3744] = 33; - Arrays.fill(CHARS, 3745, 3748, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3748] = 33; - CHARS[3749] = -19; - CHARS[3750] = 33; - CHARS[3751] = -19; - Arrays.fill(CHARS, 3752, 3754, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3754, 3756, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3756] = 33; - Arrays.fill(CHARS, 3757, 3759, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3759] = 33; - CHARS[3760] = -19; - CHARS[3761] = -87; - Arrays.fill(CHARS, 3762, 3764, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3764, 3770, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[3770] = 33; - Arrays.fill(CHARS, 3771, 3773, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3773] = -19; - Arrays.fill(CHARS, 3774, 3776, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3776, 3781, (byte) -19 ); // Fill 5 of value (byte) -19 - CHARS[3781] = 33; - CHARS[3782] = -87; - CHARS[3783] = 33; - Arrays.fill(CHARS, 3784, 3790, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3790, 3792, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3792, 3802, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3802, 3864, (byte) 33 ); // Fill 62 of value (byte) 33 - Arrays.fill(CHARS, 3864, 3866, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3866, 3872, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 3872, 3882, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3882, 3893, (byte) 33 ); // Fill 11 of value (byte) 33 - CHARS[3893] = -87; - CHARS[3894] = 33; - CHARS[3895] = -87; - CHARS[3896] = 33; - CHARS[3897] = -87; - Arrays.fill(CHARS, 3898, 3902, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3902, 3904, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3904, 3912, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3912] = 33; - Arrays.fill(CHARS, 3913, 3946, (byte) -19 ); // Fill 33 of value (byte) -19 - Arrays.fill(CHARS, 3946, 3953, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3953, 3973, (byte) -87 ); // Fill 20 of value (byte) -87 - CHARS[3973] = 33; - Arrays.fill(CHARS, 3974, 3980, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3980, 3984, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3984, 3990, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[3990] = 33; - CHARS[3991] = -87; - CHARS[3992] = 33; - Arrays.fill(CHARS, 3993, 4014, (byte) -87 ); // Fill 21 of value (byte) -87 - Arrays.fill(CHARS, 4014, 4017, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4017, 4024, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[4024] = 33; - CHARS[4025] = -87; - Arrays.fill(CHARS, 4026, 4256, (byte) 33 ); // Fill 230 of value (byte) 33 - Arrays.fill(CHARS, 4256, 4294, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 4294, 4304, (byte) 33 ); // Fill 10 of value (byte) 33 - Arrays.fill(CHARS, 4304, 4343, (byte) -19 ); // Fill 39 of value (byte) -19 - Arrays.fill(CHARS, 4343, 4352, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[4352] = -19; - CHARS[4353] = 33; - Arrays.fill(CHARS, 4354, 4356, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4356] = 33; - Arrays.fill(CHARS, 4357, 4360, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[4360] = 33; - CHARS[4361] = -19; - CHARS[4362] = 33; - Arrays.fill(CHARS, 4363, 4365, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4365] = 33; - Arrays.fill(CHARS, 4366, 4371, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 4371, 4412, (byte) 33 ); // Fill 41 of value (byte) 33 - CHARS[4412] = -19; - CHARS[4413] = 33; - CHARS[4414] = -19; - CHARS[4415] = 33; - CHARS[4416] = -19; - Arrays.fill(CHARS, 4417, 4428, (byte) 33 ); // Fill 11 of value (byte) 33 - CHARS[4428] = -19; - CHARS[4429] = 33; - CHARS[4430] = -19; - CHARS[4431] = 33; - CHARS[4432] = -19; - Arrays.fill(CHARS, 4433, 4436, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4436, 4438, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4438, 4441, (byte) 33 ); // Fill 3 of value (byte) 33 - CHARS[4441] = -19; - Arrays.fill(CHARS, 4442, 4447, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 4447, 4450, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[4450] = 33; - CHARS[4451] = -19; - CHARS[4452] = 33; - CHARS[4453] = -19; - CHARS[4454] = 33; - CHARS[4455] = -19; - CHARS[4456] = 33; - CHARS[4457] = -19; - Arrays.fill(CHARS, 4458, 4461, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4461, 4463, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4463, 4466, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4466, 4468, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4468] = 33; - CHARS[4469] = -19; - Arrays.fill(CHARS, 4470, 4510, (byte) 33 ); // Fill 40 of value (byte) 33 - CHARS[4510] = -19; - Arrays.fill(CHARS, 4511, 4520, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[4520] = -19; - Arrays.fill(CHARS, 4521, 4523, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[4523] = -19; - Arrays.fill(CHARS, 4524, 4526, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 4526, 4528, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4528, 4535, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 4535, 4537, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4537] = 33; - CHARS[4538] = -19; - CHARS[4539] = 33; - Arrays.fill(CHARS, 4540, 4547, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 4547, 4587, (byte) 33 ); // Fill 40 of value (byte) 33 - CHARS[4587] = -19; - Arrays.fill(CHARS, 4588, 4592, (byte) 33 ); // Fill 4 of value (byte) 33 - CHARS[4592] = -19; - Arrays.fill(CHARS, 4593, 4601, (byte) 33 ); // Fill 8 of value (byte) 33 - CHARS[4601] = -19; - Arrays.fill(CHARS, 4602, 7680, (byte) 33 ); // Fill 3078 of value (byte) 33 - Arrays.fill(CHARS, 7680, 7836, (byte) -19 ); // Fill 156 of value (byte) -19 - Arrays.fill(CHARS, 7836, 7840, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 7840, 7930, (byte) -19 ); // Fill 90 of value (byte) -19 - Arrays.fill(CHARS, 7930, 7936, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 7936, 7958, (byte) -19 ); // Fill 22 of value (byte) -19 - Arrays.fill(CHARS, 7958, 7960, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 7960, 7966, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 7966, 7968, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 7968, 8006, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 8006, 8008, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8008, 8014, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 8014, 8016, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8016, 8024, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[8024] = 33; - CHARS[8025] = -19; - CHARS[8026] = 33; - CHARS[8027] = -19; - CHARS[8028] = 33; - CHARS[8029] = -19; - CHARS[8030] = 33; - Arrays.fill(CHARS, 8031, 8062, (byte) -19 ); // Fill 31 of value (byte) -19 - Arrays.fill(CHARS, 8062, 8064, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8064, 8117, (byte) -19 ); // Fill 53 of value (byte) -19 - CHARS[8117] = 33; - Arrays.fill(CHARS, 8118, 8125, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[8125] = 33; - CHARS[8126] = -19; - Arrays.fill(CHARS, 8127, 8130, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8130, 8133, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[8133] = 33; - Arrays.fill(CHARS, 8134, 8141, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 8141, 8144, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8144, 8148, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 8148, 8150, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8150, 8156, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 8156, 8160, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 8160, 8173, (byte) -19 ); // Fill 13 of value (byte) -19 - Arrays.fill(CHARS, 8173, 8178, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 8178, 8181, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[8181] = 33; - Arrays.fill(CHARS, 8182, 8189, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 8189, 8400, (byte) 33 ); // Fill 211 of value (byte) 33 - Arrays.fill(CHARS, 8400, 8413, (byte) -87 ); // Fill 13 of value (byte) -87 - Arrays.fill(CHARS, 8413, 8417, (byte) 33 ); // Fill 4 of value (byte) 33 - CHARS[8417] = -87; - Arrays.fill(CHARS, 8418, 8486, (byte) 33 ); // Fill 68 of value (byte) 33 - CHARS[8486] = -19; - Arrays.fill(CHARS, 8487, 8490, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8490, 8492, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 8492, 8494, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[8494] = -19; - Arrays.fill(CHARS, 8495, 8576, (byte) 33 ); // Fill 81 of value (byte) 33 - Arrays.fill(CHARS, 8576, 8579, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 8579, 12293, (byte) 33 ); // Fill 3714 of value (byte) 33 - CHARS[12293] = -87; - CHARS[12294] = 33; - CHARS[12295] = -19; - Arrays.fill(CHARS, 12296, 12321, (byte) 33 ); // Fill 25 of value (byte) 33 - Arrays.fill(CHARS, 12321, 12330, (byte) -19 ); // Fill 9 of value (byte) -19 - Arrays.fill(CHARS, 12330, 12336, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[12336] = 33; - Arrays.fill(CHARS, 12337, 12342, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 12342, 12353, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 12353, 12437, (byte) -19 ); // Fill 84 of value (byte) -19 - Arrays.fill(CHARS, 12437, 12441, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 12441, 12443, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 12443, 12445, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 12445, 12447, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 12447, 12449, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 12449, 12539, (byte) -19 ); // Fill 90 of value (byte) -19 - CHARS[12539] = 33; - Arrays.fill(CHARS, 12540, 12543, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 12543, 12549, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 12549, 12589, (byte) -19 ); // Fill 40 of value (byte) -19 - Arrays.fill(CHARS, 12589, 19968, (byte) 33 ); // Fill 7379 of value (byte) 33 - Arrays.fill(CHARS, 19968, 40870, (byte) -19 ); // Fill 20902 of value (byte) -19 - Arrays.fill(CHARS, 40870, 44032, (byte) 33 ); // Fill 3162 of value (byte) 33 - Arrays.fill(CHARS, 44032, 55204, (byte) -19 ); // Fill 11172 of value (byte) -19 - Arrays.fill(CHARS, 55204, 55296, (byte) 33 ); // Fill 92 of value (byte) 33 - Arrays.fill(CHARS, 57344, 65534, (byte) 33 ); // Fill 8190 of value (byte) 33 - - } // () - - // - // Public static methods - // - - /** - * Returns true if the specified character is a supplemental character. - * - * @param c The character to check. - */ - public static boolean isSupplemental(int c) { - return (c >= 0x10000 && c <= 0x10FFFF); - } - - /** - * Returns true the supplemental character corresponding to the given - * surrogates. - * - * @param h The high surrogate. - * @param l The low surrogate. - */ - public static int supplemental(char h, char l) { - return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000; - } - - /** - * Returns the high surrogate of a supplemental character - * - * @param c The supplemental character to "split". - */ - public static char highSurrogate(int c) { - return (char) (((c - 0x00010000) >> 10) + 0xD800); - } - - /** - * Returns the low surrogate of a supplemental character - * - * @param c The supplemental character to "split". - */ - public static char lowSurrogate(int c) { - return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00); - } - - /** - * Returns whether the given character is a high surrogate - * - * @param c The character to check. - */ - public static boolean isHighSurrogate(int c) { - return (0xD800 <= c && c <= 0xDBFF); - } - - /** - * Returns whether the given character is a low surrogate - * - * @param c The character to check. - */ - public static boolean isLowSurrogate(int c) { - return (0xDC00 <= c && c <= 0xDFFF); - } - - - /** - * Returns true if the specified character is valid. This method - * also checks the surrogate character range from 0x10000 to 0x10FFFF. - *

- * If the program chooses to apply the mask directly to the - * CHARS array, then they are responsible for checking - * the surrogate character range. - * - * @param c The character to check. - */ - public static boolean isValid(int c) { - return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isValid(int):boolean - - /** - * Returns true if the specified character is invalid. - * - * @param c The character to check. - */ - public static boolean isInvalid(int c) { - return !isValid(c); - } // isInvalid(int):boolean - - /** - * Returns true if the specified character can be considered content. - * - * @param c The character to check. - */ - public static boolean isContent(int c) { - return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isContent(int):boolean - - /** - * Returns true if the specified character can be considered markup. - * Markup characters include '<', '&', and '%'. - * - * @param c The character to check. - */ - public static boolean isMarkup(int c) { - return c == '<' || c == '&' || c == '%'; - } // isMarkup(int):boolean - - /** - * Returns true if the specified character is a space character - * as defined by production [3] in the XML 1.0 specification. - * - * @param c The character to check. - */ - public static boolean isSpace(int c) { - return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0; - } // isSpace(int):boolean - - /** - * Returns true if the specified character is a valid name start - * character as defined by production [5] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isNameStart(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0; - } // isNameStart(int):boolean - - /** - * Returns true if the specified character is a valid name - * character as defined by production [4] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isName(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0; - } // isName(int):boolean - - /** - * Returns true if the specified character is a valid NCName start - * character as defined by production [4] in Namespaces in XML - * recommendation. - * - * @param c The character to check. - */ - public static boolean isNCNameStart(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0; - } // isNCNameStart(int):boolean - - /** - * Returns true if the specified character is a valid NCName - * character as defined by production [5] in Namespaces in XML - * recommendation. - * - * @param c The character to check. - */ - public static boolean isNCName(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0; - } // isNCName(int):boolean - - /** - * Returns true if the specified character is a valid Pubid - * character as defined by production [13] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isPubid(int c) { - return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0; - } // isPubid(int):boolean - - /* - * [5] Name ::= (Letter | '_' | ':') (NameChar)* - */ - /** - * Check to see if a string is a valid Name according to [5] - * in the XML 1.0 Recommendation - * - * @param name string to check - * @return true if name is a valid Name - */ - public static boolean isValidName(String name) { - if (name.length() == 0) - return false; - char ch = name.charAt(0); - if( isNameStart(ch) == false) - return false; - for (int i = 1; i < name.length(); i++ ) { - ch = name.charAt(i); - if( isName( ch ) == false ){ - return false; - } - } - return true; - } // isValidName(String):boolean - - - /* - * from the namespace rec - * [4] NCName ::= (Letter | '_') (NCNameChar)* - */ - /** - * Check to see if a string is a valid NCName according to [4] - * from the XML Namespaces 1.0 Recommendation - * - * @param ncName string to check - * @return true if name is a valid NCName - */ - public static boolean isValidNCName(String ncName) { - if (ncName.length() == 0) - return false; - char ch = ncName.charAt(0); - if( isNCNameStart(ch) == false) - return false; - for (int i = 1; i < ncName.length(); i++ ) { - ch = ncName.charAt(i); - if( isNCName( ch ) == false ){ - return false; - } - } - return true; - } // isValidNCName(String):boolean - - /* - * [7] Nmtoken ::= (NameChar)+ - */ - /** - * Check to see if a string is a valid Nmtoken according to [7] - * in the XML 1.0 Recommendation - * - * @param nmtoken string to check - * @return true if nmtoken is a valid Nmtoken - */ - public static boolean isValidNmtoken(String nmtoken) { - if (nmtoken.length() == 0) - return false; - for (int i = 0; i < nmtoken.length(); i++ ) { - char ch = nmtoken.charAt(i); - if( ! isName( ch ) ){ - return false; - } - } - return true; - } // isValidName(String):boolean - - - - - - // encodings - - /** - * Returns true if the encoding name is a valid IANA encoding. - * This method does not verify that there is a decoder available - * for this encoding, only that the characters are valid for an - * IANA encoding name. - * - * @param ianaEncoding The IANA encoding name. - */ - public static boolean isValidIANAEncoding(String ianaEncoding) { - if (ianaEncoding != null) { - int length = ianaEncoding.length(); - if (length > 0) { - char c = ianaEncoding.charAt(0); - if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) { - for (int i = 1; i < length; i++) { - c = ianaEncoding.charAt(i); - if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && - (c < '0' || c > '9') && c != '.' && c != '_' && - c != '-') { - return false; - } - } - return true; - } - } - } - return false; - } // isValidIANAEncoding(String):boolean - - /** - * Returns true if the encoding name is a valid Java encoding. - * This method does not verify that there is a decoder available - * for this encoding, only that the characters are valid for an - * Java encoding name. - * - * @param javaEncoding The Java encoding name. - */ - public static boolean isValidJavaEncoding(String javaEncoding) { - if (javaEncoding != null) { - int length = javaEncoding.length(); - if (length > 0) { - for (int i = 1; i < length; i++) { - char c = javaEncoding.charAt(i); - if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && - (c < '0' || c > '9') && c != '.' && c != '_' && - c != '-') { - return false; - } - } - return true; - } - } - return false; - } // isValidIANAEncoding(String):boolean - - -} // class XMLChar From e87c38d385adfbca1ce1bb098adbcb6cf43c7da6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 7 Jun 2023 11:15:10 +0000 Subject: [PATCH 017/271] JCR-4938: update remaining copies of XMLChar.java with latest version from Xerces git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910276 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/jackrabbit/util/XMLChar.java | 71 ++++++++++--------- .../org/apache/jackrabbit/test/XMLChar.java | 71 ++++++++++--------- 2 files changed, 78 insertions(+), 64 deletions(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLChar.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLChar.java index d19e90cb32d..d071cd9828c 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLChar.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLChar.java @@ -5,9 +5,9 @@ * 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. @@ -68,10 +68,10 @@ public class XMLChar { /** Pubid character mask. */ public static final int MASK_PUBID = 0x10; - - /** + + /** * Content character mask. Special characters are those that can - * be considered the start of markup, such as '<' and '&'. + * be considered the start of markup, such as '<' and '&'. * The various newline characters are considered special as well. * All other valid XML characters can be considered content. *

@@ -90,10 +90,10 @@ public class XMLChar { // static { - + // Initializing the Character Flag Array // Code generated by: XMLCharGenerator. - + CHARS[9] = 35; CHARS[10] = 19; CHARS[13] = 19; @@ -897,21 +897,23 @@ public static boolean isPubid(int c) { * @return true if name is a valid Name */ public static boolean isValidName(String name) { - if (name.length() == 0) + final int length = name.length(); + if (length == 0) { return false; + } char ch = name.charAt(0); - if( isNameStart(ch) == false) - return false; - for (int i = 1; i < name.length(); i++ ) { - ch = name.charAt(i); - if( isName( ch ) == false ){ - return false; - } + if (!isNameStart(ch)) { + return false; + } + for (int i = 1; i < length; ++i) { + ch = name.charAt(i); + if (!isName(ch)) { + return false; + } } return true; } // isValidName(String):boolean - - + /* * from the namespace rec * [4] NCName ::= (Letter | '_') (NCNameChar)* @@ -924,16 +926,19 @@ public static boolean isValidName(String name) { * @return true if name is a valid NCName */ public static boolean isValidNCName(String ncName) { - if (ncName.length() == 0) + final int length = ncName.length(); + if (length == 0) { return false; + } char ch = ncName.charAt(0); - if( isNCNameStart(ch) == false) - return false; - for (int i = 1; i < ncName.length(); i++ ) { - ch = ncName.charAt(i); - if( isNCName( ch ) == false ){ - return false; - } + if (!isNCNameStart(ch)) { + return false; + } + for (int i = 1; i < length; ++i) { + ch = ncName.charAt(i); + if (!isNCName(ch)) { + return false; + } } return true; } // isValidNCName(String):boolean @@ -946,16 +951,18 @@ public static boolean isValidNCName(String ncName) { * in the XML 1.0 Recommendation * * @param nmtoken string to check - * @return true if nmtoken is a valid Nmtoken + * @return true if nmtoken is a valid Nmtoken */ public static boolean isValidNmtoken(String nmtoken) { - if (nmtoken.length() == 0) + final int length = nmtoken.length(); + if (length == 0) { return false; - for (int i = 0; i < nmtoken.length(); i++ ) { - char ch = nmtoken.charAt(i); - if( ! isName( ch ) ){ - return false; - } + } + for (int i = 0; i < length; ++i) { + char ch = nmtoken.charAt(i); + if (!isName(ch)) { + return false; + } } return true; } // isValidName(String):boolean diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/XMLChar.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/XMLChar.java index 7cab3184059..1bccf02d052 100644 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/XMLChar.java +++ b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/XMLChar.java @@ -5,9 +5,9 @@ * 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. @@ -68,10 +68,10 @@ public class XMLChar { /** Pubid character mask. */ public static final int MASK_PUBID = 0x10; - - /** + + /** * Content character mask. Special characters are those that can - * be considered the start of markup, such as '<' and '&'. + * be considered the start of markup, such as '<' and '&'. * The various newline characters are considered special as well. * All other valid XML characters can be considered content. *

@@ -90,10 +90,10 @@ public class XMLChar { // static { - + // Initializing the Character Flag Array // Code generated by: XMLCharGenerator. - + CHARS[9] = 35; CHARS[10] = 19; CHARS[13] = 19; @@ -897,21 +897,23 @@ public static boolean isPubid(int c) { * @return true if name is a valid Name */ public static boolean isValidName(String name) { - if (name.length() == 0) + final int length = name.length(); + if (length == 0) { return false; + } char ch = name.charAt(0); - if( isNameStart(ch) == false) - return false; - for (int i = 1; i < name.length(); i++ ) { - ch = name.charAt(i); - if( isName( ch ) == false ){ - return false; - } + if (!isNameStart(ch)) { + return false; + } + for (int i = 1; i < length; ++i) { + ch = name.charAt(i); + if (!isName(ch)) { + return false; + } } return true; } // isValidName(String):boolean - - + /* * from the namespace rec * [4] NCName ::= (Letter | '_') (NCNameChar)* @@ -924,16 +926,19 @@ public static boolean isValidName(String name) { * @return true if name is a valid NCName */ public static boolean isValidNCName(String ncName) { - if (ncName.length() == 0) + final int length = ncName.length(); + if (length == 0) { return false; + } char ch = ncName.charAt(0); - if( isNCNameStart(ch) == false) - return false; - for (int i = 1; i < ncName.length(); i++ ) { - ch = ncName.charAt(i); - if( isNCName( ch ) == false ){ - return false; - } + if (!isNCNameStart(ch)) { + return false; + } + for (int i = 1; i < length; ++i) { + ch = ncName.charAt(i); + if (!isNCName(ch)) { + return false; + } } return true; } // isValidNCName(String):boolean @@ -946,16 +951,18 @@ public static boolean isValidNCName(String ncName) { * in the XML 1.0 Recommendation * * @param nmtoken string to check - * @return true if nmtoken is a valid Nmtoken + * @return true if nmtoken is a valid Nmtoken */ public static boolean isValidNmtoken(String nmtoken) { - if (nmtoken.length() == 0) + final int length = nmtoken.length(); + if (length == 0) { return false; - for (int i = 0; i < nmtoken.length(); i++ ) { - char ch = nmtoken.charAt(i); - if( ! isName( ch ) ){ - return false; - } + } + for (int i = 0; i < length; ++i) { + char ch = nmtoken.charAt(i); + if (!isName(ch)) { + return false; + } } return true; } // isValidName(String):boolean From 8004fdd28e8189c0b2c10e24adf72312ade5e6ff Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 9 Jun 2023 14:12:47 +0000 Subject: [PATCH 018/271] JCR-4939: Update commons-io dependency to 2.13.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910328 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 91ae2d82f70..d8dba79fb89 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -469,7 +469,7 @@ commons-io commons-io - 2.12.0 + 2.13.0 javax.transaction From 8cc6b47ada325092db9fe9824440eae1dc89c9c5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 14 Jun 2023 09:39:53 +0000 Subject: [PATCH 019/271] JCR-4941: Update tomcat dependency to 8.5.90 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910401 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7aa2f81a622..e1d38261a69 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 8.5.89 + 8.5.90 From 37ede49f7161bf627c5ed3b50202184d7111f38c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 17 Jun 2023 14:07:39 +0000 Subject: [PATCH 020/271] JCR-4308: update Jetty to 9.4.* (patch by Manfred Baedke) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910469 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-standalone-components/pom.xml | 15 +-------------- .../org/apache/jackrabbit/standalone/Main.java | 7 +++++++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d8dba79fb89..b7fc310fed1 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -50,7 +50,7 @@ 1.48.0 1.22.15 - 9.2.30.v20200428 + 9.4.51.v20230217 2.4.1 ${project.build.sourceEncoding} 1.7.36 @@ -605,7 +605,7 @@ org.eclipse.jetty - jetty-jsp + apache-jsp ${jetty.version} diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 3ef251409d6..9e198854df1 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -130,20 +130,7 @@ org.eclipse.jetty - jetty-jsp - - - - org.glassfish - javax.el - - - - - - org.glassfish - javax.el - 3.0.0 + apache-jsp org.eclipse.jetty diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java index 9f001e43abc..dfd0c8ef3df 100644 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java +++ b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java @@ -45,6 +45,7 @@ import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.RequestLogHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.webapp.Configuration; import org.eclipse.jetty.webapp.WebAppContext; /** @@ -280,6 +281,12 @@ private void prepareWebapp(File file, File repository, File tmp) { webapp.setExtractWAR(true); webapp.setTempDirectory(tmp); + Configuration.ClassList classlist = Configuration.ClassList + .setServerDefault(server); + classlist.addBefore( + "org.eclipse.jetty.webapp.JettyWebXmlConfiguration", + "org.eclipse.jetty.annotations.AnnotationConfiguration"); + ServletHolder servlet = new ServletHolder(JackrabbitRepositoryServlet.class); servlet.setInitOrder(1); From 8b46617e2d21cd504dde29d7fc52be1c5050bad1 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 20 Jun 2023 12:24:42 +0000 Subject: [PATCH 021/271] JCR-4606: standalone: logback log files created in wrong place git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910509 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/jackrabbit/standalone/Main.java | 174 +++++++++--------- 1 file changed, 91 insertions(+), 83 deletions(-) diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java index dfd0c8ef3df..bc438b74b72 100644 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java +++ b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java @@ -57,28 +57,8 @@ public class Main { * @param args */ public static void main(String[] args) throws Exception { - new Main(args).run(); - } - - private final Options options = new Options(); - - private final CommandLine command; - - private final RequestLogHandler accessLog = new RequestLogHandler(); + Options options = new Options(); - private final WebAppContext webapp = new WebAppContext(); - - private final Server server = new Server(); - - private final ServerConnector connector = new ServerConnector(server); - - /** - * Construct Main application instance. - *

- * Note: Constructor is protected because other projects such as Commons VFS can extend this for some reasons - * (e.g, unit testing against Jackrabbit WebDAV). - */ - protected Main(String[] args) throws ParseException { options.addOption("?", "help", false, "print this message"); options.addOption("n", "notice", false, "print copyright notices"); options.addOption("l", "license", false, "print license information"); @@ -102,19 +82,11 @@ protected Main(String[] args) throws ParseException { "C", "backup-conf", true, "backup repository configuration file"); - command = new DefaultParser().parse(options, args); - } + CommandLine command = new DefaultParser().parse(options, args); - /** - * Run this Main application. - *

- * Note: this is public because this can be used by other projects in unit tests. e.g, Commons-VFS. - * @throws Exception if any exception occurs - */ - public void run() throws Exception { String defaultFile = "jackrabbit-standalone.jar"; URL location = - Main.class.getProtectionDomain().getCodeSource().getLocation(); + Main.class.getProtectionDomain().getCodeSource().getLocation(); if (location != null && "file".equals(location.getProtocol())) { File file = new File(location.getPath()); if (file.isFile()) { @@ -154,47 +126,101 @@ public void run() throws Exception { // already logged out } } else { - message("Welcome to Apache Jackrabbit!"); - message("-------------------------------"); - File repository = - new File(command.getOptionValue("repo", "jackrabbit")); - message("Using repository directory " + repository); + new File(command.getOptionValue("repo", "jackrabbit")); repository.mkdirs(); - File tmp = new File(repository, "tmp"); - tmp.mkdir(); File log = new File(repository, "log"); log.mkdir(); - message("Writing log messages to " + log); - prepareServerLog(log); + if (!command.hasOption("quiet")) { + System.out.println("Using repository directory " + repository); + System.out.println("Writing log messages to " + log); + } - if (command.hasOption("backup")) { - backup(repository); + setSystemPropertyIfMissing( + "jackrabbit.log", + new File(log, "jackrabbit.log").getPath()); + setSystemPropertyIfMissing( + "jetty.log", + new File(log, "jetty.log").getPath()); + + if (command.hasOption("debug")) { + setSystemPropertyIfMissing("log.level", "DEBUG"); } else { - message("Starting the server..."); - prepareWebapp(file, repository, tmp); - accessLog.setHandler(webapp); - prepareAccessLog(log); - server.setHandler(accessLog); - prepareConnector(); - server.addConnector(connector); - prepareShutdown(); - - try { - server.start(); - - String host = connector.getHost(); - if (host == null) { - host = "localhost"; - } - message("Apache Jackrabbit is now running at " - +"http://" + host + ":" + connector.getPort() + "/"); - } catch (Throwable t) { - System.err.println( - "Unable to start the server: " + t.getMessage()); - System.exit(1); + setSystemPropertyIfMissing("log.level", "INFO"); + } + + setSystemPropertyIfMissing( + "derby.stream.error.file", + new File(log, "derby.log").getPath()); + + new Main(command).run(file, repository, log); + } + } + + private static void setSystemPropertyIfMissing(String key, String value) { + if (System.getProperty(key) == null) { + System.setProperty(key, value); + } + } + + private CommandLine command; + + private final RequestLogHandler accessLog = new RequestLogHandler(); + + private final WebAppContext webapp = new WebAppContext(); + + private final Server server = new Server(); + + private final ServerConnector connector = new ServerConnector(server); + + /** + * Construct Main application instance. + *

+ * Note: Constructor is protected because other projects such as Commons VFS can extend this for some reasons + * (e.g, unit testing against Jackrabbit WebDAV). + */ + protected Main(CommandLine command) throws ParseException { + this.command = command; + } + + /** + * Run this Main application. + *

+ * Note: this is public because this can be used by other projects in unit tests. e.g, Commons-VFS. + * @throws Exception if any exception occurs + */ + public void run(File file, File repository, File log) throws Exception { + message("Welcome to Apache Jackrabbit!"); + message("-------------------------------"); + + if (command.hasOption("backup")) { + backup(repository); + } else { + message("Starting the server..."); + File tmp = new File(repository, "tmp"); + tmp.mkdir(); + prepareWebapp(file, repository, tmp); + accessLog.setHandler(webapp); + prepareAccessLog(log); + server.setHandler(accessLog); + prepareConnector(); + server.addConnector(connector); + prepareShutdown(); + + try { + server.start(); + + String host = connector.getHost(); + if (host == null) { + host = "localhost"; } + message("Apache Jackrabbit is now running at " + +"http://" + host + ":" + connector.getPort() + "/"); + } catch (Throwable t) { + System.err.println( + "Unable to start the server: " + t.getMessage()); + System.exit(1); } } } @@ -250,24 +276,6 @@ private void backup(File sourceDir) throws Exception { message("The repository has been successfully copied."); } - private void prepareServerLog(File log) - throws IOException { - System.setProperty( - "jackrabbit.log", new File(log, "jackrabbit.log").getPath()); - System.setProperty( - "jetty.log", new File(log, "jetty.log").getPath()); - - if (command.hasOption("debug")) { - System.setProperty("log.level", "DEBUG"); - } else { - System.setProperty("log.level", "INFO"); - } - - System.setProperty( - "derby.stream.error.file", - new File(log, "derby.log").getPath()); - } - private void prepareAccessLog(File log) { NCSARequestLog ncsa = new NCSARequestLog( new File(log, "access.log.yyyy_mm_dd").getPath()); @@ -321,7 +329,7 @@ private void message(String message) { } } - private void copyToOutput(String resource) throws IOException { + private static void copyToOutput(String resource) throws IOException { InputStream stream = Main.class.getResourceAsStream(resource); try { IOUtils.copy(stream, System.out); From ba835993673ee9fd03150f48bcca627bdb25a244 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 7 Jul 2023 07:21:01 +0000 Subject: [PATCH 022/271] JCR-4947: update Apache parent pom to version 30 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910837 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index b7fc310fed1..a3a596051d3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 29 + 30 From 3bbd6b2c23f1ef78dc610bb0b3c7e67a5701d2ad Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 11 Jul 2023 12:40:44 +0000 Subject: [PATCH 023/271] JCR-4944: upgrade to Tomcat 9.x (patch bei baedke) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910937 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- .../src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index e1d38261a69..0b33e8a5ab7 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 8.5.90 + 9.0.78 diff --git a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java index a547758177e..021c0611d76 100644 --- a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java +++ b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java @@ -27,6 +27,7 @@ import org.apache.catalina.startup.Tomcat; import org.apache.commons.io.FileUtils; +import org.apache.tomcat.util.scan.StandardJarScanner; import org.slf4j.bridge.SLF4JBridgeHandler; import com.gargoylesoftware.htmlunit.WebClient; @@ -75,8 +76,11 @@ protected void setUp() throws Exception { tomcat.setBaseDir(baseDir.getPath()); tomcat.setHostname(url.getHost()); tomcat.setPort(url.getPort()); + tomcat.getConnector(); - tomcat.addWebapp("", war.getAbsolutePath()); + StandardJarScanner jarScanner = new StandardJarScanner(); + jarScanner.setScanManifest(false); + tomcat.addWebapp("", war.getAbsolutePath()).setJarScanner(jarScanner); tomcat.start(); From 9e8069241f4e48e82f0c12a26ece27586e36e378 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 11 Jul 2023 14:45:28 +0000 Subject: [PATCH 024/271] JCR-4352: Update lucene-core dependency to 3.6.2 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910939 13f79535-47bb-0310-9956-ffa450edef68 --- .../query/lucene/PredicateDerefQuery.java | 92 ++++++++++--------- jackrabbit-parent/pom.xml | 2 +- 2 files changed, 52 insertions(+), 42 deletions(-) diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java index b09d829812c..f91827f84b0 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java @@ -74,6 +74,11 @@ public class PredicateDerefQuery extends Query { * The scorer of the name test query */ private Scorer nameTestScorer; + + /** + * Flag indicating if the children have already been calculated + */ + private boolean childrenCalculated = false; /** * Creates a new DerefQuery based on a context * query. @@ -203,6 +208,7 @@ public void normalize(float norm) { public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException { subQueryScorer = subQuery.weight(searcher).scorer(reader, scoreDocsInOrder, false); + childrenCalculated = false; if (nameTest != null) { nameTestScorer = new NameQuery(nameTest, version, nsMappings).weight(searcher).scorer(reader, scoreDocsInOrder, false); } @@ -311,58 +317,62 @@ public int advance(int target) throws IOException { * @throws IOException */ private void calculateChildren() throws IOException { + + if (!childrenCalculated) { // subQueryHits.clear(); // hits.clear(); - subQueryScorer.score(new AbstractHitCollector() { - @Override - protected void collect(int doc, float score) { - subQueryHits.set(doc); - } - }); + subQueryScorer.score(new AbstractHitCollector() { + @Override + protected void collect(int doc, float score) { + subQueryHits.set(doc); + } + }); - TermDocs termDocs = reader.termDocs(new Term(FieldNames.PROPERTIES_SET, refProperty)); - String prefix = FieldNames.createNamedValue(refProperty, ""); - while (termDocs.next()) { - int doc = termDocs.doc(); + TermDocs termDocs = reader.termDocs(new Term(FieldNames.PROPERTIES_SET, refProperty)); + String prefix = FieldNames.createNamedValue(refProperty, ""); + while (termDocs.next()) { + int doc = termDocs.doc(); - String[] values = reader.document(doc).getValues(FieldNames.PROPERTIES); - if (values == null) { - // no reference properties at all on this node - continue; - } - for (int v = 0; v < values.length; v++) { - if (values[v].startsWith(prefix)) { - String uuid = values[v].substring(prefix.length()); - - TermDocs node = reader.termDocs(TermFactory.createUUIDTerm(uuid)); - try { - while (node.next()) { - if (subQueryHits.get(node.doc())) { - hits.set(doc); + String[] values = reader.document(doc).getValues(FieldNames.PROPERTIES); + if (values == null) { + // no reference properties at all on this node + continue; + } + for (int v = 0; v < values.length; v++) { + if (values[v].startsWith(prefix)) { + String uuid = values[v].substring(prefix.length()); + + TermDocs node = reader.termDocs(TermFactory.createUUIDTerm(uuid)); + try { + while (node.next()) { + if (subQueryHits.get(node.doc())) { + hits.set(doc); + } } + } finally { + node.close(); } - } finally { - node.close(); } } } - } - // collect nameTest hits - final BitSet nameTestHits = new BitSet(); - if (nameTestScorer != null) { - nameTestScorer.score(new AbstractHitCollector() { - @Override - protected void collect(int doc, float score) { - nameTestHits.set(doc); - } - }); - } + // collect nameTest hits + final BitSet nameTestHits = new BitSet(); + if (nameTestScorer != null) { + nameTestScorer.score(new AbstractHitCollector() { + @Override + protected void collect(int doc, float score) { + nameTestHits.set(doc); + } + }); + } - // filter out the target nodes that do not match the name test - // if there is any name test at all. - if (nameTestScorer != null) { - hits.and(nameTestHits); + // filter out the target nodes that do not match the name test + // if there is any name test at all. + if (nameTestScorer != null) { + hits.and(nameTestHits); + } + childrenCalculated = true; } } } diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index a3a596051d3..3b2f15d794c 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -499,7 +499,7 @@ org.apache.lucene lucene-core - 3.6.0 + 3.6.2 org.apache.tika From 5d2425d98718238a9e2e085200fb3d13948bf2a8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 11 Jul 2023 16:11:29 +0000 Subject: [PATCH 025/271] JCR-4942: spi-commons: bump minor version number of o.a.j.spi.commons.conversion git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910940 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/jackrabbit/spi/commons/conversion/package-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/package-info.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/package-info.java index 1f1034ce774..b1220f25bb2 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/package-info.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/package-info.java @@ -14,5 +14,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@org.osgi.annotation.versioning.Version("2.4.0") +@org.osgi.annotation.versioning.Version("2.5.0") package org.apache.jackrabbit.spi.commons.conversion; From 85c99d4894ec9666b4c2dc2b7290a03dbe9ba68b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 12:07:38 +0000 Subject: [PATCH 026/271] JCR-4948: core: beanutils leaks dependency to commons-collections in oak-core tests git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910960 13f79535-47bb-0310-9956-ffa450edef68 --- .../jackrabbit/core/query/lucene/SQL2IndexingAggregateTest.java | 2 +- .../apache/jackrabbit/core/security/user/NodeCreationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SQL2IndexingAggregateTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SQL2IndexingAggregateTest.java index ab00e7ec8c2..1445442b3ea 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SQL2IndexingAggregateTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/SQL2IndexingAggregateTest.java @@ -28,7 +28,7 @@ import javax.jcr.Node; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.input.NullInputStream; import org.apache.jackrabbit.JcrConstants; import org.apache.jackrabbit.commons.JcrUtils; diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeCreationTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeCreationTest.java index 8773eb67e05..ee78544e2b6 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeCreationTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeCreationTest.java @@ -16,7 +16,7 @@ */ package org.apache.jackrabbit.core.security.user; -import org.apache.commons.collections.map.ListOrderedMap; +import org.apache.commons.collections4.map.ListOrderedMap; import org.apache.jackrabbit.api.security.user.AbstractUserTest; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.AuthorizableExistsException; From 8a5df9df003240f0ffb045f6c8f86a8d6493129a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 12:56:30 +0000 Subject: [PATCH 027/271] JCR-4949: get rid of beanutils dependency git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910962 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-core/pom.xml | 5 -- .../jackrabbit/core/TestRepository.java | 15 +++-- jackrabbit-parent/pom.xml | 5 -- jackrabbit-standalone-components/pom.xml | 4 -- jackrabbit-webapp/pom.xml | 4 -- .../jackrabbit/j2ee/AbstractConfig.java | 56 +------------------ .../jackrabbit/j2ee/BootstrapConfig.java | 27 ++++++++- .../apache/jackrabbit/j2ee/JNDIConfig.java | 18 +++++- .../org/apache/jackrabbit/j2ee/RMIConfig.java | 45 ++++++++++++++- 9 files changed, 97 insertions(+), 82 deletions(-) diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index fd46ce4661a..b257e46f3fe 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -302,11 +302,6 @@ org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral junit test - - commons-beanutils - commons-beanutils - test - org.apache.jackrabbit jackrabbit-jcr-benchmark diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestRepository.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestRepository.java index da11586e8a5..b970f2a14a2 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestRepository.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestRepository.java @@ -17,14 +17,14 @@ package org.apache.jackrabbit.core; import java.io.InputStream; -import java.util.Map; +import java.lang.reflect.Field; +import java.lang.reflect.Method; import javax.jcr.Credentials; import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.apache.commons.beanutils.BeanMap; import org.apache.jackrabbit.commons.repository.ProxyRepository; import org.apache.jackrabbit.commons.repository.RepositoryFactory; import org.apache.jackrabbit.core.config.ConfigurationException; @@ -117,11 +117,16 @@ public static synchronized Repository getInstance() throws RepositoryException { private static Repository getIntegratedInstance() throws Exception { Class test = Class.forName("org.apache.jackrabbit.test.AbstractJCRTest"); - Map helper = new BeanMap(test.getField("helper").get(null)); + Field helperField = test.getField("helper"); + helperField.setAccessible(true); + Object helper = helperField.get(null); + Method getRepository = helper.getClass().getMethod("getRepository"); + Method getSuperuserCredentials = helper.getClass().getMethod("getSuperuserCredentials"); final Repository repository = - (Repository) helper.get("repository"); + (Repository) getRepository.invoke(helper); final Credentials superuser = - (Credentials) helper.get("superuserCredentials"); + (Credentials) getSuperuserCredentials.invoke(helper); + return new ProxyRepository(new RepositoryFactory() { public Repository getRepository() throws RepositoryException { diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 3b2f15d794c..9b7f194a62f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -456,11 +456,6 @@ concurrent 1.3.4 - - commons-beanutils - commons-beanutils - 1.9.4 - org.apache.commons commons-collections4 diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 9e198854df1..6d3d37b2436 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -157,10 +157,6 @@ commons-collections4 4.4 - - commons-beanutils - commons-beanutils - commons-digester commons-digester diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 0b33e8a5ab7..438b718f264 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -76,10 +76,6 @@ ch.qos.logback logback-classic - - commons-beanutils - commons-beanutils - org.apache.tomcat tomcat-servlet-api diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/AbstractConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/AbstractConfig.java index 2d005bdd0d2..9221327737d 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/AbstractConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/AbstractConfig.java @@ -16,17 +16,12 @@ */ package org.apache.jackrabbit.j2ee; -import org.apache.commons.beanutils.BeanMap; import org.apache.jackrabbit.util.Text; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Enumeration; +import java.util.HashMap; import java.util.Iterator; -import java.util.Properties; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; /** * Abstract configuration class that is based on a bean map. @@ -40,54 +35,7 @@ public abstract class AbstractConfig { protected boolean valid; - private BeanMap map = new BeanMap(this); - - /** - * Initializes the configuration with values from the given properties - * @param props the configuration properties - */ - public void init(Properties props) throws ServletException { - Iterator iter = props.keySet().iterator(); - while (iter.hasNext()) { - String name = (String) iter.next(); - String mapName = toMapName(name, '.'); - try { - if (map.containsKey(mapName)) { - map.put(mapName, props.getProperty(name)); - } - } catch (Exception e) { - throw new ServletExceptionWithCause( - "Invalid configuration property: " + name, e); - } - } - } - - public void init(ServletConfig ctx) throws ServletException { - Enumeration names = ctx.getInitParameterNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - String mapName = toMapName(name, '-'); - try { - if (map.containsKey(mapName)) { - map.put(mapName, ctx.getInitParameter(name)); - } - } catch (Exception e) { - throw new ServletExceptionWithCause( - "Invalid servlet configuration option: " + name, e); - } - } - } - - public String toMapName(String name, char delim) { - StringBuffer ret = new StringBuffer(); - String[] elems = Text.explode(name, delim); - ret.append(elems[0]); - for (int i=1; i=0 || rmiUri != null; } From 91e1da3e99cc9c231d5aac704644f7234afec7f5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 13:15:04 +0000 Subject: [PATCH 028/271] JCR-4950: Release Jackrabbit 2.21.17 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910963 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index b61a54a6664..118f6d363a2 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,36 +1,44 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.16 +Release Notes -- Apache Jackrabbit -- Version 2.21.17 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.16, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.17, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.16 is an unstable release cut directly from +Apache Jackrabbit 2.21.17 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.16 +Changes in Jackrabbit 2.21.17 ----------------------------- +Sub-task + + [JCR-4948] - core: beanutils leaks dependency to commons-collections in oak-core tests + Bug - [JCR-4907] - Javadocs have incorrect copyright date - [JCR-4917] - spi-commons: NameParser is too picky (allow non-ASCII whitespace) + [JCR-4606] - standalone: logback log files created in wrong place + [JCR-4949] - get rid of beanutils dependency Task - [JCR-4908] - Update commons file-upload dependency to 1.5 - [JCR-4909] - specify maven-rar-plugin dependency - [JCR-4910] - Update tomcat dependency to 8.5.86 - [JCR-4912] - set baseline comparisonVersion to latest stable (2.20.9) - [JCR-4913] - spi-commons: improve error messages for org.apache.jackrabbit.spi.commons.conversion.NameParser.parse - [JCR-4918] - vfs-ext: update hadoop-hdfs-client dependency to 3.3.5 - [JCR-4919] - Update tomcat dependency to 8.5.87 - [JCR-4922] - Remove javadoc-plugin dependency (use the one provided by Apache parent pom) - [JCR-4923] - Remove release-plugin dependency (use the one provided by Apache parent pom) + [JCR-4308] - update Jetty to 9.4.* + [JCR-4352] - Update lucene-core dependency to 3.6.2 + [JCR-4925] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.15 + [JCR-4932] - Update commons-io dependency to 2.12.0 + [JCR-4933] - Update tomcat dependency to 8.5.88 + [JCR-4936] - Update tomcat dependency to 8.5.89 + [JCR-4937] - jcr-tests: get rid of duplicate XMLChar class + [JCR-4938] - update remaining copies of XMLChar.java with latest version from Xerces + [JCR-4939] - Update commons-io dependency to 2.13.0 + [JCR-4941] - Update tomcat dependency to 8.5.90 + [JCR-4942] - spi-commons: bump minor version number of o.a.j.spi.commons.conversion + [JCR-4944] - upgrade to Tomcat 9.x + [JCR-4947] - update Apache parent pom to version 30 For more detailed information about all the changes in this and other From 421feb47f38f3b6fae4e386fb95c24b6a5baad30 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 14:09:44 +0000 Subject: [PATCH 029/271] [maven-release-plugin] prepare release jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910964 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c90430a21d..8dfa29a1d1e 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index b257e46f3fe..dafadfca85a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index c86d1ee371e..8972c6c94e8 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 783c3055dc2..4a52736aedb 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3a041ac639e..55bf97bda50 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 4b0ccabc98f..b6333163b22 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 82a71d4e9ed..12e3585d722 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 040d2ea9c9a..827fc0ef375 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ab87e6629bf..4ffebb33f16 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index c33b4ab6657..7c664ed017c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4818345e716..e3684a68b23 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index f97a8352e6f..1b48c4ffb68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d4b0fe7e0b8..b21e64de129 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9b7f194a62f..5c985e0caa6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17-SNAPSHOT + 2.21.17 pom @@ -63,7 +63,7 @@ 0.0 - 1680199282 + 1689256185 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c220c9eeae5..c90b3e7b747 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b643a9e9438..797a48d7cc6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 3aba191ad33..9cfb28f31f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bb24843333b..c3664987e8c 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6d3d37b2436..d77f598c998 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ed76d2d67d5..c6b60b4b916 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 4ea8b4fa337..13357fef1e3 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 438b718f264..5233bc19040 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8c61cd082e3..8da3db839f0 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6f8f32fc707..9213dd91328 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 From fe623ab8d4078e066771326fde8f45556b8a5ec8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 14:09:52 +0000 Subject: [PATCH 030/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910966 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 8dfa29a1d1e..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dafadfca85a..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8972c6c94e8..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 4a52736aedb..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 55bf97bda50..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index b6333163b22..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 12e3585d722..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 827fc0ef375..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4ffebb33f16..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 7c664ed017c..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e3684a68b23..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1b48c4ffb68..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b21e64de129..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 5c985e0caa6..07b17e8fa12 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689256185 + 1689257387 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c90b3e7b747..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 797a48d7cc6..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9cfb28f31f6..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c3664987e8c..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d77f598c998..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c6b60b4b916..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 13357fef1e3..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5233bc19040..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8da3db839f0..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9213dd91328..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From 3f68d1f3db5f60a5383dc44b90851ffd82f015a5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 15:20:18 +0000 Subject: [PATCH 031/271] undo release git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910968 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..2c90430a21d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..b257e46f3fe 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..c86d1ee371e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..783c3055dc2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..3a041ac639e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..4b0ccabc98f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..82a71d4e9ed 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..040d2ea9c9a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..ab87e6629bf 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..c33b4ab6657 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..4818345e716 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..f97a8352e6f 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..d4b0fe7e0b8 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 07b17e8fa12..9b7f194a62f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689257387 + 1680199282 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..c220c9eeae5 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..b643a9e9438 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..3aba191ad33 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..bb24843333b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..6d3d37b2436 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..ed76d2d67d5 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..4ea8b4fa337 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..438b718f264 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..8c61cd082e3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index b69e10fd1f4..6f8f32fc707 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT jackrabbit-parent/pom.xml From 5d845c7e6bc7fcb8260935b48d12604e4278ba05 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 15:41:41 +0000 Subject: [PATCH 032/271] [maven-release-plugin] prepare release jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910970 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c90430a21d..8dfa29a1d1e 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index b257e46f3fe..dafadfca85a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index c86d1ee371e..8972c6c94e8 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 783c3055dc2..4a52736aedb 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3a041ac639e..55bf97bda50 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 4b0ccabc98f..b6333163b22 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 82a71d4e9ed..12e3585d722 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 040d2ea9c9a..827fc0ef375 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ab87e6629bf..4ffebb33f16 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index c33b4ab6657..7c664ed017c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4818345e716..e3684a68b23 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index f97a8352e6f..1b48c4ffb68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d4b0fe7e0b8..b21e64de129 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9b7f194a62f..edf408e8012 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17-SNAPSHOT + 2.21.17 pom @@ -63,7 +63,7 @@ 0.0 - 1680199282 + 1689261819 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c220c9eeae5..c90b3e7b747 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b643a9e9438..797a48d7cc6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 3aba191ad33..9cfb28f31f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bb24843333b..c3664987e8c 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6d3d37b2436..d77f598c998 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ed76d2d67d5..c6b60b4b916 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 4ea8b4fa337..13357fef1e3 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 438b718f264..5233bc19040 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8c61cd082e3..8da3db839f0 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6f8f32fc707..9213dd91328 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 From 890381857d52e41e2b73bec84d267f23ecc704fa Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 15:41:48 +0000 Subject: [PATCH 033/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910972 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 8dfa29a1d1e..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dafadfca85a..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8972c6c94e8..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 4a52736aedb..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 55bf97bda50..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index b6333163b22..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 12e3585d722..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 827fc0ef375..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4ffebb33f16..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 7c664ed017c..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e3684a68b23..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1b48c4ffb68..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b21e64de129..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index edf408e8012..fd6e06d2af6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689261819 + 1689262904 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c90b3e7b747..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 797a48d7cc6..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9cfb28f31f6..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c3664987e8c..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d77f598c998..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c6b60b4b916..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 13357fef1e3..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5233bc19040..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8da3db839f0..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9213dd91328..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From 754b0c745edb96255c8b10d26bebd7dc2223edc9 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 15:47:20 +0000 Subject: [PATCH 034/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910973 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..2c90430a21d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..b257e46f3fe 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..c86d1ee371e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..783c3055dc2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..3a041ac639e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..4b0ccabc98f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..82a71d4e9ed 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..040d2ea9c9a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..ab87e6629bf 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..c33b4ab6657 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..4818345e716 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..f97a8352e6f 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..d4b0fe7e0b8 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index fd6e06d2af6..9b7f194a62f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689262904 + 1680199282 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..c220c9eeae5 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..b643a9e9438 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..3aba191ad33 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..bb24843333b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..6d3d37b2436 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..ed76d2d67d5 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..4ea8b4fa337 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..438b718f264 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..8c61cd082e3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index b69e10fd1f4..6f8f32fc707 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT jackrabbit-parent/pom.xml From 46d049a65dc2a69f9f0e12ab61f8352b9068fcc0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:08:59 +0000 Subject: [PATCH 035/271] [maven-release-plugin] prepare release jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910975 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c90430a21d..8dfa29a1d1e 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index b257e46f3fe..dafadfca85a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index c86d1ee371e..8972c6c94e8 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 783c3055dc2..4a52736aedb 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3a041ac639e..55bf97bda50 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 4b0ccabc98f..b6333163b22 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 82a71d4e9ed..12e3585d722 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 040d2ea9c9a..827fc0ef375 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ab87e6629bf..4ffebb33f16 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index c33b4ab6657..7c664ed017c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4818345e716..e3684a68b23 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index f97a8352e6f..1b48c4ffb68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d4b0fe7e0b8..b21e64de129 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9b7f194a62f..befefca2839 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17-SNAPSHOT + 2.21.17 pom @@ -63,7 +63,7 @@ 0.0 - 1680199282 + 1689263366 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c220c9eeae5..c90b3e7b747 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b643a9e9438..797a48d7cc6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 3aba191ad33..9cfb28f31f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bb24843333b..c3664987e8c 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6d3d37b2436..d77f598c998 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ed76d2d67d5..c6b60b4b916 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 4ea8b4fa337..13357fef1e3 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 438b718f264..5233bc19040 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8c61cd082e3..8da3db839f0 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6f8f32fc707..9213dd91328 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 From d7252fcb87a30102318183b41965a2d13800c9c6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:09:05 +0000 Subject: [PATCH 036/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910977 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 8dfa29a1d1e..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dafadfca85a..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8972c6c94e8..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 4a52736aedb..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 55bf97bda50..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index b6333163b22..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 12e3585d722..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 827fc0ef375..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4ffebb33f16..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 7c664ed017c..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e3684a68b23..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1b48c4ffb68..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b21e64de129..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index befefca2839..ae5f67b2497 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689263366 + 1689264541 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c90b3e7b747..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 797a48d7cc6..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9cfb28f31f6..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c3664987e8c..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d77f598c998..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c6b60b4b916..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 13357fef1e3..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5233bc19040..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8da3db839f0..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9213dd91328..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From 32fa4cd233547f291ce0bb820bac42134729a633 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:14:44 +0000 Subject: [PATCH 037/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910978 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..2c90430a21d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..b257e46f3fe 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..c86d1ee371e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..783c3055dc2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..3a041ac639e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..4b0ccabc98f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..82a71d4e9ed 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..040d2ea9c9a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..ab87e6629bf 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..c33b4ab6657 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..4818345e716 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..f97a8352e6f 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..d4b0fe7e0b8 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index ae5f67b2497..9b7f194a62f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689264541 + 1680199282 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..c220c9eeae5 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..b643a9e9438 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..3aba191ad33 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..bb24843333b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..6d3d37b2436 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..ed76d2d67d5 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..4ea8b4fa337 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..438b718f264 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..8c61cd082e3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index b69e10fd1f4..6f8f32fc707 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT jackrabbit-parent/pom.xml From 3dfd9e0aaaa5e186d7d38f57ed893719be3d4fcb Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:41:03 +0000 Subject: [PATCH 038/271] [maven-release-plugin] prepare release jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910980 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c90430a21d..8dfa29a1d1e 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index b257e46f3fe..dafadfca85a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index c86d1ee371e..8972c6c94e8 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 783c3055dc2..4a52736aedb 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3a041ac639e..55bf97bda50 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 4b0ccabc98f..b6333163b22 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 82a71d4e9ed..12e3585d722 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 040d2ea9c9a..827fc0ef375 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ab87e6629bf..4ffebb33f16 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index c33b4ab6657..7c664ed017c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4818345e716..e3684a68b23 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index f97a8352e6f..1b48c4ffb68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d4b0fe7e0b8..b21e64de129 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9b7f194a62f..2bcaec86547 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17-SNAPSHOT + 2.21.17 pom @@ -63,7 +63,7 @@ 0.0 - 1680199282 + 1689265358 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c220c9eeae5..c90b3e7b747 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b643a9e9438..797a48d7cc6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 3aba191ad33..9cfb28f31f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bb24843333b..c3664987e8c 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6d3d37b2436..d77f598c998 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ed76d2d67d5..c6b60b4b916 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 4ea8b4fa337..13357fef1e3 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 438b718f264..5233bc19040 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8c61cd082e3..8da3db839f0 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6f8f32fc707..9213dd91328 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 From 99326d65b2f032245f1760e022fd8ea5d2708cbf Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:41:09 +0000 Subject: [PATCH 039/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910982 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 8dfa29a1d1e..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dafadfca85a..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8972c6c94e8..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 4a52736aedb..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 55bf97bda50..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index b6333163b22..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 12e3585d722..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 827fc0ef375..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4ffebb33f16..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 7c664ed017c..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e3684a68b23..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1b48c4ffb68..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b21e64de129..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 2bcaec86547..672760f78c9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689265358 + 1689266464 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c90b3e7b747..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 797a48d7cc6..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9cfb28f31f6..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c3664987e8c..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d77f598c998..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c6b60b4b916..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 13357fef1e3..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5233bc19040..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8da3db839f0..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9213dd91328..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From f63bb7b087f0b8e1f0afd77459186f1095ef1d17 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 16:49:32 +0000 Subject: [PATCH 040/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910984 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..2c90430a21d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..b257e46f3fe 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..c86d1ee371e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..783c3055dc2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..3a041ac639e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..4b0ccabc98f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..82a71d4e9ed 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..040d2ea9c9a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..ab87e6629bf 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..c33b4ab6657 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..4818345e716 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..f97a8352e6f 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..d4b0fe7e0b8 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 672760f78c9..9b7f194a62f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689266464 + 1680199282 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..c220c9eeae5 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..b643a9e9438 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..3aba191ad33 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..bb24843333b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..6d3d37b2436 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..ed76d2d67d5 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..4ea8b4fa337 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..438b718f264 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..8c61cd082e3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index b69e10fd1f4..6f8f32fc707 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.17-SNAPSHOT jackrabbit-parent/pom.xml From a8e310bc61f170123dc69f547a7b122ff2db5ce0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 17:10:22 +0000 Subject: [PATCH 041/271] [maven-release-plugin] prepare release jackrabbit-2.21.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910986 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c90430a21d..8dfa29a1d1e 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index b257e46f3fe..dafadfca85a 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index c86d1ee371e..8972c6c94e8 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 783c3055dc2..4a52736aedb 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3a041ac639e..55bf97bda50 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 4b0ccabc98f..b6333163b22 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 82a71d4e9ed..12e3585d722 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 040d2ea9c9a..827fc0ef375 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ab87e6629bf..4ffebb33f16 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index c33b4ab6657..7c664ed017c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4818345e716..e3684a68b23 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index f97a8352e6f..1b48c4ffb68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d4b0fe7e0b8..b21e64de129 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9b7f194a62f..95367ffba32 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17-SNAPSHOT + 2.21.17 pom @@ -63,7 +63,7 @@ 0.0 - 1680199282 + 1689267134 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c220c9eeae5..c90b3e7b747 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b643a9e9438..797a48d7cc6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 3aba191ad33..9cfb28f31f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bb24843333b..c3664987e8c 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6d3d37b2436..d77f598c998 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ed76d2d67d5..c6b60b4b916 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 4ea8b4fa337..13357fef1e3 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 438b718f264..5233bc19040 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8c61cd082e3..8da3db839f0 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6f8f32fc707..9213dd91328 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17-SNAPSHOT + 2.21.17 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 From 341956df3895785c858b12f41fef08338f604379 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Jul 2023 17:10:28 +0000 Subject: [PATCH 042/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1910988 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 8dfa29a1d1e..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dafadfca85a..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8972c6c94e8..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 4a52736aedb..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 55bf97bda50..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index b6333163b22..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 12e3585d722..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 827fc0ef375..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4ffebb33f16..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 7c664ed017c..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e3684a68b23..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1b48c4ffb68..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b21e64de129..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 95367ffba32..47d1e636e46 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.17 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689267134 + 1689268224 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.17/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index c90b3e7b747..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 797a48d7cc6..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9cfb28f31f6..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c3664987e8c..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d77f598c998..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c6b60b4b916..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 13357fef1e3..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5233bc19040..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8da3db839f0..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9213dd91328..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.17 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.17 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.17 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From cb78fb24cd64943ea5c80b28927a83c7dd4ebffd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 04:18:31 +0000 Subject: [PATCH 043/271] JCR-4947: revert change of parent pom git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911100 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 47d1e636e46..9189e7ae9ae 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 30 + 29 From 7fe77ab58ad8701b1ba7ef3d0e2262f1fd4c3a59 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 04:27:05 +0000 Subject: [PATCH 044/271] JCR-4953: Release Jackrabbit 2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911102 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 118f6d363a2..5e8eb2a231a 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,18 +1,21 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.17 +Release Notes -- Apache Jackrabbit -- Version 2.21.18 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.17, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.18, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.17 is an unstable release cut directly from +Apache Jackrabbit 2.21.18 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.17 +NOTE: 2.21.17 was released from an incorrect SVN tag and actually contains version +2.21.16. This release contains what was supposed to go into 2.21.17. + +Changes in Jackrabbit 2.21.18 ----------------------------- Sub-task @@ -38,7 +41,6 @@ Task [JCR-4941] - Update tomcat dependency to 8.5.90 [JCR-4942] - spi-commons: bump minor version number of o.a.j.spi.commons.conversion [JCR-4944] - upgrade to Tomcat 9.x - [JCR-4947] - update Apache parent pom to version 30 For more detailed information about all the changes in this and other From 018758690bb835a07c6eb0b2dcbc362141a6f36f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 04:48:43 +0000 Subject: [PATCH 045/271] test commit git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911103 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 5e8eb2a231a..dd24fa59299 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -91,3 +91,4 @@ Jackrabbit project logo are trademarks of The Apache Software Foundation. + From 076d8b2af7d0808db5e7f681578be9a6b7ea2084 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:08:36 +0000 Subject: [PATCH 046/271] [maven-release-plugin] prepare release jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911104 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..5fb0819f31c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..1aaf0825123 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..1e23ac64f30 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..ba17ad3cdf7 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..7a7bbc51440 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..249b6e56c92 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..eb2d4291c8e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..4e46b6a3fe1 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..5a7396a6fcb 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..3d460a18f97 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..e5f690e207f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..d2861feae38 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..acab733a574 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9189e7ae9ae..fdaa08c9e25 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.18 pom @@ -63,7 +63,7 @@ 0.0 - 1689268224 + 1689742167 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..bf7611b6c67 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..646539cacb7 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..1e71316ad58 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..5ded747d867 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..4b9ae91ede8 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..bf3161e824e 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..744cd5a991a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..660c007cfdb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..629bcf98af2 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index b69e10fd1f4..e3e829b48c6 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 From 515a75813189eb25f9418a9e7bf8d887302bf1bf Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:08:42 +0000 Subject: [PATCH 047/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911106 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 5fb0819f31c..f3d0da0f591 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 1aaf0825123..d4e2b6afe58 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1e23ac64f30..fbb33730314 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index ba17ad3cdf7..237a39915d3 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 7a7bbc51440..ceb160a2674 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 249b6e56c92..c5ab1fec41d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index eb2d4291c8e..045702f571c 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 4e46b6a3fe1..2cb64779b13 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5a7396a6fcb..d2b56e17cfd 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 3d460a18f97..0e9337e9e29 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e5f690e207f..e91ff7da801 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d2861feae38..bf3d8db777c 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index acab733a574..8fb1df741aa 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index fdaa08c9e25..20b23d7f0d6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18 + 2.21.19-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689742167 + 1689743318 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index bf7611b6c67..67569f73a5d 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 646539cacb7..64e979cfecc 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 1e71316ad58..e5cfaf4499f 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 5ded747d867..1fb1978d1fc 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 4b9ae91ede8..887bf838155 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index bf3161e824e..17e349f3cff 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 744cd5a991a..084f163b675 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 660c007cfdb..57b168971d0 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 629bcf98af2..ce481d12936 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e3e829b48c6..047baec4e00 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 From 536e55d423b9ad1fc43ee57a64fb1f5c951db873 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:12:20 +0000 Subject: [PATCH 048/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911109 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f3d0da0f591..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index d4e2b6afe58..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index fbb33730314..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 237a39915d3..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index ceb160a2674..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index c5ab1fec41d..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 045702f571c..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2cb64779b13..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index d2b56e17cfd..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 0e9337e9e29..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e91ff7da801..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index bf3d8db777c..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 8fb1df741aa..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 20b23d7f0d6..9189e7ae9ae 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689743318 + 1689268224 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 67569f73a5d..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 64e979cfecc..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index e5cfaf4499f..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 1fb1978d1fc..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 887bf838155..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 17e349f3cff..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 084f163b675..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 57b168971d0..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index ce481d12936..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 047baec4e00..b69e10fd1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml From 04868153f194cfa787f49f808dd99ff7872fdbf3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:15:15 +0000 Subject: [PATCH 049/271] JCR-4953: Release Jackrabbit 2.21.18 - manually set SCM info git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911110 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b69e10fd1f4..63544a7e1a2 100644 --- a/pom.xml +++ b/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.16 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.16 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 From d51a29978008990b19a217e1afc00855a657e386 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:35:16 +0000 Subject: [PATCH 050/271] [maven-release-plugin] prepare release jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911111 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 28 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..5fb0819f31c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..1aaf0825123 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..1e23ac64f30 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..ba17ad3cdf7 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..7a7bbc51440 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..249b6e56c92 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..eb2d4291c8e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..4e46b6a3fe1 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..5a7396a6fcb 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..3d460a18f97 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..e5f690e207f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..d2861feae38 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..acab733a574 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9189e7ae9ae..805fe9c62fb 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.18 pom @@ -63,7 +63,7 @@ 0.0 - 1689268224 + 1689743789 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..bf7611b6c67 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..646539cacb7 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..1e71316ad58 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..5ded747d867 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..4b9ae91ede8 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..bf3161e824e 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..744cd5a991a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..660c007cfdb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..629bcf98af2 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 63544a7e1a2..e3e829b48c6 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 jackrabbit-parent/pom.xml From 64179b2e79d8fb15e328d98ee23213df857ca91e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:38:10 +0000 Subject: [PATCH 051/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911112 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 +++++----- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 28 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 5fb0819f31c..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 1aaf0825123..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1e23ac64f30..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index ba17ad3cdf7..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 7a7bbc51440..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 249b6e56c92..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index eb2d4291c8e..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 4e46b6a3fe1..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5a7396a6fcb..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 3d460a18f97..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e5f690e207f..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d2861feae38..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index acab733a574..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 805fe9c62fb..9189e7ae9ae 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18 + 2.21.18-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1689743789 + 1689268224 http://jackrabbit.apache.org/ @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index bf7611b6c67..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 646539cacb7..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 1e71316ad58..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 5ded747d867..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 4b9ae91ede8..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index bf3161e824e..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 744cd5a991a..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 660c007cfdb..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 629bcf98af2..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e3e829b48c6..63544a7e1a2 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml From 9cad2f8ff6ada4e6e0f67d7416da63357f64e406 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 05:43:06 +0000 Subject: [PATCH 052/271] JCR-4953: Release Jackrabbit 2.21.18 - manually set SCM info git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911113 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 63544a7e1a2..24dd46716fc 100644 --- a/pom.xml +++ b/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk + http://svn.apache.org/viewvc/jackrabbit/trunk From d7a3cc413486099e6facacdbe37fbcc26f1df670 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:14:01 +0000 Subject: [PATCH 053/271] [maven-release-plugin] prepare release jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911114 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 8 ++++---- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 30 insertions(+), 30 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..5fb0819f31c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..1aaf0825123 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..1e23ac64f30 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..ba17ad3cdf7 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..7a7bbc51440 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..249b6e56c92 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..eb2d4291c8e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..4e46b6a3fe1 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..5a7396a6fcb 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..3d460a18f97 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..e5f690e207f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..d2861feae38 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..acab733a574 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9189e7ae9ae..e2ff8ac3234 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.18 pom @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..bf7611b6c67 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..646539cacb7 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..1e71316ad58 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..5ded747d867 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..4b9ae91ede8 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..bf3161e824e 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..744cd5a991a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..660c007cfdb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..629bcf98af2 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 24dd46716fc..e3e829b48c6 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 From c885f8b4f311bf9a9291a56188fe2ae152403082 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:14:07 +0000 Subject: [PATCH 054/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911116 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 8 ++++---- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 30 insertions(+), 30 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 5fb0819f31c..f3d0da0f591 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 1aaf0825123..d4e2b6afe58 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1e23ac64f30..fbb33730314 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index ba17ad3cdf7..237a39915d3 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 7a7bbc51440..ceb160a2674 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 249b6e56c92..c5ab1fec41d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index eb2d4291c8e..045702f571c 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 4e46b6a3fe1..2cb64779b13 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5a7396a6fcb..d2b56e17cfd 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 3d460a18f97..0e9337e9e29 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e5f690e207f..e91ff7da801 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d2861feae38..bf3d8db777c 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index acab733a574..8fb1df741aa 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index e2ff8ac3234..1a969ae22d7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18 + 2.21.19-SNAPSHOT pom @@ -726,8 +726,8 @@ --> - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index bf7611b6c67..67569f73a5d 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 646539cacb7..64e979cfecc 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 1e71316ad58..e5cfaf4499f 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 5ded747d867..1fb1978d1fc 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 4b9ae91ede8..887bf838155 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index bf3161e824e..17e349f3cff 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 744cd5a991a..084f163b675 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 660c007cfdb..57b168971d0 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 629bcf98af2..ce481d12936 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e3e829b48c6..6a5383080ee 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk + http://svn.apache.org/viewvc/jackrabbit/trunk From c041c888ec0e5cf69a01acc8e909251e81db046c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:26:45 +0000 Subject: [PATCH 055/271] [maven-release-plugin] rollback the release of jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911118 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 2 +- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f3d0da0f591..cf495d74db6 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index d4e2b6afe58..eee720849bd 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index fbb33730314..289961fc338 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 237a39915d3..9603ad688ba 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index ceb160a2674..c5e5a108f2f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index c5ab1fec41d..ad1956d9a49 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 045702f571c..017628f72e7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2cb64779b13..2d2c6057c34 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index d2b56e17cfd..ccac1008e3f 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 0e9337e9e29..d5bff1a808c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e91ff7da801..f1d9405cee0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index bf3d8db777c..c6ec03bde04 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 8fb1df741aa..b6240d68de3 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1a969ae22d7..9189e7ae9ae 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT pom diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 67569f73a5d..3c8ed978e19 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 64e979cfecc..a9b2f452e05 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index e5cfaf4499f..88fdf81d668 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 1fb1978d1fc..c7c6c938d42 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 887bf838155..e38a94b0a83 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 17e349f3cff..8e28583b5d9 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 084f163b675..f147ab43bf1 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 57b168971d0..301cf6729e3 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index ce481d12936..e881b04daa8 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6a5383080ee..24dd46716fc 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.18-SNAPSHOT jackrabbit-parent/pom.xml From d420b6b59dc444636c26d8eab90d03c50cebee61 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:32:16 +0000 Subject: [PATCH 056/271] JCR-4953: Release Jackrabbit 2.21.18 - manually remove incorrect SCM info git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911120 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9189e7ae9ae..488b5f54bcb 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -724,10 +724,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.16/jackrabbit-parent - From 7eb28b9a82d20a7907c0e1fa5ce2d25d0d2fb73d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:51:37 +0000 Subject: [PATCH 057/271] [maven-release-plugin] prepare release jackrabbit-2.21.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911121 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 8 +++++++- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 33 insertions(+), 27 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index cf495d74db6..5fb0819f31c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index eee720849bd..1aaf0825123 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 289961fc338..1e23ac64f30 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 9603ad688ba..ba17ad3cdf7 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c5e5a108f2f..7a7bbc51440 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index ad1956d9a49..249b6e56c92 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 017628f72e7..eb2d4291c8e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2d2c6057c34..4e46b6a3fe1 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index ccac1008e3f..5a7396a6fcb 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d5bff1a808c..3d460a18f97 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f1d9405cee0..e5f690e207f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c6ec03bde04..d2861feae38 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b6240d68de3..acab733a574 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 488b5f54bcb..e2ff8ac3234 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18-SNAPSHOT + 2.21.18 pom @@ -724,4 +724,10 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 3c8ed978e19..bf7611b6c67 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a9b2f452e05..646539cacb7 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 88fdf81d668..1e71316ad58 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c7c6c938d42..5ded747d867 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index e38a94b0a83..4b9ae91ede8 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8e28583b5d9..bf3161e824e 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f147ab43bf1..744cd5a991a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 301cf6729e3..660c007cfdb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index e881b04daa8..629bcf98af2 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 24dd46716fc..e3e829b48c6 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18-SNAPSHOT + 2.21.18 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 From fa9ed6a6cfe73a7a3c295a68ea358e954e7ee35f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Jul 2023 06:51:43 +0000 Subject: [PATCH 058/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911123 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 8 +------- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 27 insertions(+), 33 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 5fb0819f31c..f3d0da0f591 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 1aaf0825123..d4e2b6afe58 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1e23ac64f30..fbb33730314 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index ba17ad3cdf7..237a39915d3 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 7a7bbc51440..ceb160a2674 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 249b6e56c92..c5ab1fec41d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index eb2d4291c8e..045702f571c 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 4e46b6a3fe1..2cb64779b13 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5a7396a6fcb..d2b56e17cfd 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 3d460a18f97..0e9337e9e29 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e5f690e207f..e91ff7da801 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d2861feae38..bf3d8db777c 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index acab733a574..8fb1df741aa 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index e2ff8ac3234..ef4b0653869 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.18 + 2.21.19-SNAPSHOT pom @@ -724,10 +724,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-29/jackrabbit-parent/tags/jackrabbit-2.21.18/jackrabbit-parent - diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index bf7611b6c67..67569f73a5d 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 646539cacb7..64e979cfecc 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 1e71316ad58..e5cfaf4499f 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 5ded747d867..1fb1978d1fc 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 4b9ae91ede8..887bf838155 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index bf3161e824e..17e349f3cff 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 744cd5a991a..084f163b675 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 660c007cfdb..57b168971d0 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 629bcf98af2..ce481d12936 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e3e829b48c6..6a5383080ee 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.18 + 2.21.19-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.18 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.18 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk + http://svn.apache.org/viewvc/jackrabbit/trunk From 6f0d4d37c34e2e03dfd8b2542fc65914227c718f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 24 Jul 2023 12:59:30 +0000 Subject: [PATCH 059/271] JCR-4955: set baseline comparisonVersion to latest stable (2.20.11) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911236 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index ef4b0653869..d8ea517c171 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -388,7 +388,7 @@ - 2.20.10 + 2.20.11 From b911028d85724fabc8bbd703eff2290976f526c9 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 31 Jul 2023 09:17:09 +0000 Subject: [PATCH 060/271] JCR-4959: update Apache parent pom to version 30 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911366 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d8ea517c171..dd7e7a69f0b 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 29 + 30 From 0b5586d19fcab2e70ba5ee963a02d1c76546f5d4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 31 Jul 2023 10:09:59 +0000 Subject: [PATCH 061/271] JCR-4957: jackrabbit-standalone: restore binary compat with 2.21.16 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911367 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/jackrabbit/standalone/Main.java | 177 +++++++++++------- 1 file changed, 106 insertions(+), 71 deletions(-) diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java index bc438b74b72..09aa5902fb0 100644 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java +++ b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/Main.java @@ -58,46 +58,13 @@ public class Main { */ public static void main(String[] args) throws Exception { Options options = new Options(); + CommandLine command = createCommand(args, options); - options.addOption("?", "help", false, "print this message"); - options.addOption("n", "notice", false, "print copyright notices"); - options.addOption("l", "license", false, "print license information"); - options.addOption( - "b", "backup", false, "create a backup of the repository"); - options.addOption( - "i", "cli", true, "command line access to a remote repository"); - - options.addOption("q", "quiet", false, "disable console output"); - options.addOption("d", "debug", false, "enable debug logging"); - - options.addOption("h", "host", true, "IP address of the HTTP server"); - options.addOption("p", "port", true, "TCP port of the HTTP server (8080)"); - options.addOption("f", "file", true, "location of this jar file"); - options.addOption("r", "repo", true, "repository directory (jackrabbit)"); - options.addOption("c", "conf", true, "repository configuration file"); - options.addOption( - "R", "backup-repo", true, - "backup repository directory (jackrabbit-backupN)"); - options.addOption( - "C", "backup-conf", true, - "backup repository configuration file"); - - CommandLine command = new DefaultParser().parse(options, args); - - String defaultFile = "jackrabbit-standalone.jar"; - URL location = - Main.class.getProtectionDomain().getCodeSource().getLocation(); - if (location != null && "file".equals(location.getProtocol())) { - File file = new File(location.getPath()); - if (file.isFile()) { - defaultFile = location.getPath(); - } - } - File file = new File(command.getOptionValue("file", defaultFile)); + File jarFile = findJarFileLocation(command); if (command.hasOption("help")) { HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("java -jar " + file.getName(), options, true); + formatter.printHelp("java -jar " + jarFile.getName(), options, true); } else if (command.hasOption("notice")) { copyToOutput("/META-INF/NOTICE.txt"); } else if (command.hasOption("license")) { @@ -126,53 +93,69 @@ public static void main(String[] args) throws Exception { // already logged out } } else { - File repository = - new File(command.getOptionValue("repo", "jackrabbit")); - repository.mkdirs(); - File log = new File(repository, "log"); - log.mkdir(); - - if (!command.hasOption("quiet")) { - System.out.println("Using repository directory " + repository); - System.out.println("Writing log messages to " + log); - } + new Main(command).run(jarFile); + } + } - setSystemPropertyIfMissing( - "jackrabbit.log", - new File(log, "jackrabbit.log").getPath()); - setSystemPropertyIfMissing( - "jetty.log", - new File(log, "jetty.log").getPath()); - - if (command.hasOption("debug")) { - setSystemPropertyIfMissing("log.level", "DEBUG"); - } else { - setSystemPropertyIfMissing("log.level", "INFO"); - } + private static CommandLine createCommand(String[] args, Options options) throws ParseException { + options.addOption("?", "help", false, "print this message"); + options.addOption("n", "notice", false, "print copyright notices"); + options.addOption("l", "license", false, "print license information"); + options.addOption( + "b", "backup", false, "create a backup of the repository"); + options.addOption( + "i", "cli", true, "command line access to a remote repository"); - setSystemPropertyIfMissing( - "derby.stream.error.file", - new File(log, "derby.log").getPath()); + options.addOption("q", "quiet", false, "disable console output"); + options.addOption("d", "debug", false, "enable debug logging"); - new Main(command).run(file, repository, log); + options.addOption("h", "host", true, "IP address of the HTTP server"); + options.addOption("p", "port", true, "TCP port of the HTTP server (8080)"); + options.addOption("f", "file", true, "location of this jar file"); + options.addOption("r", "repo", true, "repository directory (jackrabbit)"); + options.addOption("c", "conf", true, "repository configuration file"); + options.addOption( + "R", "backup-repo", true, + "backup repository directory (jackrabbit-backupN)"); + options.addOption( + "C", "backup-conf", true, + "backup repository configuration file"); + + return new DefaultParser().parse(options, args); + } + + private static File findJarFileLocation(CommandLine command) { + String defaultFile = "jackrabbit-standalone.jar"; + URL location = + Main.class.getProtectionDomain().getCodeSource().getLocation(); + if (location != null && "file".equals(location.getProtocol())) { + File file = new File(location.getPath()); + if (file.isFile()) { + defaultFile = location.getPath(); + } } + return new File(command.getOptionValue("file", defaultFile)); } - + private static void setSystemPropertyIfMissing(String key, String value) { if (System.getProperty(key) == null) { System.setProperty(key, value); } } - private CommandLine command; + private final CommandLine command; + + private final RequestLogHandler accessLog; - private final RequestLogHandler accessLog = new RequestLogHandler(); + private final WebAppContext webapp; - private final WebAppContext webapp = new WebAppContext(); + private final Server server; - private final Server server = new Server(); + private final ServerConnector connector; - private final ServerConnector connector = new ServerConnector(server); + private final File repository; + + private final File log; /** * Construct Main application instance. @@ -180,17 +163,69 @@ private static void setSystemPropertyIfMissing(String key, String value) { * Note: Constructor is protected because other projects such as Commons VFS can extend this for some reasons * (e.g, unit testing against Jackrabbit WebDAV). */ - protected Main(CommandLine command) throws ParseException { + private Main(CommandLine command) throws ParseException { this.command = command; + + repository = new File(command.getOptionValue("repo", "jackrabbit")); + repository.mkdirs(); + log = new File(repository, "log"); + log.mkdir(); + + if (!command.hasOption("quiet")) { + System.out.println("Using repository directory " + repository); + System.out.println("Writing log messages to " + log); + } + + setSystemPropertyIfMissing( + "jackrabbit.log", + new File(log, "jackrabbit.log").getPath()); + setSystemPropertyIfMissing( + "jetty.log", + new File(log, "jetty.log").getPath()); + + if (command.hasOption("debug")) { + setSystemPropertyIfMissing("log.level", "DEBUG"); + } else { + setSystemPropertyIfMissing("log.level", "INFO"); + } + + setSystemPropertyIfMissing( + "derby.stream.error.file", + new File(log, "derby.log").getPath()); + + accessLog = new RequestLogHandler(); + webapp = new WebAppContext(); + server = new Server(); + connector = new ServerConnector(server); } + /** + * Construct Main application instance. + *

+ * Note: Constructor is protected because other projects such as Commons VFS can extend this for some reasons + * (e.g, unit testing against Jackrabbit WebDAV). + */ + protected Main(String[] args) throws ParseException { + this(createCommand(args, new Options())); + } + + /** + * Run this Main application. + *

+ * Note: this is public because this can be used by other projects in unit tests. e.g, Commons-VFS. + * @throws Exception if any exception occurs + */ + public void run() throws Exception { + run(findJarFileLocation(command)); + } + /** * Run this Main application. *

* Note: this is public because this can be used by other projects in unit tests. e.g, Commons-VFS. * @throws Exception if any exception occurs */ - public void run(File file, File repository, File log) throws Exception { + private void run(File jarFile) throws Exception { message("Welcome to Apache Jackrabbit!"); message("-------------------------------"); @@ -200,7 +235,7 @@ public void run(File file, File repository, File log) throws Exception { message("Starting the server..."); File tmp = new File(repository, "tmp"); tmp.mkdir(); - prepareWebapp(file, repository, tmp); + prepareWebapp(jarFile, repository, tmp); accessLog.setHandler(webapp); prepareAccessLog(log); server.setHandler(accessLog); From 8850d5f338eb4e17ed17aef72dd4f827f3a270f1 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 2 Aug 2023 13:13:12 +0000 Subject: [PATCH 062/271] JCR-4960: disable RMI by default git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911410 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/resources/WEB-INF/web.xml | 16 ++++++++-------- .../WEB-INF/templates/bootstrap.properties | 7 ++++--- .../src/main/webapp/WEB-INF/web.xml | 16 ++++++++-------- jackrabbit-webapp/src/main/webapp/remote.jsp | 14 ++++++++++---- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/jackrabbit-standalone-components/src/main/resources/WEB-INF/web.xml b/jackrabbit-standalone-components/src/main/resources/WEB-INF/web.xml index e00199c579c..8fa8b438dda 100644 --- a/jackrabbit-standalone-components/src/main/resources/WEB-INF/web.xml +++ b/jackrabbit-standalone-components/src/main/resources/WEB-INF/web.xml @@ -170,10 +170,10 @@ - - RMI - org.apache.jackrabbit.servlet.remote.RemoteBindingServlet - + + + + @@ -186,10 +186,10 @@ JCRWebdavServer /server/* - - RMI - /rmi - + + + + diff --git a/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties b/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties index ca373785f89..046a7a9d3b5 100644 --- a/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties +++ b/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties @@ -23,9 +23,10 @@ repository.home=jackrabbit/repository repository.name=jackrabbit.repository # RMI Settings -rmi.enabled=true -rmi.port=0 -rmi.host=localhost +rmi.enabled=false + +#rmi.port=0 +#rmi.host=localhost # If the URI is not specified, it's composed as follows: #rmi.uri=//${rmi.host}:${rmi.port}/${repository.name} diff --git a/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml b/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml index bfcf019d546..b809f2bcb73 100644 --- a/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml +++ b/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml @@ -363,10 +363,10 @@ - - RMI - org.apache.jackrabbit.servlet.remote.RemoteBindingServlet - + + + + @@ -383,10 +383,10 @@ JCRWebdavServer /server/* - - RMI - /rmi - + + + + diff --git a/jackrabbit-webapp/src/main/webapp/remote.jsp b/jackrabbit-webapp/src/main/webapp/remote.jsp index 1eedcfb1f51..139502242e8 100644 --- a/jackrabbit-webapp/src/main/webapp/remote.jsp +++ b/jackrabbit-webapp/src/main/webapp/remote.jsp @@ -23,15 +23,21 @@ String base = base = Text.encodeIllegalXMLCharacters(base); %>

- The content repository within this web application is made available + The content repository within this web application may be made available to remote clients through RMI and the jackrabbit-jcr-rmi component.

- The remote repository stub is available both in the RMI registry - (one is started automatically by this web application if not already running) - and as a direct HTTP download. The default URLs for accessing the remote + To access a remote repository stub, it needs to be registered in the RMI registry. + By default, this is not started automatically by this web application. To change that, + use the related properties in the bootstrap.properties file which are commented out + in the template file. + You can also make the stub available as a direct HTTP download by enabling the + RemoteBindingServlet and the corresponding servlet mapping, which are commented out + in the web.xml template. + + The default URLs for accessing the remote repository are:

    From 9a21a1fe8acf497a3569920f591f4ef1422f1e62 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 08:55:35 +0000 Subject: [PATCH 063/271] JCR-4961: Release Jackrabbit 2.21.19 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911500 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index dd24fa59299..f4e8d8b6d9c 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,46 +1,33 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.18 +Release Notes -- Apache Jackrabbit -- Version 2.21.19 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.18, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.19, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.18 is an unstable release cut directly from +Apache Jackrabbit 2.21.19 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -NOTE: 2.21.17 was released from an incorrect SVN tag and actually contains version -2.21.16. This release contains what was supposed to go into 2.21.17. +NOTE: this release disables RMI access in the standalone and webapp projects. +See https://issues.apache.org/jira/browse/JCR-4960 for more information. -Changes in Jackrabbit 2.21.18 ------------------------------ - -Sub-task - [JCR-4948] - core: beanutils leaks dependency to commons-collections in oak-core tests +Changes in Jackrabbit 2.21.19 +----------------------------- Bug - [JCR-4606] - standalone: logback log files created in wrong place - [JCR-4949] - get rid of beanutils dependency + [JCR-4957] - jackrabbit-standalone: 2.21.18 breaks binary compatibility Task - [JCR-4308] - update Jetty to 9.4.* - [JCR-4352] - Update lucene-core dependency to 3.6.2 - [JCR-4925] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.15 - [JCR-4932] - Update commons-io dependency to 2.12.0 - [JCR-4933] - Update tomcat dependency to 8.5.88 - [JCR-4936] - Update tomcat dependency to 8.5.89 - [JCR-4937] - jcr-tests: get rid of duplicate XMLChar class - [JCR-4938] - update remaining copies of XMLChar.java with latest version from Xerces - [JCR-4939] - Update commons-io dependency to 2.13.0 - [JCR-4941] - Update tomcat dependency to 8.5.90 - [JCR-4942] - spi-commons: bump minor version number of o.a.j.spi.commons.conversion - [JCR-4944] - upgrade to Tomcat 9.x + [JCR-4955] - set baseline comparisonVersion to latest stable (2.20.11) + [JCR-4959] - update Apache parent pom to version 30 + [JCR-4960] - Disable RMI by default For more detailed information about all the changes in this and other From 943f644af71516d5c63d763d40dbd86a5f491d61 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 10:40:50 +0000 Subject: [PATCH 064/271] JCR-4962: Update h2db dependency to 2.2.220 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911502 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index d4e2b6afe58..4c2683a9b09 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -325,7 +325,7 @@ org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral com.h2database h2 - 2.1.214 + 2.2.220 test From 67fdc2cee3d792271077e9c18483dad5639564b2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 11:14:46 +0000 Subject: [PATCH 065/271] JCR-4963: vfs-ext: update hadoop-hdfs-client dependency to 3.3.6 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911505 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-vfs-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 084f163b675..7de6252bf79 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -61,7 +61,7 @@ org.apache.hadoop hadoop-hdfs-client - 3.3.5 + 3.3.6 org.jetbrains.kotlin From 18adeb755a18b5c1817024d934b0d8ce7254482c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 12:01:27 +0000 Subject: [PATCH 066/271] JCR-4964: update kotlin-stdlib dependency to 1.9.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911506 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-vfs-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 7de6252bf79..ae5d9634ae8 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -73,7 +73,7 @@ org.jetbrains.kotlin kotlin-stdlib - 1.8.0 + 1.9.0 org.apache.commons From 954cd0376ab10bda42f13ea30b28397be7c52211 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 13:17:48 +0000 Subject: [PATCH 067/271] JCR-4965: webapp: remove Guava test dependency git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911510 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 6 ------ .../test/java/org/apache/jackrabbit/j2ee/TomcatIT.java | 9 ++++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 57b168971d0..1f235dd7e27 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -124,12 +124,6 @@ ${slf4j.version} test - - com.google.guava - guava - 31.1-jre - test - org.apache.derby derby diff --git a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java index 021c0611d76..b7d4b27aed4 100644 --- a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java +++ b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java @@ -20,7 +20,7 @@ import java.io.File; import java.io.IOException; import java.net.URL; -import java.nio.charset.StandardCharsets; +import java.nio.file.Files; import java.util.List; import junit.framework.TestCase; @@ -35,7 +35,6 @@ import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.google.common.io.Files; public class TomcatIT extends TestCase { @@ -116,10 +115,10 @@ private HtmlPage submitNewRepositoryForm(HtmlPage page) throws IOException { } private void rewriteWebXml(File war) throws IOException { - File webXml = new File(war, new File("WEB-INF","web.xml").getPath()); + File webXml = new File(war, new File("WEB-INF", "web.xml").getPath()); assertTrue(webXml.exists()); - List lines = Files.readLines(webXml, StandardCharsets.UTF_8); - BufferedWriter writer = Files.newWriter(webXml, StandardCharsets.UTF_8); + List lines = Files.readAllLines(webXml.toPath()); + BufferedWriter writer = Files.newBufferedWriter(webXml.toPath()); try { for (String line : lines) { line = line.replace("jackrabbit/bootstrap.properties", From 59ca5d993fa7fd643a1ffa0ae4009f670e916b4e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 13:58:36 +0000 Subject: [PATCH 068/271] JCR-4966: update aws java sdk version to 1.12.523 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911511 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f3d0da0f591..20e50530a95 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.383 + 1.12.523 org.apache.jackrabbit From 8e1a670f08db4c93925995037679aef259da8bf5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 7 Aug 2023 14:08:31 +0000 Subject: [PATCH 069/271] JCR-4961: Release Jackrabbit 2.21.19 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911512 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index f4e8d8b6d9c..5afae71f6d1 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -28,6 +28,11 @@ Task [JCR-4955] - set baseline comparisonVersion to latest stable (2.20.11) [JCR-4959] - update Apache parent pom to version 30 [JCR-4960] - Disable RMI by default + [JCR-4962] - Update h2db dependency to 2.2.220 + [JCR-4963] - vfs-ext: update hadoop-hdfs-client dependency to 3.3.6 + [JCR-4964] - update kotlin-stdlib dependency to 1.9.0 + [JCR-4965] - webapp: remove Guava test dependency + [JCR-4966] - update aws java sdk version to 1.12.523 For more detailed information about all the changes in this and other From 0228ed97e050aec4bcbfb002f90a059f907ad9b6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 8 Aug 2023 04:10:14 +0000 Subject: [PATCH 070/271] [maven-release-plugin] prepare release jackrabbit-2.21.19 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911528 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++++++++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 34 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 20e50530a95..2c75dbf96d5 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 4c2683a9b09..ee69eafd3fc 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index fbb33730314..1b9ac64ca69 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 237a39915d3..a2ceaedf6e3 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index ceb160a2674..9cc795cafda 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index c5ab1fec41d..eb69917d450 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 045702f571c..160c7c03c54 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 2cb64779b13..3bfc42645dc 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index d2b56e17cfd..aeaead050b8 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 0e9337e9e29..2864199e152 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e91ff7da801..243effbf3de 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index bf3d8db777c..6206540952d 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 8fb1df741aa..424ee1c9a63 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index dd7e7a69f0b..addbbe253bc 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.19-SNAPSHOT + 2.21.19 pom @@ -63,7 +63,7 @@ 0.0 - 1689268224 + 1691466808 http://jackrabbit.apache.org/ @@ -724,4 +724,10 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-30/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 67569f73a5d..986462fcbc4 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 64e979cfecc..174dc75b2f7 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index e5cfaf4499f..48f5939171e 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 1fb1978d1fc..6b557a9ad26 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 887bf838155..1dbc74fa599 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 17e349f3cff..c4d6b051a9a 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index ae5d9634ae8..1c9d7df45fb 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 1f235dd7e27..24901ddbc70 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index ce481d12936..c722c529413 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 6a5383080ee..9ec8d509ca8 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19-SNAPSHOT + 2.21.19 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.19 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.19 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.19 From a90a43501fc87e0b8ff6e38a70db8a17e4aeffb6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 8 Aug 2023 04:10:21 +0000 Subject: [PATCH 071/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1911530 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++-------- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 28 insertions(+), 34 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 2c75dbf96d5..921dd9e98f4 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index ee69eafd3fc..2572873a669 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1b9ac64ca69..0b3ec8a8c5e 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index a2ceaedf6e3..fec603c8d41 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 9cc795cafda..dceb1b579d6 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index eb69917d450..85eeaa8aa8d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 160c7c03c54..f064bc67c3d 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 3bfc42645dc..e501b4de232 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index aeaead050b8..0478d44f6c1 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 2864199e152..6229f59468c 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 243effbf3de..310a0854fb8 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 6206540952d..def2994b295 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 424ee1c9a63..251f95ba4f1 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index addbbe253bc..5be0434f83f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.19 + 2.21.20-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1691466808 + 1691467816 http://jackrabbit.apache.org/ @@ -724,10 +724,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-30/jackrabbit-parent/tags/jackrabbit-2.21.19/jackrabbit-parent - diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 986462fcbc4..f9d5ab1b5fd 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 174dc75b2f7..1d8088540a3 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 48f5939171e..d336f30d646 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 6b557a9ad26..4344d07440e 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 1dbc74fa599..21fe84f4167 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c4d6b051a9a..7c9e8313bc4 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 1c9d7df45fb..9c7dfdbfabe 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 24901ddbc70..8d98d18d954 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index c722c529413..c385376a237 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 9ec8d509ca8..e7a320bc918 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.19 + 2.21.20-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.19 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.19 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.19 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk + http://svn.apache.org/viewvc/jackrabbit/trunk From 36c36e22dda19167cb44319797df63c8880f764e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 8 Sep 2023 09:19:07 +0000 Subject: [PATCH 072/271] JCR-4969: set baseline comparisonVersion to latest stable (2.20.12) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912187 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 5be0434f83f..eea14b5905f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -388,7 +388,7 @@ - 2.20.11 + 2.20.12 From ebf0e1f74dd52160d3fdc96b3cc7be2013e8ae77 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 9 Sep 2023 11:14:52 +0000 Subject: [PATCH 073/271] JCR-4940: jackrabbit-jcr2spi is incompatible with Java 21 - inline fixed copy of AbstractLinkedList git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912210 13f79535-47bb-0310-9956-ffa450edef68 --- .../hierarchy/ChildNodeEntriesImpl.java | 2 +- .../hierarchy/CopyOfAbstractLinkedList.java | 1123 +++++++++++++++++ .../jcr2spi/hierarchy/LinkedEntries.java | 9 +- .../jcr2spi/hierarchy/LinkedEntriesTest.java | 76 +- 4 files changed, 1166 insertions(+), 44 deletions(-) create mode 100644 jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java index 74ab25ca460..3b3717ac897 100644 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java @@ -471,7 +471,7 @@ private void reorderAfter(LinkedEntries.LinkNode insertLN, LinkedEntries.LinkNod } } - //-------------------------------------------------< AbstractLinkedList >--- + //-------------------------------------------------< CopyOfAbstractLinkedList >--- //-------------------------------------------------------------------------- /** diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java new file mode 100644 index 00000000000..2b45bb7a475 --- /dev/null +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java @@ -0,0 +1,1123 @@ +/* + * 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. + */ +package org.apache.jackrabbit.jcr2spi.hierarchy; + +/* + * This is a copy of org.apache.commons.collections4.list.AbstractLinkedList + * with dependencies inlined and two methods changed for JDK 21 conformance; + * see https://issues.apache.org/jira/browse/COLLECTIONS-842 and https://issues.apache.org/jira/browse/JCR-4940 + */ + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.lang.reflect.Array; +import java.util.AbstractList; +import java.util.Collection; +import java.util.ConcurrentModificationException; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; +import java.util.NoSuchElementException; +import java.util.Objects; + +/** + * An abstract implementation of a linked list which provides numerous points for + * subclasses to override. + *

    + * Overridable methods are provided to change the storage node and to change how + * nodes are added to and removed. Hopefully, all you need for unusual subclasses + * is here. + *

    + * + * @param the type of elements in this list + * @since 3.0 + */ +abstract class CopyOfAbstractLinkedList implements List { + + /* + * Implementation notes: + * - a standard circular doubly-linked list + * - a marker node is stored to mark the start and the end of the list + * - node creation and removal always occurs through createNode() and + * removeNode(). + * - a modification count is kept, with the same semantics as + * {@link java.util.LinkedList}. + * - respects {@link AbstractList#modCount} + */ + + /** + * A {@link Node} which indicates the start and end of the list and does not + * hold a value. The value of {@code next} is the first item in the + * list. The value of {@code previous} is the last item in the list. + */ + transient Node header; + + /** The size of the list */ + transient int size; + + /** Modification count for iterators */ + transient int modCount; + + /** + * Constructor that does nothing (intended for deserialization). + *

    + * If this constructor is used by a serializable subclass then the init() + * method must be called. + */ + protected CopyOfAbstractLinkedList() { + } + + /** + * Constructs a list copying data from the specified collection. + * + * @param coll the collection to copy + */ + protected CopyOfAbstractLinkedList(final Collection coll) { + init(); + addAll(coll); + } + + /** + * The equivalent of a default constructor, broken out so it can be called + * by any constructor and by {@code readObject}. + * Subclasses which override this method should make sure they call super, + * so the list is initialized properly. + */ + protected void init() { + header = createHeaderNode(); + } + + + @Override + public int size() { + return size; + } + + @Override + public boolean isEmpty() { + return size() == 0; + } + + @Override + public E get(final int index) { + final Node node = getNode(index, false); + return node.getValue(); + } + + + @Override + public Iterator iterator() { + return listIterator(); + } + + @Override + public ListIterator listIterator() { + return new LinkedListIterator<>(this, 0); + } + + @Override + public ListIterator listIterator(final int fromIndex) { + return new LinkedListIterator<>(this, fromIndex); + } + + + @Override + public int indexOf(final Object value) { + int i = 0; + for (Node node = header.next; node != header; node = node.next) { + if (isEqualValue(node.getValue(), value)) { + return i; + } + i++; + } + return INDEX_NOT_FOUND; + } + + @Override + public int lastIndexOf(final Object value) { + int i = size - 1; + for (Node node = header.previous; node != header; node = node.previous) { + if (isEqualValue(node.getValue(), value)) { + return i; + } + i--; + } + return INDEX_NOT_FOUND; + } + + @Override + public boolean contains(final Object value) { + return indexOf(value) != -1; + } + + @Override + public boolean containsAll(final Collection coll) { + for (final Object o : coll) { + if (!contains(o)) { + return false; + } + } + return true; + } + + + @Override + public Object[] toArray() { + return toArray(new Object[size]); + } + + @Override + @SuppressWarnings("unchecked") + public T[] toArray(T[] array) { + // Extend the array if needed + if (array.length < size) { + final Class componentType = array.getClass().getComponentType(); + array = (T[]) Array.newInstance(componentType, size); + } + // Copy the values into the array + int i = 0; + for (Node node = header.next; node != header; node = node.next, i++) { + array[i] = (T) node.getValue(); + } + // Set the value after the last value to null + if (array.length > size) { + array[size] = null; + } + return array; + } + + /** + * Gets a sublist of the main list. + * + * @param fromIndexInclusive the index to start from + * @param toIndexExclusive the index to end at + * @return the new sublist + */ + @Override + public List subList(final int fromIndexInclusive, final int toIndexExclusive) { + return new LinkedSubList<>(this, fromIndexInclusive, toIndexExclusive); + } + + + @Override + public boolean add(final E value) { + addLast(value); + return true; + } + + @Override + public void add(final int index, final E value) { + final Node node = getNode(index, true); + addNodeBefore(node, value); + } + + @Override + public boolean addAll(final Collection coll) { + return addAll(size, coll); + } + + @Override + public boolean addAll(final int index, final Collection coll) { + final Node node = getNode(index, true); + for (final E e : coll) { + addNodeBefore(node, e); + } + return true; + } + + + @Override + public E remove(final int index) { + final Node node = getNode(index, false); + final E oldValue = node.getValue(); + removeNode(node); + return oldValue; + } + + @Override + public boolean remove(final Object value) { + for (Node node = header.next; node != header; node = node.next) { + if (isEqualValue(node.getValue(), value)) { + removeNode(node); + return true; + } + } + return false; + } + + /** + * {@inheritDoc} + *

    + * This implementation iterates over the elements of this list, checking each element in + * turn to see if it's contained in {@code coll}. If it's contained, it's removed + * from this list. As a consequence, it is advised to use a collection type for + * {@code coll} that provides a fast (e.g. O(1)) implementation of + * {@link Collection#contains(Object)}. + */ + @Override + public boolean removeAll(final Collection coll) { + boolean modified = false; + final Iterator it = iterator(); + while (it.hasNext()) { + if (coll.contains(it.next())) { + it.remove(); + modified = true; + } + } + return modified; + } + + + /** + * {@inheritDoc} + *

    + * This implementation iterates over the elements of this list, checking each element in + * turn to see if it's contained in {@code coll}. If it's not contained, it's removed + * from this list. As a consequence, it is advised to use a collection type for + * {@code coll} that provides a fast (e.g. O(1)) implementation of + * {@link Collection#contains(Object)}. + */ + @Override + public boolean retainAll(final Collection coll) { + boolean modified = false; + final Iterator it = iterator(); + while (it.hasNext()) { + if (!coll.contains(it.next())) { + it.remove(); + modified = true; + } + } + return modified; + } + + @Override + public E set(final int index, final E value) { + final Node node = getNode(index, false); + final E oldValue = node.getValue(); + updateNode(node, value); + return oldValue; + } + + @Override + public void clear() { + removeAllNodes(); + } + + + public E getFirst() { + final Node node = header.next; + if (node == header) { + throw new NoSuchElementException(); + } + return node.getValue(); + } + + public E getLast() { + final Node node = header.previous; + if (node == header) { + throw new NoSuchElementException(); + } + return node.getValue(); + } + + public void addFirst(final E o) { + addNodeAfter(header, o); + } + + public void addLast(final E o) { + addNodeBefore(header, o); + } + + public E removeFirst() { + final Node node = header.next; + if (node == header) { + throw new NoSuchElementException(); + } + final E oldValue = node.getValue(); + removeNode(node); + return oldValue; + } + + public E removeLast() { + final Node node = header.previous; + if (node == header) { + throw new NoSuchElementException(); + } + final E oldValue = node.getValue(); + removeNode(node); + return oldValue; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof List)) { + return false; + } + final List other = (List) obj; + if (other.size() != size()) { + return false; + } + final ListIterator it1 = listIterator(); + final ListIterator it2 = other.listIterator(); + while (it1.hasNext() && it2.hasNext()) { + if (!Objects.equals(it1.next(), it2.next())) { + return false; + } + } + return !(it1.hasNext() || it2.hasNext()); + } + + @Override + public int hashCode() { + int hashCode = 1; + for (final E e : this) { + hashCode = 31 * hashCode + (e == null ? 0 : e.hashCode()); + } + return hashCode; + } + + @Override + public String toString() { + if (isEmpty()) { + return "[]"; + } + final StringBuilder buf = new StringBuilder(16 * size()); + buf.append(DEFAULT_TOSTRING_PREFIX); + + final Iterator it = iterator(); + boolean hasNext = it.hasNext(); + while (hasNext) { + final Object value = it.next(); + buf.append(value == this ? "(this Collection)" : value); + hasNext = it.hasNext(); + if (hasNext) { + buf.append(", "); + } + } + buf.append(DEFAULT_TOSTRING_SUFFIX); + return buf.toString(); + } + + /** + * Compares two values for equals. + * This implementation uses the equals method. + * Subclasses can override this to match differently. + * + * @param value1 the first value to compare, may be null + * @param value2 the second value to compare, may be null + * @return true if equal + */ + protected boolean isEqualValue(final Object value1, final Object value2) { + return Objects.equals(value1, value2); + } + + /** + * Updates the node with a new value. + * This implementation sets the value on the node. + * Subclasses can override this to record the change. + * + * @param node node to update + * @param value new value of the node + */ + protected void updateNode(final Node node, final E value) { + node.setValue(value); + } + + /** + * Creates a new node with previous, next and element all set to null. + * This implementation creates a new empty Node. + * Subclasses can override this to create a different class. + * + * @return newly created node + */ + protected Node createHeaderNode() { + return new Node<>(); + } + + /** + * Creates a new node with the specified properties. + * This implementation creates a new Node with data. + * Subclasses can override this to create a different class. + * + * @param value value of the new node + * @return a new node containing the value + */ + protected Node createNode(final E value) { + return new Node<>(value); + } + + /** + * Creates a new node with the specified object as its + * {@code value} and inserts it before {@code node}. + *

    + * This implementation uses {@link #createNode(Object)} and + * {@link #addNode(CopyOfAbstractLinkedList.Node,CopyOfAbstractLinkedList.Node)}. + * + * @param node node to insert before + * @param value value of the newly added node + * @throws NullPointerException if {@code node} is null + */ + protected void addNodeBefore(final Node node, final E value) { + final Node newNode = createNode(value); + addNode(newNode, node); + } + + /** + * Creates a new node with the specified object as its + * {@code value} and inserts it after {@code node}. + *

    + * This implementation uses {@link #createNode(Object)} and + * {@link #addNode(CopyOfAbstractLinkedList.Node,CopyOfAbstractLinkedList.Node)}. + * + * @param node node to insert after + * @param value value of the newly added node + * @throws NullPointerException if {@code node} is null + */ + protected void addNodeAfter(final Node node, final E value) { + final Node newNode = createNode(value); + addNode(newNode, node.next); + } + + /** + * Inserts a new node into the list. + * + * @param nodeToInsert new node to insert + * @param insertBeforeNode node to insert before + * @throws NullPointerException if either node is null + */ + protected void addNode(final Node nodeToInsert, final Node insertBeforeNode) { + Objects.requireNonNull(nodeToInsert, "nodeToInsert"); + Objects.requireNonNull(insertBeforeNode, "insertBeforeNode"); + nodeToInsert.next = insertBeforeNode; + nodeToInsert.previous = insertBeforeNode.previous; + insertBeforeNode.previous.next = nodeToInsert; + insertBeforeNode.previous = nodeToInsert; + size++; + modCount++; + } + + /** + * Removes the specified node from the list. + * + * @param node the node to remove + * @throws NullPointerException if {@code node} is null + */ + protected void removeNode(final Node node) { + Objects.requireNonNull(node, "node"); + node.previous.next = node.next; + node.next.previous = node.previous; + size--; + modCount++; + } + + /** + * Removes all nodes by resetting the circular list marker. + */ + protected void removeAllNodes() { + header.next = header; + header.previous = header; + size = 0; + modCount++; + } + + /** + * Gets the node at a particular index. + * + * @param index the index, starting from 0 + * @param endMarkerAllowed whether or not the end marker can be returned if + * startIndex is set to the list's size + * @return the node at the given index + * @throws IndexOutOfBoundsException if the index is less than 0; equal to + * the size of the list and endMakerAllowed is false; or greater than the + * size of the list + */ + protected Node getNode(final int index, final boolean endMarkerAllowed) throws IndexOutOfBoundsException { + // Check the index is within the bounds + if (index < 0) { + throw new IndexOutOfBoundsException("Couldn't get the node: " + + "index (" + index + ") less than zero."); + } + if (!endMarkerAllowed && index == size) { + throw new IndexOutOfBoundsException("Couldn't get the node: " + + "index (" + index + ") is the size of the list."); + } + if (index > size) { + throw new IndexOutOfBoundsException("Couldn't get the node: " + + "index (" + index + ") greater than the size of the " + + "list (" + size + ")."); + } + // Search the list and get the node + Node node; + if (index < size / 2) { + // Search forwards + node = header.next; + for (int currentIndex = 0; currentIndex < index; currentIndex++) { + node = node.next; + } + } else { + // Search backwards + node = header; + for (int currentIndex = size; currentIndex > index; currentIndex--) { + node = node.previous; + } + } + return node; + } + + /** + * Creates an iterator for the sublist. + * + * @param subList the sublist to get an iterator for + * @return a new iterator on the given sublist + */ + protected Iterator createSubListIterator(final LinkedSubList subList) { + return createSubListListIterator(subList, 0); + } + + /** + * Creates a list iterator for the sublist. + * + * @param subList the sublist to get an iterator for + * @param fromIndex the index to start from, relative to the sublist + * @return a new list iterator on the given sublist + */ + protected ListIterator createSubListListIterator(final LinkedSubList subList, final int fromIndex) { + return new LinkedSubListIterator<>(subList, fromIndex); + } + + /** + * Serializes the data held in this object to the stream specified. + *

    + * The first serializable subclass must call this method from + * {@code writeObject}. + * + * @param outputStream the stream to write the object to + * @throws IOException if anything goes wrong + */ + protected void doWriteObject(final ObjectOutputStream outputStream) throws IOException { + // Write the size so we know how many nodes to read back + outputStream.writeInt(size()); + for (final E e : this) { + outputStream.writeObject(e); + } + } + + /** + * Deserializes the data held in this object to the stream specified. + *

    + * The first serializable subclass must call this method from + * {@code readObject}. + * + * @param inputStream the stream to read the object from + * @throws IOException if any error occurs while reading from the stream + * @throws ClassNotFoundException if a class read from the stream can not be loaded + */ + @SuppressWarnings("unchecked") + protected void doReadObject(final ObjectInputStream inputStream) throws IOException, ClassNotFoundException { + init(); + final int size = inputStream.readInt(); + for (int i = 0; i < size; i++) { + add((E) inputStream.readObject()); + } + } + + /** + * A node within the linked list. + *

    + * From Commons Collections 3.1, all access to the {@code value} property + * is via the methods on this class. + */ + protected static class Node { + + /** A pointer to the node before this node */ + protected Node previous; + /** A pointer to the node after this node */ + protected Node next; + /** The object contained within this node */ + protected E value; + + /** + * Constructs a new header node. + */ + protected Node() { + previous = this; + next = this; + } + + /** + * Constructs a new node. + * + * @param value the value to store + */ + protected Node(final E value) { + this.value = value; + } + + /** + * Constructs a new node. + * + * @param previous the previous node in the list + * @param next the next node in the list + * @param value the value to store + */ + protected Node(final Node previous, final Node next, final E value) { + this.previous = previous; + this.next = next; + this.value = value; + } + + /** + * Gets the value of the node. + * + * @return the value + * @since 3.1 + */ + protected E getValue() { + return value; + } + + /** + * Sets the value of the node. + * + * @param value the value + * @since 3.1 + */ + protected void setValue(final E value) { + this.value = value; + } + + /** + * Gets the previous node. + * + * @return the previous node + * @since 3.1 + */ + protected Node getPreviousNode() { + return previous; + } + + /** + * Sets the previous node. + * + * @param previous the previous node + * @since 3.1 + */ + protected void setPreviousNode(final Node previous) { + this.previous = previous; + } + + /** + * Gets the next node. + * + * @return the next node + * @since 3.1 + */ + protected Node getNextNode() { + return next; + } + + /** + * Sets the next node. + * + * @param next the next node + * @since 3.1 + */ + protected void setNextNode(final Node next) { + this.next = next; + } + } + + /** + * A list iterator over the linked list. + * + * @param the type of elements in this iterator. + */ + protected static class LinkedListIterator implements ListIterator, CopyOfOrderedIterator { + + /** The parent list */ + protected final CopyOfAbstractLinkedList parent; + + /** + * The node that will be returned by {@link #next()}. If this is equal + * to {@link CopyOfAbstractLinkedList#header} then there are no more values to return. + */ + protected Node next; + + /** + * The index of {@link #next}. + */ + protected int nextIndex; + + /** + * The last node that was returned by {@link #next()} or {@link + * #previous()}. Set to {@code null} if {@link #next()} or {@link + * #previous()} haven't been called, or if the node has been removed + * with {@link #remove()} or a new node added with {@link #add(Object)}. + * Should be accessed through {@link #getLastNodeReturned()} to enforce + * this behavior. + */ + protected Node current; + + /** + * The modification count that the list is expected to have. If the list + * doesn't have this count, then a + * {@link java.util.ConcurrentModificationException} may be thrown by + * the operations. + */ + protected int expectedModCount; + + /** + * Create a ListIterator for a list. + * + * @param parent the parent list + * @param fromIndex the index to start at + * @throws IndexOutOfBoundsException if fromIndex is less than 0 or greater than the size of the list + */ + protected LinkedListIterator(final CopyOfAbstractLinkedList parent, final int fromIndex) + throws IndexOutOfBoundsException { + this.parent = parent; + this.expectedModCount = parent.modCount; + this.next = parent.getNode(fromIndex, true); + this.nextIndex = fromIndex; + } + + /** + * Checks the modification count of the list is the value that this + * object expects. + * + * @throws ConcurrentModificationException If the list's modification + * count isn't the value that was expected. + */ + protected void checkModCount() { + if (parent.modCount != expectedModCount) { + throw new ConcurrentModificationException(); + } + } + + /** + * Gets the last node returned. + * + * @return the last node returned + * @throws IllegalStateException If {@link #next()} or {@link #previous()} haven't been called, + * or if the node has been removed with {@link #remove()} or a new node added with {@link #add(Object)}. + */ + protected Node getLastNodeReturned() throws IllegalStateException { + if (current == null) { + throw new IllegalStateException(); + } + return current; + } + + @Override + public boolean hasNext() { + return next != parent.header; + } + + @Override + public E next() { + checkModCount(); + if (!hasNext()) { + throw new NoSuchElementException("No element at index " + nextIndex + "."); + } + final E value = next.getValue(); + current = next; + next = next.next; + nextIndex++; + return value; + } + + @Override + public boolean hasPrevious() { + return next.previous != parent.header; + } + + @Override + public E previous() { + checkModCount(); + if (!hasPrevious()) { + throw new NoSuchElementException("Already at start of list."); + } + next = next.previous; + final E value = next.getValue(); + current = next; + nextIndex--; + return value; + } + + @Override + public int nextIndex() { + return nextIndex; + } + + @Override + public int previousIndex() { + // not normally overridden, as relative to nextIndex() + return nextIndex() - 1; + } + + @Override + public void remove() { + checkModCount(); + if (current == next) { + // remove() following previous() + next = next.next; + parent.removeNode(getLastNodeReturned()); + } else { + // remove() following next() + parent.removeNode(getLastNodeReturned()); + nextIndex--; + } + current = null; + expectedModCount++; + } + + @Override + public void set(final E obj) { + checkModCount(); + getLastNodeReturned().setValue(obj); + } + + @Override + public void add(final E obj) { + checkModCount(); + parent.addNodeBefore(next, obj); + current = null; + nextIndex++; + expectedModCount++; + } + + } + + /** + * A list iterator over the linked sub list. + * + * @param the type of elements in this iterator. + */ + protected static class LinkedSubListIterator extends LinkedListIterator { + + /** The sub list */ + protected final LinkedSubList sub; + + protected LinkedSubListIterator(final LinkedSubList sub, final int startIndex) { + super(sub.parent, startIndex + sub.offset); + this.sub = sub; + } + + @Override + public boolean hasNext() { + return nextIndex() < sub.size; + } + + @Override + public boolean hasPrevious() { + return previousIndex() >= 0; + } + + @Override + public int nextIndex() { + return super.nextIndex() - sub.offset; + } + + @Override + public void add(final E obj) { + super.add(obj); + sub.expectedModCount = parent.modCount; + sub.size++; + } + + @Override + public void remove() { + super.remove(); + sub.expectedModCount = parent.modCount; + sub.size--; + } + } + + /** + * The sublist implementation for CopyOfAbstractLinkedList. + * + * @param the type of elements in this list. + */ + protected static class LinkedSubList extends AbstractList { + /** The main list */ + CopyOfAbstractLinkedList parent; + /** Offset from the main list */ + int offset; + /** Sublist size */ + int size; + /** Sublist modCount */ + int expectedModCount; + + protected LinkedSubList(final CopyOfAbstractLinkedList parent, final int fromIndex, final int toIndex) { + if (fromIndex < 0) { + throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); + } + if (toIndex > parent.size()) { + throw new IndexOutOfBoundsException("toIndex = " + toIndex); + } + if (fromIndex > toIndex) { + throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); + } + this.parent = parent; + this.offset = fromIndex; + this.size = toIndex - fromIndex; + this.expectedModCount = parent.modCount; + } + + @Override + public int size() { + checkModCount(); + return size; + } + + @Override + public E get(final int index) { + rangeCheck(index, size); + checkModCount(); + return parent.get(index + offset); + } + + @Override + public void add(final int index, final E obj) { + rangeCheck(index, size + 1); + checkModCount(); + parent.add(index + offset, obj); + expectedModCount = parent.modCount; + size++; + modCount++; + } + + @Override + public E remove(final int index) { + rangeCheck(index, size); + checkModCount(); + final E result = parent.remove(index + offset); + expectedModCount = parent.modCount; + size--; + modCount++; + return result; + } + + @Override + public boolean addAll(final Collection coll) { + return addAll(size, coll); + } + + @Override + public boolean addAll(final int index, final Collection coll) { + rangeCheck(index, size + 1); + final int cSize = coll.size(); + if (cSize == 0) { + return false; + } + + checkModCount(); + parent.addAll(offset + index, coll); + expectedModCount = parent.modCount; + size += cSize; + modCount++; + return true; + } + + @Override + public E set(final int index, final E obj) { + rangeCheck(index, size); + checkModCount(); + return parent.set(index + offset, obj); + } + + @Override + public void clear() { + checkModCount(); + final Iterator it = iterator(); + while (it.hasNext()) { + it.next(); + it.remove(); + } + } + + @Override + public Iterator iterator() { + checkModCount(); + return parent.createSubListIterator(this); + } + + @Override + public ListIterator listIterator(final int index) { + rangeCheck(index, size + 1); + checkModCount(); + return parent.createSubListListIterator(this, index); + } + + @Override + public List subList(final int fromIndexInclusive, final int toIndexExclusive) { + return new LinkedSubList<>(parent, fromIndexInclusive + offset, toIndexExclusive + offset); + } + + protected void rangeCheck(final int index, final int beyond) { + if (index < 0 || index >= beyond) { + throw new IndexOutOfBoundsException("Index '" + index + "' out of bounds for size '" + size + "'"); + } + } + + protected void checkModCount() { + if (parent.modCount != expectedModCount) { + throw new ConcurrentModificationException(); + } + } + } + + // inlined dependencies from commons-collections + + private interface CopyOfOrderedIterator extends Iterator { + + /** + * Checks to see if there is a previous element that can be iterated to. + * + * @return {@code true} if the iterator has a previous element + */ + boolean hasPrevious(); + + /** + * Gets the previous element from the container. + * + * @return the previous element in the iteration + * @throws java.util.NoSuchElementException if the iteration is finished + */ + E previous(); + + } + + /** + * The index value when an element is not found in a collection or array: {@code -1}. + */ + private static final int INDEX_NOT_FOUND = -1; + + /** + * Default prefix used while converting an Iterator to its String representation. + */ + private static final String DEFAULT_TOSTRING_PREFIX = "["; + + /** + * Default suffix used while converting an Iterator to its String representation. + */ + private static final String DEFAULT_TOSTRING_SUFFIX = "]"; +} diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java index 8d707fc96d9..67c5b154a6e 100644 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java @@ -22,7 +22,6 @@ import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.commons.collections4.list.AbstractLinkedList; import org.apache.jackrabbit.spi.Name; import org.apache.jackrabbit.spi.Path; @@ -31,7 +30,7 @@ * LinkNode which links the entries of the list. */ @SuppressWarnings("rawtypes") -class LinkedEntries extends AbstractLinkedList { +class LinkedEntries extends CopyOfAbstractLinkedList { private Node header; private volatile int modCount; @@ -166,7 +165,7 @@ void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) { * * @param value a child node entry. * @return a wrapping {@link LinkedEntries.LinkNode}. - * @see AbstractLinkedList#createNode(Object) + * @see CopyOfAbstractLinkedList#createNode(Object) */ @Override protected Node createNode(Object value) { @@ -175,7 +174,7 @@ protected Node createNode(Object value) { /** * @return a new LinkNode. - * @see AbstractLinkedList#createHeaderNode() + * @see CopyOfAbstractLinkedList#createHeaderNode() */ @Override protected Node createHeaderNode() { @@ -192,7 +191,7 @@ protected Iterator linkNodeIterator() { //---------------------------------------------------------------------- /** - * Extends the AbstractLinkedList.Node. + * Extends the CopyOfAbstractLinkedList.Node. */ protected final class LinkNode extends Node { diff --git a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntriesTest.java b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntriesTest.java index 972e63aa2fb..9ab5e3ae7dd 100644 --- a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntriesTest.java +++ b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntriesTest.java @@ -1,38 +1,38 @@ -/* - * 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. - */ -package org.apache.jackrabbit.jcr2spi.hierarchy; - -import static org.mockito.Mockito.mock; - -import java.util.ConcurrentModificationException; -import java.util.Iterator; - -import junit.framework.TestCase; - -public class LinkedEntriesTest extends TestCase { - - public void testLinkedEntries() { - LinkedEntries linkedEntries = new LinkedEntries(null, null); - Iterator it = linkedEntries.linkNodeIterator(); - linkedEntries.add(mock(NodeEntry.class), 0); - try { - it.next(); - fail("ConcurrentModificationException expected"); - } catch (ConcurrentModificationException expected) { - } - } -} +/* + * 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. + */ +package org.apache.jackrabbit.jcr2spi.hierarchy; + +import static org.mockito.Mockito.mock; + +import java.util.ConcurrentModificationException; +import java.util.Iterator; + +import junit.framework.TestCase; + +public class LinkedEntriesTest extends TestCase { + + public void testLinkedEntries() { + LinkedEntries linkedEntries = new LinkedEntries(null, null); + Iterator it = linkedEntries.linkNodeIterator(); + linkedEntries.add(mock(NodeEntry.class), 0); + try { + it.next(); + fail("ConcurrentModificationException expected"); + } catch (ConcurrentModificationException expected) { + } + } +} From 329109222ad7ba26d6fec46805235b32a81260bf Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 9 Sep 2023 12:17:19 +0000 Subject: [PATCH 074/271] JCR-4970: it-osgi: fix package name git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912211 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/java/org/apache/jackrabbit/{oak => }/osgi/OSGiIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/{oak => }/osgi/OSGiIT.java (99%) diff --git a/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java b/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java similarity index 99% rename from jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java rename to jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java index 8adac99ae47..066656f8517 100644 --- a/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java +++ b/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.jackrabbit.oak.osgi; +package org.apache.jackrabbit.osgi; import static org.junit.Assert.assertEquals; import static org.ops4j.pax.exam.CoreOptions.bundle; From c234ad1f9cbc6b1eefe41dd69e3f3f9bfae2bdb8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 15 Sep 2023 08:05:42 +0000 Subject: [PATCH 075/271] JCR-4951: Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.16 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912321 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index eea14b5905f..a852b5dfa4a 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -49,7 +49,7 @@ 1.48.0 - 1.22.15 + 1.22.16 9.4.51.v20230217 2.4.1 ${project.build.sourceEncoding} From 463a0a98301e43386f0d7a8d6cdb609c2d82fd38 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 15 Sep 2023 08:44:39 +0000 Subject: [PATCH 076/271] JCR-4971: Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912323 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index a852b5dfa4a..db867725d9a 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -49,7 +49,7 @@ 1.48.0 - 1.22.16 + 1.22.17 9.4.51.v20230217 2.4.1 ${project.build.sourceEncoding} From ec04fa2ad5ac20a077c81c85b654aae77399ddd2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 29 Sep 2023 11:28:36 +0000 Subject: [PATCH 077/271] JCR-4974: Update easymock dependency to 5.2.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912603 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index db867725d9a..07224746e0b 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -616,7 +616,7 @@ org.easymock easymock - 5.1.0 + 5.2.0 junit From f6f53b48c41228951fb90402835da591637217ba Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 29 Sep 2023 13:01:29 +0000 Subject: [PATCH 078/271] JCR-4975: update aws java sdk version to 1.12.560 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912605 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 921dd9e98f4..b49be211b4a 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.523 + 1.12.560 org.apache.jackrabbit From f0163fc1091c4c6636821f2d6a1415f91204c5fc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 29 Sep 2023 13:57:44 +0000 Subject: [PATCH 079/271] JCR-4976: Update tomcat dependency to 9.0.80 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912609 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 8d98d18d954..ff9b7710920 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.78 + 9.0.80 From 92f01e669c945b64455fd21afcecb52ef350dc48 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 4 Oct 2023 10:55:48 +0000 Subject: [PATCH 080/271] JCR-4973: Deprecate RMI support git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912729 13f79535-47bb-0310-9956-ffa450edef68 --- .../jackrabbit/rmi/client/BrokenRemoteRepository.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientAdapterFactory.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientItem.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientItemDefinition.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientLock.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientLockManager.java | 2 +- .../jackrabbit/rmi/client/ClientNamespaceRegistry.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientNode.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientNodeDefinition.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientNodeType.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientNodeTypeManager.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientObject.java | 4 +++- .../jackrabbit/rmi/client/ClientObservationManager.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientProperty.java | 4 +++- .../jackrabbit/rmi/client/ClientPropertyDefinition.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientQuery.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientQueryManager.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientQueryResult.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientRepository.java | 4 +++- .../jackrabbit/rmi/client/ClientRepositoryFactory.java | 4 +++- .../java/org/apache/jackrabbit/rmi/client/ClientRow.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientSession.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientVersion.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientVersionHistory.java | 4 +++- .../apache/jackrabbit/rmi/client/ClientVersionManager.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientWorkspace.java | 4 +++- .../org/apache/jackrabbit/rmi/client/ClientXASession.java | 4 +++- .../apache/jackrabbit/rmi/client/DefaultContentHandler.java | 4 +++- .../apache/jackrabbit/rmi/client/LocalAdapterFactory.java | 4 +++- .../jackrabbit/rmi/client/RemoteRepositoryException.java | 4 +++- .../jackrabbit/rmi/client/RemoteRuntimeException.java | 4 +++- .../apache/jackrabbit/rmi/client/SafeClientRepository.java | 4 +++- .../jackrabbit/rmi/client/SerializingContentHandler.java | 4 +++- .../jackrabbit/rmi/client/iterator/ClientIterator.java | 4 +++- .../jackrabbit/rmi/client/iterator/ClientNodeIterator.java | 4 +++- .../rmi/client/iterator/ClientNodeTypeIterator.java | 4 +++- .../rmi/client/iterator/ClientPropertyIterator.java | 4 +++- .../jackrabbit/rmi/client/iterator/ClientRowIterator.java | 4 +++- .../rmi/client/iterator/ClientVersionIterator.java | 4 +++- .../apache/jackrabbit/rmi/client/principal/ClientGroup.java | 4 +++- .../jackrabbit/rmi/client/principal/ClientPrincipal.java | 4 +++- .../rmi/client/principal/ClientPrincipalIterator.java | 4 +++- .../rmi/client/security/ClientAccessControlEntry.java | 4 +++- .../rmi/client/security/ClientAccessControlList.java | 4 +++- .../rmi/client/security/ClientAccessControlManager.java | 4 +++- .../rmi/client/security/ClientAccessControlPolicy.java | 4 +++- .../client/security/ClientAccessControlPolicyIterator.java | 4 +++- .../jackrabbit/rmi/client/security/ClientPrivilege.java | 4 +++- .../apache/jackrabbit/rmi/iterator/ArrayEventIterator.java | 4 +++- .../jackrabbit/rmi/iterator/ArrayEventListenerIterator.java | 4 +++- .../org/apache/jackrabbit/rmi/iterator/ArrayIterator.java | 4 +++- .../rmi/jackrabbit/JackrabbitClientAdapterFactory.java | 4 +++- .../apache/jackrabbit/rmi/observation/ClientEventPoll.java | 4 +++- .../java/org/apache/jackrabbit/rmi/observation/Queue.java | 4 +++- .../rmi/observation/ServerEventListenerProxy.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/ArrayIterator.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/BufferIterator.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteEventCollection.java | 4 +++- .../java/org/apache/jackrabbit/rmi/remote/RemoteItem.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteItemDefinition.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteIterator.java | 4 +++- .../java/org/apache/jackrabbit/rmi/remote/RemoteLock.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteLockManager.java | 2 +- .../jackrabbit/rmi/remote/RemoteNamespaceRegistry.java | 4 +++- .../java/org/apache/jackrabbit/rmi/remote/RemoteNode.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteNodeType.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java | 4 +++- .../jackrabbit/rmi/remote/RemoteObservationManager.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteProperty.java | 4 +++- .../jackrabbit/rmi/remote/RemotePropertyDefinition.java | 4 +++- .../java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteQueryManager.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteRepository.java | 4 +++- .../java/org/apache/jackrabbit/rmi/remote/RemoteRow.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteSession.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteVersion.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteVersionHistory.java | 4 +++- .../apache/jackrabbit/rmi/remote/RemoteVersionManager.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/RemoteXASession.java | 4 +++- .../org/apache/jackrabbit/rmi/remote/SerializableXid.java | 4 +++- .../apache/jackrabbit/rmi/remote/principal/RemoteGroup.java | 6 ++++-- .../jackrabbit/rmi/remote/principal/RemotePrincipal.java | 4 +++- .../rmi/remote/security/RemoteAccessControlEntry.java | 4 +++- .../rmi/remote/security/RemoteAccessControlList.java | 4 +++- .../rmi/remote/security/RemoteAccessControlManager.java | 4 +++- .../rmi/remote/security/RemoteAccessControlPolicy.java | 4 +++- .../jackrabbit/rmi/remote/security/RemotePrivilege.java | 4 +++- .../rmi/repository/AbstractRemoteRepositoryFactory.java | 4 +++- .../jackrabbit/rmi/repository/JNDIRemoteRepository.java | 4 +++- .../rmi/repository/JNDIRemoteRepositoryFactory.java | 4 +++- .../apache/jackrabbit/rmi/repository/ProxyRepository.java | 4 +++- .../jackrabbit/rmi/repository/RMIRemoteRepository.java | 4 +++- .../rmi/repository/RMIRemoteRepositoryFactory.java | 4 +++- .../apache/jackrabbit/rmi/repository/RepositoryFactory.java | 4 +++- .../jackrabbit/rmi/repository/RmiRepositoryFactory.java | 2 +- .../jackrabbit/rmi/repository/URLRemoteRepository.java | 4 +++- .../rmi/repository/URLRemoteRepositoryFactory.java | 4 +++- .../apache/jackrabbit/rmi/server/RemoteAdapterFactory.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerAdapterFactory.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerEventCollection.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerItem.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerItemDefinition.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerLock.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerLockManager.java | 2 +- .../jackrabbit/rmi/server/ServerNamespaceRegistry.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerNode.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerNodeDefinition.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerNodeType.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerNodeTypeManager.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerObject.java | 4 +++- .../jackrabbit/rmi/server/ServerObservationManager.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerProperty.java | 4 +++- .../jackrabbit/rmi/server/ServerPropertyDefinition.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerQuery.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerQueryManager.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerQueryResult.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerRepository.java | 4 +++- .../java/org/apache/jackrabbit/rmi/server/ServerRow.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerSession.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerVersion.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerVersionHistory.java | 4 +++- .../apache/jackrabbit/rmi/server/ServerVersionManager.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerWorkspace.java | 4 +++- .../org/apache/jackrabbit/rmi/server/ServerXASession.java | 4 +++- .../jackrabbit/rmi/server/iterator/ServerIterator.java | 4 +++- .../jackrabbit/rmi/server/iterator/ServerNodeIterator.java | 4 +++- .../rmi/server/iterator/ServerNodeTypeIterator.java | 4 +++- .../rmi/server/iterator/ServerPropertyIterator.java | 4 +++- .../jackrabbit/rmi/server/iterator/ServerRowIterator.java | 4 +++- .../rmi/server/iterator/ServerVersionIterator.java | 4 +++- .../org/apache/jackrabbit/rmi/server/jmx/JCRServer.java | 4 +++- .../apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java | 2 +- .../apache/jackrabbit/rmi/server/principal/ServerGroup.java | 2 +- .../jackrabbit/rmi/server/principal/ServerPrincipal.java | 2 +- .../rmi/server/principal/ServerPrincipalIterator.java | 2 +- .../rmi/server/security/ServerAccessControlEntry.java | 2 +- .../rmi/server/security/ServerAccessControlList.java | 2 +- .../rmi/server/security/ServerAccessControlManager.java | 2 +- .../rmi/server/security/ServerAccessControlPolicy.java | 2 +- .../server/security/ServerAccessControlPolicyIterator.java | 4 +++- .../jackrabbit/rmi/server/security/ServerPrivilege.java | 2 +- .../java/org/apache/jackrabbit/rmi/value/AbstractValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/BinaryValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/BooleanValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/DateValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/DecimalValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/DoubleValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/LongValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/NameValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/PathValue.java | 4 +++- .../org/apache/jackrabbit/rmi/value/ReferenceValue.java | 4 +++- .../org/apache/jackrabbit/rmi/value/SerialValueFactory.java | 4 +++- .../org/apache/jackrabbit/rmi/value/SerializableBinary.java | 4 +++- .../java/org/apache/jackrabbit/rmi/value/StringValue.java | 4 +++- .../java/org/apache/jackrabbit/rmi/ConformanceTest.java | 4 +++- .../java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java | 2 +- 159 files changed, 444 insertions(+), 160 deletions(-) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java index 9201f1a7ba8..efb1408d0e4 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java @@ -25,11 +25,13 @@ import org.apache.jackrabbit.rmi.remote.RemoteSession; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Dummy remote repository instance that throws a {@link RemoteException} * whenever any method is invoked. Used as a sentinel object by the * {@link SafeClientRepository} class. */ -public class BrokenRemoteRepository implements RemoteRepository { +@Deprecated public class BrokenRemoteRepository implements RemoteRepository { /** * The remote exception thrown by methods of this instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java index 14959c91ead..5b5007e2830 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java @@ -99,6 +99,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Default implementation of the * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory LocalAdapterFactory} * interface. This factory uses the client adapters defined in this @@ -106,7 +108,7 @@ * easily override or extend the default adapters by implementing the * corresponding factory methods. */ -public class ClientAdapterFactory implements LocalAdapterFactory { +@Deprecated public class ClientAdapterFactory implements LocalAdapterFactory { /** * Creates and returns a {@link ClientRepository ClientRepository} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java index cb5bbe5fcbe..6be987761d5 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java @@ -28,6 +28,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteItem; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} * interface. This class makes a remote item locally available using @@ -40,7 +42,7 @@ * @see javax.jcr.Item * @see org.apache.jackrabbit.rmi.remote.RemoteItem */ -public class ClientItem extends ClientObject implements Item { +@Deprecated public class ClientItem extends ClientObject implements Item { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java index c758f227198..34785c5d9ef 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} * interface. This class makes a remote item definition locally available using @@ -37,7 +39,7 @@ * @see javax.jcr.nodetype.ItemDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition */ -public class ClientItemDefinition extends ClientObject implements ItemDefinition { +@Deprecated public class ClientItemDefinition extends ClientObject implements ItemDefinition { /** The adapted remote item definition. */ private RemoteItemDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java index c4abc32c272..9d27d87a51e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java @@ -26,6 +26,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteLock; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} * interface. This class makes a remote lock locally available using @@ -34,7 +36,7 @@ * @see javax.jcr.lock.Lock * @see org.apache.jackrabbit.rmi.remote.RemoteLock */ -public class ClientLock extends ClientObject implements Lock { +@Deprecated public class ClientLock extends ClientObject implements Lock { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java index a8dd98135c7..1a6218c2cab 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -public class ClientLockManager extends ClientObject implements LockManager { +@Deprecated public class ClientLockManager extends ClientObject implements LockManager { /** The current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java index 9d6b21eaa2f..364d6bcc86f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java @@ -24,6 +24,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} * interface. This class makes a remote namespace registry locally available @@ -33,7 +35,7 @@ * @see javax.jcr.NamespaceRegistry * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry */ -public class ClientNamespaceRegistry extends ClientObject implements +@Deprecated public class ClientNamespaceRegistry extends ClientObject implements NamespaceRegistry { /** The adapted remote namespace registry. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java index 09f2f2b1049..76bbed5ac67 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java @@ -43,6 +43,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} * interface. This class makes a remote node locally available using @@ -51,7 +53,7 @@ * @see javax.jcr.Node * @see org.apache.jackrabbit.rmi.remote.RemoteNode */ -public class ClientNode extends ClientItem implements Node { +@Deprecated public class ClientNode extends ClientItem implements Node { /** The adapted remote node. */ private RemoteNode remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java index 1412f227a6d..de52d5fb506 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} * interface. This class makes a remote node definition locally available using @@ -33,7 +35,7 @@ * @see javax.jcr.nodetype.NodeDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition */ -public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { +@Deprecated public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { /** The adapted remote node definition. */ private RemoteNodeDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java index 5f23c047c35..e122288e1d5 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java @@ -31,6 +31,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} * interface. This class makes a remote node type locally available using @@ -39,7 +41,7 @@ * @see javax.jcr.nodetype.NodeType * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType */ -public class ClientNodeType extends ClientObject implements NodeType { +@Deprecated public class ClientNodeType extends ClientObject implements NodeType { /** The adapted remote node type. */ private RemoteNodeType remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java index c1d9e438c64..b6011357757 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java @@ -31,6 +31,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} * interface. This class makes a remote node type manager locally available @@ -40,7 +42,7 @@ * @see javax.jcr.nodetype.NodeTypeManager * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager */ -public class ClientNodeTypeManager extends ClientObject +@Deprecated public class ClientNodeTypeManager extends ClientObject implements NodeTypeManager { /** The adapted remote node type manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java index fbb0634fbe3..79cedec6511 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java @@ -29,12 +29,14 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Base class for client adapter objects. The only purpose of * this class is to centralize the handling of the * local adapter factory used by the client adapters to * instantiate new adapters. */ -public class ClientObject { +@Deprecated public class ClientObject { /** Local adapter factory. */ private LocalAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java index d1b57006ae8..dee8bc99bd1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java @@ -31,6 +31,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The ClientObservationManager class *

    * This class uses an instance of the @@ -47,7 +49,7 @@ * * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll */ -public class ClientObservationManager extends ClientObject implements +@Deprecated public class ClientObservationManager extends ClientObject implements ObservationManager { /** The remote observation manager */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java index fd565456e8b..8646f1e4c2e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java @@ -39,6 +39,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} * interface. This class makes a remote property locally available using @@ -47,7 +49,7 @@ * @see javax.jcr.Property * @see org.apache.jackrabbit.rmi.remote.RemoteProperty */ -public class ClientProperty extends ClientItem implements Property { +@Deprecated public class ClientProperty extends ClientItem implements Property { /** The adapted remote property. */ private RemoteProperty remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java index 15955b321f4..0fdec062898 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java @@ -24,6 +24,8 @@ import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} * interface. This class makes a remote property definition locally available @@ -32,7 +34,7 @@ * @see javax.jcr.nodetype.PropertyDefinition * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition */ -public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { +@Deprecated public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { /** The adapted remote property. */ private RemotePropertyDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java index 0de4fde8995..65d9d821fef 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java @@ -28,6 +28,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteQuery; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link RemoteQuery RemoteQuery} * interface. This class makes a remote query locally available using @@ -36,7 +38,7 @@ * @see javax.jcr.query.Query Query * @see org.apache.jackrabbit.rmi.remote.RemoteQuery */ -public class ClientQuery extends ClientObject implements Query { +@Deprecated public class ClientQuery extends ClientObject implements Query { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java index a6919992e78..f29f40b93d9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java @@ -29,6 +29,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteQueryManager RemoteQueryManager} * interface. This class makes a remote query manager locally available using * the JCR {@link QueryManager QueryManager} interface. @@ -36,7 +38,7 @@ * @see javax.jcr.query.QueryManager QueryManager * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager */ -public class ClientQueryManager extends ClientObject implements QueryManager { +@Deprecated public class ClientQueryManager extends ClientObject implements QueryManager { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java index dd2ef4b1d5e..030a786e950 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link RemoteQueryResult RemoteQueryResult} * interface. This class makes a remote query result locally available using @@ -35,7 +37,7 @@ * @see javax.jcr.query.QueryResult QueryResult * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult */ -public class ClientQueryResult extends ClientObject implements QueryResult { +@Deprecated public class ClientQueryResult extends ClientObject implements QueryResult { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java index f292298dc88..974af7134e3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java @@ -31,6 +31,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} * interface. This class makes a remote repository locally available using @@ -39,7 +41,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -public class ClientRepository implements Repository { +@Deprecated public class ClientRepository implements Repository { /** * The set of standard descriptor keys defined in the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java index 9aa41e5fd2e..b360ef4f7a6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java @@ -32,12 +32,14 @@ import org.apache.jackrabbit.rmi.remote.RemoteRepository; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Object factory for JCR-RMI clients. This factory can be used either * directly or as a JNDI object factory. * * @see ClientRepository */ -public class ClientRepositoryFactory implements ObjectFactory { +@Deprecated public class ClientRepositoryFactory implements ObjectFactory { /** * The JNDI parameter name for configuring the RMI URL of diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java index 253b3c451b0..f64aa83172f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteRow; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteRow RemoteRow} * interface. This class makes a remote query row locally available using * the JCR {@link Row Row} interface. @@ -34,7 +36,7 @@ * @see javax.jcr.query.Row Row * @see org.apache.jackrabbit.rmi.remote.RemoteRow */ -public class ClientRow extends ClientObject implements Row { +@Deprecated public class ClientRow extends ClientObject implements Row { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java index 909ad2a6545..b74e8ee0a41 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java @@ -53,6 +53,8 @@ import org.xml.sax.SAXException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} * interface. This class makes a remote session locally available using @@ -61,7 +63,7 @@ * @see javax.jcr.Session * @see org.apache.jackrabbit.rmi.remote.RemoteSession */ -public class ClientSession extends ClientObject implements Session { +@Deprecated public class ClientSession extends ClientObject implements Session { /** * Logger instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java index edce561b40b..8f101222fd0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java @@ -28,6 +28,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersion; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} * interface. This class makes a remote version locally available using @@ -36,7 +38,7 @@ * @see javax.jcr.version.Version * @see org.apache.jackrabbit.rmi.remote.RemoteVersion */ -public class ClientVersion extends ClientNode implements Version { +@Deprecated public class ClientVersion extends ClientNode implements Version { /** The adapted remote version. */ private RemoteVersion remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java index 5d855cf5b9d..5c495526ba4 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java @@ -30,6 +30,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} * interface. This class makes a remote version history locally available using @@ -38,7 +40,7 @@ * @see javax.jcr.version.VersionHistory * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory */ -public class ClientVersionHistory extends ClientNode implements VersionHistory { +@Deprecated public class ClientVersionHistory extends ClientNode implements VersionHistory { /** The adapted remote version history. */ private RemoteVersionHistory remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java index 07f9dedbdf3..7cf35518d93 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java @@ -30,7 +30,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -public class ClientVersionManager extends ClientObject +@Deprecated public class ClientVersionManager extends ClientObject implements VersionManager { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java index 89f83f41f72..1bcf10d30fa 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java @@ -40,6 +40,8 @@ import org.xml.sax.SAXException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteWorkspace RemoteWorkspace} * interface. This class makes a remote workspace locally available using * the JCR {@link Workspace Workspace} interface. @@ -47,7 +49,7 @@ * @see javax.jcr.Workspace * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace */ -public class ClientWorkspace extends ClientObject implements Workspace { +@Deprecated public class ClientWorkspace extends ClientObject implements Workspace { /** The current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java index 63a3bedb2b1..4aea1217ff3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java @@ -28,13 +28,15 @@ import org.apache.jackrabbit.rmi.remote.SerializableXid; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteXASession RemoteXASession} * interface. * * @since 1.4 */ -public class ClientXASession extends ClientSession implements XAResource { +@Deprecated public class ClientXASession extends ClientSession implements XAResource { /** * The adapted remote transaction enabled session. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java index d6f3947b215..a4b3027a168 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java @@ -23,10 +23,12 @@ import org.xml.sax.helpers.DefaultHandler; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Adapter class for exposing a {@link ContentHandler} instance as * {@link DefaultHandler} object. */ -class DefaultContentHandler extends DefaultHandler { +@Deprecated class DefaultContentHandler extends DefaultHandler { /** * The adapted content handler instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java index a2f55edbb3d..7c2efe7710f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java @@ -83,6 +83,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory interface for creating local adapters for remote references. * This interface defines how remote JCR-RMI references are adapted * back to the normal JCR interfaces. The adaption mechanism can be @@ -99,7 +101,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory * @see org.apache.jackrabbit.rmi.client.ClientObject */ -public interface LocalAdapterFactory { +@Deprecated public interface LocalAdapterFactory { /** * Factory method for creating a local adapter for a remote repository. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java index ab5919a8fea..30eaf35b2be 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java @@ -21,6 +21,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * JCR-RMI remote exception. Used by the JCR-RMI client to wrap RMI errors * into RepositoryExceptions to avoid breaking the JCR interfaces. *

    @@ -28,7 +30,7 @@ * exceptions, then the RemoteException is wrapped into a * RemoteRuntimeException. */ -public class RemoteRepositoryException extends RepositoryException { +@Deprecated public class RemoteRepositoryException extends RepositoryException { /** * Creates a RemoteRepositoryException based on the given RemoteException. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java index 72ad8080f50..e2eb42aed97 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java @@ -19,6 +19,8 @@ import java.rmi.RemoteException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * JCR-RMI remote runtime exception. Used by the JCR-RMI client to wrap * RMI errors into RuntimeExceptions to avoid breaking the JCR interfaces. *

    @@ -26,7 +28,7 @@ * throw RepositoryExceptions, then the RemoteException is wrapped into * a RemoteRepositoryException. */ -public class RemoteRuntimeException extends RuntimeException { +@Deprecated public class RemoteRuntimeException extends RuntimeException { /** * Creates a RemoteRuntimeException based on the given RemoteException. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java index 4b6acafb0b4..5a7319413c3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java @@ -28,6 +28,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteSession; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A "safe" local adapter for the JCR-RMI * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} * interface. This class uses an abstract factory method for loading @@ -39,7 +41,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -public abstract class SafeClientRepository extends ClientObject +@Deprecated public abstract class SafeClientRepository extends ClientObject implements Repository { /** The adapted remote repository. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java index 7076210af2e..0afc09e79c9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java @@ -41,6 +41,8 @@ import org.xml.sax.helpers.DefaultHandler; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A {@link ContentHandler} that serializes SAX events to a given * {@link Result} instance. The JAXP {@link SAXTransformerFactory} * facility is used for the serialization. @@ -55,7 +57,7 @@ * org.apache.cocoon.serialization.AbstractTextSerializer class in the * cocoon-pipeline-impl component for the original code. */ -class SerializingContentHandler extends DefaultContentHandler { +@Deprecated class SerializingContentHandler extends DefaultContentHandler { /** * The character encoding used for serialization (UTF-8). diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java index 113f66bfbd4..3610a797490 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A buffering local adapter for the JCR-RMI {@link RemoteIterator} * interface. This class makes the remote iterator locally available * using the JCR {@link RangeIterator} interface. The element arrays @@ -34,7 +36,7 @@ *

    * See the subclasses for type-specific versions of this abstract class. */ -public abstract class ClientIterator extends ClientObject +@Deprecated public abstract class ClientIterator extends ClientObject implements RangeIterator { /** The adapted remote iterator. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java index a8e228cbf26..f57dcec0c0c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote nodes. */ -public class ClientNodeIterator extends ClientIterator implements NodeIterator { +@Deprecated public class ClientNodeIterator extends ClientIterator implements NodeIterator { /** The current session. */ private final Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java index 3bc09cab013..73d1803ac03 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote node types. */ -public class ClientNodeTypeIterator extends ClientIterator +@Deprecated public class ClientNodeTypeIterator extends ClientIterator implements NodeTypeIterator { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java index a180f508dd0..f825bc1b548 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.remote.RemoteProperty; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote properties. */ -public class ClientPropertyIterator extends ClientIterator +@Deprecated public class ClientPropertyIterator extends ClientIterator implements PropertyIterator { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java index 7014fbeaa09..c092440f42b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.remote.RemoteRow; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote rows. */ -public class ClientRowIterator extends ClientIterator implements RowIterator { +@Deprecated public class ClientRowIterator extends ClientIterator implements RowIterator { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java index 44832ef8db1..1178ce97740 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersion; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote versions. */ -public class ClientVersionIterator extends ClientIterator +@Deprecated public class ClientVersionIterator extends ClientIterator implements VersionIterator { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java index 84ed3c100ef..c2a849ef758 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java @@ -31,11 +31,13 @@ import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface. * * @see RemoteGroup */ -public class ClientGroup extends ClientPrincipal implements GroupPrincipal { +@Deprecated public class ClientGroup extends ClientPrincipal implements GroupPrincipal { private final LocalAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java index 266c0810688..1052de5f7a2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal} * interface. This class makes a remote principal locally available using the * Java {@link Principal} interface. @@ -32,7 +34,7 @@ * @see Principal * @see RemotePrincipal */ -public class ClientPrincipal implements Principal { +@Deprecated public class ClientPrincipal implements Principal { private final RemotePrincipal p; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java index 207e113808f..b8b152ec7f4 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote principals */ -public class ClientPrincipalIterator extends ClientIterator { +@Deprecated public class ClientPrincipalIterator extends ClientIterator { public ClientPrincipalIterator(final RemoteIterator iterator, final LocalAdapterFactory factory) { diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java index 3554cdb1a11..481faac7ae7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java @@ -30,6 +30,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry * RemoteAccessControlEntry} interface. This class makes a remote * AccessControlEntry locally available using the JCR {@link AccessControlEntry @@ -38,7 +40,7 @@ * @see javax.jcr.security.AccessControlEntry * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry */ -public class ClientAccessControlEntry extends ClientObject implements +@Deprecated public class ClientAccessControlEntry extends ClientObject implements AccessControlEntry { private final RemoteAccessControlEntry race; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java index 98674442199..110e90bf8b0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java @@ -32,6 +32,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteAccessControlList * RemoteAccessControlList} interface. This class makes a remote * AccessControlList locally available using the JCR {@link AccessControlList @@ -40,7 +42,7 @@ * @see javax.jcr.security.AccessControlList * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList */ -public class ClientAccessControlList extends ClientAccessControlPolicy +@Deprecated public class ClientAccessControlList extends ClientAccessControlPolicy implements AccessControlList { public ClientAccessControlList(final RemoteAccessControlList racl, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java index ef8996ff9c6..36972f5d49d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java @@ -35,6 +35,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteAccessControlManager * RemoteAccessControlManager} interface. This class makes a remote * AccessControlManager locally available using the JCR @@ -43,7 +45,7 @@ * @see javax.jcr.security.AccessControlManager * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager */ -public class ClientAccessControlManager extends ClientObject implements +@Deprecated public class ClientAccessControlManager extends ClientObject implements AccessControlManager { private final RemoteAccessControlManager racm; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java index e68b5f55de3..0b0f719bf12 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java @@ -24,6 +24,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy * RemoteAccessControlPolicy} interface. This class makes a remote * AccessControlPolicy locally available using the JCR @@ -32,7 +34,7 @@ * @see javax.jcr.security.AccessControlPolicy * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy */ -public class ClientAccessControlPolicy extends ClientObject implements +@Deprecated public class ClientAccessControlPolicy extends ClientObject implements AccessControlPolicy { private final RemoteAccessControlPolicy racp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java index fe43e1d5424..9774cddc7bc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ClientIterator for iterating remote access control policies. */ -public class ClientAccessControlPolicyIterator extends ClientIterator implements +@Deprecated public class ClientAccessControlPolicyIterator extends ClientIterator implements AccessControlPolicyIterator { public ClientAccessControlPolicyIterator(RemoteIterator iterator, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java index b8a6450cdd5..975cbf28018 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java @@ -28,6 +28,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Local adapter for the JCR-RMI {@link RemotePrivilege RemotePrivilege} * interface. This class makes a remote Privilege locally available using the * JCR {@link Privilege Privilege} interface. @@ -35,7 +37,7 @@ * @see javax.jcr.security.Privilege * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege */ -public class ClientPrivilege extends ClientObject implements Privilege { +@Deprecated public class ClientPrivilege extends ClientObject implements Privilege { private final RemotePrivilege rp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java index 543f620d9d7..e045b4141b3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java @@ -20,12 +20,14 @@ import javax.jcr.observation.EventIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Array implementation of the JCR * {@link javax.jcr.observation.EventIterator EventIterator} interface. * This class is used by the JCR-RMI client adapters to convert * node arrays to iterators. */ -public class ArrayEventIterator extends ArrayIterator implements EventIterator { +@Deprecated public class ArrayEventIterator extends ArrayIterator implements EventIterator { /** * Creates an iterator for the given array of events. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java index 8a497982ead..f83a7ac65e2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java @@ -20,12 +20,14 @@ import javax.jcr.observation.EventListenerIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Array implementation of the JCR * {@link javax.jcr.observation.EventListenerIterator EventListenerIterator} interface. * This class is used by the JCR-RMI client adapters to convert * listener arrays to iterators. */ -public class ArrayEventListenerIterator extends ArrayIterator +@Deprecated public class ArrayEventListenerIterator extends ArrayIterator implements EventListenerIterator { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java index f06ca8c7f62..3b51825df50 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java @@ -21,13 +21,15 @@ import javax.jcr.RangeIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Array implementation of the JCR * {@link javax.jcr.RangeIterator RangeIterator} interface. This class * implements the RangeIterator functionality for an underlying array * of objects. Used as the base class for the type-specific iterator * classes defined in this package. */ -public class ArrayIterator implements RangeIterator { +@Deprecated public class ArrayIterator implements RangeIterator { /** The current iterator position. */ private int position; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java index 972172d9cc4..8d613bfedc9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java @@ -19,7 +19,9 @@ import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * @deprecated Use the normal {@link ClientAdapterFactory} instead */ -public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { +@Deprecated public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { } diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java index 7c3dca80819..325c2bfc3f1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java @@ -35,6 +35,8 @@ import org.slf4j.LoggerFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The ClientEventPoll class is the registry for client-side * event listeners on behalf of the * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class. In @@ -53,7 +55,7 @@ * * @see #run() */ -public class ClientEventPoll extends Thread { +@Deprecated public class ClientEventPoll extends Thread { /** logger */ private static final Logger log = diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java index c0f22230264..9a25f040797 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java @@ -19,11 +19,13 @@ import java.util.LinkedList; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The Queue class is a very simple queue assuming that there is * at least one consumer and potentially multiple producers. This class poses * no restrictions on the size of the queue. */ -public class Queue { +@Deprecated public class Queue { /** The linked list implementing the queue of data */ private final LinkedList queue; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java index ad4a88267cd..cbfe0443902 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java @@ -27,6 +27,8 @@ import org.slf4j.LoggerFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The ServerEventListenerProxy class is the server-side event * listener proxy registered on behalf of a client-side event listener identified * with the unique identifier. @@ -42,7 +44,7 @@ * See the package overview for an explanation of the mechanisms implemented for * event dispatching. */ -public class ServerEventListenerProxy implements EventListener { +@Deprecated public class ServerEventListenerProxy implements EventListener { /** logger */ private static final Logger log = diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java index 1c58e43a679..046f6f7dbf8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java @@ -20,11 +20,13 @@ import java.util.NoSuchElementException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A simple array-based remote iterator. Used when the iteration is * short enough for all the elements to be sent over the network in * one go. */ -public class ArrayIterator implements RemoteIterator, Serializable { +@Deprecated public class ArrayIterator implements RemoteIterator, Serializable { /** * The elements in this iterator. Set to null when diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java index 542596eeb71..36b60556437 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java @@ -21,11 +21,13 @@ import java.util.NoSuchElementException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A buffered remote iterator. Used to transfer a remote iterator reference * along with a buffer of the first few iterator elements in one network * transmission. */ -public class BufferIterator implements RemoteIterator, Serializable { +@Deprecated public class BufferIterator implements RemoteIterator, Serializable { /** The element buffer. Set to null when the iterator ends. */ private Object[] buffer; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java index 9c9eca1d8c4..5c5e9c3d246 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java @@ -23,13 +23,15 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The RemoteEventCollection class serves as a container for * notifications sent to registered event listeners. Instances of this class are * created by the server-side event listener proxies and sent to the client-side * event poller. On the client-side the enclosed list of events is then sent to * the listener identified by the contained listener identifier. */ -public interface RemoteEventCollection extends Remote { +@Deprecated public interface RemoteEventCollection extends Remote { /** * Returns unique identifier of the client-side listener to which the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java index bbf98380c39..bf6d0feeb76 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Item Item} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerItem ServerItem} * and {@link org.apache.jackrabbit.rmi.client.ClientItem ClientItem} @@ -39,7 +41,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientItem * @see org.apache.jackrabbit.rmi.server.ServerItem */ -public interface RemoteItem extends Remote { +@Deprecated public interface RemoteItem extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java index 3ab6e0f17d6..ac48d5e30c8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java @@ -20,6 +20,8 @@ import java.rmi.RemoteException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.ServerItemDefinition ServerItemDefinition} and @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientItemDefinition * @see org.apache.jackrabbit.rmi.server.ServerItemDefinition */ -public interface RemoteItemDefinition extends Remote { +@Deprecated public interface RemoteItemDefinition extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java index fa6b69f4d1d..82ad895b688 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java @@ -21,6 +21,8 @@ import java.util.NoSuchElementException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.RangeIterator} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.iterator.ServerIterator} and * {@link org.apache.jackrabbit.rmi.client.iterator.ClientIterator} classes to @@ -29,7 +31,7 @@ * This interface allows both the client and server side to control the * amount of buffering used to increase performance. */ -public interface RemoteIterator extends Remote { +@Deprecated public interface RemoteIterator extends Remote { /** * Returns the size of the iteration, or -1 if the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java index 014c69cafd7..49fad069199 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.lock.Lock} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerLock ServerLock} * and {@link org.apache.jackrabbit.rmi.client.ClientLock ClientLock} @@ -37,7 +39,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientLock * @see org.apache.jackrabbit.rmi.server.ServerLock */ -public interface RemoteLock extends Remote { +@Deprecated public interface RemoteLock extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java index caf3f387cba..2bf498003fa 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java @@ -21,7 +21,7 @@ import javax.jcr.RepositoryException; -public interface RemoteLockManager extends Remote { +@Deprecated public interface RemoteLockManager extends Remote { String[] getLockTokens() throws RepositoryException, RemoteException; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java index b442f2033ed..a602126c3f0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. * Used by the @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry * @see org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry */ -public interface RemoteNamespaceRegistry extends Remote { +@Deprecated public interface RemoteNamespaceRegistry extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java index e95a0473d7e..5558fe9799d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java @@ -22,6 +22,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Node Node} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} * and {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} @@ -49,7 +51,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNode * @see org.apache.jackrabbit.rmi.server.ServerNode */ -public interface RemoteNode extends RemoteItem { +@Deprecated public interface RemoteNode extends RemoteItem { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java index a4c14c29857..3768f2b6a1a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java @@ -19,6 +19,8 @@ import java.rmi.RemoteException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} and @@ -38,7 +40,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeDefinition * @see org.apache.jackrabbit.rmi.server.ServerNodeDefinition */ -public interface RemoteNodeDefinition extends RemoteItemDefinition { +@Deprecated public interface RemoteNodeDefinition extends RemoteItemDefinition { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java index 8f4c834ce87..01687cc762f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java @@ -22,6 +22,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.nodetype.NodeType NodeType} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.ServerNodeType ServerNodeType} and @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeType * @see org.apache.jackrabbit.rmi.server.ServerNodeType */ -public interface RemoteNodeType extends Remote { +@Deprecated public interface RemoteNodeType extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java index 6f21d595143..d71be1686d7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} interface. * Used by the @@ -44,7 +46,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeTypeManager * @see org.apache.jackrabbit.rmi.server.ServerNodeTypeManager */ -public interface RemoteNodeTypeManager extends Remote { +@Deprecated public interface RemoteNodeTypeManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java index fcd36000053..04569f2bd26 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.observation.ObservationManager ObservationManager} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.ServerObservationManager ServerObservationManager} @@ -38,7 +40,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientObservationManager * @see org.apache.jackrabbit.rmi.server.ServerObservationManager */ -public interface RemoteObservationManager extends Remote { +@Deprecated public interface RemoteObservationManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java index b760627b8a5..cd41a5b35f4 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java @@ -22,6 +22,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Property Property} interface. * Used by the * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} @@ -49,7 +51,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientProperty * @see org.apache.jackrabbit.rmi.server.ServerProperty */ -public interface RemoteProperty extends RemoteItem { +@Deprecated public interface RemoteProperty extends RemoteItem { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java index 3219b156953..68ed5999b52 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java @@ -21,6 +21,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} @@ -43,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientPropertyDefinition * @see org.apache.jackrabbit.rmi.server.ServerPropertyDefinition */ -public interface RemotePropertyDefinition extends RemoteItemDefinition { +@Deprecated public interface RemotePropertyDefinition extends RemoteItemDefinition { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java index 0a9c37c6c0d..b0f6d997842 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java @@ -23,6 +23,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.query.Query Query} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQuery ServerQuery} * and {@link org.apache.jackrabbit.rmi.client.ClientQuery ClientQuery} @@ -34,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQuery * @see org.apache.jackrabbit.rmi.server.ServerQuery */ -public interface RemoteQuery extends Remote { +@Deprecated public interface RemoteQuery extends Remote { /** * @see javax.jcr.query.Query#execute() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java index da672ec3ed7..b3d65d3b79b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java @@ -23,6 +23,8 @@ import javax.jcr.query.Query; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.query.QueryManager QueryManager} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryManager ServerQueryManager} * and {@link org.apache.jackrabbit.rmi.client.ClientQueryManager ClientQueryManager} @@ -34,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQueryManager * @see org.apache.jackrabbit.rmi.server.ServerQueryManager */ -public interface RemoteQueryManager extends Remote { +@Deprecated public interface RemoteQueryManager extends Remote { /** * @see javax.jcr.query.QueryManager#createQuery diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java index 5fe8691c5e9..ee3754b03db 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryResult ServerQueryResult} * and {@link org.apache.jackrabbit.rmi.client.ClientQueryResult ClientQueryResult} @@ -33,7 +35,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQueryResult * @see org.apache.jackrabbit.rmi.server.ServerQueryResult */ -public interface RemoteQueryResult extends Remote { +@Deprecated public interface RemoteQueryResult extends Remote { /** * @see javax.jcr.query.QueryResult#getColumnNames() * diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java index 93b5ac6be20..01c4b3486e0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java @@ -24,6 +24,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Repository Repository} interface. * Used by the * {@link org.apache.jackrabbit.rmi.server.ServerRepository ServerRepository} @@ -43,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientRepository * @see org.apache.jackrabbit.rmi.server.ServerRepository */ -public interface RemoteRepository extends Remote { +@Deprecated public interface RemoteRepository extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java index 0aa8365d126..15784c5e749 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java @@ -23,6 +23,8 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.query.Row Row} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerRow ServerRow} * and {@link org.apache.jackrabbit.rmi.client.ClientRow ClientRow} @@ -34,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientRow * @see org.apache.jackrabbit.rmi.server.ServerRow */ -public interface RemoteRow extends Remote { +@Deprecated public interface RemoteRow extends Remote { /** * @see javax.jcr.query.Row#getValues() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java index 7edce7929ab..02cf10fc91c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java @@ -26,6 +26,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Session Session} interface. * Used by the * {@link org.apache.jackrabbit.rmi.server.ServerSession ServerSession} @@ -45,7 +47,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientSession * @see org.apache.jackrabbit.rmi.server.ServerSession */ -public interface RemoteSession extends Remote { +@Deprecated public interface RemoteSession extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java index 5598fa2c225..60ee0ff69c1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java @@ -22,6 +22,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.version.Version Version} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerVersion ServerVersion} * and {@link org.apache.jackrabbit.rmi.client.ClientVersion ClientVersion} @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientVersion * @see org.apache.jackrabbit.rmi.server.ServerVersion */ -public interface RemoteVersion extends RemoteNode { +@Deprecated public interface RemoteVersion extends RemoteNode { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java index 6bcc0ef58c9..87aa3f4a915 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java @@ -21,6 +21,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JC * {@link javax.jcr.version.VersionHistory VersionHistory} interface. Used by * the @@ -42,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientVersionHistory * @see org.apache.jackrabbit.rmi.server.ServerVersionHistory */ -public interface RemoteVersionHistory extends RemoteNode { +@Deprecated public interface RemoteVersionHistory extends RemoteNode { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java index 626be070ec7..7de25d7dbef 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java @@ -21,7 +21,7 @@ import javax.jcr.RepositoryException; -public interface RemoteVersionManager extends Remote { +@Deprecated public interface RemoteVersionManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java index 078b20680cf..e335e448bfa 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java @@ -23,6 +23,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.Workspace Workspace} interface. * Used by the * {@link org.apache.jackrabbit.rmi.server.ServerWorkspace ServerWorkspace} @@ -42,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientWorkspace * @see org.apache.jackrabbit.rmi.server.ServerWorkspace */ -public interface RemoteWorkspace extends Remote { +@Deprecated public interface RemoteWorkspace extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java index b6f425faa01..8bc7be4d95e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java @@ -23,10 +23,12 @@ import javax.transaction.xa.Xid; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the {@link org.apache.jackrabbit.api.XASession} * interface. */ -public interface RemoteXASession extends RemoteSession, Remote { +@Deprecated public interface RemoteXASession extends RemoteSession, Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java index 83bd3524208..df168328f0e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java @@ -22,11 +22,13 @@ import javax.transaction.xa.Xid; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Serializable {@link Xid}. * * @since Jackrabbit JCR-RMI 1.5 */ -public class SerializableXid implements Serializable, Xid { +@Deprecated public class SerializableXid implements Serializable, Xid { private final int formatId; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java index ae3695396c0..2f6b2423c39 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java @@ -22,6 +22,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal GroupPrincipal} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.principal.ServerGroup * ServerGroup} and @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup */ -public interface RemoteGroup extends RemotePrincipal { +@Deprecated public interface RemoteGroup extends RemotePrincipal { /** * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#isMember(java.security.Principal) @@ -52,4 +54,4 @@ public interface RemoteGroup extends RemotePrincipal { */ RemoteIterator members() throws RemoteException; -} \ No newline at end of file +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java index fb49911a9cd..2c9a382ed98 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java @@ -22,6 +22,8 @@ import java.rmi.RemoteException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link java.security.Principal Principal} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.principal.ServerPrincipal @@ -41,7 +43,7 @@ * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal */ -public interface RemotePrincipal extends Remote { +@Deprecated public interface RemotePrincipal extends Remote { /** * @see java.security.Principal#getName() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java index b02fb584060..f7270c84eaf 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java @@ -22,6 +22,8 @@ import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.security.AccessControlEntry * AccessControlEntry} interface. Used by the * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry @@ -42,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry */ -public interface RemoteAccessControlEntry extends Remote { +@Deprecated public interface RemoteAccessControlEntry extends Remote { /** * @see javax.jcr.security.AccessControlEntry#getPrincipal() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java index 12b15d4e553..a3eda6dbab6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java @@ -21,6 +21,8 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.security.AccessControlList * AccessControlList} interface. Used by the * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlList @@ -40,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList */ -public interface RemoteAccessControlList extends RemoteAccessControlPolicy { +@Deprecated public interface RemoteAccessControlList extends RemoteAccessControlPolicy { /** * @see javax.jcr.security.AccessControlList#getAccessControlEntries() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java index bca2539f496..65015f1f3b9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java @@ -23,6 +23,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.security.AccessControlManager * AccessControlManager} interface. Used by the * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager @@ -43,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager */ -public interface RemoteAccessControlManager extends Remote { +@Deprecated public interface RemoteAccessControlManager extends Remote { /** * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java index a775b5ac0f6..b3429844764 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java @@ -21,6 +21,8 @@ import java.rmi.Remote; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.security.AccessControlPolicy * AccessControlPolicy} interface. Used by the * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy @@ -41,6 +43,6 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy */ -public interface RemoteAccessControlPolicy extends Remote { +@Deprecated public interface RemoteAccessControlPolicy extends Remote { } diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java index 148aff1de02..b502c79589d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java @@ -20,6 +20,8 @@ import java.rmi.RemoteException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote version of the JCR {@link javax.jcr.security.Privilege Privilege} * interface. Used by the * {@link org.apache.jackrabbit.rmi.server.security.ServerPrivilege @@ -39,7 +41,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege */ -public interface RemotePrivilege extends Remote { +@Deprecated public interface RemotePrivilege extends Remote { /** * @see javax.jcr.security.Privilege#getAggregatePrivileges() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java index 1a8be8d8dd0..9fdcf7eb7da 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java @@ -23,6 +23,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteRepository; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Abstract base class for repository factories that make a remote repository * available locally. Subclasses need to implement the * {@link #getRemoteRepository()} method to actually retrieve the remote @@ -30,7 +32,7 @@ * * @since 1.4 */ -public abstract class AbstractRemoteRepositoryFactory +@Deprecated public abstract class AbstractRemoteRepositoryFactory implements RepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java index add03b1f880..ab6c459643c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java @@ -24,6 +24,8 @@ import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Proxy for a remote repository bound in JNDI. The configured repository is * looked up from JNDI lazily during each method call. Thus the JNDI entry * does not need to exist when this class is instantiated. The JNDI entry @@ -32,7 +34,7 @@ * * @since 1.4 */ -public class JNDIRemoteRepository extends ProxyRepository { +@Deprecated public class JNDIRemoteRepository extends ProxyRepository { /** * Creates a proxy for a remote repository in JNDI. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java index 5d00a582c03..d3a476fcbe8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java @@ -24,11 +24,13 @@ import org.apache.jackrabbit.rmi.remote.RemoteRepository; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory that looks up a remote repository from JNDI. * * @since 1.4 */ -public class JNDIRemoteRepositoryFactory +@Deprecated public class JNDIRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java index 36496d0ce3b..433ce5953bc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java @@ -26,13 +26,15 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Repository that proxies all method calls to another repository. * The other repository is accessed lazily using a * {@link RepositoryFactory repository factory}. * * @since 1.4 */ -public class ProxyRepository implements Repository { +@Deprecated public class ProxyRepository implements Repository { /** * The set of standard descriptor keys defined in the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java index d1c2d0b866e..bb3e29ca3cc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java @@ -20,6 +20,8 @@ import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Proxy for a remote repository bound in RMI. The configured repository is * looked up from RMI lazily during each method call. Thus the RMI entry * does not need to exist when this class is instantiated. The RMI entry @@ -28,7 +30,7 @@ * * @since 1.4 */ -public class RMIRemoteRepository extends ProxyRepository { +@Deprecated public class RMIRemoteRepository extends ProxyRepository { /** * Creates a proxy for the remote repository in the given RMI URL. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java index d462b8c8cda..87785b5f799 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java @@ -27,11 +27,13 @@ import org.apache.jackrabbit.rmi.remote.RemoteRepository; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory that looks up a remote repository from an RMI registry. * * @since 1.4 */ -public class RMIRemoteRepositoryFactory +@Deprecated public class RMIRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java index 92decd5c676..c7b86150d24 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java @@ -20,9 +20,11 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory interface for JCR content repositories. */ -interface RepositoryFactory { +@Deprecated interface RepositoryFactory { /** * Returns a content repository. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java index a4c1c85ac9f..fbe916edf41 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java @@ -40,7 +40,7 @@ import org.apache.jackrabbit.rmi.client.SafeClientRepository; import org.apache.jackrabbit.rmi.remote.RemoteRepository; -public class RmiRepositoryFactory implements RepositoryFactory { +@Deprecated public class RmiRepositoryFactory implements RepositoryFactory { private static final String REPOSITORY_URI = "org.apache.jackrabbit.repository.uri"; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java index 0e8fce5668b..23c19816358 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java @@ -23,6 +23,8 @@ import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Proxy for a remote repository accessed via a URL. The configured URL is * dereferenced lazily during each method call. Thus the resource pointed to * by the URL does not need to exist when this class is instantiated. The @@ -31,7 +33,7 @@ * * @since 1.4 */ -public class URLRemoteRepository extends ProxyRepository { +@Deprecated public class URLRemoteRepository extends ProxyRepository { /** * Creates a proxy for the remote repository at the given URL. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java index 633a98d1223..e41b3c83aa8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java @@ -26,11 +26,13 @@ import org.apache.jackrabbit.rmi.remote.RemoteRepository; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory that looks up a remote repository from a given URL. * * @since 1.4 */ -public class URLRemoteRepositoryFactory +@Deprecated public class URLRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java index 58e6c940ff8..155a70fab54 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java @@ -85,6 +85,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Factory interface for creating remote adapters for local resources. * This interface defines how the local JCR interfaces are adapted to * remote JCR-RMI references. The adaption mechanism can be @@ -100,7 +102,7 @@ * @see org.apache.jackrabbit.rmi.server.ServerAdapterFactory * @see org.apache.jackrabbit.rmi.server.ServerObject */ -public interface RemoteAdapterFactory { +@Deprecated public interface RemoteAdapterFactory { /** * Returns the port number to which the server objects created by diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java index 2551d6971d5..7cbf4f4b03b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java @@ -106,6 +106,8 @@ import org.apache.jackrabbit.rmi.server.security.ServerPrivilege; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Default implementation of the {@link RemoteAdapterFactory * RemoteAdapterFactory} interface. This factory uses the server adapters * defined in this package as the default adapter implementations. Subclasses @@ -115,7 +117,7 @@ * The bufferSize property can be used to configure the size of the * buffer used by iterators to speed up iterator traversal over the network. */ -public class ServerAdapterFactory implements RemoteAdapterFactory { +@Deprecated public class ServerAdapterFactory implements RemoteAdapterFactory { /** The default iterator buffer size. */ private static final int DEFAULT_BUFFER_SIZE = 100; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java index c242f62765d..470aaf87fcd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The ServerEventCollection class implements the * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection}event to * actually sent the server-side event to the client. @@ -34,7 +36,7 @@ * provided such that the receiving listener may be identified on the * client-side. */ -public class ServerEventCollection extends ServerObject implements +@Deprecated public class ServerEventCollection extends ServerObject implements RemoteEventCollection { /** The unique identifier of the receiving listener */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java index 2ced6414a1a..6ff506b3b85 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.Item Item} interface. * This class makes a local item available as an RMI service using * the {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} @@ -36,7 +38,7 @@ * @see javax.jcr.Item * @see org.apache.jackrabbit.rmi.remote.RemoteItem */ -public class ServerItem extends ServerObject implements RemoteItem { +@Deprecated public class ServerItem extends ServerObject implements RemoteItem { /** The adapted local item. */ private Item item; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java index 486fc925d83..dc73148956a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDefinition} * interface. This class makes a local item definition available as an * RMI service using the @@ -38,7 +40,7 @@ * @see javax.jcr.nodetype.ItemDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition */ -public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { +@Deprecated public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { /** The adapted local item definition. */ private ItemDefinition def; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java index af268afec43..4f80a39cc20 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.lock.Lock Lock} interface. * This class makes a local lock available as an RMI service using * the {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} @@ -33,7 +35,7 @@ * @see javax.jcr.lock.Lock * @see org.apache.jackrabbit.rmi.remote.RemoteLock */ -public class ServerLock extends ServerObject implements RemoteLock { +@Deprecated public class ServerLock extends ServerObject implements RemoteLock { /** The adapted local lock. */ private Lock lock; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java index 1708b10527f..4c76d011f86 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java @@ -24,7 +24,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteLock; import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -public class ServerLockManager extends ServerObject +@Deprecated public class ServerLockManager extends ServerObject implements RemoteLockManager { /** The adapted local lock manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java index 8ddea6ca2b9..b9c5696c92a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java @@ -24,6 +24,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. * This class makes a local namespace registry available as an RMI service @@ -34,7 +36,7 @@ * @see javax.jcr.NamespaceRegistry * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry */ -public class ServerNamespaceRegistry extends ServerObject implements +@Deprecated public class ServerNamespaceRegistry extends ServerObject implements RemoteNamespaceRegistry { /** The adapted local namespace registry. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java index b611d4278b7..ef7cd0d3684 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java @@ -38,6 +38,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.Node Node} interface. * This class makes a local node available as an RMI service using * the {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} @@ -46,7 +48,7 @@ * @see javax.jcr.Node * @see org.apache.jackrabbit.rmi.remote.RemoteNode */ -public class ServerNode extends ServerItem implements RemoteNode { +@Deprecated public class ServerNode extends ServerItem implements RemoteNode { /** The adapted local node. */ private Node node; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java index eab72362eac..f767d0c3df8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} * interface. This class makes a local node definition available as an * RMI service using the @@ -34,7 +36,7 @@ * @see javax.jcr.nodetype.NodeDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition */ -public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { +@Deprecated public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { /** The adapted node definition. */ private NodeDefinition def; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java index 918d06f32a2..eb8f5494ebc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java @@ -29,6 +29,8 @@ import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeType NodeType} * interface. This class makes a local node type available as an RMI service * using the @@ -38,7 +40,7 @@ * @see javax.jcr.nodetype.NodeType * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType */ -public class ServerNodeType extends ServerObject implements RemoteNodeType { +@Deprecated public class ServerNodeType extends ServerObject implements RemoteNodeType { /** The adapted local node type. */ private NodeType type; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java index bb3fba80908..e15050ae6f7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java @@ -26,6 +26,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} * interface. This class makes a local node type manager available as an @@ -36,7 +38,7 @@ * @see javax.jcr.nodetype.NodeTypeManager * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager */ -public class ServerNodeTypeManager extends ServerObject +@Deprecated public class ServerNodeTypeManager extends ServerObject implements RemoteNodeTypeManager { /** The adapted local node type manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java index e5be43c2498..e5436144c7e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java @@ -56,11 +56,13 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Base class for remote adapters. The purpose of this class is to * centralize the handling of the RemoteAdapterFactory instance used * to instantiate new server adapters. */ -public class ServerObject extends UnicastRemoteObject { +@Deprecated public class ServerObject extends UnicastRemoteObject { /** Factory for creating server adapters. */ private RemoteAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java index a382e03f400..16e4fa6de0f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java @@ -29,6 +29,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR * {@link javax.jcr.observation.ObservationManager ObservationManager} interface. * This class makes a local item available as an RMI service using @@ -44,7 +46,7 @@ * @see javax.jcr.observation.ObservationManager * @see org.apache.jackrabbit.rmi.remote.RemoteObservationManager */ -public class ServerObservationManager extends ServerObject implements +@Deprecated public class ServerObservationManager extends ServerObject implements RemoteObservationManager { /** The adapted local observation manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java index f4806ed6a31..0d0eb95b3fd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.Property Property} * interface. This class makes a local property available as an RMI service * using the @@ -36,7 +38,7 @@ * @see javax.jcr.Property * @see org.apache.jackrabbit.rmi.remote.RemoteProperty */ -public class ServerProperty extends ServerItem implements RemoteProperty { +@Deprecated public class ServerProperty extends ServerItem implements RemoteProperty { /** The adapted local property. */ private Property property; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java index 42655a2d366..c552810ab51 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR * {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} interface. This * class makes a local property definition available as an RMI service @@ -35,7 +37,7 @@ * @see javax.jcr.nodetype.PropertyDefinition * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition */ -public class ServerPropertyDefinition extends ServerItemDefinition +@Deprecated public class ServerPropertyDefinition extends ServerItemDefinition implements RemotePropertyDefinition { /** The adapted local property definition. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java index 8aeec951d89..732140acdfc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.query.Query Query} interface. * This class makes a local session available as an RMI service using the * {@link org.apache.jackrabbit.rmi.remote.RemoteQuery RemoteQuery} @@ -35,7 +37,7 @@ * @see javax.jcr.query.Query * @see org.apache.jackrabbit.rmi.remote.RemoteQuery */ -public class ServerQuery extends ServerObject implements RemoteQuery { +@Deprecated public class ServerQuery extends ServerObject implements RemoteQuery { /** The adapted local query manager. */ private Query query; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java index c70904ee21e..36a2602ac2c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java @@ -30,6 +30,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.query.QueryManager QueryManager} * interface. This class makes a local query manager available as an RMI * service using the @@ -39,7 +41,7 @@ * @see javax.jcr.query.QueryManager * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager */ -public class ServerQueryManager extends ServerObject +@Deprecated public class ServerQueryManager extends ServerObject implements RemoteQueryManager { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java index 36535e9867c..a1d04af019c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. * This class makes a local session available as an RMI service using the * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryResult RemoteQueryResult} @@ -33,7 +35,7 @@ * @see javax.jcr.query.QueryResult * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult */ -public class ServerQueryResult extends ServerObject +@Deprecated public class ServerQueryResult extends ServerObject implements RemoteQueryResult { /** The adapted local query result. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java index 75d764376db..c9d83b6270a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java @@ -29,6 +29,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.Repository Repository} * interface. This class makes a local repository available as an RMI service * using the @@ -38,7 +40,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -public class ServerRepository extends ServerObject implements RemoteRepository { +@Deprecated public class ServerRepository extends ServerObject implements RemoteRepository { /** The adapted local repository. */ private Repository repository; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java index f14283f6891..387df0fe7b2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.value.SerialValueFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.query.Row Row} interface. * This class makes a local session available as an RMI service using the * {@link org.apache.jackrabbit.rmi.remote.RemoteRow RemoteRow} @@ -35,7 +37,7 @@ * @see javax.jcr.query.Row * @see org.apache.jackrabbit.rmi.remote.RemoteRow */ -public class ServerRow extends ServerObject implements RemoteRow { +@Deprecated public class ServerRow extends ServerObject implements RemoteRow { /** The adapted local row. */ private Row row; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java index 0ec4e164f89..14a3e865e8c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java @@ -34,6 +34,8 @@ import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.Session Session} interface. * This class makes a local session available as an RMI service using the * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} @@ -42,7 +44,7 @@ * @see javax.jcr.Session * @see org.apache.jackrabbit.rmi.remote.RemoteSession */ -public class ServerSession extends ServerObject implements RemoteSession { +@Deprecated public class ServerSession extends ServerObject implements RemoteSession { /** The adapted local session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java index 581a9d0359c..f11ea0ce852 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.version.Version Version} interface. * This class makes a local version available as an RMI service using * the {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} @@ -35,7 +37,7 @@ * @see javax.jcr.version.Version * @see org.apache.jackrabbit.rmi.remote.RemoteVersion */ -public class ServerVersion extends ServerNode implements RemoteVersion { +@Deprecated public class ServerVersion extends ServerNode implements RemoteVersion { /** The adapted local version. */ private Version version; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java index 466a496fb1d..95a37e50c50 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java @@ -27,6 +27,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link javax.jcr.version.VersionHistory VersionHistory} * interface. This class makes a local version history available as an RMI * service using the @@ -36,7 +38,7 @@ * @see javax.jcr.version.VersionHistory * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory */ -public class ServerVersionHistory extends ServerNode +@Deprecated public class ServerVersionHistory extends ServerNode implements RemoteVersionHistory { /** The adapted local version history. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java index d8766af3a35..96c5a4a73ee 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java @@ -30,7 +30,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -public class ServerVersionManager extends ServerObject +@Deprecated public class ServerVersionManager extends ServerObject implements RemoteVersionManager { private final Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java index 664adbaf5db..9efd288eb00 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java @@ -38,6 +38,8 @@ import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link Workspace Workspace} interface. * This class makes a local workspace available as an RMI service using the * {@link RemoteWorkspace RemoteWorkspace} interface. @@ -45,7 +47,7 @@ * @see Workspace * @see RemoteWorkspace */ -public class ServerWorkspace extends ServerObject implements RemoteWorkspace { +@Deprecated public class ServerWorkspace extends ServerObject implements RemoteWorkspace { /** The adapted local workspace. */ private Workspace workspace; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java index 8d792973ea9..9141a339013 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java @@ -27,11 +27,13 @@ import org.apache.jackrabbit.rmi.remote.SerializableXid; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for XA-enabled sessions. * * @since 1.4 */ -public class ServerXASession extends ServerSession implements RemoteXASession { +@Deprecated public class ServerXASession extends ServerSession implements RemoteXASession { /** * The adapted local XA resource diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java index 775d1059377..4c8ca406f51 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java @@ -28,11 +28,13 @@ /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Remote adapter for the JCR {@link RangeIterator} interface. This * class makes a local iterator available as an RMI service using the * {@link RemoteIterator} interface. */ -public abstract class ServerIterator extends ServerObject +@Deprecated public abstract class ServerIterator extends ServerObject implements RemoteIterator { /** The adapted local iterator. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java index 83dd0e39b99..5b56a121250 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating nodes. */ -public class ServerNodeIterator extends ServerIterator { +@Deprecated public class ServerNodeIterator extends ServerIterator { /** * Creates a ServerNodeIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java index dd153d7a732..b66348c7477 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating node types. */ -public class ServerNodeTypeIterator extends ServerIterator { +@Deprecated public class ServerNodeTypeIterator extends ServerIterator { /** * Creates a ServerNodeTypeIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java index 8709bd90a86..9d55d8d13a9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating properties. */ -public class ServerPropertyIterator extends ServerIterator { +@Deprecated public class ServerPropertyIterator extends ServerIterator { /** * Creates a ServerPropertyIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java index 5b77ef43bbf..6122a0785eb 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating rows. */ -public class ServerRowIterator extends ServerIterator { +@Deprecated public class ServerRowIterator extends ServerIterator { /** * Creates a ServerRowIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java index 39675d595c0..96a5e8d6abc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java @@ -24,9 +24,11 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating versions. */ -public class ServerVersionIterator extends ServerIterator { +@Deprecated public class ServerVersionIterator extends ServerIterator { /** * Creates a ServerVersionIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java index ec9a31c3c90..3c37a6722c6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java @@ -31,9 +31,11 @@ import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * MBean that registers a JCR RMI server through JNDI. */ -public class JCRServer implements JCRServerMBean { +@Deprecated public class JCRServer implements JCRServerMBean { /** * local repository address diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java index 8884577e921..6af2a7333ea 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java @@ -18,7 +18,7 @@ import javax.jcr.RepositoryException; -public interface JCRServerMBean { +@Deprecated public interface JCRServerMBean { void start() throws Exception; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java index 2c140dcadf5..c96916c3d63 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java @@ -29,7 +29,7 @@ import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -public class ServerGroup extends ServerPrincipal implements RemoteGroup { +@Deprecated public class ServerGroup extends ServerPrincipal implements RemoteGroup { public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory) throws RemoteException { diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java index 378742f0020..bdab3c96131 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -public class ServerPrincipal extends ServerObject implements RemotePrincipal { +@Deprecated public class ServerPrincipal extends ServerObject implements RemotePrincipal { private final Principal principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java index b3114a9acc8..97cfdb2a79a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; -public class ServerPrincipalIterator extends ServerIterator { +@Deprecated public class ServerPrincipalIterator extends ServerIterator { public ServerPrincipalIterator(Iterator iterator, RemoteAdapterFactory factory, int maxBufferSize) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java index f19470aa818..ec6b550e88c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java @@ -26,7 +26,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -public class ServerAccessControlEntry extends ServerObject implements +@Deprecated public class ServerAccessControlEntry extends ServerObject implements RemoteAccessControlEntry { private final AccessControlEntry ace; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java index 5b6b237315c..202114f4140 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java @@ -31,7 +31,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; -public class ServerAccessControlList extends ServerAccessControlPolicy +@Deprecated public class ServerAccessControlList extends ServerAccessControlPolicy implements RemoteAccessControlList { public ServerAccessControlList(final AccessControlList acl, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java index 45ded92f5e1..b7c31f6dccc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java @@ -31,7 +31,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -public class ServerAccessControlManager extends ServerObject implements +@Deprecated public class ServerAccessControlManager extends ServerObject implements RemoteAccessControlManager { private final AccessControlManager acm; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java index 33703d24354..1e987831dfd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java @@ -24,7 +24,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -public class ServerAccessControlPolicy extends ServerObject implements +@Deprecated public class ServerAccessControlPolicy extends ServerObject implements RemoteAccessControlPolicy { private final AccessControlPolicy acp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java index 507866d9d08..e9c44c6abac 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java @@ -25,9 +25,11 @@ import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * A ServerIterator for iterating rows. */ -public class ServerAccessControlPolicyIterator extends ServerIterator { +@Deprecated public class ServerAccessControlPolicyIterator extends ServerIterator { /** * Creates a ServerRowIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java index 1c01436ff3b..ee8bf9dcd79 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -public class ServerPrivilege extends ServerObject implements RemotePrivilege { +@Deprecated public class ServerPrivilege extends ServerObject implements RemotePrivilege { private final Privilege privilege; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java index 786528e0ed3..2689ee929f2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java @@ -33,6 +33,8 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Abstract base class for {@link Value} implementations. This class * implements all {@link Value} methods except getString and * getType. @@ -48,7 +50,7 @@ * The {@link #getStream()} method uses {@link #getBinary()} to implement * the deprecated JCR 1.0 behaviour. This method must not be overridden. */ -abstract class AbstractValue implements Value, Serializable { +@Deprecated abstract class AbstractValue implements Value, Serializable { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java index d4b224a25c3..5f2806d9afc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java @@ -31,9 +31,11 @@ import javax.jcr.Value; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Binary value. */ -class BinaryValue implements Value, Serializable { +@Deprecated class BinaryValue implements Value, Serializable { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java index 1fa3926869f..961bcf21426 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java @@ -19,9 +19,11 @@ import javax.jcr.PropertyType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Boolean value. */ -class BooleanValue extends AbstractValue { +@Deprecated class BooleanValue extends AbstractValue { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java index 2e748375599..ad6e3af9db1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java @@ -26,9 +26,11 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Date value. */ -class DateValue extends AbstractValue { +@Deprecated class DateValue extends AbstractValue { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java index 1f2f8e3ed26..e4c2ba5d62d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java @@ -23,9 +23,11 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Decimal value. */ -class DecimalValue extends AbstractValue { +@Deprecated class DecimalValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java index ae151d13f1e..9a78414a8b7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java @@ -23,9 +23,11 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Double value. */ -class DoubleValue extends AbstractValue { +@Deprecated class DoubleValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java index 75ac27e27fc..193c7881f0c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java @@ -22,9 +22,11 @@ import javax.jcr.PropertyType; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Long value. */ -class LongValue extends AbstractValue { +@Deprecated class LongValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java index 90c5e831f8a..759b0a06323 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java @@ -21,12 +21,14 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The NameValue class implements the committed value state for * Name values as a part of the State design pattern (Gof) used by this package. * * @since 0.16.4.1 */ -public class NameValue extends AbstractValue { +@Deprecated public class NameValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java index 0657637de34..8435b27d4bf 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java @@ -21,12 +21,14 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The PathValue class implements the committed value state for * Path values as a part of the State design pattern (Gof) used by this package. * * @since 0.16.4.1 */ -public class PathValue extends AbstractValue { +@Deprecated public class PathValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java index 65cf752b5b8..363d11e1a8f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java @@ -21,13 +21,15 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The ReferenceValue class implements the committed value state * for Reference values as a part of the State design pattern (Gof) used by * this package. * * @since 0.16.4.1 */ -public class ReferenceValue extends AbstractValue { +@Deprecated public class ReferenceValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java index 0a548447a77..e5c057759d8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java @@ -33,6 +33,8 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The SerialValueFactory class is used in the RMI infrastructure * to create serializable Value instances on the client side. *

    @@ -45,7 +47,7 @@ * methods of the ValueFactory interface are declared final to * guard against breaking the rules. */ -public class SerialValueFactory implements ValueFactory { +@Deprecated public class SerialValueFactory implements ValueFactory { /** The singleton value factory instance */ private static final SerialValueFactory INSTANCE = new SerialValueFactory(); diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java index 03ffb6e19f7..ac696fb9404 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java @@ -33,9 +33,11 @@ import javax.jcr.RepositoryException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Serializable binary. */ -class SerializableBinary implements Binary, Serializable { +@Deprecated class SerializableBinary implements Binary, Serializable { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java index d4c45e9e6f9..f685ca048b3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java @@ -25,9 +25,11 @@ import javax.jcr.ValueFormatException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * String value. */ -class StringValue extends AbstractValue { +@Deprecated class StringValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java index f2f59d3e91a..40e5b1fe859 100644 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java @@ -22,9 +22,11 @@ import org.apache.jackrabbit.test.JCRTestSuite; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * JCR API conformance test suite. */ -public class ConformanceTest extends TestCase { +@Deprecated public class ConformanceTest extends TestCase { public static TestSuite suite() { TestSuite suite = new TestSuite(); diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java index 055d4b881c3..de19175e7ca 100644 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java @@ -39,7 +39,7 @@ import org.apache.jackrabbit.rmi.server.principal.ServerGroup; import org.apache.jackrabbit.test.RepositoryStubException; -public class RepositoryStubImpl extends JackrabbitRepositoryStub { +@Deprecated public class RepositoryStubImpl extends JackrabbitRepositoryStub { /** * A known principal used for access control tests. From 876bd58385bc498ca78b64f4234a597fba697014 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 4 Oct 2023 10:58:59 +0000 Subject: [PATCH 081/271] JCR-4973: Deprecate RMI support git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912730 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-jcr-rmi/README.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jackrabbit-jcr-rmi/README.txt b/jackrabbit-jcr-rmi/README.txt index 837df5bb00d..5cd4cf2f73e 100644 --- a/jackrabbit-jcr-rmi/README.txt +++ b/jackrabbit-jcr-rmi/README.txt @@ -2,11 +2,5 @@ Apache Jackrabbit JCR-RMI =================================================== -JCR-RMI is a transparent Remote Method Invocation (RMI) layer for JCR. -The layer makes it possible to remotely access JCR content repositories. - -Note that due to changes in the way the RMI client is built, versions since -2.16 will not be able to connect to older versions of the server. If -compatibility with older servers is needed, just use the client from a -recent 2.14 release. +RMI support is deprecated and will be removed in a future version of Jackrabbit; see https://issues.apache.org/jira/browse/JCR-4972 for more information. From dd36263d6d6b48fbe024ae726782fc2125f43408 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 4 Oct 2023 11:03:42 +0000 Subject: [PATCH 082/271] JCR-4978: Release Jackrabbit 2.21.20 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912731 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 5afae71f6d1..802ad58c97f 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,13 +1,13 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.19 +Release Notes -- Apache Jackrabbit -- Version 2.21.20 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.19, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.20, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.19 is an unstable release cut directly from +Apache Jackrabbit 2.21.20 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. @@ -16,23 +16,23 @@ NOTE: this release disables RMI access in the standalone and webapp projects. See https://issues.apache.org/jira/browse/JCR-4960 for more information. -Changes in Jackrabbit 2.21.19 +Changes in Jackrabbit 2.21.20 ----------------------------- Bug - [JCR-4957] - jackrabbit-standalone: 2.21.18 breaks binary compatibility + [JCR-4940] - jackrabbit-jcr2spi is incompatible with Java 21 Task - [JCR-4955] - set baseline comparisonVersion to latest stable (2.20.11) - [JCR-4959] - update Apache parent pom to version 30 - [JCR-4960] - Disable RMI by default - [JCR-4962] - Update h2db dependency to 2.2.220 - [JCR-4963] - vfs-ext: update hadoop-hdfs-client dependency to 3.3.6 - [JCR-4964] - update kotlin-stdlib dependency to 1.9.0 - [JCR-4965] - webapp: remove Guava test dependency - [JCR-4966] - update aws java sdk version to 1.12.523 + [JCR-4951] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.16 + [JCR-4969] - set baseline comparisonVersion to latest stable (2.20.12) + [JCR-4970] - it-osgi: fix package name + [JCR-4971] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.17 + [JCR-4973] - Deprecate RMI support + [JCR-4974] - Update easymock dependency to 5.2.0 + [JCR-4975] - update aws java sdk version to 1.12.560 + [JCR-4976] - Update tomcat dependency to 9.0.80 For more detailed information about all the changes in this and other From 1ea4300dde378fed5a153fe01791fd6d1048a832 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Oct 2023 15:49:52 +0000 Subject: [PATCH 083/271] test commit git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912752 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 802ad58c97f..af282f702b7 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -81,6 +81,3 @@ Trademarks Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache Jackrabbit project logo are trademarks of The Apache Software Foundation. - - - From 6b6dcd50c1418a0a710124a34b583abc8761f913 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Oct 2023 16:33:28 +0000 Subject: [PATCH 084/271] test commit git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912753 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index af282f702b7..3059b256621 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -81,3 +81,4 @@ Trademarks Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache Jackrabbit project logo are trademarks of The Apache Software Foundation. + From a474302d9c02cd73fd81f50ec4974f0c1cb65574 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Oct 2023 16:33:50 +0000 Subject: [PATCH 085/271] test commit git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912754 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 3059b256621..af282f702b7 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -81,4 +81,3 @@ Trademarks Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache Jackrabbit project logo are trademarks of The Apache Software Foundation. - From 82a2c04965b360ef83ab1a83b0fba05ae6e4e07e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Oct 2023 16:41:28 +0000 Subject: [PATCH 086/271] [maven-release-plugin] prepare release jackrabbit-2.21.20 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912755 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++++++++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 34 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index b49be211b4a..3e3e21c1cda 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 2572873a669..bd9e3fd99b2 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 0b3ec8a8c5e..fd80e8e0fe3 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index fec603c8d41..0ee4edf8eb7 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index dceb1b579d6..ad4023be3ea 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 85eeaa8aa8d..102d8bb179d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index f064bc67c3d..e17246bf00a 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index e501b4de232..e7b4028c2cc 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 0478d44f6c1..8d552d75ee3 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 6229f59468c..62bcee3349e 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 310a0854fb8..76fd950b5bf 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index def2994b295..de2005e7994 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 251f95ba4f1..7ff5a991b81 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 07224746e0b..75f92d7aed3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.20-SNAPSHOT + 2.21.20 pom @@ -63,7 +63,7 @@ 0.0 - 1691467816 + 1696522984 http://jackrabbit.apache.org/ @@ -724,4 +724,10 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-30/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index f9d5ab1b5fd..e121855b88f 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 1d8088540a3..b5f460d4085 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index d336f30d646..03680030d5c 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 4344d07440e..4bf80f16e84 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 21fe84f4167..a25b70b8970 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 7c9e8313bc4..f71befe85fe 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 9c7dfdbfabe..2928eb98fa9 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index ff9b7710920..d66c344a405 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index c385376a237..434c844ec17 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e7a320bc918..1434b994123 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20-SNAPSHOT + 2.21.20 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.20 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.20 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.20 From 595a72fa132f1f761434178e5de966fd4ed87824 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Oct 2023 16:41:34 +0000 Subject: [PATCH 087/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912757 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++-------- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 28 insertions(+), 34 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 3e3e21c1cda..18f7a1a423c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index bd9e3fd99b2..10ecf93497e 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index fd80e8e0fe3..ea5b16703a1 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 0ee4edf8eb7..f4f265f1532 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index ad4023be3ea..390e8778c5b 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 102d8bb179d..2f3ae2d5853 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index e17246bf00a..9029d322461 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index e7b4028c2cc..7a60012324e 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 8d552d75ee3..6a5c7ffd1e7 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 62bcee3349e..8ca5f160335 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 76fd950b5bf..8a5e6b70a03 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index de2005e7994..2830ac6e299 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 7ff5a991b81..ee838832e1b 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 75f92d7aed3..4f3582ebae6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.20 + 2.21.21-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1696522984 + 1696524090 http://jackrabbit.apache.org/ @@ -724,10 +724,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-30/jackrabbit-parent/tags/jackrabbit-2.21.20/jackrabbit-parent - diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index e121855b88f..737c0322557 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index b5f460d4085..21e8f59ec65 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 03680030d5c..cb0432c1bde 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 4bf80f16e84..5f2c4397a2a 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index a25b70b8970..1fa0863e445 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index f71befe85fe..a5997a3b4be 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 2928eb98fa9..10f42b41adf 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index d66c344a405..433514991b5 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 434c844ec17..4ac45b3e25f 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 1434b994123..cdcae3025a9 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.20 + 2.21.21-SNAPSHOT jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.20 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.20 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.20 + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk + http://svn.apache.org/viewvc/jackrabbit/trunk From 27e018fcb4496e690783259fac768334a5ab4c7f Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Fri, 13 Oct 2023 08:29:59 +0000 Subject: [PATCH 088/271] JCR-4956: Replace deprecated Surefire fork options Removed, because they matched the default values anyway. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1912931 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-jcr-client/pom.xml | 1 - jackrabbit-jcr-rmi/pom.xml | 1 - jackrabbit-jcr-server/pom.xml | 1 - jackrabbit-jcr2dav/pom.xml | 1 - jackrabbit-spi2dav/pom.xml | 1 - jackrabbit-spi2jcr/pom.xml | 1 - jackrabbit-webdav/pom.xml | 1 - 7 files changed, 7 deletions(-) diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 2f3ae2d5853..74dfb5c3356 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -69,7 +69,6 @@ **/*Test.java target - once ${test.opts} diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 7a60012324e..fe1bc0c614a 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -117,7 +117,6 @@ maven-surefire-plugin ${test.opts} - true jackrabbit.test.integration diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 6a5c7ffd1e7..05484a70727 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -42,7 +42,6 @@ **/*Test.java - once ${test.opts} diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 2830ac6e299..734ac35ce3e 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -45,7 +45,6 @@ maven-surefire-plugin ${test.opts} - true jackrabbit.test.integration diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index cb0432c1bde..a47072840bb 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -45,7 +45,6 @@ false - once ${test.opts} diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 5f2c4397a2a..caa5f81e980 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -40,7 +40,6 @@ **/TestAll.java - once ${test.opts} diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 4ac45b3e25f..7ffc68d547e 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -47,7 +47,6 @@ **/*TestAll.java - once ${test.opts} From 9f6fc382c9136c2907e0c7e87d3e69452ed06b16 Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Thu, 19 Oct 2023 11:04:58 +0000 Subject: [PATCH 089/271] JCR-4571: WebdavRequestImpl stores If-Header values using either absolute URIs or absolute paths, but both may be used for lookup Now lookup uses both path and uri. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913113 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-jcr-server/pom.xml | 2 -- .../jackrabbit/webdav/header/IfHeader.java | 25 ++++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 05484a70727..09badb89974 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -175,8 +175,6 @@ org.apache.jackrabbit.webdav.server.RFC4918IfHeaderTest#testPutIfEtag - - org.apache.jackrabbit.webdav.server.RFC4918IfHeaderTest#testPutIfLockToken diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java index 63d272865b6..eca2927296d 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java @@ -103,6 +103,8 @@ public class IfHeader implements Header { */ private List allNotTokens = new ArrayList(); + private String uriPrefix; + /** * Create a Untagged IfHeader if the given lock tokens. * @@ -127,6 +129,9 @@ public IfHeader(String[] tokens) { * @param req The request object */ public IfHeader(HttpServletRequest req) { + String host = req.getHeader("Host"); + String scheme = req.getScheme(); + uriPrefix = scheme + "://" + host + req.getContextPath(); headerValue = req.getHeader(DavConstants.HEADER_IF); ifHeader = parse(); } @@ -858,7 +863,7 @@ public boolean matches(String resource, String token, String etag) { Tagged = { "<" Word ">" "(" IfList ")" } . * */ - private static class IfHeaderMap extends HashMap implements IfHeaderInterface { + private class IfHeaderMap extends HashMap implements IfHeaderInterface { /** * Matches the token and etag for the given resource. If the resource is @@ -876,10 +881,22 @@ private static class IfHeaderMap extends HashMap implement public boolean matches(String resource, String token, String etag) { log.debug("matches: Trying to match resource="+resource+", token="+token+","+etag); - IfHeaderList list = get(resource); + String uri; + String path; + if (resource.startsWith("/")) { + path = resource; + uri = IfHeader.this.uriPrefix + resource; + } else { + path = resource.substring(IfHeader.this.uriPrefix.length()); + uri = resource; + } + IfHeaderList list = get(path); + if (list == null) { + list = get(uri); + } if (list == null) { - log.debug("matches: No entry for tag "+resource+", assuming match"); - return true; + log.debug("matches: No entry for tag "+resource+", assuming mismatch"); + return false; } else { return list.matches(resource, token, etag); } From 99de2bde631a2a09e1bd7700fe263a201bdd01a2 Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Fri, 20 Oct 2023 12:27:13 +0000 Subject: [PATCH 090/271] CR-4570: WebdavRequestImpl does not check ETags if there is no resource or no exclusive write lock Fixed the ETag matching algorithm. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913142 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-jcr-server/pom.xml | 7 ---- .../webdav/simple/SimpleWebdavServlet.java | 2 +- .../jackrabbit/webdav/WebdavRequestImpl.java | 34 +++++++++++-------- .../jackrabbit/webdav/header/IfHeader.java | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 09badb89974..9ce6c3d7673 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -170,13 +170,6 @@ derby.stream.error.file target/derby.log - - known.issues - - - org.apache.jackrabbit.webdav.server.RFC4918IfHeaderTest#testPutIfEtag - - diff --git a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/SimpleWebdavServlet.java b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/SimpleWebdavServlet.java index f975082d852..a41eb129279 100644 --- a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/SimpleWebdavServlet.java +++ b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/SimpleWebdavServlet.java @@ -214,7 +214,7 @@ protected boolean isPreconditionValid(WebdavRequest request, } } - return !resource.exists() || request.matchesIfHeader(resource); + return request.matchesIfHeader(resource); } /** diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java index 38d8460a4da..39aba4696a3 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java @@ -61,6 +61,7 @@ import org.apache.jackrabbit.webdav.header.OverwriteHeader; import org.apache.jackrabbit.webdav.header.PollTimeoutHeader; import org.apache.jackrabbit.webdav.header.TimeoutHeader; +import org.apache.jackrabbit.webdav.lock.ActiveLock; import org.apache.jackrabbit.webdav.lock.LockInfo; import org.apache.jackrabbit.webdav.lock.Scope; import org.apache.jackrabbit.webdav.lock.Type; @@ -619,19 +620,22 @@ public LockInfo getLockInfo() throws DavException { * @see org.apache.jackrabbit.webdav.lock.ActiveLock#getToken() */ public boolean matchesIfHeader(DavResource resource) { - // no ifheader, no resource or no write lock on resource + // no ifheader // >> preconditions ok so far - if (!ifHeader.hasValue() || resource == null || !resource.hasLock(Type.WRITE, Scope.EXCLUSIVE)) { + if (!ifHeader.hasValue() || resource == null) { return true; } - boolean isMatching = false; - String lockToken = resource.getLock(Type.WRITE, Scope.EXCLUSIVE).getToken(); - if (lockToken != null) { - isMatching = matchesIfHeader(resource.getHref(), lockToken, getStrongETag(resource)); - } // else: lockToken is null >> the if-header will not match. - - return isMatching; + ActiveLock[] locks = resource.getLocks(); + if (!resource.exists() || locks.length == 0) { + return matchesIfHeader(resource.getHref(), null, getStrongETag(resource)); + } + for (ActiveLock lock : locks) { + if (matchesIfHeader(resource.getHref(), lock.getToken(), getStrongETag(resource))) { + return true; + } + } + return false; } /** @@ -650,11 +654,13 @@ public boolean matchesIfHeader(String href, String token, String eTag) { * @return strong etag or empty string. */ private String getStrongETag(DavResource resource) { - DavProperty prop = resource.getProperty(DavPropertyName.GETETAG); - if (prop != null && prop.getValue() != null) { - String etag = prop.getValue().toString(); - if (isStrongETag(etag)) { - return etag; + if (resource.exists()) { + DavProperty prop = resource.getProperty(DavPropertyName.GETETAG); + if (prop != null && prop.getValue() != null) { + String etag = prop.getValue().toString(); + if (isStrongETag(etag)) { + return etag; + } } } // no strong etag available diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java index eca2927296d..6adac78482b 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java @@ -662,7 +662,7 @@ private static class IfListEntryToken extends IfListEntry { */ @Override public boolean match(String token, String etag) { - return super.match(token); + return token == null || super.match(token); } /** From 03f56e36a831c9e58a1bc061bbf06138ac90cb6a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 25 Oct 2023 13:24:01 +0000 Subject: [PATCH 091/271] JCR-4981: jackrabbit-webapp: deprecate RMI support git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913322 13f79535-47bb-0310-9956-ffa450edef68 --- .../jackrabbit/j2ee/BootstrapConfig.java | 12 ++++++--- .../org/apache/jackrabbit/j2ee/RMIConfig.java | 4 ++- .../j2ee/RepositoryAccessServlet.java | 14 +++++++--- .../j2ee/RepositoryStartupServlet.java | 27 +++++++++++++------ 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java index 860ab544d67..dfff9fd4f6c 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java @@ -46,7 +46,7 @@ public class BootstrapConfig extends AbstractConfig { private JNDIConfig jndiConfig = new JNDIConfig(this); - private RMIConfig rmiConfig = new RMIConfig(this); + @Deprecated private RMIConfig rmiConfig = new RMIConfig(this); public void init(Properties props) throws ServletException { String property = props.getProperty("repository.home");; @@ -107,11 +107,17 @@ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } - public JNDIConfig getJndiConfig() { + /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + */ + @Deprecated public JNDIConfig getJndiConfig() { return jndiConfig; } - public RMIConfig getRmiConfig() { + /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + */ + @Deprecated public RMIConfig getRmiConfig() { return rmiConfig; } diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java index 67af62279c7..e82351bf3ef 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java @@ -28,6 +28,8 @@ import javax.servlet.ServletException; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * The RMI config hold information about RMI connection details. * * It supports the following properties and init parameters: @@ -43,7 +45,7 @@ * +-------------------+--------------------+ * */ -public class RMIConfig extends AbstractConfig { +@Deprecated public class RMIConfig extends AbstractConfig { /** * default logger diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java index f09575fdab2..a8e383c6f0c 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java @@ -195,6 +195,8 @@ private InitialContext getInitialContext() { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Checks if the repository is available via JNDI and returns it. * @return the repository or null * @throws ServletException if this servlet is not properly configured. @@ -221,11 +223,13 @@ private Repository getRepositoryByJNDI() throws ServletException { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Checks if the repository is available via RMI and returns it. * @return the repository or null * @throws ServletException if this servlet is not properly configured. */ - private Repository getRepositoryByRMI() throws ServletException { + @Deprecated private Repository getRepositoryByRMI() throws ServletException { BootstrapConfig config = getConfig(); if (!config.getRmiConfig().isValid() || !config.getRmiConfig().enabled()) { return null; @@ -337,18 +341,22 @@ public BootstrapConfig getBootstrapConfig() { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * optional class for RMI, will only be used, if RMI client is present */ - protected static abstract class ClientFactoryDelegater { + @Deprecated protected static abstract class ClientFactoryDelegater { public abstract Repository getRepository(String uri) throws RemoteException, MalformedURLException, NotBoundException; } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * optional class for RMI, will only be used, if RMI server is present */ - protected static class RMIClientFactoryDelegater extends ClientFactoryDelegater { + @Deprecated protected static class RMIClientFactoryDelegater extends ClientFactoryDelegater { // only used to enforce linking upon Class.forName() static String FactoryClassName = ClientRepositoryFactory.class.getName(); diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java index fef961e058b..b2041b0c90d 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java @@ -177,9 +177,11 @@ public class RepositoryStartupServlet extends AbstractRepositoryServlet { */ private InitialContext jndiContext; - private Registry rmiRegistry = null; + @Deprecated private Registry rmiRegistry = null; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Keeps a strong reference to the server side RMI repository instance to * prevent the RMI distributed Garbage Collector from collecting the * instance making the repository unaccessible though it should still be. @@ -190,7 +192,7 @@ public class RepositoryStartupServlet extends AbstractRepositoryServlet { * @see #registerRMI() * @see #unregisterRMI() */ - private Remote rmiRepository; + @Deprecated private Remote rmiRepository; /** * the file to the bootstrap config @@ -488,13 +490,15 @@ private void unregisterJNDI() { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Registers the repository to an RMI registry configured in the web * application. See Registration with RMI in the * class documentation for a description of the algorithms used to register * the repository with an RMI registry. * @throws ServletException if an error occurs. */ - private void registerRMI() { + @Deprecated private void registerRMI() { RMIConfig rc = config.getRmiConfig(); if (!rc.isValid() || !rc.enabled()) { return; @@ -588,10 +592,12 @@ private void registerRMI() { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Unregisters the repository from the RMI registry, if it has previously * been registered. */ - private void unregisterRMI() { + @Deprecated private void unregisterRMI() { if (rmiRepository != null) { // Forcibly unexport the repository; try { @@ -643,6 +649,8 @@ protected String getRemoteFactoryDelegaterClass() { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * Returns an RMIServerSocketFactory used to create the server * socket for a locally created RMI registry. *

    @@ -660,7 +668,7 @@ protected String getRemoteFactoryDelegaterClass() { * creating java.net.ServerSocket instances bound to * the rmiHost. */ - protected RMIServerSocketFactory getRMIServerSocketFactory( + @Deprecated protected RMIServerSocketFactory getRMIServerSocketFactory( final InetAddress hostAddress) { return new RMIServerSocketFactory() { public ServerSocket createServerSocket(int port) throws IOException { @@ -670,18 +678,22 @@ public ServerSocket createServerSocket(int port) throws IOException { } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * optional class for RMI, will only be used, if RMI server is present */ - protected static abstract class RemoteFactoryDelegater { + @Deprecated protected static abstract class RemoteFactoryDelegater { public abstract Remote createRemoteRepository(Repository repository) throws RemoteException; } /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    * optional class for RMI, will only be used, if RMI server is present */ - protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater { + @Deprecated protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater { private static final RemoteAdapterFactory FACTORY = new ServerAdapterFactory(); @@ -764,4 +776,3 @@ private void redirect(HttpServletRequest req, resp.sendRedirect(cp + loc); } } - From 2c178726f55e759d7cc14e1df7ba57f9a5d4e81d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 26 Oct 2023 12:08:45 +0000 Subject: [PATCH 092/271] JCR-4982: jackrabbit-spi-commons: update Javadoc for IllegalNameException git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913345 13f79535-47bb-0310-9956-ffa450edef68 --- .../jackrabbit/spi/commons/conversion/IllegalNameException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IllegalNameException.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IllegalNameException.java index 366b45e0695..e26ae80f1fd 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IllegalNameException.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IllegalNameException.java @@ -23,7 +23,7 @@ * {@link javax.jcr.NamespaceException} is thrown if the prefix of the JCR name * string is syntactically valid but not bound to any namespace. *

    - * See the section 4.6 of the JCR 1.0 specification for details of the + * See the section 3.4 of the JCR 2.0 specification for details of the * JCR name syntax. */ public class IllegalNameException extends NameException { From b61f0ab6957d91e7aa3965dd4812451894293e27 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 2 Nov 2023 13:02:34 +0000 Subject: [PATCH 093/271] JCR-4983: jackrabbit-spi-commons: improve diagnostics for invalid names git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913533 13f79535-47bb-0310-9956-ffa450edef68 --- .../spi/commons/conversion/NameParser.java | 66 +++++++++++++------ .../commons/conversion/NameParserTest.java | 16 ++++- 2 files changed, 61 insertions(+), 21 deletions(-) diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java index a33909a0cb6..aa7c0f87756 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/NameParser.java @@ -52,13 +52,18 @@ public class NameParser { */ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory factory) throws IllegalNameException, NamespaceException { - // trivial check - int len = jcrName == null ? 0 : jcrName.length(); + + if (jcrName == null) { + complainAndThrow("name is null", ""); + } + + int len = jcrName.length(); if (len == 0) { - throw new IllegalNameException("empty name"); + complainAndThrow("empty name", jcrName); } + if (".".equals(jcrName) || "..".equals(jcrName)) { - throw new IllegalNameException(jcrName); + complainAndThrow("illegal name", jcrName); } // parse the name @@ -73,36 +78,36 @@ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory char c = jcrName.charAt(i); if (c == ':') { if (state == STATE_PREFIX_START) { - throw new IllegalNameException("Prefix must not be empty"); + complainAndThrow("Prefix must not be empty", jcrName, i); } else if (state == STATE_PREFIX) { if (trailingSpaces) { - throw new IllegalNameException("Trailing spaces not allowed"); + complainAndThrow("Trailing spaces not allowed", jcrName, i); } prefix = jcrName.substring(0, i); if (!XMLChar.isValidNCName(prefix)) { - throw new IllegalNameException("Invalid name prefix: " + prefix); + complainAndThrow("Invalid name prefix: " + prefix, jcrName, i); } state = STATE_NAME_START; } else if (state == STATE_URI) { // ignore -> validation of uri later on. } else { - throw new IllegalNameException(asDisplayableString(c) + " not allowed in name"); + complainAndThrow("'" + asDisplayableString(c) + "' not allowed in name", jcrName, i); } trailingSpaces = false; } else if (c == ' ') { if (state == STATE_PREFIX_START || state == STATE_NAME_START) { - throw new IllegalNameException(asDisplayableString(c) + " not valid name start"); + complainAndThrow("'" + asDisplayableString(c) + "' not valid name start", jcrName, i); } trailingSpaces = true; } else if (c == '[' || c == ']' || c == '*' || c == '|') { - throw new IllegalNameException(asDisplayableString(c) + " not allowed in name"); + complainAndThrow("'" + asDisplayableString(c) + "' not allowed in name", jcrName, i); } else if (Character.isWhitespace(c) && c < 128) { - throw new IllegalNameException("Whitespace character " + asDisplayableString(c) + " not allowed in name"); + complainAndThrow("Whitespace character '" + asDisplayableString(c) + "' not allowed in name", jcrName, i); } else if (c == '/') { if (state == STATE_URI_START) { state = STATE_URI; } else if (state != STATE_URI) { - throw new IllegalNameException(asDisplayableString(c) + " not allowed in name"); + complainAndThrow("'" + asDisplayableString(c) + "' not allowed in name", jcrName, i); } trailingSpaces = false; } else if (c == '{') { @@ -140,10 +145,7 @@ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory state = STATE_NAME; nameStart = 0; } else { - throw new IllegalNameException( - "The URI prefix of the name " + jcrName - + " is neither a valid URI nor a valid part" - + " of a local name."); + complainAndThrow("The URI prefix is neither a valid URI nor a valid part of a local name", jcrName); } } else if (state == STATE_PREFIX_START) { state = STATE_PREFIX; // prefix start -> validation later on will fail. @@ -168,14 +170,14 @@ public static Name parse(String jcrName, NamespaceResolver resolver, NameFactory // take care of qualified jcrNames starting with '{' that are not having // a terminating '}' -> make sure there are no illegal characters present. if (state == STATE_URI && (jcrName.indexOf(':') > -1 || jcrName.indexOf('/') > -1)) { - throw new IllegalNameException("Local name may not contain ':' nor '/'"); + complainAndThrow("Local name may not contain ':' nor '/'", jcrName); } if (nameStart == len || state == STATE_NAME_START) { - throw new IllegalNameException("Local name must not be empty"); + complainAndThrow("Local name must not be empty", jcrName); } if (trailingSpaces) { - throw new IllegalNameException("Trailing spaces not allowed"); + complainAndThrow("Trailing spaces not allowed", jcrName); } // if namespace is null, this is just a check for format. this can only @@ -206,11 +208,37 @@ private static String asDisplayableString(char c) { return "\\r"; } else if (c == '\t') { return "\\t"; + } else if (c == '\'') { + return "\\'"; + } else if (c == '"') { + return "\\\""; } else { return String.format("\\u%04x", (int) c); } } + private static String formatNameForDisplay(String name) { + StringBuilder b = new StringBuilder(); + for (int i = 0; i < name.length(); i++) { + b.append(asDisplayableString(name.charAt(i))); + } + return b.toString(); + } + + private static void complainAndThrow(String reason, String name) throws IllegalNameException { + complainAndThrow(reason, name, -1); + } + + private static void complainAndThrow(String reason, String name, int index) throws IllegalNameException{ + String msg; + if (index == -1) { + msg = String.format("%s (name: \"%s\")", reason, formatNameForDisplay(name)); + } else { + msg = String.format("%s (name: \"%s\", at position: %d)", reason, formatNameForDisplay(name), index); + } + throw new IllegalNameException(msg); + } + /** * Parses an array of jcrName and returns the respective * array of Name. diff --git a/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java b/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java index 6dc0ec23537..d2cfee6e5db 100644 --- a/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java +++ b/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/NameParserTest.java @@ -241,12 +241,24 @@ public void testCheckFormatOfExpandedNames() throws NamespaceException, IllegalN } } - public void testMessage() { + public void testMessageTab() { try { NameParser.checkFormat("horizontal\ttab"); fail("should fail with IllegalNameException"); } catch (IllegalNameException ex) { - assertTrue("message should contain '\\t'", ex.getMessage().indexOf("\\t") >= 0); + assertTrue("message should contain '\\t', was: >>>" + ex.getMessage() + "<<<", ex.getMessage().indexOf("\\t") >= 0); + assertTrue("message should contain 'horizontal', was: >>>" + ex.getMessage() + "<<<", + ex.getMessage().indexOf("horizontal") >= 0); + } + } + + public void testMessageWithNonAscii() { + try { + NameParser.checkFormat("\uD83D\uDCA9[]"); + fail("should fail with IllegalNameException"); + } catch (IllegalNameException ex) { + assertTrue("message should contain '\\ud83d\\udca9', was: >>>" + ex.getMessage() + "<<<", + ex.getMessage().indexOf("\\ud83d\\udca9") >= 0); } } From 08c773ca796b21a2b59ee11aee4e70560caf24aa Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 3 Nov 2023 10:46:28 +0000 Subject: [PATCH 094/271] JCR-4986: update Jetty to 9.4.53.v20231009 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913553 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4f3582ebae6..f31349f19b4 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -50,7 +50,7 @@ 1.48.0 1.22.17 - 9.4.51.v20230217 + 9.4.53.v20231009 2.4.1 ${project.build.sourceEncoding} 1.7.36 From 90b60f4561eae41256c2110df3a72b854ead962d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 Nov 2023 12:49:37 +0000 Subject: [PATCH 095/271] JCR-4989: set baseline comparisonVersion to latest stable (2.20.13) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913653 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index f31349f19b4..6b73135387e 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -388,7 +388,7 @@ - 2.20.12 + 2.20.13 From 9dccd521490508d37fc3c804080079ea719c1c64 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 10:11:55 +0000 Subject: [PATCH 096/271] JCR-4990: add test for observing effect of remapping a namespace prefix to a different namespace name git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913761 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/api/NamespaceRemappingTest.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRemappingTest.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRemappingTest.java index 37c7561bd93..883be3b54ba 100644 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRemappingTest.java +++ b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRemappingTest.java @@ -16,12 +16,16 @@ */ package org.apache.jackrabbit.test.api; +import static org.junit.Assert.assertNotEquals; + import java.util.Arrays; import java.util.HashSet; +import java.util.Random; import java.util.Set; import javax.jcr.NamespaceException; import javax.jcr.NamespaceRegistry; +import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.RepositoryException; import javax.jcr.Session; @@ -364,6 +368,56 @@ public void testGetNamespacePrefixes() throws RepositoryException { } } + /** + * Tests that, after locally re-assigning a prefix, a previously created + * node continues to work with respect to sameness and consistent naming + * behavior. + */ + public void testPrefixRemapping() throws NamespaceException, RepositoryException { + Random r = new Random(); + int i1 = r.nextInt(); + int i2 = r.nextInt(); + String prefix = getUnusedPrefix(); + String uri1 = "foobar:1-" + i1; + String uri2 = "foobar:2-" + i2; + String testLocalName = "test"; + String expandedTestName ="{" + uri1 + "}" + testLocalName; + + try { + superuser.getWorkspace().getNamespaceRegistry().registerNamespace(prefix, uri1); + + String originalName = prefix + ":" + testLocalName; + Node testNode = superuser.getRootNode().addNode(originalName); + superuser.save(); + + // check that expanded name works + Node n2 = superuser.getRootNode().getNode(expandedTestName); + assertTrue(testNode.isSame(n2)); + + // remap prefix1 to uri2 + superuser.setNamespacePrefix(prefix, uri2); + + // check that expanded name still works + Node n3 = superuser.getRootNode().getNode(expandedTestName); + assertTrue(testNode.isSame(n3)); + + String remappedName = n3.getName(); + assertNotEquals(originalName, remappedName); + + int colon = remappedName.indexOf(':'); + assertTrue("remapped name must contain colon:" + remappedName, colon > 0); + String remappedPrefix = remappedName.substring(0, colon); + assertNotEquals("prefix after mapping must be different", prefix, remappedPrefix); + + assertEquals("remapped prefix need to map to original URI " + uri1, uri1, superuser.getNamespaceURI(remappedPrefix)); + } finally { + try { + superuser.getWorkspace().getNamespaceRegistry().unregisterNamespace(prefix); + } catch (RepositoryException ignored) { + // best effort cleanup + } + } + } /** * Returns a namespace prefix that is not in use. From c1ed40884ea58217859d4360964ceb929600896e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 10:30:14 +0000 Subject: [PATCH 097/271] JCR-4991: Update to maven bundle plugin to 5.1.9 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913762 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 6b73135387e..625cc435644 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -369,7 +369,7 @@ org.apache.felix maven-bundle-plugin - 5.1.8 + 5.1.9 true From 8a7c6a3a86b5c69e5189af8e04b3a87fa8706d12 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 11:09:19 +0000 Subject: [PATCH 098/271] JCR-4980: make webapp build reproducible by switching to maven-jar-plugin (patch by Herve Boutemy) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913763 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 433514991b5..eaf1720e4ad 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -134,28 +134,25 @@ - maven-antrun-plugin + maven-jar-plugin - package - - - - - + prepare-jar + + prepare-package - run + jar - + org.codehaus.mojo build-helper-maven-plugin - attach-artifacts + attach-jar package attach-artifact From a8b767fb969d3baf81c398f20e310dc01638b863 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 11:32:27 +0000 Subject: [PATCH 099/271] JCR-4987: Update to jacoco version 0.8.11 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913764 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 625cc435644..517be716c73 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -269,7 +269,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.11 pre-unit-test From 622633a9a66a4e5d95f1b98e695a0bccd00e0a3a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 11:54:10 +0000 Subject: [PATCH 100/271] JCR-4992: Update animal-sniffer plugin dependency to 1.23 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913765 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 517be716c73..90291072b2e 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -202,7 +202,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.22 + 1.23 org.codehaus.mojo.signature From 6f9ca7617b078d17b3ce7d91062eb14d061749fd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 12:15:25 +0000 Subject: [PATCH 101/271] JCR-4993: Update war-plugin dependency to 3.4.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913767 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 90291072b2e..ebb0ea98edc 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -356,7 +356,7 @@ maven-war-plugin - 3.3.2 + 3.4.0 maven-idea-plugin From 373680adb976dc1a4e9cd972221ee183981ac2e0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 12:42:56 +0000 Subject: [PATCH 102/271] JCR-4994: Update build-helper-maven-plugin to version 3.4.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913768 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index ebb0ea98edc..f97f51c17db 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -396,7 +396,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.4.0 org.codehaus.mojo From 3d437a89c04e650ae5daef771408175a6d3b6433 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 13:02:07 +0000 Subject: [PATCH 103/271] JCR-4995: Update pmd-plugin dependency to 3.21.2 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913770 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index f97f51c17db..20888703191 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -425,7 +425,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.20.0 + 3.21.2 ${java.version} From 1e7afdc9c28f8d34de8b04bdb27057974db245e3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 13:23:01 +0000 Subject: [PATCH 104/271] JCR-4996: update checkstyle-plugin dependency to 3.3.1 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913771 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 20888703191..fe46016327b 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -420,7 +420,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.1 + 3.3.1 org.apache.maven.plugins From b7ec1e04f45354223c754d5262e24b004d7fd6c2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 13:43:30 +0000 Subject: [PATCH 105/271] JCR-4997: Update spotbugs-maven-plugin to 4.8.1.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913772 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index fe46016327b..22c632913e8 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -433,7 +433,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.0 + 4.8.1.0 From 372b66248b5ba53850813d87e9951198f55ed857 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 14:06:00 +0000 Subject: [PATCH 106/271] JCR-4998: Update commons-io dependency to 2.15.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913773 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 22c632913e8..bcb27290f55 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -464,7 +464,7 @@ commons-io commons-io - 2.13.0 + 2.15.0 javax.transaction From 1f8d140e1887b3da414894784176d481adc7b691 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 14 Nov 2023 14:33:56 +0000 Subject: [PATCH 107/271] JCR-4999: Update commons-cli dependency to 1.6.0 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913774 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-standalone-components/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 1fa0863e445..d5716e4cb35 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -139,7 +139,7 @@ commons-cli commons-cli - 1.5.0 + 1.6.0 commons-chain From bb60a2d35549a1b519c31bba3099fe5845159d52 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 15 Nov 2023 16:04:35 +0000 Subject: [PATCH 108/271] JCR-5000: update Apache parent pom to version 31 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913810 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index bcb27290f55..0a0841bc658 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 30 + 31 From bbdee15842fb41c54195f35adfcae5516e4a8dc6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 17 Nov 2023 09:57:59 +0000 Subject: [PATCH 109/271] JCR-5001: Update tomcat dependency to 9.0.83 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913881 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index eaf1720e4ad..7378467089e 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.80 + 9.0.83 From f74065207bca4c75940491f30fe2f6720c4692aa Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 17 Nov 2023 11:36:41 +0000 Subject: [PATCH 110/271] JCR-5002: update aws java sdk version to 1.12.591 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913883 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 18f7a1a423c..c26440c3982 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.560 + 1.12.591 org.apache.jackrabbit From 888d6c0c328661918cdc1ec1df9b587a78a5e1f4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 17 Nov 2023 12:40:08 +0000 Subject: [PATCH 111/271] JCR-5003: Update h2db dependency to 2.2.224 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913884 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 10ecf93497e..e9cbc2ce06e 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -325,7 +325,7 @@ org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral com.h2database h2 - 2.2.220 + 2.2.224 test From 8ad4b768f80cdcec3bf041930be0829779aa7ae4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 20 Nov 2023 13:54:41 +0000 Subject: [PATCH 112/271] JCR-4987: revert due to breakage on Java >= 17 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1913984 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0a0841bc658..c1965f6068e 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -269,7 +269,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.8 pre-unit-test From 33a3a71b0b89642426a968464609bc08aceafa81 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 1 Dec 2023 13:59:48 +0000 Subject: [PATCH 113/271] JCR-5005: Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.18 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914260 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c1965f6068e..77729718035 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -49,7 +49,7 @@ 1.48.0 - 1.22.17 + 1.22.18 9.4.53.v20231009 2.4.1 ${project.build.sourceEncoding} From 3b823c7e127b89022d7ce1d054cd5b14747ba2cc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 5 Dec 2023 18:23:17 +0000 Subject: [PATCH 114/271] JCR-5006: Release Jackrabbit 2.21.21 - Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914370 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE-NOTES.txt | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index af282f702b7..11fd2fdaf92 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,13 +1,13 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.20 +Release Notes -- Apache Jackrabbit -- Version 2.21.21 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.20, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.21, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.20 is an unstable release cut directly from +Apache Jackrabbit 2.21.21 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. @@ -16,23 +16,44 @@ NOTE: this release disables RMI access in the standalone and webapp projects. See https://issues.apache.org/jira/browse/JCR-4960 for more information. -Changes in Jackrabbit 2.21.20 +Changes in Jackrabbit 2.21.21 ----------------------------- Bug - [JCR-4940] - jackrabbit-jcr2spi is incompatible with Java 21 + [JCR-4570] - WebdavRequestImpl does not check ETags if there is no resource or no exclusive write lock + [JCR-4571] - WebdavRequestImpl stores If-Header values using either absolute URIs or absolute paths, but both may be used for lookup + +Improvement + + [JCR-4980] - make webapp build reproducible + +Test + + [JCR-4990] - add test for observing effect of remapping a namespace prefix to a different namespace name Task - [JCR-4951] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.16 - [JCR-4969] - set baseline comparisonVersion to latest stable (2.20.12) - [JCR-4970] - it-osgi: fix package name - [JCR-4971] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.17 - [JCR-4973] - Deprecate RMI support - [JCR-4974] - Update easymock dependency to 5.2.0 - [JCR-4975] - update aws java sdk version to 1.12.560 - [JCR-4976] - Update tomcat dependency to 9.0.80 + [JCR-4956] - Replace deprecated Surefire fork options + [JCR-4981] - jackrabbit-webapp: deprecate RMI support + [JCR-4982] - jackrabbit-spi-commons: update Javadoc for IllegalNameException + [JCR-4983] - jackrabbit-spi-commons: improve diagnostics for invalid names + [JCR-4986] - update Jetty to 9.4.53.v20231009 + [JCR-4989] - set baseline comparisonVersion to latest stable (2.20.13) + [JCR-4991] - Update to maven bundle plugin to 5.1.9 + [JCR-4992] - Update animal-sniffer plugin dependency to 1.23 + [JCR-4993] - Update war-plugin dependency to 3.4.0 + [JCR-4994] - Update build-helper-maven-plugin to version 3.4.0 + [JCR-4995] - Update pmd-plugin dependency to 3.21.2 + [JCR-4996] - update checkstyle-plugin dependency to 3.3.1 + [JCR-4997] - Update spotbugs-maven-plugin to 4.8.1.0 + [JCR-4998] - Update commons-io dependency to 2.15.0 + [JCR-4999] - Update commons-cli dependency to 1.6.0 + [JCR-5000] - update Apache parent pom to version 31 + [JCR-5001] - Update tomcat dependency to 9.0.83 + [JCR-5002] - update aws java sdk version to 1.12.591 + [JCR-5003] - Update h2db dependency to 2.2.224 + [JCR-5005] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.18 For more detailed information about all the changes in this and other From c267fee16c5063fce708cef0a7cf3351ed6b3a9a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 6 Dec 2023 13:36:11 +0000 Subject: [PATCH 115/271] JCR-4967: test coverage for modification of non-versioned node with jcr:isCheckedOut==false property git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914385 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-core/pom.xml | 2 + .../ModifyNonVersionableCheckedOutTest.java | 87 +++++++++++++++++++ .../jackrabbit/core/version/TestAll.java | 1 + 3 files changed, 90 insertions(+) create mode 100755 jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/ModifyNonVersionableCheckedOutTest.java diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index e9cbc2ce06e..c039bfc3ea2 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -114,6 +114,8 @@ org.apache.jackrabbit.core.security.user.MembershipCachePerfTest org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testPathLiteral org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral +org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testNonVersionableCheckedOut +org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModifyNonVersionableNodeWithCheckedOutProperty diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/ModifyNonVersionableCheckedOutTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/ModifyNonVersionableCheckedOutTest.java new file mode 100755 index 00000000000..3f32e144cfd --- /dev/null +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/ModifyNonVersionableCheckedOutTest.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +package org.apache.jackrabbit.core.version; + +import javax.jcr.Node; + +import org.apache.jackrabbit.test.AbstractJCRTest; + +public class ModifyNonVersionableCheckedOutTest extends AbstractJCRTest { + + public void testNonVersionableCheckedOut() throws Exception { + Node node = testRootNode.addNode(nodeName1, "nt:unstructured"); + superuser.save(); + + assertTrue(node.isCheckedOut()); + + node.setProperty("jcr:isCheckedOut", false); + superuser.save(); + + assertTrue(node.getPath() + " does not have mix:versionable and thus should be reported as checked out", + node.isCheckedOut()); + } + + public void testModifyNonVersionableNodeWithCheckedOutProperty() throws Exception { + Node node = testRootNode.addNode(nodeName1, "nt:unstructured"); + superuser.save(); + + assertTrue(node.isCheckedOut()); + + node.setProperty("jcr:isCheckedOut", false); + superuser.save(); + + node.setProperty("test", true); + superuser.save(); + + assertTrue(node.getProperty("test").getBoolean()); + + node.setProperty("test", false); + superuser.save(); + + assertFalse(node.getProperty("test").getBoolean()); + + node.getProperty("test").remove(); + superuser.save(); + assertFalse(node.hasProperty("test")); + + node.addNode(nodeName2, "nt:unstructured"); + superuser.save(); + + assertTrue(node.hasNode(nodeName2)); + + node.getNode(nodeName2).remove(); + superuser.save(); + + assertFalse(node.hasNode(nodeName2)); + } + + public void testAddRemoveMixinVersionable() throws Exception { + Node node = testRootNode.addNode(nodeName1, "nt:unstructured"); + node.addMixin(mixVersionable); + superuser.save(); + node.checkin(); + superuser.save(); + assertFalse(node.isCheckedOut()); + node.checkout(); + superuser.save(); + assertTrue(node.isCheckedOut()); + node.removeMixin(mixVersionable); + superuser.save(); + assertTrue(node.isCheckedOut()); + assertFalse(node.hasProperty(jcrIsCheckedOut)); + } +} diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/TestAll.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/TestAll.java index f3f68009ea0..60fed324a2e 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/TestAll.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/TestAll.java @@ -39,6 +39,7 @@ public static Test suite() { suite.addTestSuite(RestoreTest.class); suite.addTestSuite(RestoreNodeWithSNSTest.class); suite.addTestSuite(VersionIteratorImplTest.class); + suite.addTestSuite(ModifyNonVersionableCheckedOutTest.class); return suite; } } From 087ac6c78f4c49b5b4f14ed73fdf0e2253aa720b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 6 Dec 2023 21:20:26 +0000 Subject: [PATCH 116/271] [maven-release-plugin] prepare release jackrabbit-2.21.21 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914412 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 10 ++++++++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 8 ++++---- 24 files changed, 34 insertions(+), 28 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index c26440c3982..979b778bbda 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index c039bfc3ea2..58566cc59b3 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index ea5b16703a1..1397081ee92 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index f4f265f1532..aaa576f661e 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 390e8778c5b..7e4f3190ea6 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 74dfb5c3356..c3f80314778 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 9029d322461..2975e486ba7 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index fe1bc0c614a..d5c2c62ac8e 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 9ce6c3d7673..f839026f7d0 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 8ca5f160335..f726d7b3823 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 8a5e6b70a03..71b7599d4bc 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 734ac35ce3e..c8419b06b45 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index ee838832e1b..0be3b077df5 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 77729718035..0743e91ebc9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.21-SNAPSHOT + 2.21.21 pom @@ -63,7 +63,7 @@ 0.0 - 1696524090 + 1701892363 http://jackrabbit.apache.org/ @@ -724,4 +724,10 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent + scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent + https://github.com/apache/maven-apache-parent/tree/apache-31/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 737c0322557..9a027d6a10b 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 21e8f59ec65..a0ed44ff855 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index a47072840bb..8a9d989bc0a 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index caa5f81e980..448674d322d 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d5716e4cb35..be12401bf88 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index a5997a3b4be..d737f28dc1a 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 10f42b41adf..3f897ffbd08 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7378467089e..7e2d8dfe050 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 7ffc68d547e..53ff8482069 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index cdcae3025a9..535e5a1f4fc 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21-SNAPSHOT + 2.21.21 jackrabbit-parent/pom.xml @@ -62,9 +62,9 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/trunk - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/trunk - http://svn.apache.org/viewvc/jackrabbit/trunk + scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.21 + scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.21 + http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.21 From f58f9a6a03127d01cbfe6f37b59bf52678c1f98a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 6 Dec 2023 21:20:33 +0000 Subject: [PATCH 117/271] [maven-release-plugin] prepare for next development iteration git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914414 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 979b778bbda..dfed6f2d840 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 58566cc59b3..5cb72024aa2 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 1397081ee92..806f96b0cf2 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index aaa576f661e..046a691e55e 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 7e4f3190ea6..a75e718605c 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index c3f80314778..6c80fb2a95f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 2975e486ba7..3c1a3ff0b4d 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index d5c2c62ac8e..7cc2db23d75 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index f839026f7d0..c4132b40191 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index f726d7b3823..97db6b063cf 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 71b7599d4bc..0e0fd045877 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index c8419b06b45..1782ba8ce76 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 0be3b077df5..1b2616b4226 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0743e91ebc9..0b06c127757 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.21 + 2.21.22-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1701892363 + 1701897629 http://jackrabbit.apache.org/ diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 9a027d6a10b..e518dcb8928 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a0ed44ff855..dad845211ef 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 8a9d989bc0a..79a86e98b59 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 448674d322d..a5f12ad2316 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index be12401bf88..69d0b700991 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index d737f28dc1a..ae026f2a814 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 3f897ffbd08..1947e1ce840 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7e2d8dfe050..7654899da7b 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 53ff8482069..73f863785e1 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 535e5a1f4fc..a4b35bc4631 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.21 + 2.21.22-SNAPSHOT jackrabbit-parent/pom.xml From 4750396c3d9413fce678da18a04c178fca5d2202 Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Fri, 8 Dec 2023 10:44:37 +0000 Subject: [PATCH 118/271] JCR-5004: jcr-commons: get rid of cglib test dependency (unmaintained) Replaced cglib with Mockito. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914456 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-jcr-commons/pom.xml | 11 +- .../commons/AbstractRepositoryTest.java | 43 ++--- .../jackrabbit/commons/JcrUtilsTest.java | 8 +- .../apache/jackrabbit/commons/MockCase.java | 155 ------------------ 4 files changed, 27 insertions(+), 190 deletions(-) delete mode 100644 jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/MockCase.java diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 3c1a3ff0b4d..4127aa61e9c 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -88,12 +88,6 @@ junit test - - cglib - cglib - 3.3.0 - test - com.googlecode.json-simple json-simple @@ -106,6 +100,11 @@ 0.11.4.1 test + + org.mockito + mockito-core + test + diff --git a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/AbstractRepositoryTest.java b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/AbstractRepositoryTest.java index 5aecae67828..30e0eacde3c 100644 --- a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/AbstractRepositoryTest.java +++ b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/AbstractRepositoryTest.java @@ -16,15 +16,20 @@ */ package org.apache.jackrabbit.commons; +import junit.framework.TestCase; + import javax.jcr.Credentials; import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.SimpleCredentials; +import org.mockito.Mockito; +import org.mockito.internal.verification.Times; + /** * Test cases for the {@link AbstractRepositoryTest} class. */ -public class AbstractRepositoryTest extends MockCase { +public class AbstractRepositoryTest extends TestCase { /** * Tests the {@link AbstractRepository#login()} method. @@ -32,13 +37,10 @@ public class AbstractRepositoryTest extends MockCase { * @throws RepositoryException if an error occurs */ public void testLogin() throws RepositoryException { - Repository repository = (Repository) record(AbstractRepository.class); + Repository repository = Mockito.spy(AbstractRepository.class); repository.login(null, null); - - replay(); repository.login(); - - verify(); + Mockito.verify(repository, new Times(2)).login(null, null); } /** @@ -48,14 +50,10 @@ public void testLogin() throws RepositoryException { */ public void testLoginWithCredentials() throws RepositoryException { Credentials credentials = new SimpleCredentials("", "".toCharArray()); - - Repository repository = (Repository) record(AbstractRepository.class); + Repository repository = Mockito.spy(AbstractRepository.class); repository.login(credentials, null); - - replay(); repository.login(credentials); - - verify(); + Mockito.verify(repository, new Times(2)).login(credentials, null); } /** @@ -65,13 +63,10 @@ public void testLoginWithCredentials() throws RepositoryException { * @throws RepositoryException if an error occurs */ public void testLoginWithNullCredentials() throws RepositoryException { - Repository repository = (Repository) record(AbstractRepository.class); + Repository repository = Mockito.spy(AbstractRepository.class); repository.login(null, null); - - replay(); repository.login((Credentials) null); - - verify(); + Mockito.verify(repository, new Times(2)).login(null, null); } /** @@ -80,13 +75,10 @@ public void testLoginWithNullCredentials() throws RepositoryException { * @throws RepositoryException if an error occurs */ public void testLoginWithWorkspace() throws RepositoryException { - Repository repository = (Repository) record(AbstractRepository.class); + Repository repository = Mockito.spy(AbstractRepository.class); repository.login(null, "workspace"); - - replay(); repository.login("workspace"); - - verify(); + Mockito.verify(repository, new Times(2)).login(null, "workspace"); } /** @@ -96,12 +88,9 @@ public void testLoginWithWorkspace() throws RepositoryException { * @throws RepositoryException if an error occurs */ public void testLoginWithNullWorkspace() throws RepositoryException { - Repository repository = (Repository) record(AbstractRepository.class); + Repository repository = Mockito.spy(AbstractRepository.class); repository.login(null, null); - - replay(); repository.login((String) null); - - verify(); + Mockito.verify(repository, new Times(2)).login(null, null); } } diff --git a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java index 007bef3d112..a6a867112be 100644 --- a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java +++ b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java @@ -16,6 +16,8 @@ */ package org.apache.jackrabbit.commons; +import junit.framework.TestCase; + import java.util.Arrays; import java.util.HashMap; import java.util.Hashtable; @@ -26,10 +28,12 @@ import javax.jcr.RepositoryException; import javax.naming.InitialContext; -public class JcrUtilsTest extends MockCase { +import org.mockito.Mockito; + +public class JcrUtilsTest extends TestCase { public void testGetRepository() throws Exception { - Object repository = record(AbstractRepository.class); + Object repository = Mockito.spy(AbstractRepository.class); Hashtable environment = new Hashtable(); environment.put( diff --git a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/MockCase.java b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/MockCase.java deleted file mode 100644 index c73967f0a26..00000000000 --- a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/MockCase.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.commons; - -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.LinkedList; - -import junit.framework.TestCase; - -import net.sf.cglib.proxy.Enhancer; -import net.sf.cglib.proxy.MethodInterceptor; -import net.sf.cglib.proxy.MethodProxy; - -/** - * Simple {@link TestCase} base class for mock-testing the abstract - * JCR implementation classes in this package. - */ -public class MockCase extends TestCase implements MethodInterceptor { - - /** - * Mock test state. Set to true when the mock methods - * are being recorded, and to false when the methods are - * being played back. - */ - private boolean recording; - - /** - * The recorded mock call sequence. List of {@link MethodCall} objects. - */ - private LinkedList calls; - - /** - * The abstract base class being tested. - */ - private Class base; - - /** - * Creates a mocked proxy object for the given abstract base class and - * starts recording calls to the object. - * - * @param base the abstract base class being tested - * @return mocked proxy object - */ - protected Object record(Class base) { - this.recording = true; - this.calls = new LinkedList(); - this.base = base; - return Enhancer.create(base, base.getInterfaces(), this); - } - - /** - * Switches the test state to replaying and verifying the recorded - * call sequence. - */ - protected void replay() { - recording = false; - } - - /** - * Verifies that all recorded method calls were executed during - * the verification phase. - */ - protected void verify() { - assertTrue(calls.isEmpty()); - } - - //---------------------------------------------------< MethodInterceptor > - - /** - * Intercepts a method call to the mocked proxy object. Passes the - * call through if the abstract base class being tested implements the - * method, and records or verifies the method call otherwise. - * - * @param object the object on which the method is being called - * @param method the method being called - * @param args method arguments - * @param proxy proxy for re-invoking the called method - * @return method return value - * @throws Throwable if an error occurs - */ - public Object intercept( - Object object, Method method, Object[] args, MethodProxy proxy) - throws Throwable { - try { - base.getDeclaredMethod(method.getName(), method.getParameterTypes()); - return proxy.invokeSuper(object, args); - } catch (NoSuchMethodException e) { - if (recording) { - calls.addLast(new MethodCall(method, args)); - } else { - assertFalse(calls.isEmpty()); - MethodCall call = (MethodCall) calls.removeFirst(); - call.assertCall(method, args); - } - return null; - } - } - - //----------------------------------------------------------< MethodCall > - - /** - * Record of a method call. - */ - private static class MethodCall { - - /** - * The method that was called. - */ - private final Method method; - - /** - * The arguments that were passed to the method. - */ - private final Object[] args; - - /** - * Creates a new method call record. - * - * @param method the method that was called - * @param args the arguments that were passed to the method - */ - public MethodCall(Method method, Object[] args) { - this.method = method; - this.args = args; - } - - /** - * Verifies that the given method is the same as was recorded. - * - * @param method the method that was called - * @param args the arguments that were passed to the method - */ - public void assertCall(Method method, Object[] args) { - assertEquals(this.method, method); - assertTrue(Arrays.equals(this.args, args)); - } - - } - -} From 37300da2f0b74b79a81b3a1f5e90b3e8f04077a2 Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Fri, 8 Dec 2023 12:47:54 +0000 Subject: [PATCH 119/271] JCR-4987: Update to jacoco version 0.8.11 git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1914461 13f79535-47bb-0310-9956-ffa450edef68 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0b06c127757..32d5bd8b854 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -269,7 +269,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.11 pre-unit-test From ef12034a7c935a9bf2a61cc5411ac9d2726262ee Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 12 Dec 2023 12:44:46 +0100 Subject: [PATCH 120/271] JCR-4979: Adjust SCM urls after git migration (#146) Add repository metadata for GitHub --- .asf.yaml | 31 +++++++++++++++++++++++++++++++ README.txt | 16 ++-------------- jackrabbit-parent/pom.xml | 5 ----- pom.xml | 9 +++++---- 4 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .asf.yaml diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 00000000000..5948afd1371 --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,31 @@ +# 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. + +# https://cwiki.apache.org/confluence/x/7guYBw +github: + description: "Apache Jackrabbit" + homepage: "https://jackrabbit.apache.org/" + labels: + - java + - jackrabbit + - jcr + - repository + - database + autolink_jira: + - OAK + - JCR + - JCRVLT + - SLING + - FELIX \ No newline at end of file diff --git a/README.txt b/README.txt index 2143f553530..d11b7635a32 100644 --- a/README.txt +++ b/README.txt @@ -56,21 +56,9 @@ Jackrabbit mailing lists as well as links to list archives, please see: Latest development ================== -The latest Jackrabbit source code is available via Subversion at +The latest Jackrabbit source code is from - https://svn.apache.org/repos/asf/jackrabbit/trunk/ - -or with ViewVC at - - https://svn.apache.org/viewvc/jackrabbit/trunk/ - -To checkout the main Jackrabbit source tree, run - - svn checkout https://svn.apache.org/repos/asf/jackrabbit/trunk jackrabbit - -If you use Git, you can clone Jackrabbit with - - git clone git://git.apache.org/jackrabbit.git + https://github.com/apache/jackrabbit Credits ======= diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 32d5bd8b854..d357b32bcfc 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -725,9 +725,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent - scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent - https://github.com/apache/maven-apache-parent/tree/apache-31/jackrabbit-parent/tags/jackrabbit-2.21.21/jackrabbit-parent - diff --git a/pom.xml b/pom.xml index a4b35bc4631..3f6512cf222 100644 --- a/pom.xml +++ b/pom.xml @@ -62,9 +62,10 @@ - scm:svn:http://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.21 - scm:svn:https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-2.21.21 - http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-2.21.21 + scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git + scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git + https://github.com/apache/jackrabbit/tree/${project.scm.tag} + trunk @@ -181,7 +182,7 @@ A staged Maven repository is available for review at: The command for running automated checks against this release candidate is: # run in SVN checkout of https://dist.apache.org/repos/dist/dev/jackrabbit/ - $ sh check-release.sh ${project.version} ${checksum} + $ sh check-release.sh jackrabbit ${project.version} ${checksum} Please vote on releasing this package as Apache Jackrabbit ${project.version}. The vote is open for the next 72 hours and passes if a majority of at From 270c7c5c96f52e5c5a698896910faf2030ea91a4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Dec 2023 12:39:00 +0100 Subject: [PATCH 121/271] JCR-5008: Release Jackrabbit 2.21.22 - Candidate Release Notes --- RELEASE-NOTES.txt | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) mode change 100644 => 100755 RELEASE-NOTES.txt diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt old mode 100644 new mode 100755 index 11fd2fdaf92..0f112fdf333 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,59 +1,32 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.21 +Release Notes -- Apache Jackrabbit -- Version 2.21.22 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.21, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.22, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.21 is an unstable release cut directly from +Apache Jackrabbit 2.21.22 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -NOTE: this release disables RMI access in the standalone and webapp projects. -See https://issues.apache.org/jira/browse/JCR-4960 for more information. - - -Changes in Jackrabbit 2.21.21 +Changes in Jackrabbit 2.21.22 ----------------------------- -Bug - - [JCR-4570] - WebdavRequestImpl does not check ETags if there is no resource or no exclusive write lock - [JCR-4571] - WebdavRequestImpl stores If-Header values using either absolute URIs or absolute paths, but both may be used for lookup - Improvement - [JCR-4980] - make webapp build reproducible + [JCR-4979] - Migrate from Subversion to Git Test - [JCR-4990] - add test for observing effect of remapping a namespace prefix to a different namespace name + [JCR-4967] - test coverage for modification of non-versioned node with jcr:isCheckedOut==false property Task - [JCR-4956] - Replace deprecated Surefire fork options - [JCR-4981] - jackrabbit-webapp: deprecate RMI support - [JCR-4982] - jackrabbit-spi-commons: update Javadoc for IllegalNameException - [JCR-4983] - jackrabbit-spi-commons: improve diagnostics for invalid names - [JCR-4986] - update Jetty to 9.4.53.v20231009 - [JCR-4989] - set baseline comparisonVersion to latest stable (2.20.13) - [JCR-4991] - Update to maven bundle plugin to 5.1.9 - [JCR-4992] - Update animal-sniffer plugin dependency to 1.23 - [JCR-4993] - Update war-plugin dependency to 3.4.0 - [JCR-4994] - Update build-helper-maven-plugin to version 3.4.0 - [JCR-4995] - Update pmd-plugin dependency to 3.21.2 - [JCR-4996] - update checkstyle-plugin dependency to 3.3.1 - [JCR-4997] - Update spotbugs-maven-plugin to 4.8.1.0 - [JCR-4998] - Update commons-io dependency to 2.15.0 - [JCR-4999] - Update commons-cli dependency to 1.6.0 - [JCR-5000] - update Apache parent pom to version 31 - [JCR-5001] - Update tomcat dependency to 9.0.83 - [JCR-5002] - update aws java sdk version to 1.12.591 - [JCR-5003] - Update h2db dependency to 2.2.224 - [JCR-5005] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.18 + [JCR-4987] - Update to jacoco version 0.8.11 + [JCR-5004] - jcr-commons: get rid of cglib test dependency (unmaintained) For more detailed information about all the changes in this and other From 7e960b2809221ea859f68c875c8646088d6a346f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Dec 2023 12:39:13 +0100 Subject: [PATCH 122/271] JCR-5008: Release Jackrabbit 2.21.22 - Candidate Release Notes --- RELEASE-NOTES.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 RELEASE-NOTES.txt diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt old mode 100755 new mode 100644 From 03c82b71760c2b33a27c0142a7f73af47b660e04 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 14 Dec 2023 05:50:36 +0100 Subject: [PATCH 123/271] [maven-release-plugin] prepare release jackrabbit-2.21.22 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 8 ++++++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 4 ++-- 24 files changed, 30 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index dfed6f2d840..f510d5c8a44 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 5cb72024aa2..dfd5109c344 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 806f96b0cf2..b5e0b5aaac3 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 046a691e55e..19d312d551d 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index a75e718605c..3cd516a356e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 6c80fb2a95f..5913d9da5e7 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 4127aa61e9c..0ba46baae02 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 7cc2db23d75..41139b8b68b 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index c4132b40191..a206b17621b 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 97db6b063cf..639d5495751 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 0e0fd045877..4f7584e6c5e 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 1782ba8ce76..d69db388366 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 1b2616b4226..c5172604f19 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d357b32bcfc..bd260fd7bf8 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.22-SNAPSHOT + 2.21.22 pom @@ -63,7 +63,7 @@ 0.0 - 1701897629 + 1702528112 http://jackrabbit.apache.org/ @@ -725,4 +725,8 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> + + + jackrabbit-2.21.22 + diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index e518dcb8928..d1384e4f780 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index dad845211ef..af135fb7575 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 79a86e98b59..c3f699a543e 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index a5f12ad2316..f728c292531 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 69d0b700991..c46a70eece4 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index ae026f2a814..1016e4acaf6 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 1947e1ce840..c128f2a23fb 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7654899da7b..7d7ebb1635b 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 73f863785e1..430471cc234 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 3f6512cf222..acd48b8b364 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22-SNAPSHOT + 2.21.22 jackrabbit-parent/pom.xml @@ -65,7 +65,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - trunk + jackrabbit-2.21.22 From 2b6958e8cfa1dd741306af3c983de7997dab2f0a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 14 Dec 2023 05:50:44 +0100 Subject: [PATCH 124/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 9 ++------- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 4 ++-- 24 files changed, 26 insertions(+), 31 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f510d5c8a44..9f51e29dffd 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dfd5109c344..4c95d4c6001 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index b5e0b5aaac3..0bb6f8ad286 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 19d312d551d..f8b0a64d1fa 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 3cd516a356e..4970e681a7a 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 5913d9da5e7..d1df88c297b 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 0ba46baae02..379c4abd174 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 41139b8b68b..72e031b0b6f 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index a206b17621b..4fa248d4834 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 639d5495751..42cce008183 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4f7584e6c5e..b09e36de6c8 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d69db388366..fde130e36e5 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index c5172604f19..88ebf29f442 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index bd260fd7bf8..841c29dd1e7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.22 + 2.21.23-SNAPSHOT pom @@ -63,7 +63,7 @@ 0.0 - 1702528112 + 1702529444 http://jackrabbit.apache.org/ @@ -724,9 +724,4 @@ https://svn.apache.org/repos/asf/jackrabbit/site/trunk/src/site/markdown/jackrabbit-team.md --> - - - - jackrabbit-2.21.22 - diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index d1384e4f780..a70bc92594a 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index af135fb7575..1899f58b112 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index c3f699a543e..b0a1c204265 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index f728c292531..1cfa92e91c7 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index c46a70eece4..0c751413a47 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 1016e4acaf6..454b7bd3bda 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index c128f2a23fb..a7fc5c5f9ae 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7d7ebb1635b..3b3716644eb 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 430471cc234..8a66cb8f6a7 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index acd48b8b364..a83d6bee129 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.22 + 2.21.23-SNAPSHOT jackrabbit-parent/pom.xml @@ -65,7 +65,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.22 + trunk From 11fb7e1d001732e5d236b2c2758901635acedd23 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Thu, 14 Dec 2023 13:17:33 +0100 Subject: [PATCH 125/271] trivial: fix typo --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index d11b7635a32..cbf57b754f1 100644 --- a/README.txt +++ b/README.txt @@ -56,7 +56,7 @@ Jackrabbit mailing lists as well as links to list archives, please see: Latest development ================== -The latest Jackrabbit source code is from +The latest Jackrabbit source code is available at https://github.com/apache/jackrabbit From 79ff0eeeedb6ce42253041b652f84f2034c8e977 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Thu, 4 Jan 2024 22:23:38 +0100 Subject: [PATCH 126/271] JCR-5011 Move SCM elements to parent POM (#147) Adjust inheritance rules accordingly --- jackrabbit-parent/pom.xml | 11 ++++++++++- pom.xml | 7 ------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 841c29dd1e7..43b9cd23452 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -17,7 +17,7 @@ limitations under the License. --> - + 4.0.0 @@ -42,6 +42,14 @@ http://issues.apache.org/jira/browse/JCR + + + scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git + scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git + https://github.com/apache/jackrabbit/tree/${project.scm.tag} + trunk + + -Xmx256m @@ -64,6 +72,7 @@ 1702529444 + 3.6.1 http://jackrabbit.apache.org/ diff --git a/pom.xml b/pom.xml index a83d6bee129..07b61654fe7 100644 --- a/pom.xml +++ b/pom.xml @@ -61,13 +61,6 @@ jackrabbit-it-osgi - - scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git - scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git - https://github.com/apache/jackrabbit/tree/${project.scm.tag} - trunk - - From 7191fd738f9a39c4d6d267e086ceff1771cf8ef3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 11 Jan 2024 09:07:16 +0100 Subject: [PATCH 127/271] JCR-5012: set baseline comparisonVersion to latest stable (2.20.14) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 43b9cd23452..c095e6f7437 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -397,7 +397,7 @@ - 2.20.13 + 2.20.14 From 7abf5bc6cd09901b0055776f5756d8ae811eb042 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 13:45:43 +0100 Subject: [PATCH 128/271] JCR-5013: Update commons-io dependency to 2.15.1 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c095e6f7437..dec5994cde8 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -473,7 +473,7 @@ commons-io commons-io - 2.15.0 + 2.15.1 javax.transaction From 9f1e6c48b188b773002c6ca5762c5adf8a7555dd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 14:14:06 +0100 Subject: [PATCH 129/271] JCR-5014: Update tomcat dependency to 9.0.85 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 3b3716644eb..570873e8860 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.83 + 9.0.85 From 2b42d6d4a1f729fd8e60a5aea42859ea21366cfb Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 14:36:24 +0100 Subject: [PATCH 130/271] JCR-5015: update aws java sdk version to 1.12.635 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 9f51e29dffd..7f6977bf0d7 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.591 + 1.12.635 org.apache.jackrabbit From d49bf8dfcff03fdd4f6726975f27211980bd68d0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 15:32:43 +0100 Subject: [PATCH 131/271] JCR-5016: standalone-components: remove unused jcr-rmi dependency --- jackrabbit-standalone-components/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 0c751413a47..d6db1c8cb75 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -103,11 +103,6 @@ jackrabbit-jcr2dav ${project.version} - - org.apache.jackrabbit - jackrabbit-jcr-rmi - ${project.version} - org.apache.jackrabbit jackrabbit-webapp From d4e0b85f4b85958e33559f82559cec117460a7b4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 16:02:27 +0100 Subject: [PATCH 132/271] JCR-5017: Update spotbugs-maven-plugin to 4.8.2.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index dec5994cde8..49bfa0b86b5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -442,7 +442,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.1.0 + 4.8.2.0 From 8161c9f334b055db70eb512f8eaefdb43664bc9f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 16:26:47 +0100 Subject: [PATCH 133/271] JCR-5019: Update build-helper-maven-plugin to version 3.5.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 49bfa0b86b5..1d512c9785e 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -405,7 +405,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.4.0 + 3.5.0 org.codehaus.mojo From 2501b12ac465555130ad2377cdf937f1d4188a35 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 12 Jan 2024 17:14:58 +0100 Subject: [PATCH 134/271] JCR-5018: bump up minimal Java version to 11 --- README.txt | 2 +- jackrabbit-parent/pom.xml | 31 +++++++------------------------ 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/README.txt b/README.txt index cbf57b754f1..776b26e2d81 100644 --- a/README.txt +++ b/README.txt @@ -19,7 +19,7 @@ You can build Jackrabbit like this: mvn clean install -You need Maven 3 (or higher) with Java 8 (or higher) for the +You need Maven 3 (or higher) with Java 11 (or higher) for the build. For more instructions, please see the documentation at: http://jackrabbit.apache.org/building-jackrabbit.html diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1d512c9785e..7a3caf1242c 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -64,8 +64,10 @@ 1.7.36 1.7.36 1.2.11 - 1.8 - java18 + 11 + ${java.version} + ${java.version} + ${java.version} true 0.0 0.0 @@ -204,29 +206,10 @@ maven-compiler-plugin - ${java.version} - ${java.version} - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - 1.23 - - - org.codehaus.mojo.signature - ${java.version.signature} - 1.0 - + + -Xpkginfo:always + - - - compile - - check - - - From baa52ef20f98b257101bc37285c44f399d61a0fd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jan 2024 15:52:21 +0100 Subject: [PATCH 135/271] JCR-5018: bump up minimal Java version to 11 (rename variable) --- jackrabbit-parent/pom.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 7a3caf1242c..832adfc310f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -64,10 +64,13 @@ 1.7.36 1.7.36 1.2.11 - 11 - ${java.version} - ${java.version} - ${java.version} + + + 11 + ${javaTargetVersion} + ${javaTargetVersion} + ${javaTargetVersion} + true 0.0 0.0 From a80549f753cd99e940b340ce496d2157b89034bc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jan 2024 17:43:15 +0100 Subject: [PATCH 136/271] JCR-5020: jackrabbit-webapp: deprecate RMI support "for removal" --- .../apache/jackrabbit/j2ee/BootstrapConfig.java | 6 +++--- .../java/org/apache/jackrabbit/j2ee/RMIConfig.java | 2 +- .../jackrabbit/j2ee/RepositoryAccessServlet.java | 6 +++--- .../jackrabbit/j2ee/RepositoryStartupServlet.java | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java index dfff9fd4f6c..e34795e1d5d 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java @@ -46,7 +46,7 @@ public class BootstrapConfig extends AbstractConfig { private JNDIConfig jndiConfig = new JNDIConfig(this); - @Deprecated private RMIConfig rmiConfig = new RMIConfig(this); + @Deprecated(forRemoval = true) private RMIConfig rmiConfig = new RMIConfig(this); public void init(Properties props) throws ServletException { String property = props.getProperty("repository.home");; @@ -110,14 +110,14 @@ public void setRepositoryName(String repositoryName) { /** * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ - @Deprecated public JNDIConfig getJndiConfig() { + @Deprecated(forRemoval = true) public JNDIConfig getJndiConfig() { return jndiConfig; } /** * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ - @Deprecated public RMIConfig getRmiConfig() { + @Deprecated(forRemoval = true) public RMIConfig getRmiConfig() { return rmiConfig; } diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java index e82351bf3ef..8e2390fc871 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java @@ -45,7 +45,7 @@ * +-------------------+--------------------+ * */ -@Deprecated public class RMIConfig extends AbstractConfig { +@Deprecated(forRemoval = true) public class RMIConfig extends AbstractConfig { /** * default logger diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java index a8e383c6f0c..38feeb36cd7 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java @@ -229,7 +229,7 @@ private Repository getRepositoryByJNDI() throws ServletException { * @return the repository or null * @throws ServletException if this servlet is not properly configured. */ - @Deprecated private Repository getRepositoryByRMI() throws ServletException { + @Deprecated(forRemoval = true) private Repository getRepositoryByRMI() throws ServletException { BootstrapConfig config = getConfig(); if (!config.getRmiConfig().isValid() || !config.getRmiConfig().enabled()) { return null; @@ -345,7 +345,7 @@ public BootstrapConfig getBootstrapConfig() { *

    * optional class for RMI, will only be used, if RMI client is present */ - @Deprecated protected static abstract class ClientFactoryDelegater { + @Deprecated(forRemoval = true) protected static abstract class ClientFactoryDelegater { public abstract Repository getRepository(String uri) throws RemoteException, MalformedURLException, NotBoundException; @@ -356,7 +356,7 @@ public abstract Repository getRepository(String uri) *

    * optional class for RMI, will only be used, if RMI server is present */ - @Deprecated protected static class RMIClientFactoryDelegater extends ClientFactoryDelegater { + @Deprecated(forRemoval = true) protected static class RMIClientFactoryDelegater extends ClientFactoryDelegater { // only used to enforce linking upon Class.forName() static String FactoryClassName = ClientRepositoryFactory.class.getName(); diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java index b2041b0c90d..10941628592 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java @@ -177,7 +177,7 @@ public class RepositoryStartupServlet extends AbstractRepositoryServlet { */ private InitialContext jndiContext; - @Deprecated private Registry rmiRegistry = null; + @Deprecated(forRemoval = true) private Registry rmiRegistry = null; /** * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. @@ -192,7 +192,7 @@ public class RepositoryStartupServlet extends AbstractRepositoryServlet { * @see #registerRMI() * @see #unregisterRMI() */ - @Deprecated private Remote rmiRepository; + @Deprecated(forRemoval = true) private Remote rmiRepository; /** * the file to the bootstrap config @@ -498,7 +498,7 @@ private void unregisterJNDI() { * the repository with an RMI registry. * @throws ServletException if an error occurs. */ - @Deprecated private void registerRMI() { + @Deprecated(forRemoval = true) private void registerRMI() { RMIConfig rc = config.getRmiConfig(); if (!rc.isValid() || !rc.enabled()) { return; @@ -597,7 +597,7 @@ private void unregisterJNDI() { * Unregisters the repository from the RMI registry, if it has previously * been registered. */ - @Deprecated private void unregisterRMI() { + @Deprecated(forRemoval = true) private void unregisterRMI() { if (rmiRepository != null) { // Forcibly unexport the repository; try { @@ -668,7 +668,7 @@ protected String getRemoteFactoryDelegaterClass() { * creating java.net.ServerSocket instances bound to * the rmiHost. */ - @Deprecated protected RMIServerSocketFactory getRMIServerSocketFactory( + @Deprecated(forRemoval = true) protected RMIServerSocketFactory getRMIServerSocketFactory( final InetAddress hostAddress) { return new RMIServerSocketFactory() { public ServerSocket createServerSocket(int port) throws IOException { @@ -682,7 +682,7 @@ public ServerSocket createServerSocket(int port) throws IOException { *

    * optional class for RMI, will only be used, if RMI server is present */ - @Deprecated protected static abstract class RemoteFactoryDelegater { + @Deprecated(forRemoval = true) protected static abstract class RemoteFactoryDelegater { public abstract Remote createRemoteRepository(Repository repository) throws RemoteException; @@ -693,7 +693,7 @@ public abstract Remote createRemoteRepository(Repository repository) *

    * optional class for RMI, will only be used, if RMI server is present */ - @Deprecated protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater { + @Deprecated(forRemoval = true) protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater { private static final RemoteAdapterFactory FACTORY = new ServerAdapterFactory(); From 20405ac058a96442e5c40877e796b08237e496d8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 19 Jan 2024 18:35:39 +0100 Subject: [PATCH 137/271] JCR-5021: jackrabbit-jcr-rmi: deprecate RMI support "for removal" --- .../apache/jackrabbit/rmi/client/BrokenRemoteRepository.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/client/ClientItem.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientItemDefinition.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/client/ClientLock.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientLockManager.java | 2 +- .../apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/client/ClientNode.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientNodeType.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientObject.java | 2 +- .../apache/jackrabbit/rmi/client/ClientObservationManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientProperty.java | 2 +- .../apache/jackrabbit/rmi/client/ClientPropertyDefinition.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientQueryManager.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientQueryResult.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientRepository.java | 2 +- .../apache/jackrabbit/rmi/client/ClientRepositoryFactory.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/client/ClientRow.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientSession.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientVersion.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientVersionHistory.java | 2 +- .../org/apache/jackrabbit/rmi/client/ClientVersionManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java | 2 +- .../java/org/apache/jackrabbit/rmi/client/ClientXASession.java | 2 +- .../org/apache/jackrabbit/rmi/client/DefaultContentHandler.java | 2 +- .../org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java | 2 +- .../apache/jackrabbit/rmi/client/RemoteRepositoryException.java | 2 +- .../apache/jackrabbit/rmi/client/RemoteRuntimeException.java | 2 +- .../org/apache/jackrabbit/rmi/client/SafeClientRepository.java | 2 +- .../apache/jackrabbit/rmi/client/SerializingContentHandler.java | 2 +- .../apache/jackrabbit/rmi/client/iterator/ClientIterator.java | 2 +- .../jackrabbit/rmi/client/iterator/ClientNodeIterator.java | 2 +- .../jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java | 2 +- .../jackrabbit/rmi/client/iterator/ClientPropertyIterator.java | 2 +- .../jackrabbit/rmi/client/iterator/ClientRowIterator.java | 2 +- .../jackrabbit/rmi/client/iterator/ClientVersionIterator.java | 2 +- .../org/apache/jackrabbit/rmi/client/principal/ClientGroup.java | 2 +- .../apache/jackrabbit/rmi/client/principal/ClientPrincipal.java | 2 +- .../rmi/client/principal/ClientPrincipalIterator.java | 2 +- .../rmi/client/security/ClientAccessControlEntry.java | 2 +- .../jackrabbit/rmi/client/security/ClientAccessControlList.java | 2 +- .../rmi/client/security/ClientAccessControlManager.java | 2 +- .../rmi/client/security/ClientAccessControlPolicy.java | 2 +- .../rmi/client/security/ClientAccessControlPolicyIterator.java | 2 +- .../apache/jackrabbit/rmi/client/security/ClientPrivilege.java | 2 +- .../org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java | 2 +- .../jackrabbit/rmi/iterator/ArrayEventListenerIterator.java | 2 +- .../java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java | 2 +- .../rmi/jackrabbit/JackrabbitClientAdapterFactory.java | 2 +- .../org/apache/jackrabbit/rmi/observation/ClientEventPoll.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/observation/Queue.java | 2 +- .../jackrabbit/rmi/observation/ServerEventListenerProxy.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/BufferIterator.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteLockManager.java | 2 +- .../apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java | 2 +- .../apache/jackrabbit/rmi/remote/RemoteObservationManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java | 2 +- .../apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteSession.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java | 2 +- .../org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java | 2 +- .../java/org/apache/jackrabbit/rmi/remote/SerializableXid.java | 2 +- .../org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java | 2 +- .../apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java | 2 +- .../rmi/remote/security/RemoteAccessControlEntry.java | 2 +- .../jackrabbit/rmi/remote/security/RemoteAccessControlList.java | 2 +- .../rmi/remote/security/RemoteAccessControlManager.java | 2 +- .../rmi/remote/security/RemoteAccessControlPolicy.java | 2 +- .../apache/jackrabbit/rmi/remote/security/RemotePrivilege.java | 2 +- .../rmi/repository/AbstractRemoteRepositoryFactory.java | 2 +- .../apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java | 2 +- .../jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java | 2 +- .../org/apache/jackrabbit/rmi/repository/ProxyRepository.java | 2 +- .../apache/jackrabbit/rmi/repository/RMIRemoteRepository.java | 2 +- .../jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java | 2 +- .../org/apache/jackrabbit/rmi/repository/RepositoryFactory.java | 2 +- .../apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java | 2 +- .../apache/jackrabbit/rmi/repository/URLRemoteRepository.java | 2 +- .../jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java | 2 +- .../org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerEventCollection.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/server/ServerItem.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerItemDefinition.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/server/ServerLock.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerLockManager.java | 2 +- .../apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/server/ServerNode.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerNodeType.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerObject.java | 2 +- .../apache/jackrabbit/rmi/server/ServerObservationManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerProperty.java | 2 +- .../apache/jackrabbit/rmi/server/ServerPropertyDefinition.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerQueryManager.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerQueryResult.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerRepository.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/server/ServerRow.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerSession.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerVersion.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerVersionHistory.java | 2 +- .../org/apache/jackrabbit/rmi/server/ServerVersionManager.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/ServerXASession.java | 2 +- .../apache/jackrabbit/rmi/server/iterator/ServerIterator.java | 2 +- .../jackrabbit/rmi/server/iterator/ServerNodeIterator.java | 2 +- .../jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java | 2 +- .../jackrabbit/rmi/server/iterator/ServerPropertyIterator.java | 2 +- .../jackrabbit/rmi/server/iterator/ServerRowIterator.java | 2 +- .../jackrabbit/rmi/server/iterator/ServerVersionIterator.java | 2 +- .../java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java | 2 +- .../org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java | 2 +- .../org/apache/jackrabbit/rmi/server/principal/ServerGroup.java | 2 +- .../apache/jackrabbit/rmi/server/principal/ServerPrincipal.java | 2 +- .../rmi/server/principal/ServerPrincipalIterator.java | 2 +- .../rmi/server/security/ServerAccessControlEntry.java | 2 +- .../jackrabbit/rmi/server/security/ServerAccessControlList.java | 2 +- .../rmi/server/security/ServerAccessControlManager.java | 2 +- .../rmi/server/security/ServerAccessControlPolicy.java | 2 +- .../rmi/server/security/ServerAccessControlPolicyIterator.java | 2 +- .../apache/jackrabbit/rmi/server/security/ServerPrivilege.java | 2 +- .../java/org/apache/jackrabbit/rmi/value/AbstractValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/DateValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/LongValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/NameValue.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/PathValue.java | 2 +- .../java/org/apache/jackrabbit/rmi/value/ReferenceValue.java | 2 +- .../org/apache/jackrabbit/rmi/value/SerialValueFactory.java | 2 +- .../org/apache/jackrabbit/rmi/value/SerializableBinary.java | 2 +- .../main/java/org/apache/jackrabbit/rmi/value/StringValue.java | 2 +- .../test/java/org/apache/jackrabbit/rmi/ConformanceTest.java | 2 +- .../test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java | 2 +- 159 files changed, 159 insertions(+), 159 deletions(-) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java index efb1408d0e4..1b4c329c985 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java @@ -31,7 +31,7 @@ * whenever any method is invoked. Used as a sentinel object by the * {@link SafeClientRepository} class. */ -@Deprecated public class BrokenRemoteRepository implements RemoteRepository { +@Deprecated(forRemoval = true) public class BrokenRemoteRepository implements RemoteRepository { /** * The remote exception thrown by methods of this instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java index 5b5007e2830..7b8c50eaac7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java @@ -108,7 +108,7 @@ * easily override or extend the default adapters by implementing the * corresponding factory methods. */ -@Deprecated public class ClientAdapterFactory implements LocalAdapterFactory { +@Deprecated(forRemoval = true) public class ClientAdapterFactory implements LocalAdapterFactory { /** * Creates and returns a {@link ClientRepository ClientRepository} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java index 6be987761d5..901e34004dc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java @@ -42,7 +42,7 @@ * @see javax.jcr.Item * @see org.apache.jackrabbit.rmi.remote.RemoteItem */ -@Deprecated public class ClientItem extends ClientObject implements Item { +@Deprecated(forRemoval = true) public class ClientItem extends ClientObject implements Item { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java index 34785c5d9ef..a602adc16ef 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java @@ -39,7 +39,7 @@ * @see javax.jcr.nodetype.ItemDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition */ -@Deprecated public class ClientItemDefinition extends ClientObject implements ItemDefinition { +@Deprecated(forRemoval = true) public class ClientItemDefinition extends ClientObject implements ItemDefinition { /** The adapted remote item definition. */ private RemoteItemDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java index 9d27d87a51e..39e32ad76fc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java @@ -36,7 +36,7 @@ * @see javax.jcr.lock.Lock * @see org.apache.jackrabbit.rmi.remote.RemoteLock */ -@Deprecated public class ClientLock extends ClientObject implements Lock { +@Deprecated(forRemoval = true) public class ClientLock extends ClientObject implements Lock { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java index 1a6218c2cab..02ca2d94fef 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -@Deprecated public class ClientLockManager extends ClientObject implements LockManager { +@Deprecated(forRemoval = true) public class ClientLockManager extends ClientObject implements LockManager { /** The current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java index 364d6bcc86f..0a95cc576fc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java @@ -35,7 +35,7 @@ * @see javax.jcr.NamespaceRegistry * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry */ -@Deprecated public class ClientNamespaceRegistry extends ClientObject implements +@Deprecated(forRemoval = true) public class ClientNamespaceRegistry extends ClientObject implements NamespaceRegistry { /** The adapted remote namespace registry. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java index 76bbed5ac67..eb970ebeac8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java @@ -53,7 +53,7 @@ * @see javax.jcr.Node * @see org.apache.jackrabbit.rmi.remote.RemoteNode */ -@Deprecated public class ClientNode extends ClientItem implements Node { +@Deprecated(forRemoval = true) public class ClientNode extends ClientItem implements Node { /** The adapted remote node. */ private RemoteNode remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java index de52d5fb506..05cbc568589 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java @@ -35,7 +35,7 @@ * @see javax.jcr.nodetype.NodeDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition */ -@Deprecated public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { +@Deprecated(forRemoval = true) public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { /** The adapted remote node definition. */ private RemoteNodeDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java index e122288e1d5..37bf473646e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java @@ -41,7 +41,7 @@ * @see javax.jcr.nodetype.NodeType * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType */ -@Deprecated public class ClientNodeType extends ClientObject implements NodeType { +@Deprecated(forRemoval = true) public class ClientNodeType extends ClientObject implements NodeType { /** The adapted remote node type. */ private RemoteNodeType remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java index b6011357757..2a4555521b5 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java @@ -42,7 +42,7 @@ * @see javax.jcr.nodetype.NodeTypeManager * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager */ -@Deprecated public class ClientNodeTypeManager extends ClientObject +@Deprecated(forRemoval = true) public class ClientNodeTypeManager extends ClientObject implements NodeTypeManager { /** The adapted remote node type manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java index 79cedec6511..5241619921c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java @@ -36,7 +36,7 @@ * local adapter factory used by the client adapters to * instantiate new adapters. */ -@Deprecated public class ClientObject { +@Deprecated(forRemoval = true) public class ClientObject { /** Local adapter factory. */ private LocalAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java index dee8bc99bd1..e30761eaf8f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java @@ -49,7 +49,7 @@ * * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll */ -@Deprecated public class ClientObservationManager extends ClientObject implements +@Deprecated(forRemoval = true) public class ClientObservationManager extends ClientObject implements ObservationManager { /** The remote observation manager */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java index 8646f1e4c2e..16f0359f6a3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java @@ -49,7 +49,7 @@ * @see javax.jcr.Property * @see org.apache.jackrabbit.rmi.remote.RemoteProperty */ -@Deprecated public class ClientProperty extends ClientItem implements Property { +@Deprecated(forRemoval = true) public class ClientProperty extends ClientItem implements Property { /** The adapted remote property. */ private RemoteProperty remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java index 0fdec062898..161ba536fd1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java @@ -34,7 +34,7 @@ * @see javax.jcr.nodetype.PropertyDefinition * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition */ -@Deprecated public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { +@Deprecated(forRemoval = true) public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { /** The adapted remote property. */ private RemotePropertyDefinition remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java index 65d9d821fef..aee001a45b0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java @@ -38,7 +38,7 @@ * @see javax.jcr.query.Query Query * @see org.apache.jackrabbit.rmi.remote.RemoteQuery */ -@Deprecated public class ClientQuery extends ClientObject implements Query { +@Deprecated(forRemoval = true) public class ClientQuery extends ClientObject implements Query { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java index f29f40b93d9..3590c2be6e6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java @@ -38,7 +38,7 @@ * @see javax.jcr.query.QueryManager QueryManager * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager */ -@Deprecated public class ClientQueryManager extends ClientObject implements QueryManager { +@Deprecated(forRemoval = true) public class ClientQueryManager extends ClientObject implements QueryManager { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java index 030a786e950..a03b458622f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java @@ -37,7 +37,7 @@ * @see javax.jcr.query.QueryResult QueryResult * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult */ -@Deprecated public class ClientQueryResult extends ClientObject implements QueryResult { +@Deprecated(forRemoval = true) public class ClientQueryResult extends ClientObject implements QueryResult { /** The current session */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java index 974af7134e3..07285c7c9ba 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java @@ -41,7 +41,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -@Deprecated public class ClientRepository implements Repository { +@Deprecated(forRemoval = true) public class ClientRepository implements Repository { /** * The set of standard descriptor keys defined in the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java index b360ef4f7a6..dd785636835 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java @@ -39,7 +39,7 @@ * * @see ClientRepository */ -@Deprecated public class ClientRepositoryFactory implements ObjectFactory { +@Deprecated(forRemoval = true) public class ClientRepositoryFactory implements ObjectFactory { /** * The JNDI parameter name for configuring the RMI URL of diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java index f64aa83172f..38701da7629 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java @@ -36,7 +36,7 @@ * @see javax.jcr.query.Row Row * @see org.apache.jackrabbit.rmi.remote.RemoteRow */ -@Deprecated public class ClientRow extends ClientObject implements Row { +@Deprecated(forRemoval = true) public class ClientRow extends ClientObject implements Row { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java index b74e8ee0a41..a07769bbd8b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java @@ -63,7 +63,7 @@ * @see javax.jcr.Session * @see org.apache.jackrabbit.rmi.remote.RemoteSession */ -@Deprecated public class ClientSession extends ClientObject implements Session { +@Deprecated(forRemoval = true) public class ClientSession extends ClientObject implements Session { /** * Logger instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java index 8f101222fd0..c48b605a74c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java @@ -38,7 +38,7 @@ * @see javax.jcr.version.Version * @see org.apache.jackrabbit.rmi.remote.RemoteVersion */ -@Deprecated public class ClientVersion extends ClientNode implements Version { +@Deprecated(forRemoval = true) public class ClientVersion extends ClientNode implements Version { /** The adapted remote version. */ private RemoteVersion remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java index 5c495526ba4..6e6887b8d8e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java @@ -40,7 +40,7 @@ * @see javax.jcr.version.VersionHistory * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory */ -@Deprecated public class ClientVersionHistory extends ClientNode implements VersionHistory { +@Deprecated(forRemoval = true) public class ClientVersionHistory extends ClientNode implements VersionHistory { /** The adapted remote version history. */ private RemoteVersionHistory remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java index 7cf35518d93..502146b85da 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java @@ -30,7 +30,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteNode; import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -@Deprecated public class ClientVersionManager extends ClientObject +@Deprecated(forRemoval = true) public class ClientVersionManager extends ClientObject implements VersionManager { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java index 1bcf10d30fa..ec8e74e5394 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java @@ -49,7 +49,7 @@ * @see javax.jcr.Workspace * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace */ -@Deprecated public class ClientWorkspace extends ClientObject implements Workspace { +@Deprecated(forRemoval = true) public class ClientWorkspace extends ClientObject implements Workspace { /** The current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java index 4aea1217ff3..d9fcb0f12ff 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java @@ -36,7 +36,7 @@ * * @since 1.4 */ -@Deprecated public class ClientXASession extends ClientSession implements XAResource { +@Deprecated(forRemoval = true) public class ClientXASession extends ClientSession implements XAResource { /** * The adapted remote transaction enabled session. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java index a4b3027a168..c2d1765dec3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java @@ -28,7 +28,7 @@ * Adapter class for exposing a {@link ContentHandler} instance as * {@link DefaultHandler} object. */ -@Deprecated class DefaultContentHandler extends DefaultHandler { +@Deprecated(forRemoval = true) class DefaultContentHandler extends DefaultHandler { /** * The adapted content handler instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java index 7c2efe7710f..611860c072c 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java @@ -101,7 +101,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory * @see org.apache.jackrabbit.rmi.client.ClientObject */ -@Deprecated public interface LocalAdapterFactory { +@Deprecated(forRemoval = true) public interface LocalAdapterFactory { /** * Factory method for creating a local adapter for a remote repository. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java index 30eaf35b2be..ef22fd94cbe 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java @@ -30,7 +30,7 @@ * exceptions, then the RemoteException is wrapped into a * RemoteRuntimeException. */ -@Deprecated public class RemoteRepositoryException extends RepositoryException { +@Deprecated(forRemoval = true) public class RemoteRepositoryException extends RepositoryException { /** * Creates a RemoteRepositoryException based on the given RemoteException. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java index e2eb42aed97..a446e51179d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java @@ -28,7 +28,7 @@ * throw RepositoryExceptions, then the RemoteException is wrapped into * a RemoteRepositoryException. */ -@Deprecated public class RemoteRuntimeException extends RuntimeException { +@Deprecated(forRemoval = true) public class RemoteRuntimeException extends RuntimeException { /** * Creates a RemoteRuntimeException based on the given RemoteException. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java index 5a7319413c3..c9981ba0092 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java @@ -41,7 +41,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -@Deprecated public abstract class SafeClientRepository extends ClientObject +@Deprecated(forRemoval = true) public abstract class SafeClientRepository extends ClientObject implements Repository { /** The adapted remote repository. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java index 0afc09e79c9..a50bcdafe45 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java @@ -57,7 +57,7 @@ * org.apache.cocoon.serialization.AbstractTextSerializer class in the * cocoon-pipeline-impl component for the original code. */ -@Deprecated class SerializingContentHandler extends DefaultContentHandler { +@Deprecated(forRemoval = true) class SerializingContentHandler extends DefaultContentHandler { /** * The character encoding used for serialization (UTF-8). diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java index 3610a797490..dfc4123c1c2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java @@ -36,7 +36,7 @@ *

    * See the subclasses for type-specific versions of this abstract class. */ -@Deprecated public abstract class ClientIterator extends ClientObject +@Deprecated(forRemoval = true) public abstract class ClientIterator extends ClientObject implements RangeIterator { /** The adapted remote iterator. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java index f57dcec0c0c..71c7e121489 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java @@ -29,7 +29,7 @@ *

    * A ClientIterator for iterating remote nodes. */ -@Deprecated public class ClientNodeIterator extends ClientIterator implements NodeIterator { +@Deprecated(forRemoval = true) public class ClientNodeIterator extends ClientIterator implements NodeIterator { /** The current session. */ private final Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java index 73d1803ac03..8bf80cbf30b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java @@ -28,7 +28,7 @@ *

    * A ClientIterator for iterating remote node types. */ -@Deprecated public class ClientNodeTypeIterator extends ClientIterator +@Deprecated(forRemoval = true) public class ClientNodeTypeIterator extends ClientIterator implements NodeTypeIterator { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java index f825bc1b548..47e7a35ffae 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java @@ -29,7 +29,7 @@ *

    * A ClientIterator for iterating remote properties. */ -@Deprecated public class ClientPropertyIterator extends ClientIterator +@Deprecated(forRemoval = true) public class ClientPropertyIterator extends ClientIterator implements PropertyIterator { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java index c092440f42b..6774b10ce07 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java @@ -29,7 +29,7 @@ *

    * A ClientIterator for iterating remote rows. */ -@Deprecated public class ClientRowIterator extends ClientIterator implements RowIterator { +@Deprecated(forRemoval = true) public class ClientRowIterator extends ClientIterator implements RowIterator { /** Current session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java index 1178ce97740..4d1cd98ccad 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java @@ -29,7 +29,7 @@ *

    * A ClientIterator for iterating remote versions. */ -@Deprecated public class ClientVersionIterator extends ClientIterator +@Deprecated(forRemoval = true) public class ClientVersionIterator extends ClientIterator implements VersionIterator { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java index c2a849ef758..8953b1acbba 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java @@ -37,7 +37,7 @@ * * @see RemoteGroup */ -@Deprecated public class ClientGroup extends ClientPrincipal implements GroupPrincipal { +@Deprecated(forRemoval = true) public class ClientGroup extends ClientPrincipal implements GroupPrincipal { private final LocalAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java index 1052de5f7a2..24420e51817 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java @@ -34,7 +34,7 @@ * @see Principal * @see RemotePrincipal */ -@Deprecated public class ClientPrincipal implements Principal { +@Deprecated(forRemoval = true) public class ClientPrincipal implements Principal { private final RemotePrincipal p; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java index b8b152ec7f4..31f893b9e10 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java @@ -28,7 +28,7 @@ *

    * A ClientIterator for iterating remote principals */ -@Deprecated public class ClientPrincipalIterator extends ClientIterator { +@Deprecated(forRemoval = true) public class ClientPrincipalIterator extends ClientIterator { public ClientPrincipalIterator(final RemoteIterator iterator, final LocalAdapterFactory factory) { diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java index 481faac7ae7..1e1b3251c3d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java @@ -40,7 +40,7 @@ * @see javax.jcr.security.AccessControlEntry * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry */ -@Deprecated public class ClientAccessControlEntry extends ClientObject implements +@Deprecated(forRemoval = true) public class ClientAccessControlEntry extends ClientObject implements AccessControlEntry { private final RemoteAccessControlEntry race; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java index 110e90bf8b0..c497d95bac0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java @@ -42,7 +42,7 @@ * @see javax.jcr.security.AccessControlList * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList */ -@Deprecated public class ClientAccessControlList extends ClientAccessControlPolicy +@Deprecated(forRemoval = true) public class ClientAccessControlList extends ClientAccessControlPolicy implements AccessControlList { public ClientAccessControlList(final RemoteAccessControlList racl, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java index 36972f5d49d..d8c4fd96d75 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java @@ -45,7 +45,7 @@ * @see javax.jcr.security.AccessControlManager * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager */ -@Deprecated public class ClientAccessControlManager extends ClientObject implements +@Deprecated(forRemoval = true) public class ClientAccessControlManager extends ClientObject implements AccessControlManager { private final RemoteAccessControlManager racm; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java index 0b0f719bf12..30c12bd3ec6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java @@ -34,7 +34,7 @@ * @see javax.jcr.security.AccessControlPolicy * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy */ -@Deprecated public class ClientAccessControlPolicy extends ClientObject implements +@Deprecated(forRemoval = true) public class ClientAccessControlPolicy extends ClientObject implements AccessControlPolicy { private final RemoteAccessControlPolicy racp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java index 9774cddc7bc..80ac1bb0759 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java @@ -29,7 +29,7 @@ *

    * A ClientIterator for iterating remote access control policies. */ -@Deprecated public class ClientAccessControlPolicyIterator extends ClientIterator implements +@Deprecated(forRemoval = true) public class ClientAccessControlPolicyIterator extends ClientIterator implements AccessControlPolicyIterator { public ClientAccessControlPolicyIterator(RemoteIterator iterator, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java index 975cbf28018..0bcfb22b1c1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java @@ -37,7 +37,7 @@ * @see javax.jcr.security.Privilege * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege */ -@Deprecated public class ClientPrivilege extends ClientObject implements Privilege { +@Deprecated(forRemoval = true) public class ClientPrivilege extends ClientObject implements Privilege { private final RemotePrivilege rp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java index e045b4141b3..7b84b842279 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java @@ -27,7 +27,7 @@ * This class is used by the JCR-RMI client adapters to convert * node arrays to iterators. */ -@Deprecated public class ArrayEventIterator extends ArrayIterator implements EventIterator { +@Deprecated(forRemoval = true) public class ArrayEventIterator extends ArrayIterator implements EventIterator { /** * Creates an iterator for the given array of events. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java index f83a7ac65e2..1abc13e4cc4 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java @@ -27,7 +27,7 @@ * This class is used by the JCR-RMI client adapters to convert * listener arrays to iterators. */ -@Deprecated public class ArrayEventListenerIterator extends ArrayIterator +@Deprecated(forRemoval = true) public class ArrayEventListenerIterator extends ArrayIterator implements EventListenerIterator { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java index 3b51825df50..bdc89d6f277 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java @@ -29,7 +29,7 @@ * of objects. Used as the base class for the type-specific iterator * classes defined in this package. */ -@Deprecated public class ArrayIterator implements RangeIterator { +@Deprecated(forRemoval = true) public class ArrayIterator implements RangeIterator { /** The current iterator position. */ private int position; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java index 8d613bfedc9..5fcfb5ba432 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java @@ -23,5 +23,5 @@ *

    * @deprecated Use the normal {@link ClientAdapterFactory} instead */ -@Deprecated public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { +@Deprecated(forRemoval = true) public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { } diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java index 325c2bfc3f1..a30ebd589a3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java @@ -55,7 +55,7 @@ * * @see #run() */ -@Deprecated public class ClientEventPoll extends Thread { +@Deprecated(forRemoval = true) public class ClientEventPoll extends Thread { /** logger */ private static final Logger log = diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java index 9a25f040797..5b39287157f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java @@ -25,7 +25,7 @@ * at least one consumer and potentially multiple producers. This class poses * no restrictions on the size of the queue. */ -@Deprecated public class Queue { +@Deprecated(forRemoval = true) public class Queue { /** The linked list implementing the queue of data */ private final LinkedList queue; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java index cbfe0443902..94f78b6d13a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java @@ -44,7 +44,7 @@ * See the package overview for an explanation of the mechanisms implemented for * event dispatching. */ -@Deprecated public class ServerEventListenerProxy implements EventListener { +@Deprecated(forRemoval = true) public class ServerEventListenerProxy implements EventListener { /** logger */ private static final Logger log = diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java index 046f6f7dbf8..146f1479a63 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java @@ -26,7 +26,7 @@ * short enough for all the elements to be sent over the network in * one go. */ -@Deprecated public class ArrayIterator implements RemoteIterator, Serializable { +@Deprecated(forRemoval = true) public class ArrayIterator implements RemoteIterator, Serializable { /** * The elements in this iterator. Set to null when diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java index 36b60556437..43d8e7d0082 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java @@ -27,7 +27,7 @@ * along with a buffer of the first few iterator elements in one network * transmission. */ -@Deprecated public class BufferIterator implements RemoteIterator, Serializable { +@Deprecated(forRemoval = true) public class BufferIterator implements RemoteIterator, Serializable { /** The element buffer. Set to null when the iterator ends. */ private Object[] buffer; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java index 5c5e9c3d246..0013e31881a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java @@ -31,7 +31,7 @@ * event poller. On the client-side the enclosed list of events is then sent to * the listener identified by the contained listener identifier. */ -@Deprecated public interface RemoteEventCollection extends Remote { +@Deprecated(forRemoval = true) public interface RemoteEventCollection extends Remote { /** * Returns unique identifier of the client-side listener to which the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java index bf6d0feeb76..bc459dc06cf 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java @@ -41,7 +41,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientItem * @see org.apache.jackrabbit.rmi.server.ServerItem */ -@Deprecated public interface RemoteItem extends Remote { +@Deprecated(forRemoval = true) public interface RemoteItem extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java index ac48d5e30c8..fdfedb991cb 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientItemDefinition * @see org.apache.jackrabbit.rmi.server.ServerItemDefinition */ -@Deprecated public interface RemoteItemDefinition extends Remote { +@Deprecated(forRemoval = true) public interface RemoteItemDefinition extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java index 82ad895b688..42604b88223 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java @@ -31,7 +31,7 @@ * This interface allows both the client and server side to control the * amount of buffering used to increase performance. */ -@Deprecated public interface RemoteIterator extends Remote { +@Deprecated(forRemoval = true) public interface RemoteIterator extends Remote { /** * Returns the size of the iteration, or -1 if the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java index 49fad069199..d9ba20e269b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java @@ -39,7 +39,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientLock * @see org.apache.jackrabbit.rmi.server.ServerLock */ -@Deprecated public interface RemoteLock extends Remote { +@Deprecated(forRemoval = true) public interface RemoteLock extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java index 2bf498003fa..894fee12f1f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java @@ -21,7 +21,7 @@ import javax.jcr.RepositoryException; -@Deprecated public interface RemoteLockManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteLockManager extends Remote { String[] getLockTokens() throws RepositoryException, RemoteException; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java index a602126c3f0..a241f0cc1ac 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry * @see org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry */ -@Deprecated public interface RemoteNamespaceRegistry extends Remote { +@Deprecated(forRemoval = true) public interface RemoteNamespaceRegistry extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java index 5558fe9799d..886cfe2bd41 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java @@ -51,7 +51,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNode * @see org.apache.jackrabbit.rmi.server.ServerNode */ -@Deprecated public interface RemoteNode extends RemoteItem { +@Deprecated(forRemoval = true) public interface RemoteNode extends RemoteItem { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java index 3768f2b6a1a..49c9ce9497a 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java @@ -40,7 +40,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeDefinition * @see org.apache.jackrabbit.rmi.server.ServerNodeDefinition */ -@Deprecated public interface RemoteNodeDefinition extends RemoteItemDefinition { +@Deprecated(forRemoval = true) public interface RemoteNodeDefinition extends RemoteItemDefinition { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java index 01687cc762f..08240e1e494 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeType * @see org.apache.jackrabbit.rmi.server.ServerNodeType */ -@Deprecated public interface RemoteNodeType extends Remote { +@Deprecated(forRemoval = true) public interface RemoteNodeType extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java index d71be1686d7..ba74f0981e3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java @@ -46,7 +46,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientNodeTypeManager * @see org.apache.jackrabbit.rmi.server.ServerNodeTypeManager */ -@Deprecated public interface RemoteNodeTypeManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteNodeTypeManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java index 04569f2bd26..3bab8ecdb67 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java @@ -40,7 +40,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientObservationManager * @see org.apache.jackrabbit.rmi.server.ServerObservationManager */ -@Deprecated public interface RemoteObservationManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteObservationManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java index cd41a5b35f4..6b61f89a517 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java @@ -51,7 +51,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientProperty * @see org.apache.jackrabbit.rmi.server.ServerProperty */ -@Deprecated public interface RemoteProperty extends RemoteItem { +@Deprecated(forRemoval = true) public interface RemoteProperty extends RemoteItem { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java index 68ed5999b52..7c0ffc78fd6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java @@ -45,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientPropertyDefinition * @see org.apache.jackrabbit.rmi.server.ServerPropertyDefinition */ -@Deprecated public interface RemotePropertyDefinition extends RemoteItemDefinition { +@Deprecated(forRemoval = true) public interface RemotePropertyDefinition extends RemoteItemDefinition { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java index b0f6d997842..638700400d3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java @@ -36,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQuery * @see org.apache.jackrabbit.rmi.server.ServerQuery */ -@Deprecated public interface RemoteQuery extends Remote { +@Deprecated(forRemoval = true) public interface RemoteQuery extends Remote { /** * @see javax.jcr.query.Query#execute() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java index b3d65d3b79b..fd4e25fdaff 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java @@ -36,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQueryManager * @see org.apache.jackrabbit.rmi.server.ServerQueryManager */ -@Deprecated public interface RemoteQueryManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteQueryManager extends Remote { /** * @see javax.jcr.query.QueryManager#createQuery diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java index ee3754b03db..84bff566655 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java @@ -35,7 +35,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientQueryResult * @see org.apache.jackrabbit.rmi.server.ServerQueryResult */ -@Deprecated public interface RemoteQueryResult extends Remote { +@Deprecated(forRemoval = true) public interface RemoteQueryResult extends Remote { /** * @see javax.jcr.query.QueryResult#getColumnNames() * diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java index 01c4b3486e0..f1189b628ea 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java @@ -45,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientRepository * @see org.apache.jackrabbit.rmi.server.ServerRepository */ -@Deprecated public interface RemoteRepository extends Remote { +@Deprecated(forRemoval = true) public interface RemoteRepository extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java index 15784c5e749..ae9419b54a3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java @@ -36,7 +36,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientRow * @see org.apache.jackrabbit.rmi.server.ServerRow */ -@Deprecated public interface RemoteRow extends Remote { +@Deprecated(forRemoval = true) public interface RemoteRow extends Remote { /** * @see javax.jcr.query.Row#getValues() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java index 02cf10fc91c..6ac8f47908d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java @@ -47,7 +47,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientSession * @see org.apache.jackrabbit.rmi.server.ServerSession */ -@Deprecated public interface RemoteSession extends Remote { +@Deprecated(forRemoval = true) public interface RemoteSession extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java index 60ee0ff69c1..b0ccc6eb11b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientVersion * @see org.apache.jackrabbit.rmi.server.ServerVersion */ -@Deprecated public interface RemoteVersion extends RemoteNode { +@Deprecated(forRemoval = true) public interface RemoteVersion extends RemoteNode { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java index 87aa3f4a915..21ee15fd0db 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java @@ -44,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientVersionHistory * @see org.apache.jackrabbit.rmi.server.ServerVersionHistory */ -@Deprecated public interface RemoteVersionHistory extends RemoteNode { +@Deprecated(forRemoval = true) public interface RemoteVersionHistory extends RemoteNode { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java index 7de25d7dbef..232476319a6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java @@ -21,7 +21,7 @@ import javax.jcr.RepositoryException; -@Deprecated public interface RemoteVersionManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteVersionManager extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java index e335e448bfa..82b8a66bb4b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java @@ -44,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.ClientWorkspace * @see org.apache.jackrabbit.rmi.server.ServerWorkspace */ -@Deprecated public interface RemoteWorkspace extends Remote { +@Deprecated(forRemoval = true) public interface RemoteWorkspace extends Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java index 8bc7be4d95e..356c1cfb9e1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java @@ -28,7 +28,7 @@ * Remote version of the {@link org.apache.jackrabbit.api.XASession} * interface. */ -@Deprecated public interface RemoteXASession extends RemoteSession, Remote { +@Deprecated(forRemoval = true) public interface RemoteXASession extends RemoteSession, Remote { /** * Remote version of the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java index df168328f0e..e7bf5e19e5e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java @@ -28,7 +28,7 @@ * * @since Jackrabbit JCR-RMI 1.5 */ -@Deprecated public class SerializableXid implements Serializable, Xid { +@Deprecated(forRemoval = true) public class SerializableXid implements Serializable, Xid { private final int formatId; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java index 2f6b2423c39..36fc05d892f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup */ -@Deprecated public interface RemoteGroup extends RemotePrincipal { +@Deprecated(forRemoval = true) public interface RemoteGroup extends RemotePrincipal { /** * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#isMember(java.security.Principal) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java index 2c9a382ed98..10bb5dd024d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java @@ -43,7 +43,7 @@ * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal */ -@Deprecated public interface RemotePrincipal extends Remote { +@Deprecated(forRemoval = true) public interface RemotePrincipal extends Remote { /** * @see java.security.Principal#getName() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java index f7270c84eaf..eb5dea06e67 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java @@ -44,7 +44,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry */ -@Deprecated public interface RemoteAccessControlEntry extends Remote { +@Deprecated(forRemoval = true) public interface RemoteAccessControlEntry extends Remote { /** * @see javax.jcr.security.AccessControlEntry#getPrincipal() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java index a3eda6dbab6..832eaf95798 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java @@ -42,7 +42,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList */ -@Deprecated public interface RemoteAccessControlList extends RemoteAccessControlPolicy { +@Deprecated(forRemoval = true) public interface RemoteAccessControlList extends RemoteAccessControlPolicy { /** * @see javax.jcr.security.AccessControlList#getAccessControlEntries() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java index 65015f1f3b9..baf3d49917d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java @@ -45,7 +45,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager */ -@Deprecated public interface RemoteAccessControlManager extends Remote { +@Deprecated(forRemoval = true) public interface RemoteAccessControlManager extends Remote { /** * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java index b3429844764..353393139ae 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java @@ -43,6 +43,6 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy */ -@Deprecated public interface RemoteAccessControlPolicy extends Remote { +@Deprecated(forRemoval = true) public interface RemoteAccessControlPolicy extends Remote { } diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java index b502c79589d..f09982f30dd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java @@ -41,7 +41,7 @@ * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege */ -@Deprecated public interface RemotePrivilege extends Remote { +@Deprecated(forRemoval = true) public interface RemotePrivilege extends Remote { /** * @see javax.jcr.security.Privilege#getAggregatePrivileges() diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java index 9fdcf7eb7da..1b29ac184ee 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java @@ -32,7 +32,7 @@ * * @since 1.4 */ -@Deprecated public abstract class AbstractRemoteRepositoryFactory +@Deprecated(forRemoval = true) public abstract class AbstractRemoteRepositoryFactory implements RepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java index ab6c459643c..df577ce1022 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java @@ -34,7 +34,7 @@ * * @since 1.4 */ -@Deprecated public class JNDIRemoteRepository extends ProxyRepository { +@Deprecated(forRemoval = true) public class JNDIRemoteRepository extends ProxyRepository { /** * Creates a proxy for a remote repository in JNDI. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java index d3a476fcbe8..943b904aab6 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java @@ -30,7 +30,7 @@ * * @since 1.4 */ -@Deprecated public class JNDIRemoteRepositoryFactory +@Deprecated(forRemoval = true) public class JNDIRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java index 433ce5953bc..e5dd0afe10f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java @@ -34,7 +34,7 @@ * * @since 1.4 */ -@Deprecated public class ProxyRepository implements Repository { +@Deprecated(forRemoval = true) public class ProxyRepository implements Repository { /** * The set of standard descriptor keys defined in the diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java index bb3e29ca3cc..979dc7e0ccd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java @@ -30,7 +30,7 @@ * * @since 1.4 */ -@Deprecated public class RMIRemoteRepository extends ProxyRepository { +@Deprecated(forRemoval = true) public class RMIRemoteRepository extends ProxyRepository { /** * Creates a proxy for the remote repository in the given RMI URL. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java index 87785b5f799..370ec3aea36 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java @@ -33,7 +33,7 @@ * * @since 1.4 */ -@Deprecated public class RMIRemoteRepositoryFactory +@Deprecated(forRemoval = true) public class RMIRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java index c7b86150d24..b16f85c1d83 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java @@ -24,7 +24,7 @@ *

    * Factory interface for JCR content repositories. */ -@Deprecated interface RepositoryFactory { +@Deprecated(forRemoval = true) interface RepositoryFactory { /** * Returns a content repository. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java index fbe916edf41..8a7b3aa99dc 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java @@ -40,7 +40,7 @@ import org.apache.jackrabbit.rmi.client.SafeClientRepository; import org.apache.jackrabbit.rmi.remote.RemoteRepository; -@Deprecated public class RmiRepositoryFactory implements RepositoryFactory { +@Deprecated(forRemoval = true) public class RmiRepositoryFactory implements RepositoryFactory { private static final String REPOSITORY_URI = "org.apache.jackrabbit.repository.uri"; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java index 23c19816358..4d8095e7d19 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java @@ -33,7 +33,7 @@ * * @since 1.4 */ -@Deprecated public class URLRemoteRepository extends ProxyRepository { +@Deprecated(forRemoval = true) public class URLRemoteRepository extends ProxyRepository { /** * Creates a proxy for the remote repository at the given URL. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java index e41b3c83aa8..cc950fa3e02 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java @@ -32,7 +32,7 @@ * * @since 1.4 */ -@Deprecated public class URLRemoteRepositoryFactory +@Deprecated(forRemoval = true) public class URLRemoteRepositoryFactory extends AbstractRemoteRepositoryFactory { /** diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java index 155a70fab54..d30e5d1b03f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java @@ -102,7 +102,7 @@ * @see org.apache.jackrabbit.rmi.server.ServerAdapterFactory * @see org.apache.jackrabbit.rmi.server.ServerObject */ -@Deprecated public interface RemoteAdapterFactory { +@Deprecated(forRemoval = true) public interface RemoteAdapterFactory { /** * Returns the port number to which the server objects created by diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java index 7cbf4f4b03b..2b5e1220537 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java @@ -117,7 +117,7 @@ * The bufferSize property can be used to configure the size of the * buffer used by iterators to speed up iterator traversal over the network. */ -@Deprecated public class ServerAdapterFactory implements RemoteAdapterFactory { +@Deprecated(forRemoval = true) public class ServerAdapterFactory implements RemoteAdapterFactory { /** The default iterator buffer size. */ private static final int DEFAULT_BUFFER_SIZE = 100; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java index 470aaf87fcd..b88192ca798 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java @@ -36,7 +36,7 @@ * provided such that the receiving listener may be identified on the * client-side. */ -@Deprecated public class ServerEventCollection extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerEventCollection extends ServerObject implements RemoteEventCollection { /** The unique identifier of the receiving listener */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java index 6ff506b3b85..d6bf0b24bc3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java @@ -38,7 +38,7 @@ * @see javax.jcr.Item * @see org.apache.jackrabbit.rmi.remote.RemoteItem */ -@Deprecated public class ServerItem extends ServerObject implements RemoteItem { +@Deprecated(forRemoval = true) public class ServerItem extends ServerObject implements RemoteItem { /** The adapted local item. */ private Item item; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java index dc73148956a..f9ad98d8c7b 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java @@ -40,7 +40,7 @@ * @see javax.jcr.nodetype.ItemDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition */ -@Deprecated public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { +@Deprecated(forRemoval = true) public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { /** The adapted local item definition. */ private ItemDefinition def; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java index 4f80a39cc20..59db0f39fcb 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java @@ -35,7 +35,7 @@ * @see javax.jcr.lock.Lock * @see org.apache.jackrabbit.rmi.remote.RemoteLock */ -@Deprecated public class ServerLock extends ServerObject implements RemoteLock { +@Deprecated(forRemoval = true) public class ServerLock extends ServerObject implements RemoteLock { /** The adapted local lock. */ private Lock lock; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java index 4c76d011f86..9221f8c6b01 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java @@ -24,7 +24,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteLock; import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -@Deprecated public class ServerLockManager extends ServerObject +@Deprecated(forRemoval = true) public class ServerLockManager extends ServerObject implements RemoteLockManager { /** The adapted local lock manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java index b9c5696c92a..445ea42d2e8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java @@ -36,7 +36,7 @@ * @see javax.jcr.NamespaceRegistry * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry */ -@Deprecated public class ServerNamespaceRegistry extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerNamespaceRegistry extends ServerObject implements RemoteNamespaceRegistry { /** The adapted local namespace registry. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java index ef7cd0d3684..cb2aa90c5aa 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java @@ -48,7 +48,7 @@ * @see javax.jcr.Node * @see org.apache.jackrabbit.rmi.remote.RemoteNode */ -@Deprecated public class ServerNode extends ServerItem implements RemoteNode { +@Deprecated(forRemoval = true) public class ServerNode extends ServerItem implements RemoteNode { /** The adapted local node. */ private Node node; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java index f767d0c3df8..9239a3e6542 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java @@ -36,7 +36,7 @@ * @see javax.jcr.nodetype.NodeDefinition * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition */ -@Deprecated public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { +@Deprecated(forRemoval = true) public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { /** The adapted node definition. */ private NodeDefinition def; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java index eb8f5494ebc..c8881db8a53 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java @@ -40,7 +40,7 @@ * @see javax.jcr.nodetype.NodeType * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType */ -@Deprecated public class ServerNodeType extends ServerObject implements RemoteNodeType { +@Deprecated(forRemoval = true) public class ServerNodeType extends ServerObject implements RemoteNodeType { /** The adapted local node type. */ private NodeType type; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java index e15050ae6f7..0da63de8771 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java @@ -38,7 +38,7 @@ * @see javax.jcr.nodetype.NodeTypeManager * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager */ -@Deprecated public class ServerNodeTypeManager extends ServerObject +@Deprecated(forRemoval = true) public class ServerNodeTypeManager extends ServerObject implements RemoteNodeTypeManager { /** The adapted local node type manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java index e5436144c7e..5a604f0f034 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java @@ -62,7 +62,7 @@ * centralize the handling of the RemoteAdapterFactory instance used * to instantiate new server adapters. */ -@Deprecated public class ServerObject extends UnicastRemoteObject { +@Deprecated(forRemoval = true) public class ServerObject extends UnicastRemoteObject { /** Factory for creating server adapters. */ private RemoteAdapterFactory factory; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java index 16e4fa6de0f..e1589876867 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java @@ -46,7 +46,7 @@ * @see javax.jcr.observation.ObservationManager * @see org.apache.jackrabbit.rmi.remote.RemoteObservationManager */ -@Deprecated public class ServerObservationManager extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerObservationManager extends ServerObject implements RemoteObservationManager { /** The adapted local observation manager. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java index 0d0eb95b3fd..1b1ab01d14f 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java @@ -38,7 +38,7 @@ * @see javax.jcr.Property * @see org.apache.jackrabbit.rmi.remote.RemoteProperty */ -@Deprecated public class ServerProperty extends ServerItem implements RemoteProperty { +@Deprecated(forRemoval = true) public class ServerProperty extends ServerItem implements RemoteProperty { /** The adapted local property. */ private Property property; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java index c552810ab51..647831ed2ab 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java @@ -37,7 +37,7 @@ * @see javax.jcr.nodetype.PropertyDefinition * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition */ -@Deprecated public class ServerPropertyDefinition extends ServerItemDefinition +@Deprecated(forRemoval = true) public class ServerPropertyDefinition extends ServerItemDefinition implements RemotePropertyDefinition { /** The adapted local property definition. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java index 732140acdfc..5cc63f8d4a3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java @@ -37,7 +37,7 @@ * @see javax.jcr.query.Query * @see org.apache.jackrabbit.rmi.remote.RemoteQuery */ -@Deprecated public class ServerQuery extends ServerObject implements RemoteQuery { +@Deprecated(forRemoval = true) public class ServerQuery extends ServerObject implements RemoteQuery { /** The adapted local query manager. */ private Query query; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java index 36a2602ac2c..4310bfc51eb 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java @@ -41,7 +41,7 @@ * @see javax.jcr.query.QueryManager * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager */ -@Deprecated public class ServerQueryManager extends ServerObject +@Deprecated(forRemoval = true) public class ServerQueryManager extends ServerObject implements RemoteQueryManager { /** The current session. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java index a1d04af019c..2a4cc66b298 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java @@ -35,7 +35,7 @@ * @see javax.jcr.query.QueryResult * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult */ -@Deprecated public class ServerQueryResult extends ServerObject +@Deprecated(forRemoval = true) public class ServerQueryResult extends ServerObject implements RemoteQueryResult { /** The adapted local query result. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java index c9d83b6270a..0cac82f6e25 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java @@ -40,7 +40,7 @@ * @see javax.jcr.Repository * @see org.apache.jackrabbit.rmi.remote.RemoteRepository */ -@Deprecated public class ServerRepository extends ServerObject implements RemoteRepository { +@Deprecated(forRemoval = true) public class ServerRepository extends ServerObject implements RemoteRepository { /** The adapted local repository. */ private Repository repository; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java index 387df0fe7b2..f41571bdf5e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java @@ -37,7 +37,7 @@ * @see javax.jcr.query.Row * @see org.apache.jackrabbit.rmi.remote.RemoteRow */ -@Deprecated public class ServerRow extends ServerObject implements RemoteRow { +@Deprecated(forRemoval = true) public class ServerRow extends ServerObject implements RemoteRow { /** The adapted local row. */ private Row row; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java index 14a3e865e8c..f5ce9c04c12 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java @@ -44,7 +44,7 @@ * @see javax.jcr.Session * @see org.apache.jackrabbit.rmi.remote.RemoteSession */ -@Deprecated public class ServerSession extends ServerObject implements RemoteSession { +@Deprecated(forRemoval = true) public class ServerSession extends ServerObject implements RemoteSession { /** The adapted local session. */ private Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java index f11ea0ce852..2dda97f12aa 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java @@ -37,7 +37,7 @@ * @see javax.jcr.version.Version * @see org.apache.jackrabbit.rmi.remote.RemoteVersion */ -@Deprecated public class ServerVersion extends ServerNode implements RemoteVersion { +@Deprecated(forRemoval = true) public class ServerVersion extends ServerNode implements RemoteVersion { /** The adapted local version. */ private Version version; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java index 95a37e50c50..ac31de6c573 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java @@ -38,7 +38,7 @@ * @see javax.jcr.version.VersionHistory * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory */ -@Deprecated public class ServerVersionHistory extends ServerNode +@Deprecated(forRemoval = true) public class ServerVersionHistory extends ServerNode implements RemoteVersionHistory { /** The adapted local version history. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java index 96c5a4a73ee..61d2fd6f94d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java @@ -30,7 +30,7 @@ import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -@Deprecated public class ServerVersionManager extends ServerObject +@Deprecated(forRemoval = true) public class ServerVersionManager extends ServerObject implements RemoteVersionManager { private final Session session; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java index 9efd288eb00..f3c18efbf40 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java @@ -47,7 +47,7 @@ * @see Workspace * @see RemoteWorkspace */ -@Deprecated public class ServerWorkspace extends ServerObject implements RemoteWorkspace { +@Deprecated(forRemoval = true) public class ServerWorkspace extends ServerObject implements RemoteWorkspace { /** The adapted local workspace. */ private Workspace workspace; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java index 9141a339013..661c027f8ce 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java @@ -33,7 +33,7 @@ * * @since 1.4 */ -@Deprecated public class ServerXASession extends ServerSession implements RemoteXASession { +@Deprecated(forRemoval = true) public class ServerXASession extends ServerSession implements RemoteXASession { /** * The adapted local XA resource diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java index 4c8ca406f51..f675dd453a8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java @@ -34,7 +34,7 @@ * class makes a local iterator available as an RMI service using the * {@link RemoteIterator} interface. */ -@Deprecated public abstract class ServerIterator extends ServerObject +@Deprecated(forRemoval = true) public abstract class ServerIterator extends ServerObject implements RemoteIterator { /** The adapted local iterator. */ diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java index 5b56a121250..471e6859be2 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java @@ -28,7 +28,7 @@ *

    * A ServerIterator for iterating nodes. */ -@Deprecated public class ServerNodeIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerNodeIterator extends ServerIterator { /** * Creates a ServerNodeIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java index b66348c7477..5e817880f84 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java @@ -28,7 +28,7 @@ *

    * A ServerIterator for iterating node types. */ -@Deprecated public class ServerNodeTypeIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerNodeTypeIterator extends ServerIterator { /** * Creates a ServerNodeTypeIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java index 9d55d8d13a9..47862666941 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java @@ -28,7 +28,7 @@ *

    * A ServerIterator for iterating properties. */ -@Deprecated public class ServerPropertyIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerPropertyIterator extends ServerIterator { /** * Creates a ServerPropertyIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java index 6122a0785eb..07ea0a3a8e8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java @@ -28,7 +28,7 @@ *

    * A ServerIterator for iterating rows. */ -@Deprecated public class ServerRowIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerRowIterator extends ServerIterator { /** * Creates a ServerRowIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java index 96a5e8d6abc..b235f259344 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java @@ -28,7 +28,7 @@ *

    * A ServerIterator for iterating versions. */ -@Deprecated public class ServerVersionIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerVersionIterator extends ServerIterator { /** * Creates a ServerVersionIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java index 3c37a6722c6..62b10c3e543 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java @@ -35,7 +35,7 @@ *

    * MBean that registers a JCR RMI server through JNDI. */ -@Deprecated public class JCRServer implements JCRServerMBean { +@Deprecated(forRemoval = true) public class JCRServer implements JCRServerMBean { /** * local repository address diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java index 6af2a7333ea..cb8a76a48bb 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java @@ -18,7 +18,7 @@ import javax.jcr.RepositoryException; -@Deprecated public interface JCRServerMBean { +@Deprecated(forRemoval = true) public interface JCRServerMBean { void start() throws Exception; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java index c96916c3d63..256929b7ea9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java @@ -29,7 +29,7 @@ import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -@Deprecated public class ServerGroup extends ServerPrincipal implements RemoteGroup { +@Deprecated(forRemoval = true) public class ServerGroup extends ServerPrincipal implements RemoteGroup { public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory) throws RemoteException { diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java index bdab3c96131..c7d3dc414b3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -@Deprecated public class ServerPrincipal extends ServerObject implements RemotePrincipal { +@Deprecated(forRemoval = true) public class ServerPrincipal extends ServerObject implements RemotePrincipal { private final Principal principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java index 97cfdb2a79a..1d5cb1c1bc7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; -@Deprecated public class ServerPrincipalIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerPrincipalIterator extends ServerIterator { public ServerPrincipalIterator(Iterator iterator, RemoteAdapterFactory factory, int maxBufferSize) diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java index ec6b550e88c..ae6ed38cfe7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java @@ -26,7 +26,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -@Deprecated public class ServerAccessControlEntry extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerAccessControlEntry extends ServerObject implements RemoteAccessControlEntry { private final AccessControlEntry ace; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java index 202114f4140..d4e3bf475a7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java @@ -31,7 +31,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; -@Deprecated public class ServerAccessControlList extends ServerAccessControlPolicy +@Deprecated(forRemoval = true) public class ServerAccessControlList extends ServerAccessControlPolicy implements RemoteAccessControlList { public ServerAccessControlList(final AccessControlList acl, diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java index b7c31f6dccc..84b451156ee 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java @@ -31,7 +31,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -@Deprecated public class ServerAccessControlManager extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerAccessControlManager extends ServerObject implements RemoteAccessControlManager { private final AccessControlManager acm; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java index 1e987831dfd..0e6c75cb2d3 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java @@ -24,7 +24,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -@Deprecated public class ServerAccessControlPolicy extends ServerObject implements +@Deprecated(forRemoval = true) public class ServerAccessControlPolicy extends ServerObject implements RemoteAccessControlPolicy { private final AccessControlPolicy acp; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java index e9c44c6abac..5f17ca941d9 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java @@ -29,7 +29,7 @@ *

    * A ServerIterator for iterating rows. */ -@Deprecated public class ServerAccessControlPolicyIterator extends ServerIterator { +@Deprecated(forRemoval = true) public class ServerAccessControlPolicyIterator extends ServerIterator { /** * Creates a ServerRowIterator instance. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java index ee8bf9dcd79..8fd174319e1 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java @@ -25,7 +25,7 @@ import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; import org.apache.jackrabbit.rmi.server.ServerObject; -@Deprecated public class ServerPrivilege extends ServerObject implements RemotePrivilege { +@Deprecated(forRemoval = true) public class ServerPrivilege extends ServerObject implements RemotePrivilege { private final Privilege privilege; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java index 2689ee929f2..d4a5bf109f0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java @@ -50,7 +50,7 @@ * The {@link #getStream()} method uses {@link #getBinary()} to implement * the deprecated JCR 1.0 behaviour. This method must not be overridden. */ -@Deprecated abstract class AbstractValue implements Value, Serializable { +@Deprecated(forRemoval = true) abstract class AbstractValue implements Value, Serializable { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java index 5f2806d9afc..3ab01d1b2bd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java @@ -35,7 +35,7 @@ *

    * Binary value. */ -@Deprecated class BinaryValue implements Value, Serializable { +@Deprecated(forRemoval = true) class BinaryValue implements Value, Serializable { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java index 961bcf21426..030dc5622b0 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java @@ -23,7 +23,7 @@ *

    * Boolean value. */ -@Deprecated class BooleanValue extends AbstractValue { +@Deprecated(forRemoval = true) class BooleanValue extends AbstractValue { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java index ad6e3af9db1..51e0931bd82 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java @@ -30,7 +30,7 @@ *

    * Date value. */ -@Deprecated class DateValue extends AbstractValue { +@Deprecated(forRemoval = true) class DateValue extends AbstractValue { /** * Serial version UID diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java index e4c2ba5d62d..718907220c7 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java @@ -27,7 +27,7 @@ *

    * Decimal value. */ -@Deprecated class DecimalValue extends AbstractValue { +@Deprecated(forRemoval = true) class DecimalValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java index 9a78414a8b7..e11828313da 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java @@ -27,7 +27,7 @@ *

    * Double value. */ -@Deprecated class DoubleValue extends AbstractValue { +@Deprecated(forRemoval = true) class DoubleValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java index 193c7881f0c..4e813f1d94d 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java @@ -26,7 +26,7 @@ *

    * Long value. */ -@Deprecated class LongValue extends AbstractValue { +@Deprecated(forRemoval = true) class LongValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java index 759b0a06323..5c26a5cec58 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java @@ -28,7 +28,7 @@ * * @since 0.16.4.1 */ -@Deprecated public class NameValue extends AbstractValue { +@Deprecated(forRemoval = true) public class NameValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java index 8435b27d4bf..1efe3f5ef3e 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java @@ -28,7 +28,7 @@ * * @since 0.16.4.1 */ -@Deprecated public class PathValue extends AbstractValue { +@Deprecated(forRemoval = true) public class PathValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java index 363d11e1a8f..6e55a573c60 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java @@ -29,7 +29,7 @@ * * @since 0.16.4.1 */ -@Deprecated public class ReferenceValue extends AbstractValue { +@Deprecated(forRemoval = true) public class ReferenceValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java index e5c057759d8..9d1173fb1f8 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java @@ -47,7 +47,7 @@ * methods of the ValueFactory interface are declared final to * guard against breaking the rules. */ -@Deprecated public class SerialValueFactory implements ValueFactory { +@Deprecated(forRemoval = true) public class SerialValueFactory implements ValueFactory { /** The singleton value factory instance */ private static final SerialValueFactory INSTANCE = new SerialValueFactory(); diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java index ac696fb9404..8da0a56a920 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java @@ -37,7 +37,7 @@ *

    * Serializable binary. */ -@Deprecated class SerializableBinary implements Binary, Serializable { +@Deprecated(forRemoval = true) class SerializableBinary implements Binary, Serializable { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java index f685ca048b3..8d9ffb85ccd 100644 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java @@ -29,7 +29,7 @@ *

    * String value. */ -@Deprecated class StringValue extends AbstractValue { +@Deprecated(forRemoval = true) class StringValue extends AbstractValue { /** * Serial version UID. diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java index 40e5b1fe859..3272ab6c915 100644 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java @@ -26,7 +26,7 @@ *

    * JCR API conformance test suite. */ -@Deprecated public class ConformanceTest extends TestCase { +@Deprecated(forRemoval = true) public class ConformanceTest extends TestCase { public static TestSuite suite() { TestSuite suite = new TestSuite(); diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java index de19175e7ca..34e7e535633 100644 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java @@ -39,7 +39,7 @@ import org.apache.jackrabbit.rmi.server.principal.ServerGroup; import org.apache.jackrabbit.test.RepositoryStubException; -@Deprecated public class RepositoryStubImpl extends JackrabbitRepositoryStub { +@Deprecated(forRemoval = true) public class RepositoryStubImpl extends JackrabbitRepositoryStub { /** * A known principal used for access control tests. From e3a82cf95ebe295fcbd3c5327c52869256d2f764 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sun, 21 Jan 2024 12:50:17 +0100 Subject: [PATCH 138/271] JCR-4914: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.60.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 832adfc310f..12d62448951 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.48.0 + 1.60.0 1.22.18 9.4.53.v20231009 From d32af8943bc2afe91a8730f028fb9b13525bfcbc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 29 Jan 2024 14:43:42 +0100 Subject: [PATCH 139/271] JCR-5022: Update derby dependency to 10.15.2.0 (#157) --- jackrabbit-core/pom.xml | 5 +++++ jackrabbit-jca/pom.xml | 6 ++++++ jackrabbit-jcr-rmi/pom.xml | 5 +++++ jackrabbit-jcr-server/pom.xml | 5 +++++ jackrabbit-jcr2dav/pom.xml | 5 +++++ jackrabbit-parent/pom.xml | 7 ++++++- jackrabbit-spi2dav/pom.xml | 5 +++++ jackrabbit-spi2jcr/pom.xml | 5 +++++ jackrabbit-webapp/pom.xml | 6 ++++++ 9 files changed, 48 insertions(+), 1 deletion(-) diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 4c95d4c6001..d8fa14716e8 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -293,6 +293,11 @@ org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModify derby test + + org.apache.derby + derbytools + test + org.apache.jackrabbit jackrabbit-jcr-tests diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 4970e681a7a..d2a3b9f97c8 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -130,6 +130,12 @@ org.apache.derby derby + test + + + org.apache.derby + derbytools + test diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 72e031b0b6f..e222b3639a2 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -573,6 +573,11 @@ org.apache.jackrabbit.test.api.observation.EventJournalTest derby test + + org.apache.derby + derbytools + test + diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4fa248d4834..c4e8396102a 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -282,6 +282,11 @@ derby test + + org.apache.derby + derbytools + test + diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index fde130e36e5..69586e33d4d 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -207,6 +207,11 @@ derby test + + org.apache.derby + derbytools + test + diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 12d62448951..e2183484e74 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -560,7 +560,12 @@ org.apache.derby derby - 10.14.2.0 + 10.15.2.0 + + + org.apache.derby + derbytools + 10.15.2.0 org.apache.geronimo.specs diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index b0a1c204265..c6ad8460959 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -252,6 +252,11 @@ derby test + + org.apache.derby + derbytools + test + org.littleshoot diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 1cfa92e91c7..562ad10f520 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -181,5 +181,10 @@ org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin derby test + + org.apache.derby + derbytools + test + diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 570873e8860..ccd832f0e45 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -127,6 +127,12 @@ org.apache.derby derby + test + + + org.apache.derby + derbytools + test From 8744ebb486dda5c34f3595fee5256052c483cec3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 1 Feb 2024 11:11:21 +0100 Subject: [PATCH 140/271] JCR-5023: Release Jackrabbit 2.21.23 - Candidate Release Notes --- RELEASE-NOTES.txt | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 0f112fdf333..333b53a6688 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,32 +1,38 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.22 +Release Notes -- Apache Jackrabbit -- Version 2.21.23 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.22, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.23, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.22 is an unstable release cut directly from +Apache Jackrabbit 2.21.23 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.22 +Changes in Jackrabbit 2.21.23 ----------------------------- Improvement - [JCR-4979] - Migrate from Subversion to Git - -Test - - [JCR-4967] - test coverage for modification of non-versioned node with jcr:isCheckedOut==false property + [JCR-5011] - Restore SCM information in parent POM Task - [JCR-4987] - Update to jacoco version 0.8.11 - [JCR-5004] - jcr-commons: get rid of cglib test dependency (unmaintained) + [JCR-4914] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.60.0 + [JCR-5012] - set baseline comparisonVersion to latest stable (2.20.14) + [JCR-5013] - Update commons-io dependency to 2.15.1 + [JCR-5014] - Update tomcat dependency to 9.0.85 + [JCR-5015] - update aws java sdk version to 1.12.635 + [JCR-5016] - standalone-components: remove unused jcr-rmi dependency + [JCR-5017] - Update spotbugs-maven-plugin to 4.8.2.0 + [JCR-5018] - Bump up minimal Java version to 11 + [JCR-5019] - Update build-helper-maven-plugin to version 3.5.0 + [JCR-5020] - jackrabbit-webapp: deprecate RMI support "for removal" + [JCR-5021] - jackrabbit-jcr-rmi: deprecate RMI support "for removal" + [JCR-5022] - Update derby dependency to 10.15.2.0 For more detailed information about all the changes in this and other From 71121aca964a00602bd51e3570f7102bfc5c540d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 3 Feb 2024 17:53:39 +0100 Subject: [PATCH 141/271] [maven-release-plugin] prepare release jackrabbit-2.21.23 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 7f6977bf0d7..589df7ac366 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index d8fa14716e8..1c7b211b844 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 0bb6f8ad286..4d7c188311d 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index f8b0a64d1fa..bbdcb5eee85 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index d2a3b9f97c8..81a61bf2ebf 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index d1df88c297b..eb1a21f0c0e 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 379c4abd174..2624a707769 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index e222b3639a2..541e2d8a2ac 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index c4e8396102a..8ee699cbd87 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 42cce008183..1df2da36f79 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index b09e36de6c8..b2b27245f11 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 69586e33d4d..8986e3f4187 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 88ebf29f442..57894dacb84 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index e2183484e74..eed62d24584 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.23-SNAPSHOT + 2.21.23 pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - trunk + jackrabbit-2.21.23 @@ -76,7 +76,7 @@ 0.0 - 1702529444 + 1706977841 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index a70bc92594a..a9961311c8a 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 1899f58b112..7f863180b53 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index c6ad8460959..e239e3b78c2 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 562ad10f520..70b97cce0fe 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index d6db1c8cb75..fcd927dcc02 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 454b7bd3bda..bb3c37a336c 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index a7fc5c5f9ae..fbaaefb7ffd 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index ccd832f0e45..be1afb06ee2 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 8a66cb8f6a7..4b34f713bda 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 07b61654fe7..f06f961d1bf 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23-SNAPSHOT + 2.21.23 jackrabbit-parent/pom.xml From 866035bee64319f3545b54c5cc7fbd3e8be77cdf Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 3 Feb 2024 17:53:49 +0100 Subject: [PATCH 142/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 589df7ac366..eba7f1dcfa8 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 1c7b211b844..dd2a38b0668 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 4d7c188311d..595867e5a42 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index bbdcb5eee85..2a4899e8e96 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 81a61bf2ebf..429b229f221 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index eb1a21f0c0e..f33c28a9d0a 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 2624a707769..fd5ded256c4 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 541e2d8a2ac..1640fcbf814 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 8ee699cbd87..d0f6d07a0d4 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 1df2da36f79..d85265ff813 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index b2b27245f11..f0112f900e8 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 8986e3f4187..56b91f51392 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 57894dacb84..6e2c21be375 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index eed62d24584..c6ebd0f6481 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.23 + 2.21.24-SNAPSHOT pom @@ -76,7 +76,7 @@ 0.0 - 1706977841 + 1706979228 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index a9961311c8a..79d66a30e20 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 7f863180b53..a897523c740 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index e239e3b78c2..9ba6ba1e413 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 70b97cce0fe..c574c5bb04b 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index fcd927dcc02..8a7cc6adf2e 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index bb3c37a336c..3a9f0924f46 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index fbaaefb7ffd..1279a9492cb 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index be1afb06ee2..de83487fdcf 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 4b34f713bda..254fa0a0c8a 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index f06f961d1bf..f6620328b4f 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.23 + 2.21.24-SNAPSHOT jackrabbit-parent/pom.xml From 5bce7e2cf5095ba85790b3773fb29ca6e8560762 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 9 Feb 2024 15:44:13 +0100 Subject: [PATCH 143/271] JCR-5024: webapp: un-deprecate BootstrapConfig.getJndiConfig (#159) --- .../java/org/apache/jackrabbit/j2ee/BootstrapConfig.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java index e34795e1d5d..ddc769c84c9 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java @@ -107,10 +107,7 @@ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ - @Deprecated(forRemoval = true) public JNDIConfig getJndiConfig() { + public JNDIConfig getJndiConfig() { return jndiConfig; } From 8159e73e6cf423dc4aef1ebb0e64d52901b1707f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 9 Feb 2024 16:15:22 +0100 Subject: [PATCH 144/271] JCR-5024: webapp: un-deprecate RepositoryAccessServlet.getRepositoryByJNDI (#160) --- .../org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java index 38feeb36cd7..1e748d9bc36 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java @@ -195,8 +195,6 @@ private InitialContext getInitialContext() { } /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    * Checks if the repository is available via JNDI and returns it. * @return the repository or null * @throws ServletException if this servlet is not properly configured. From 3baf3b6a96b4ef9b4994f575777d501ab7506747 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 9 Feb 2024 17:27:31 +0100 Subject: [PATCH 145/271] JCR-5025: standalone: deprecate remote repository support (RMI and JNDI) --- .../jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java | 6 ++++-- .../jackrabbit/standalone/cli/ext/ConnectToRmiServer.java | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java index d5c119042dd..f7b3cebedf0 100644 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java +++ b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java @@ -28,8 +28,10 @@ import org.apache.jackrabbit.standalone.cli.CommandHelper; /** - * Connect to a JCR-RMI server - */ +* @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. +* Connect to a JCR-RMI server +*/ +@Deprecated(forRemoval = true) public class ConnectToJNDIServer implements Command { /** logger */ private static Log log = LogFactory.getLog(ConnectToJNDIServer.class); diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java index b9c706cc75f..6ba205e1324 100644 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java +++ b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java @@ -26,8 +26,10 @@ import org.apache.jackrabbit.standalone.cli.CommandHelper; /** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. * Connect to a JCR-RMI server */ +@Deprecated(forRemoval = true) public class ConnectToRmiServer implements Command { /** logger */ private static Log log = LogFactory.getLog(ConnectToRmiServer.class); From 7a075db1225a6e3143b9334ee32cfbf7cc74c82b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 15 Feb 2024 17:53:54 +0100 Subject: [PATCH 146/271] JCR-5029: update aws java sdk version to 1.12.659 (#164) --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index eba7f1dcfa8..c6f0ab10c60 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.635 + 1.12.659 org.apache.jackrabbit From d30d499f2bea07955caec7a5a9a434265437228b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 17 Feb 2024 16:38:50 +0100 Subject: [PATCH 147/271] [maven-release-plugin] prepare release jackrabbit-2.21.24 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index c6f0ab10c60..f79213ed8c4 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index dd2a38b0668..e7e5aa24b34 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 595867e5a42..4f513ef636b 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 2a4899e8e96..387903f6bbf 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 429b229f221..025bb1bd705 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index f33c28a9d0a..d0f6ed87e6e 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index fd5ded256c4..48be985cb28 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 1640fcbf814..ba812b835d4 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index d0f6d07a0d4..d0b800d2074 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d85265ff813..b668f3a0a60 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index f0112f900e8..b4b203bd238 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 56b91f51392..50fc1923402 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 6e2c21be375..c946f5ad312 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c6ebd0f6481..488cf3e0dd7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.24-SNAPSHOT + 2.21.24 pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.23 + jackrabbit-2.21.24 @@ -76,7 +76,7 @@ 0.0 - 1706979228 + 1708183173 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 79d66a30e20..ea88a0f6aef 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index a897523c740..eb8df61723a 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 9ba6ba1e413..cb5e89165d4 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c574c5bb04b..d6553362f6d 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 8a7cc6adf2e..51810b8e932 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 3a9f0924f46..dd3f30eae7b 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 1279a9492cb..ba66e967f72 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index de83487fdcf..b4f4d0b2dff 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 254fa0a0c8a..20cd7547564 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index f6620328b4f..1c6a1e49513 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24-SNAPSHOT + 2.21.24 jackrabbit-parent/pom.xml From 1422d92b1467073e9c68f605f2e8bae530ec3326 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 17 Feb 2024 16:38:58 +0100 Subject: [PATCH 148/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f79213ed8c4..fcfe7f7c69f 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index e7e5aa24b34..ae5656c1d6e 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 4f513ef636b..93481883fb3 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 387903f6bbf..805f799df6d 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 025bb1bd705..0222d7ec38f 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index d0f6ed87e6e..a5fb2b9995f 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 48be985cb28..93e72a5dc0b 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index ba812b835d4..73539a5944c 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index d0b800d2074..b56eb4342fd 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index b668f3a0a60..bd3cad00d98 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index b4b203bd238..b5fba1ffb61 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 50fc1923402..9cfd48e7de8 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index c946f5ad312..261e0807399 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 488cf3e0dd7..c65eb01bdaa 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.24 + 2.21.25-SNAPSHOT pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.24 + jackrabbit-2.21.23 @@ -76,7 +76,7 @@ 0.0 - 1708183173 + 1708184338 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index ea88a0f6aef..b35cb180e08 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index eb8df61723a..9030896e840 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index cb5e89165d4..caea04c44d8 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index d6553362f6d..17a724dd8c7 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 51810b8e932..bd7c5c2a612 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index dd3f30eae7b..8f6ce00fefd 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index ba66e967f72..58705bc85a8 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index b4f4d0b2dff..e400500f115 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 20cd7547564..d8467c40081 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 1c6a1e49513..75429eb9852 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.24 + 2.21.25-SNAPSHOT jackrabbit-parent/pom.xml From 75f354ea66d3ba96ffac9684a670d6789c05b1f7 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 22 Feb 2024 11:38:20 +0100 Subject: [PATCH 149/271] JCR-5031: Release Jackrabbit 2.21.25 - Candidate Release Notes --- RELEASE-NOTES.txt | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 333b53a6688..21b6acdbbb4 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,38 +1,28 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.23 +Release Notes -- Apache Jackrabbit -- Version 2.21.25 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.23, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.25, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.23 is an unstable release cut directly from +Apache Jackrabbit 2.21.25 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.23 +Changes in Jackrabbit 2.21.25 ----------------------------- -Improvement +Bug - [JCR-5011] - Restore SCM information in parent POM + [JCR-5024] - webapp: un-deprecate BootstrapConfig.getJndiConfig and RepositoryAccessServlet.getRepositoryByJNDI Task - [JCR-4914] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.60.0 - [JCR-5012] - set baseline comparisonVersion to latest stable (2.20.14) - [JCR-5013] - Update commons-io dependency to 2.15.1 - [JCR-5014] - Update tomcat dependency to 9.0.85 - [JCR-5015] - update aws java sdk version to 1.12.635 - [JCR-5016] - standalone-components: remove unused jcr-rmi dependency - [JCR-5017] - Update spotbugs-maven-plugin to 4.8.2.0 - [JCR-5018] - Bump up minimal Java version to 11 - [JCR-5019] - Update build-helper-maven-plugin to version 3.5.0 - [JCR-5020] - jackrabbit-webapp: deprecate RMI support "for removal" - [JCR-5021] - jackrabbit-jcr-rmi: deprecate RMI support "for removal" - [JCR-5022] - Update derby dependency to 10.15.2.0 + [JCR-5025] - standalone: deprecate remote repository support (RMI and JNDI) + [JCR-5029] - update aws java sdk version to 1.12.659 For more detailed information about all the changes in this and other From 3245f8e98ba50a5311d3ad00ca7a478959233df2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 22 Feb 2024 13:25:12 +0100 Subject: [PATCH 150/271] [maven-release-plugin] prepare release jackrabbit-2.21.25 --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index fcfe7f7c69f..efdf2771149 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index ae5656c1d6e..2beff9e47eb 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 93481883fb3..60cd8153668 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 805f799df6d..03a9650778d 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 0222d7ec38f..f7e177f013e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index a5fb2b9995f..e59af8a830c 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 93e72a5dc0b..4d6aebec80e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 73539a5944c..8cbf131d829 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index b56eb4342fd..a403a08e3ba 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index bd3cad00d98..0248f53ff42 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index b5fba1ffb61..ed4a8af97a0 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 9cfd48e7de8..65383242ba3 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 261e0807399..a11ee2ede32 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c65eb01bdaa..ea399e51ee0 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.25-SNAPSHOT + 2.21.25 pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.23 + jackrabbit-2.21.25 @@ -76,7 +76,7 @@ 0.0 - 1708184338 + 1708602759 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index b35cb180e08..63cd4280337 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 9030896e840..2111bd20423 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index caea04c44d8..f7c312461f2 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 17a724dd8c7..1b8b8a6e202 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index bd7c5c2a612..54435a787a2 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 8f6ce00fefd..2d294d0a3c0 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 58705bc85a8..1f56e01507d 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index e400500f115..dcf0eb3acae 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index d8467c40081..f67cbaec0b9 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 75429eb9852..2f71ff31a51 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25-SNAPSHOT + 2.21.25 jackrabbit-parent/pom.xml From 8511a2fd1a5a10d9bb66af392cf81bb1ff3d5420 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 22 Feb 2024 13:25:21 +0100 Subject: [PATCH 151/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index efdf2771149..b3983b088dc 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 2beff9e47eb..a504cb250a4 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 60cd8153668..4e5191d1374 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 03a9650778d..0300f2319d3 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index f7e177f013e..523fcf0651e 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index e59af8a830c..641d4f0f62b 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 4d6aebec80e..0828cea4895 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 8cbf131d829..22a06e4950f 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index a403a08e3ba..9639a3bb773 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 0248f53ff42..f9fb32c3b95 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index ed4a8af97a0..7b3a5c9b2dd 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 65383242ba3..7d16318e4cc 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index a11ee2ede32..2023d08b0b0 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index ea399e51ee0..d5ed822957f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.25 + 2.21.26-SNAPSHOT pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.25 + jackrabbit-2.21.23 @@ -76,7 +76,7 @@ 0.0 - 1708602759 + 1708604721 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 63cd4280337..69383a3acc1 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 2111bd20423..4242f56da4d 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index f7c312461f2..ecad80998f0 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 1b8b8a6e202..f90b15772be 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 54435a787a2..401c9903c18 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 2d294d0a3c0..c7fcd81680b 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 1f56e01507d..f94eceff04a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index dcf0eb3acae..64d2a9a1f28 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index f67cbaec0b9..7151762d328 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 2f71ff31a51..d960fe2fc23 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.25 + 2.21.26-SNAPSHOT jackrabbit-parent/pom.xml From 54395133550deecb38f2107b1bb25fb64c995388 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Thu, 22 Feb 2024 20:25:24 +0100 Subject: [PATCH 152/271] JCR-4979 Adjust email vote template after migration to Git (#165) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d960fe2fc23..ab95758ceb6 100644 --- a/pom.xml +++ b/pom.xml @@ -164,7 +164,7 @@ A candidate for the Jackrabbit ${project.version} release is available at: The release candidate is a zip archive of the sources in: - https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-${project.version}/ + https://github.com/apache/jackrabbit/tree/${project.artifactId}-${project.version}/ The SHA1 checksum of the archive is ${checksum}. From aa8dc3f882e5fd1864b6ab30ed3af076956707be Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 27 Feb 2024 13:35:04 +0100 Subject: [PATCH 153/271] JCR-5026: standalone: remove remote repository support (RMI and JNDI) (#161) --- .../cli/ext/ConnectToJNDIServer.java | 73 ------------------- .../cli/ext/ConnectToRmiServer.java | 69 ------------------ .../jackrabbit/standalone/cli/command.xml | 6 -- 3 files changed, 148 deletions(-) delete mode 100644 jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java delete mode 100644 jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java deleted file mode 100644 index f7b3cebedf0..00000000000 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.standalone.cli.ext; - -import javax.jcr.Repository; -import javax.naming.InitialContext; - -import org.apache.commons.chain.Command; -import org.apache.commons.chain.Context; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.standalone.cli.CommandHelper; - -/** -* @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. -* Connect to a JCR-RMI server -*/ -@Deprecated(forRemoval = true) -public class ConnectToJNDIServer implements Command { - /** logger */ - private static Log log = LogFactory.getLog(ConnectToJNDIServer.class); - - // ---------------------------- < keys > - /** url key */ - private String urlKey = "url"; - - /** - * {@inheritDoc} - */ - public boolean execute(Context ctx) throws Exception { - String url = (String) ctx.get(this.urlKey); - if (log.isDebugEnabled()) { - log.debug("connecting to jndi server at " + url); - } - InitialContext iCtx = new InitialContext(); - ClientAdapterFactory adapter = new ClientAdapterFactory(); - RemoteRepository remote = (RemoteRepository) iCtx.lookup(url); - Repository repo = adapter.getRepository(remote); - CommandHelper.setRepository(ctx, repo, "jndi " + url); - return false; - } - - /** - * @return the url key - */ - public String getUrlKey() { - return urlKey; - } - - /** - * @param urlKey - * the url key to set - */ - public void setUrlKey(String urlKey) { - this.urlKey = urlKey; - } -} diff --git a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java b/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java deleted file mode 100644 index 6ba205e1324..00000000000 --- a/jackrabbit-standalone-components/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToRmiServer.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.standalone.cli.ext; - -import javax.jcr.Repository; - -import org.apache.commons.chain.Command; -import org.apache.commons.chain.Context; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.jackrabbit.rmi.client.ClientRepositoryFactory; -import org.apache.jackrabbit.standalone.cli.CommandHelper; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - * Connect to a JCR-RMI server - */ -@Deprecated(forRemoval = true) -public class ConnectToRmiServer implements Command { - /** logger */ - private static Log log = LogFactory.getLog(ConnectToRmiServer.class); - - // ---------------------------- < keys > - /** url key */ - private String urlKey = "url"; - - /** - * {@inheritDoc} - */ - public boolean execute(Context ctx) throws Exception { - String url = (String) ctx.get(this.urlKey); - if (log.isDebugEnabled()) { - log.debug("connecting to jcr-rmi server at " + url); - } - ClientRepositoryFactory factory = new ClientRepositoryFactory(); - Repository repository = factory.getRepository(url); - CommandHelper.setRepository(ctx, repository, "jcr-rmi " + url); - return false; - } - - /** - * @return the url key - */ - public String getUrlKey() { - return urlKey; - } - - /** - * @param urlKey - * the url key to set - */ - public void setUrlKey(String urlKey) { - this.urlKey = urlKey; - } -} diff --git a/jackrabbit-standalone-components/src/main/resources/org/apache/jackrabbit/standalone/cli/command.xml b/jackrabbit-standalone-components/src/main/resources/org/apache/jackrabbit/standalone/cli/command.xml index 959990e3fa4..6a226719c63 100644 --- a/jackrabbit-standalone-components/src/main/resources/org/apache/jackrabbit/standalone/cli/command.xml +++ b/jackrabbit-standalone-components/src/main/resources/org/apache/jackrabbit/standalone/cli/command.xml @@ -54,12 +54,6 @@ - - - - From 87351a8f95f2c83e956b832014680d0a89b2860e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 27 Feb 2024 14:03:18 +0100 Subject: [PATCH 154/271] JCR-5027: jackrabbit-webapp: remove RMI support (#162) * JCR-5026: standalone: remove remote repository support (RMI and JNDI) * JCR-5027: jackrabbit-webapp: remove RMI support --- jackrabbit-webapp/pom.xml | 5 - .../jackrabbit/j2ee/BootstrapConfig.java | 15 - .../org/apache/jackrabbit/j2ee/RMIConfig.java | 220 ------------- .../j2ee/RepositoryAccessServlet.java | 76 +---- .../j2ee/RepositoryStartupServlet.java | 300 +----------------- .../WEB-INF/templates/bootstrap.properties | 8 - 6 files changed, 2 insertions(+), 622 deletions(-) delete mode 100644 jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 64d2a9a1f28..deea601b625 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -67,11 +67,6 @@ jackrabbit-jcr-servlet ${project.version} - - org.apache.jackrabbit - jackrabbit-jcr-rmi - ${project.version} - ch.qos.logback logback-classic diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java index ddc769c84c9..bcef72d1653 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java @@ -46,8 +46,6 @@ public class BootstrapConfig extends AbstractConfig { private JNDIConfig jndiConfig = new JNDIConfig(this); - @Deprecated(forRemoval = true) private RMIConfig rmiConfig = new RMIConfig(this); - public void init(Properties props) throws ServletException { String property = props.getProperty("repository.home");; if (property != null) { @@ -62,7 +60,6 @@ public void init(Properties props) throws ServletException { setRepositoryName(property); } jndiConfig.init(props); - rmiConfig.init(props); } public void init(ServletConfig ctx) throws ServletException { @@ -79,7 +76,6 @@ public void init(ServletConfig ctx) throws ServletException { setRepositoryName(property); } jndiConfig.init(ctx); - rmiConfig.init(ctx); } public String getRepositoryHome() { @@ -111,17 +107,9 @@ public JNDIConfig getJndiConfig() { return jndiConfig; } - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ - @Deprecated(forRemoval = true) public RMIConfig getRmiConfig() { - return rmiConfig; - } - public void validate() { valid = repositoryName != null; jndiConfig.validate(); - rmiConfig.validate(); } @@ -130,8 +118,5 @@ public void logInfos() { if (jndiConfig.isValid()) { jndiConfig.logInfos(); } - if (rmiConfig.isValid()) { - rmiConfig.logInfos(); - } } } \ No newline at end of file diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java deleted file mode 100644 index 8e2390fc871..00000000000 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RMIConfig.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.j2ee; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.net.URI; -import java.net.URISyntaxException; -import java.rmi.registry.Registry; -import java.util.Properties; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The RMI config hold information about RMI connection details. - * - * It supports the following properties and init parameters: - *

    - * +-------------------+--------------------+
    - * | Property Name     | Init-Param Name    |
    - * +-------------------+--------------------+
    - * | rmi.enable        | {rmi-port sepc.}   |
    - * | rmi.host          | rmi-host           |
    - * | rmi.port          | rmi-port           |
    - * | rmi.name          | {repository name}  |
    - * | rmi.url           | rmi-url            |
    - * +-------------------+--------------------+
    - * 
    - */ -@Deprecated(forRemoval = true) public class RMIConfig extends AbstractConfig { - - /** - * default logger - */ - private static final Logger log = LoggerFactory.getLogger(RMIConfig.class); - - private boolean rmiEnabled; - - private int rmiPort = -1; - - private String rmiHost; - - private String rmiName; - - private String rmiUri; - - private final BootstrapConfig parentConfig; - - - public RMIConfig(BootstrapConfig parentConfig) { - this.parentConfig = parentConfig; - } - - public void init(Properties props) throws ServletException { - String property = props.getProperty("rmi.name");; - if (property != null) { - setRmiName(property); - } - property = props.getProperty("rmi.enabled"); - if (property != null) { - setRmiEnabled(property); - } - property = props.getProperty("rmi.port"); - if (property != null) { - setRmiPort(property); - } - property = props.getProperty("rmi.host"); - if (property != null) { - setRmiHost(property); - } - property = props.getProperty("rmi.uri"); - if (property != null) { - setRmiUri(property); - } - } - - public void init(ServletConfig ctx) throws ServletException { - String property = ctx.getInitParameter("rmi-name"); - if (property != null) { - setRmiName(property); - } - property = ctx.getInitParameter("rmi-enabled"); - if (property != null) { - setRmiEnabled(property); - } - property = ctx.getInitParameter("rmi-port"); - if (property != null) { - setRmiPort(property); - } - property = ctx.getInitParameter("rmi-host"); - if (property != null) { - setRmiHost(property); - } - property = ctx.getInitParameter("rmi-uri"); - if (property != null) { - setRmiUri(property); - } - // enable RMI if either port or url was defined - rmiEnabled = rmiPort >=0 || rmiUri != null; - } - - public String getRmiName() { - return rmiName; - } - - public void setRmiName(String rmiName) { - this.rmiName = rmiName; - } - - public boolean enabled() { - return rmiEnabled; - } - - public String getRmiEnabled() { - return String.valueOf(rmiEnabled); - } - - public void setRmiEnabled(String rmiEnabled) { - this.rmiEnabled = Boolean.valueOf(rmiEnabled).booleanValue(); - } - - public int rmiPort() { - return rmiPort; - } - - public String getRmiPort() { - return String.valueOf(rmiPort); - } - - public void setRmiPort(String rmiPort) { - this.rmiPort = Integer.decode(rmiPort).intValue(); - } - - public String getRmiHost() { - return rmiHost; - } - - public void setRmiHost(String rmiHost) { - this.rmiHost = rmiHost; - } - - public String getRmiUri() { - return rmiUri; - } - - public void setRmiUri(String rmiUri) { - this.rmiUri = rmiUri; - } - - public void validate() { - if (!rmiEnabled) { - return; - } - - if (rmiUri != null && rmiUri.length() > 0) { - // URI takes precedences, so check whether the configuration has to - // be set from the URI - try { - URI uri = new URI(rmiUri); - - // extract values from the URI, check later - rmiHost = uri.getHost(); - rmiPort = uri.getPort(); - rmiName = uri.getPath(); - - } catch (URISyntaxException e) { - log.warn("Cannot parse RMI URI '" + rmiUri + "'.", e); - rmiUri = null; // clear RMI URI use another one - rmiHost = null; // use default host, ignore rmi-host param - } - - // cut of leading slash from name if defined at all - if (rmiName != null && rmiName.startsWith("/")) { - rmiName = rmiName.substring(1); - } - } - - // check RMI port - if (rmiPort == -1 || rmiPort == 0) { - // accept -1 or 0 as a hint to use the default - rmiPort = Registry.REGISTRY_PORT; - } else if (rmiPort < -1 || rmiPort > 0xFFFF) { - // emit a warning if out of range, use defualt in this case - log.warn("Invalid port in rmi-port param " + rmiPort + ". using default port."); - rmiPort = Registry.REGISTRY_PORT; - } - - // check host - use an empty name if null (i.e. not configured) - if (rmiHost == null) { - rmiHost = ""; - } - - // check name - use repositoryName if empty or null - if (rmiName == null || rmiName.length() ==0) { - rmiName = parentConfig.getRepositoryName(); - } - - // reconstruct the rmiURI now because values might have been changed - rmiUri = "//" + rmiHost + ":" + rmiPort + "/" + rmiName; - valid = true; - } -} \ No newline at end of file diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java index 1e748d9bc36..f4df97e9ca6 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java @@ -16,7 +16,6 @@ */ package org.apache.jackrabbit.j2ee; -import org.apache.jackrabbit.rmi.client.ClientRepositoryFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,9 +24,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; import java.util.Properties; import javax.jcr.Repository; @@ -39,7 +35,7 @@ /** * This Class implements a servlet that is used as unified mechanism to retrieve - * a jcr repository either through JNDI or RMI. + * a jcr repository either through JNDI. */ public class RepositoryAccessServlet extends HttpServlet { @@ -220,44 +216,6 @@ private Repository getRepositoryByJNDI() throws ServletException { } } - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Checks if the repository is available via RMI and returns it. - * @return the repository or null - * @throws ServletException if this servlet is not properly configured. - */ - @Deprecated(forRemoval = true) private Repository getRepositoryByRMI() throws ServletException { - BootstrapConfig config = getConfig(); - if (!config.getRmiConfig().isValid() || !config.getRmiConfig().enabled()) { - return null; - } - - // acquire via RMI - String rmiURI = config.getRmiConfig().getRmiUri(); - if (rmiURI == null) { - return null; - } - log.info(" trying to retrieve repository using rmi. uri={}", rmiURI); - ClientFactoryDelegater cfd; - try { - Class clazz = Class.forName(getServerFactoryDelegaterClass()); - cfd = (ClientFactoryDelegater) clazz.newInstance(); - } catch (Throwable e) { - log.error("Unable to locate RMI ClientRepositoryFactory. Is jcr-rmi.jar missing?", e); - return null; - } - - try { - Repository r = cfd.getRepository(rmiURI); - log.info("Acquired repository via RMI."); - return r; - } catch (Exception e) { - log.error("Error while retrieving repository using RMI: {}", rmiURI, e); - return null; - } - } - /** * If our config said so, try to retrieve a Repository from the ServletContext */ @@ -304,10 +262,6 @@ public Repository getRepository() { // try to retrieve via jndi repository = getRepositoryByJNDI(); } - if (repository == null) { - // try to get via rmi - repository = getRepositoryByRMI(); - } if (repository == null) { throw new ServletException("N/A"); } @@ -337,33 +291,5 @@ public static Repository getRepository(ServletContext ctx) { public BootstrapConfig getBootstrapConfig() { return config; } - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * optional class for RMI, will only be used, if RMI client is present - */ - @Deprecated(forRemoval = true) protected static abstract class ClientFactoryDelegater { - - public abstract Repository getRepository(String uri) - throws RemoteException, MalformedURLException, NotBoundException; - } - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * optional class for RMI, will only be used, if RMI server is present - */ - @Deprecated(forRemoval = true) protected static class RMIClientFactoryDelegater extends ClientFactoryDelegater { - - // only used to enforce linking upon Class.forName() - static String FactoryClassName = ClientRepositoryFactory.class.getName(); - - public Repository getRepository(String uri) - throws MalformedURLException, NotBoundException, RemoteException { - System.setProperty("java.rmi.server.useCodebaseOnly", "true"); - return new ClientRepositoryFactory().getRepository(uri); - } - } } diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java index 10941628592..8f44a720994 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java @@ -20,8 +20,6 @@ import org.apache.jackrabbit.commons.repository.RepositoryFactory; import org.apache.jackrabbit.core.RepositoryImpl; import org.apache.jackrabbit.core.config.RepositoryConfig; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; import org.apache.jackrabbit.servlet.AbstractRepositoryServlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,15 +33,6 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.UnknownHostException; -import java.rmi.AlreadyBoundException; -import java.rmi.Naming; -import java.rmi.NoSuchObjectException; -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; -import java.rmi.server.RMIServerSocketFactory; -import java.rmi.server.UnicastRemoteObject; import java.util.Properties; import javax.jcr.Repository; @@ -57,83 +46,8 @@ /** * The RepositoryStartupServlet starts a jackrabbit repository and registers it - * to the JNDI environment and optional to the RMI registry. + * to the JNDI environment. *

    - * Registration with RMI - *

    - * Upon successfull creation of the repository in the {@link #init()} method, - * the repository is registered with an RMI registry if the web application is - * so configured. To register with RMI, the following web application - * init-params are considered: rmi-port designating - * the port on which the RMI registry is listening, rmi-host - * designating the interface on the local host on which the RMI registry is - * active, repository-name designating the name to which the - * repository is to be bound in the registry, and rmi-uri - * designating an RMI URI complete with host, optional port and name to which - * the object is bound. - *

    - * If the rmi-uri parameter is configured with a non-empty value, - * the rmi-port and rmi-host parameters are ignored. - * The repository-name parameter is only considered if a non-empty - * rmi-uri parameter is configured if the latter does not contain - * a name to which to bind the repository. - *

    - * This is the algorithm used to find out the host, port and name for RMI - * registration: - *

      - *
    1. If neither a rmi-uri nor a rmi-host nor a - * rmi-port parameter is configured, the repository is not - * registered with any RMI registry. - *
    2. If a non-empty rmi-uri parameter is configured extract the - * host name (or IP address), port number and name to bind to from the - * URI. If the URI is not valid, host defaults to 0.0.0.0 - * meaning all interfaces on the local host, port defaults to the RMI - * default port (1099) and the name defaults to the value - * of the repository-name parameter. - *
    3. If a non-empty rmi-uri is not configured, the host is taken - * from the rmi-host parameter, the port from the - * rmi-port parameter and the name to bind the repository to - * from the repository-name parameter. If the - * rmi-host parameter is empty or not configured, the host - * defaults to 0.0.0.0 meaning all interfaces on the local - * host. If the rmi-port parameter is empty, not configured, - * zero or a negative value, the default port for the RMI registry - * (1099) is used. - *
    - *

    - * After finding the host and port of the registry, the RMI registry itself - * is acquired. It is assumed, that host and port primarily designate an RMI - * registry, which should be active on the local host but has not been started - * yet. In this case, the LocateRegistry.createRegistry method is - * called to create a registry on the local host listening on the host and port - * configured. If creation fails, the LocateRegistry.getRegistry - * method is called to get a remote instance of the registry. Note, that - * getRegistry does not create an actual registry on the given - * host/port nor does it check, whether an RMI registry is active. - *

    - * When the registry has been retrieved, either by creation or by just creating - * a remote instance, the repository is bound to the configured name in the - * registry. - *

    - * Possible causes for registration failures include: - *

      - *
    • The web application is not configured to register with an RMI registry at - * all. - *
    • The registry is expected to be running on a remote host but does not. - *
    • The registry is expected to be running on the local host but cannot be - * accessed. Reasons include another application which does not act as an - * RMI registry is running on the configured port and thus blocks creation - * of a new RMI registry. - *
    • An object may already be bound to the same name as is configured to be - * used for the repository. - *
    - *

    - * Note: if a bootstrap-config init parameter is specified the - * servlet tries to read the respective resource, either as context resource or - * as file. The properties specified in this file override the init params - * specified in the web.xml. - *

    - *

    * Setup Wizard Functionality
    * When using the first time, the configuration can miss the relevant * repository parameters in the web.xml. if so, it must contain a @@ -177,23 +91,6 @@ public class RepositoryStartupServlet extends AbstractRepositoryServlet { */ private InitialContext jndiContext; - @Deprecated(forRemoval = true) private Registry rmiRegistry = null; - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Keeps a strong reference to the server side RMI repository instance to - * prevent the RMI distributed Garbage Collector from collecting the - * instance making the repository unaccessible though it should still be. - * This field is only set to a non-null value, if registration - * of the repository to an RMI registry succeeded in the - * {@link #registerRMI()} method. - * - * @see #registerRMI() - * @see #unregisterRMI() - */ - @Deprecated(forRemoval = true) private Remote rmiRepository; - /** * the file to the bootstrap config */ @@ -247,7 +144,6 @@ public void startup() throws ServletException { try { if (configure()) { initRepository(); - registerRMI(); registerJNDI(); } log.info("RepositoryStartupServlet initialized."); @@ -268,7 +164,6 @@ public void shutdown() { } else { log.info("RepositoryStartupServlet shutting down..."); shutdownRepository(); - unregisterRMI(); unregisterJNDI(); log.info("RepositoryStartupServlet shut down."); } @@ -489,143 +384,6 @@ private void unregisterJNDI() { } } - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Registers the repository to an RMI registry configured in the web - * application. See Registration with RMI in the - * class documentation for a description of the algorithms used to register - * the repository with an RMI registry. - * @throws ServletException if an error occurs. - */ - @Deprecated(forRemoval = true) private void registerRMI() { - RMIConfig rc = config.getRmiConfig(); - if (!rc.isValid() || !rc.enabled()) { - return; - } - - // try to create remote repository - Remote remote; - try { - Class clazz = Class.forName(getRemoteFactoryDelegaterClass()); - RemoteFactoryDelegater rmf = (RemoteFactoryDelegater) clazz.newInstance(); - remote = rmf.createRemoteRepository(repository); - } catch (RemoteException e) { - log.warn("Unable to create RMI repository.", e); - return; - } catch (Throwable t) { - log.warn("Unable to create RMI repository." - + " The jcr-rmi jar might be missing.", t); - return; - } - - try { - System.setProperty("java.rmi.server.useCodebaseOnly", "true"); - Registry reg = null; - - // first try to create the registry, which will fail if another - // application is already running on the configured host/port - // or if the rmiHost is not local - try { - // find the server socket factory: use the default if the - // rmiHost is not configured - RMIServerSocketFactory sf; - if (rc.getRmiHost().length() > 0) { - log.debug("Creating RMIServerSocketFactory for host " + rc.getRmiHost()); - InetAddress hostAddress = InetAddress.getByName(rc.getRmiHost()); - sf = getRMIServerSocketFactory(hostAddress); - } else { - // have the RMI implementation decide which factory is the - // default actually - log.debug("Using default RMIServerSocketFactory"); - sf = null; - } - - // create a registry using the default client socket factory - // and the server socket factory retrieved above. This also - // binds to the server socket to the rmiHost:rmiPort. - reg = LocateRegistry.createRegistry(rc.rmiPort(), null, sf); - rmiRegistry = reg; - } catch (UnknownHostException uhe) { - // thrown if the rmiHost cannot be resolved into an IP-Address - // by getRMIServerSocketFactory - log.info("Cannot create Registry", uhe); - } catch (RemoteException e) { - // thrown by createRegistry if binding to the rmiHost:rmiPort - // fails, for example due to rmiHost being remote or another - // application already being bound to the port - log.info("Cannot create Registry", e); - } - - // if creation of the registry failed, we try to access an - // potentially active registry. We do not check yet, whether the - // registry is actually accessible. - if (reg == null) { - log.debug("Trying to access existing registry at " + rc.getRmiHost() - + ":" + rc.getRmiPort()); - try { - reg = LocateRegistry.getRegistry(rc.getRmiHost(), rc.rmiPort()); - } catch (RemoteException re) { - log.warn("Cannot create the reference to the registry at " - + rc.getRmiHost() + ":" + rc.getRmiPort(), re); - } - } - - // if we finally have a registry, register the repository with the - // rmiName - if (reg != null) { - log.debug("Registering repository as " + rc.getRmiName() - + " to registry " + reg); - reg.bind(rc.getRmiName(), remote); - - // when successfull, keep references - this.rmiRepository = remote; - log.info("Repository bound via RMI with name: " + rc.getRmiUri()); - } else { - log.info("RMI registry missing, cannot bind repository via RMI"); - } - } catch (RemoteException e) { - log.warn("Unable to bind repository via RMI: " + rc.getRmiUri(), e); - } catch (AlreadyBoundException e) { - log.warn("Unable to bind repository via RMI: " + rc.getRmiUri(), e); - } - } - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Unregisters the repository from the RMI registry, if it has previously - * been registered. - */ - @Deprecated(forRemoval = true) private void unregisterRMI() { - if (rmiRepository != null) { - // Forcibly unexport the repository; - try { - UnicastRemoteObject.unexportObject(rmiRepository, true); - } catch (NoSuchObjectException e) { - log.warn("Odd, the RMI repository was not exported", e); - } - // drop strong reference to remote repository - rmiRepository = null; - - // unregister repository - try { - Naming.unbind(config.getRmiConfig().getRmiUri()); - } catch (Exception e) { - log("Error while unbinding repository from JNDI: " + e); - } - } - - if (rmiRegistry != null) { - try { - UnicastRemoteObject.unexportObject(rmiRegistry, true); - } catch (NoSuchObjectException e) { - log.warn("Odd, the RMI registry was not exported", e); - } - rmiRegistry = null; - } - } - /** * Returns the config that was used to bootstrap this servlet. * @return the bootstrap config or null. @@ -648,62 +406,6 @@ protected String getRemoteFactoryDelegaterClass() { return getClass().getName() + "$RMIRemoteFactoryDelegater"; } - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Returns an RMIServerSocketFactory used to create the server - * socket for a locally created RMI registry. - *

    - * This implementation returns a new instance of a simple - * RMIServerSocketFactory which just creates instances of - * the java.net.ServerSocket class bound to the given - * hostAddress. Implementations may overwrite this method to - * provide factory instances, which provide more elaborate server socket - * creation, such as SSL server sockets. - * - * @param hostAddress The InetAddress instance representing the - * the interface on the local host to which the server sockets are - * bound. - * @return A new instance of a simple RMIServerSocketFactory - * creating java.net.ServerSocket instances bound to - * the rmiHost. - */ - @Deprecated(forRemoval = true) protected RMIServerSocketFactory getRMIServerSocketFactory( - final InetAddress hostAddress) { - return new RMIServerSocketFactory() { - public ServerSocket createServerSocket(int port) throws IOException { - return new ServerSocket(port, -1, hostAddress); - } - }; - } - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * optional class for RMI, will only be used, if RMI server is present - */ - @Deprecated(forRemoval = true) protected static abstract class RemoteFactoryDelegater { - - public abstract Remote createRemoteRepository(Repository repository) - throws RemoteException; - } - - /** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * optional class for RMI, will only be used, if RMI server is present - */ - @Deprecated(forRemoval = true) protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater { - - private static final RemoteAdapterFactory FACTORY = - new ServerAdapterFactory(); - - public Remote createRemoteRepository(Repository repository) - throws RemoteException { - return FACTORY.getRemoteRepository(repository); - } - - } //-------------------------------------------------< Installer Routines >--- diff --git a/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties b/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties index 046a7a9d3b5..1b6672dd991 100644 --- a/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties +++ b/jackrabbit-webapp/src/main/webapp/WEB-INF/templates/bootstrap.properties @@ -22,14 +22,6 @@ repository.config=jackrabbit/repository/repository.xml repository.home=jackrabbit/repository repository.name=jackrabbit.repository -# RMI Settings -rmi.enabled=false - -#rmi.port=0 -#rmi.host=localhost -# If the URI is not specified, it's composed as follows: -#rmi.uri=//${rmi.host}:${rmi.port}/${repository.name} - # JNDI Settings # all properties starting with 'java.naming.' will go into the # environment of the initial context From 27f19580e030e487b0477861067c39058ec4b93c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 27 Feb 2024 14:29:07 +0100 Subject: [PATCH 155/271] JCR-5028: remove RMI support (#163) * JCR-5026: standalone: remove remote repository support (RMI and JNDI) * JCR-5027: jackrabbit-webapp: remove RMI support * JCR-5028: remove RMI support * JCR-5030: Release Jackrabbit 2.21.24 - Candidate Release Notes * JCR-5031: Release Jackrabbit 2.21.25 - Candidate Release Notes --- jackrabbit-jcr-rmi/HEADER.txt | 16 - jackrabbit-jcr-rmi/README.txt | 6 - jackrabbit-jcr-rmi/checkstyle.xml | 164 ---- .../rmi/client/BrokenRemoteRepository.java | 180 ---- .../rmi/client/ClientAdapterFactory.java | 459 ---------- .../jackrabbit/rmi/client/ClientItem.java | 212 ----- .../rmi/client/ClientItemDefinition.java | 117 --- .../jackrabbit/rmi/client/ClientLock.java | 142 ---- .../rmi/client/ClientLockManager.java | 110 --- .../rmi/client/ClientNamespaceRegistry.java | 111 --- .../jackrabbit/rmi/client/ClientNode.java | 800 ------------------ .../rmi/client/ClientNodeDefinition.java | 104 --- .../jackrabbit/rmi/client/ClientNodeType.java | 317 ------- .../rmi/client/ClientNodeTypeManager.java | 151 ---- .../jackrabbit/rmi/client/ClientObject.java | 131 --- .../rmi/client/ClientObservationManager.java | 144 ---- .../jackrabbit/rmi/client/ClientProperty.java | 447 ---------- .../rmi/client/ClientPropertyDefinition.java | 117 --- .../jackrabbit/rmi/client/ClientQuery.java | 145 ---- .../rmi/client/ClientQueryManager.java | 99 --- .../rmi/client/ClientQueryResult.java | 99 --- .../rmi/client/ClientRepository.java | 219 ----- .../rmi/client/ClientRepositoryFactory.java | 137 --- .../jackrabbit/rmi/client/ClientRow.java | 131 --- .../jackrabbit/rmi/client/ClientSession.java | 589 ------------- .../jackrabbit/rmi/client/ClientVersion.java | 154 ---- .../rmi/client/ClientVersionHistory.java | 219 ----- .../rmi/client/ClientVersionManager.java | 279 ------ .../rmi/client/ClientWorkspace.java | 299 ------- .../rmi/client/ClientXASession.java | 146 ---- .../rmi/client/DefaultContentHandler.java | 176 ---- .../rmi/client/LocalAdapterFactory.java | 447 ---------- .../rmi/client/RemoteRepositoryException.java | 44 - .../rmi/client/RemoteRuntimeException.java | 42 - .../rmi/client/SafeClientRepository.java | 222 ----- .../rmi/client/SerializingContentHandler.java | 441 ---------- .../rmi/client/iterator/ClientIterator.java | 222 ----- .../client/iterator/ClientNodeIterator.java | 72 -- .../iterator/ClientNodeTypeIterator.java | 66 -- .../iterator/ClientPropertyIterator.java | 73 -- .../client/iterator/ClientRowIterator.java | 70 -- .../iterator/ClientVersionIterator.java | 73 -- .../rmi/client/iterator/package-info.java | 18 - .../jackrabbit/rmi/client/package-info.java | 18 - .../rmi/client/principal/ClientGroup.java | 91 -- .../rmi/client/principal/ClientPrincipal.java | 66 -- .../principal/ClientPrincipalIterator.java | 43 - .../rmi/client/principal/package-info.java | 18 - .../security/ClientAccessControlEntry.java | 75 -- .../security/ClientAccessControlList.java | 87 -- .../security/ClientAccessControlManager.java | 161 ---- .../security/ClientAccessControlPolicy.java | 52 -- .../ClientAccessControlPolicyIterator.java | 50 -- .../rmi/client/security/ClientPrivilege.java | 113 --- .../rmi/client/security/package-info.java | 18 - .../rmi/iterator/ArrayEventIterator.java | 46 - .../iterator/ArrayEventListenerIterator.java | 47 - .../rmi/iterator/ArrayIterator.java | 85 -- .../jackrabbit/rmi/iterator/package-info.java | 18 - .../JackrabbitClientAdapterFactory.java | 27 - .../rmi/jackrabbit/package-info.java | 18 - .../rmi/observation/ClientEventPoll.java | 344 -------- .../jackrabbit/rmi/observation/Queue.java | 85 -- .../observation/ServerEventListenerProxy.java | 146 ---- .../rmi/observation/package-info.java | 18 - .../jackrabbit/rmi/remote/ArrayIterator.java | 104 --- .../jackrabbit/rmi/remote/BufferIterator.java | 109 --- .../rmi/remote/RemoteEventCollection.java | 129 --- .../jackrabbit/rmi/remote/RemoteItem.java | 147 ---- .../rmi/remote/RemoteItemDefinition.java | 109 --- .../jackrabbit/rmi/remote/RemoteIterator.java | 71 -- .../jackrabbit/rmi/remote/RemoteLock.java | 133 --- .../rmi/remote/RemoteLockManager.java | 50 -- .../rmi/remote/RemoteNamespaceRegistry.java | 118 --- .../jackrabbit/rmi/remote/RemoteNode.java | 745 ---------------- .../rmi/remote/RemoteNodeDefinition.java | 96 --- .../jackrabbit/rmi/remote/RemoteNodeType.java | 292 ------- .../rmi/remote/RemoteNodeTypeManager.java | 106 --- .../rmi/remote/RemoteObservationManager.java | 106 --- .../jackrabbit/rmi/remote/RemoteProperty.java | 142 ---- .../rmi/remote/RemotePropertyDefinition.java | 121 --- .../jackrabbit/rmi/remote/RemoteQuery.java | 119 --- .../rmi/remote/RemoteQueryManager.java | 75 -- .../rmi/remote/RemoteQueryResult.java | 74 -- .../rmi/remote/RemoteRepository.java | 161 ---- .../jackrabbit/rmi/remote/RemoteRow.java | 117 --- .../jackrabbit/rmi/remote/RemoteSession.java | 464 ---------- .../jackrabbit/rmi/remote/RemoteVersion.java | 121 --- .../rmi/remote/RemoteVersionHistory.java | 246 ------ .../rmi/remote/RemoteVersionManager.java | 109 --- .../rmi/remote/RemoteWorkspace.java | 200 ----- .../rmi/remote/RemoteXASession.java | 88 -- .../rmi/remote/SerializableXid.java | 73 -- .../jackrabbit/rmi/remote/package-info.java | 18 - .../rmi/remote/principal/RemoteGroup.java | 57 -- .../rmi/remote/principal/RemotePrincipal.java | 53 -- .../rmi/remote/principal/package-info.java | 18 - .../security/RemoteAccessControlEntry.java | 59 -- .../security/RemoteAccessControlList.java | 53 -- .../security/RemoteAccessControlManager.java | 93 -- .../security/RemoteAccessControlPolicy.java | 48 -- .../rmi/remote/security/RemotePrivilege.java | 71 -- .../rmi/remote/security/package-info.java | 18 - .../AbstractRemoteRepositoryFactory.java | 71 -- .../rmi/repository/JNDIRemoteRepository.java | 75 -- .../JNDIRemoteRepositoryFactory.java | 89 -- .../rmi/repository/ProxyRepository.java | 250 ------ .../rmi/repository/RMIRemoteRepository.java | 56 -- .../RMIRemoteRepositoryFactory.java | 77 -- .../rmi/repository/RepositoryFactory.java | 37 - .../rmi/repository/RmiRepositoryFactory.java | 175 ---- .../rmi/repository/URLRemoteRepository.java | 71 -- .../URLRemoteRepositoryFactory.java | 92 -- .../rmi/repository/package-info.java | 18 - .../rmi/server/RemoteAdapterFactory.java | 479 ----------- .../rmi/server/ServerAdapterFactory.java | 531 ------------ .../rmi/server/ServerEventCollection.java | 139 --- .../jackrabbit/rmi/server/ServerItem.java | 143 ---- .../rmi/server/ServerItemDefinition.java | 96 --- .../jackrabbit/rmi/server/ServerLock.java | 100 --- .../rmi/server/ServerLockManager.java | 108 --- .../rmi/server/ServerNamespaceRegistry.java | 117 --- .../jackrabbit/rmi/server/ServerNode.java | 688 --------------- .../rmi/server/ServerNodeDefinition.java | 87 -- .../jackrabbit/rmi/server/ServerNodeType.java | 233 ----- .../rmi/server/ServerNodeTypeManager.java | 122 --- .../jackrabbit/rmi/server/ServerObject.java | 263 ------ .../rmi/server/ServerObservationManager.java | 166 ---- .../jackrabbit/rmi/server/ServerProperty.java | 134 --- .../rmi/server/ServerPropertyDefinition.java | 98 --- .../jackrabbit/rmi/server/ServerQuery.java | 112 --- .../rmi/server/ServerQueryManager.java | 104 --- .../rmi/server/ServerQueryResult.java | 78 -- .../rmi/server/ServerRepository.java | 143 ---- .../jackrabbit/rmi/server/ServerRow.java | 136 --- .../jackrabbit/rmi/server/ServerSession.java | 353 -------- .../jackrabbit/rmi/server/ServerVersion.java | 157 ---- .../rmi/server/ServerVersionHistory.java | 215 ----- .../rmi/server/ServerVersionManager.java | 278 ------ .../rmi/server/ServerWorkspace.java | 242 ------ .../rmi/server/ServerXASession.java | 134 --- .../rmi/server/iterator/ServerIterator.java | 142 ---- .../server/iterator/ServerNodeIterator.java | 59 -- .../iterator/ServerNodeTypeIterator.java | 59 -- .../iterator/ServerPropertyIterator.java | 59 -- .../server/iterator/ServerRowIterator.java | 59 -- .../iterator/ServerVersionIterator.java | 59 -- .../rmi/server/iterator/package-info.java | 18 - .../jackrabbit/rmi/server/jmx/JCRServer.java | 170 ---- .../rmi/server/jmx/JCRServerMBean.java | 54 -- .../rmi/server/jmx/package-info.java | 18 - .../jackrabbit/rmi/server/package-info.java | 18 - .../rmi/server/principal/ServerGroup.java | 92 -- .../rmi/server/principal/ServerPrincipal.java | 54 -- .../principal/ServerPrincipalIterator.java | 42 - .../rmi/server/principal/package-info.java | 18 - .../security/ServerAccessControlEntry.java | 51 -- .../security/ServerAccessControlList.java | 83 -- .../security/ServerAccessControlManager.java | 89 -- .../security/ServerAccessControlPolicy.java | 44 - .../ServerAccessControlPolicyIterator.java | 61 -- .../rmi/server/security/ServerPrivilege.java | 64 -- .../rmi/server/security/package-info.java | 18 - .../jackrabbit/rmi/value/AbstractValue.java | 247 ------ .../jackrabbit/rmi/value/BinaryValue.java | 122 --- .../jackrabbit/rmi/value/BooleanValue.java | 67 -- .../jackrabbit/rmi/value/DateValue.java | 209 ----- .../jackrabbit/rmi/value/DecimalValue.java | 117 --- .../jackrabbit/rmi/value/DoubleValue.java | 106 --- .../jackrabbit/rmi/value/LongValue.java | 95 --- .../jackrabbit/rmi/value/NameValue.java | 62 -- .../jackrabbit/rmi/value/PathValue.java | 62 -- .../jackrabbit/rmi/value/ReferenceValue.java | 63 -- .../rmi/value/SerialValueFactory.java | 254 ------ .../rmi/value/SerializableBinary.java | 202 ----- .../jackrabbit/rmi/value/StringValue.java | 242 ------ .../jackrabbit/rmi/value/package-info.java | 18 - .../rmi/client/iterator/package.html | 19 - .../apache/jackrabbit/rmi/client/package.html | 76 -- .../jackrabbit/rmi/iterator/package.html | 26 - .../jackrabbit/rmi/observation/package.html | 71 -- .../apache/jackrabbit/rmi/remote/package.html | 35 - .../rmi/server/iterator/package.html | 19 - .../apache/jackrabbit/rmi/server/package.html | 80 -- .../apache/jackrabbit/rmi/value/package.html | 30 - .../apache/jackrabbit/rmi/xml/package.html | 31 - .../services/javax.jcr.RepositoryFactory | 16 - .../main/resources/jackrabbit-rmi-service.xml | 41 - .../jackrabbit/rmi/ConformanceTest.java | 39 - .../jackrabbit/rmi/RepositoryStubImpl.java | 108 --- .../src/test/resources/logback-test.xml | 31 - .../resources/repositoryStubImpl.properties | 17 - pom.xml | 1 - 193 files changed, 25053 deletions(-) delete mode 100644 jackrabbit-jcr-rmi/HEADER.txt delete mode 100644 jackrabbit-jcr-rmi/README.txt delete mode 100644 jackrabbit-jcr-rmi/checkstyle.xml delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory delete mode 100644 jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml delete mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java delete mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java delete mode 100644 jackrabbit-jcr-rmi/src/test/resources/logback-test.xml delete mode 100644 jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties diff --git a/jackrabbit-jcr-rmi/HEADER.txt b/jackrabbit-jcr-rmi/HEADER.txt deleted file mode 100644 index ae6f28c4a1c..00000000000 --- a/jackrabbit-jcr-rmi/HEADER.txt +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ diff --git a/jackrabbit-jcr-rmi/README.txt b/jackrabbit-jcr-rmi/README.txt deleted file mode 100644 index 5cd4cf2f73e..00000000000 --- a/jackrabbit-jcr-rmi/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -=================================================== -Apache Jackrabbit JCR-RMI -=================================================== - -RMI support is deprecated and will be removed in a future version of Jackrabbit; see https://issues.apache.org/jira/browse/JCR-4972 for more information. - diff --git a/jackrabbit-jcr-rmi/checkstyle.xml b/jackrabbit-jcr-rmi/checkstyle.xml deleted file mode 100644 index 33678aa8981..00000000000 --- a/jackrabbit-jcr-rmi/checkstyle.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java deleted file mode 100644 index 1b4c329c985..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Dummy remote repository instance that throws a {@link RemoteException} - * whenever any method is invoked. Used as a sentinel object by the - * {@link SafeClientRepository} class. - */ -@Deprecated(forRemoval = true) public class BrokenRemoteRepository implements RemoteRepository { - - /** - * The remote exception thrown by methods of this instance. - */ - private final RemoteException exception; - - /** - * Creates a remote repository whose methods throw the given - * exception. - * - * @param exception remote exception - */ - public BrokenRemoteRepository(RemoteException exception) { - this.exception = exception; - } - - /** - * Creates a remote repository whose methods trow a remote - * exception with the given message. - * - * @param message exception message - */ - public BrokenRemoteRepository(String message) { - this(new RemoteException(message)); - } - - /** - * Creates a remote repository whose methods throw a remote exception. - */ - public BrokenRemoteRepository() { - this(new RemoteException()); - } - - //----------------------------------------------------< RemoteRepository > - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public String getDescriptor(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @return nothing - * @throws RemoteException always thrown - */ - public String[] getDescriptorKeys() throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login() throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param workspace ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(String workspace) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param credentials ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(Credentials credentials) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param workspace ignored - * @param credentials ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(Credentials credentials, String workspace) - throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public Value getDescriptorValue(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public Value[] getDescriptorValues(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public boolean isSingleValueDescriptor(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public boolean isStandardDescriptor(String key) throws RemoteException { - throw exception; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java deleted file mode 100644 index 7b8c50eaac7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.client.iterator.ClientNodeIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientNodeTypeIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientPropertyIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientRowIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientVersionIterator; -import org.apache.jackrabbit.rmi.client.principal.ClientGroup; -import org.apache.jackrabbit.rmi.client.principal.ClientPrincipal; -import org.apache.jackrabbit.rmi.client.principal.ClientPrincipalIterator; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlList; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicyIterator; -import org.apache.jackrabbit.rmi.client.security.ClientPrivilege; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Default implementation of the - * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory LocalAdapterFactory} - * interface. This factory uses the client adapters defined in this - * package as the default adapter implementations. Subclasses can - * easily override or extend the default adapters by implementing the - * corresponding factory methods. - */ -@Deprecated(forRemoval = true) public class ClientAdapterFactory implements LocalAdapterFactory { - - /** - * Creates and returns a {@link ClientRepository ClientRepository} - * instance. - * - * {@inheritDoc} - */ - public Repository getRepository(RemoteRepository remote) { - return new ClientRepository(remote, this); - } - - /** - * Creates and returns a {@link ClientSession ClientSession} instance. - * In case the remote session is transaction enabled, the returned session - * will be transaction enabled too through the {@link ClientXASession}. - * - * {@inheritDoc} - */ - public Session getSession(Repository repository, RemoteSession remote) { - if (remote instanceof RemoteXASession) { - return new ClientXASession( - repository, (RemoteXASession) remote, this); - } else { - return new ClientSession(repository, remote, this); - } - } - - /** - * Creates and returns a {@link ClientWorkspace ClientWorkspace} instance. - * - * {@inheritDoc} - */ - public Workspace getWorkspace(Session session, RemoteWorkspace remote) { - return new ClientWorkspace(session, remote, this); - } - - /** - * Creates and returns a - * {@link ClientObservationManager ClientObservationManager} instance. - * - * {@inheritDoc} - */ - public ObservationManager getObservationManager(Workspace workspace, - RemoteObservationManager remote) { - return new ClientObservationManager(workspace, remote); - } - - /** - * Creates and returns a - * {@link ClientNamespaceRegistry ClientClientNamespaceRegistry} instance. - * - * {@inheritDoc} - */ - public NamespaceRegistry getNamespaceRegistry( - RemoteNamespaceRegistry remote) { - return new ClientNamespaceRegistry(remote, this); - } - - /** - * Creates and returns a - * {@link ClientNodeTypeManager ClienNodeTypeManager} instance. - * - * {@inheritDoc} - */ - public NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote) { - return new ClientNodeTypeManager(remote, this); - } - - /** - * Creates and returns a {@link ClientItem ClientItem} instance. - * - * {@inheritDoc} - */ - public Item getItem(Session session, RemoteItem remote) { - return new ClientItem(session, remote, this); - } - - /** - * Creates and returns a {@link ClientProperty ClientProperty} instance. - * - * {@inheritDoc} - */ - public Property getProperty(Session session, RemoteProperty remote) { - return new ClientProperty(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNode ClientNode} instance. - * - * {@inheritDoc} - */ - public Node getNode(Session session, RemoteNode remote) { - return new ClientNode(session, remote, this); - } - - /** - * Creates and returns a {@link ClientVersion ClientVersion} instance. - * - * {@inheritDoc} - */ - public Version getVersion(Session session, RemoteVersion remote) { - return new ClientVersion(session, remote, this); - } - - /** - * Creates and returns a {@link ClientVersionHistory ClientVersionHistory} - * instance. - * - * {@inheritDoc} - */ - public VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote) { - return new ClientVersionHistory(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNodeType ClientNodeType} instance. - * - * {@inheritDoc} - */ - public NodeType getNodeType(RemoteNodeType remote) { - return new ClientNodeType(remote, this); - } - - /** - * Creates and returns a {@link ClientItemDefinition ClientItemDefinition} instance. - * - * {@inheritDoc} - */ - public ItemDefinition getItemDef(RemoteItemDefinition remote) { - return new ClientItemDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientNodeDefinition ClientNodeDefinition} instance. - * - * {@inheritDoc} - */ - public NodeDefinition getNodeDef(RemoteNodeDefinition remote) { - return new ClientNodeDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientPropertyDefinition ClientPropertyDefinition} - * instance. - * - * {@inheritDoc} - */ - public PropertyDefinition getPropertyDef(RemotePropertyDefinition remote) { - return new ClientPropertyDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientLock ClientLock} instance. - * - * {@inheritDoc} - */ - public Lock getLock(Session session, RemoteLock remote) { - return new ClientLock(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQueryManager ClientQueryManager} instance. - * - * {@inheritDoc} - */ - public QueryManager getQueryManager( - Session session, RemoteQueryManager remote) { - return new ClientQueryManager(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQuery ClientQuery} instance. - * - * {@inheritDoc} - */ - public Query getQuery(Session session, RemoteQuery remote) { - return new ClientQuery(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQueryResult ClientQueryResult} instance. - * - * {@inheritDoc} - */ - public QueryResult getQueryResult( - Session session, RemoteQueryResult remote) { - return new ClientQueryResult(session, remote, this); - } - - /** - * Creates and returns a {@link ClientRow ClientRow} instance. - * - * {@inheritDoc} - */ - public Row getRow(Session session, RemoteRow remote) { - return new ClientRow(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNodeIterator} instance. - * {@inheritDoc} - */ - public NodeIterator getNodeIterator( - Session session, RemoteIterator remote) { - return new ClientNodeIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientPropertyIterator} instance. - * {@inheritDoc} - */ - public PropertyIterator getPropertyIterator( - Session session, RemoteIterator remote) { - return new ClientPropertyIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientVersionIterator} instance. - * {@inheritDoc} - */ - public VersionIterator getVersionIterator( - Session session, RemoteIterator remote) { - return new ClientVersionIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientNodeTypeIterator} instance. - * {@inheritDoc} - */ - public NodeTypeIterator getNodeTypeIterator(RemoteIterator remote) { - return new ClientNodeTypeIterator(remote, this); - } - - /** - * Creates and returns a {@link ClientRowIterator} instance. - * {@inheritDoc} - */ - public RowIterator getRowIterator(Session session, RemoteIterator remote) { - return new ClientRowIterator(session, remote, this); - } - - public LockManager getLockManager( - Session session, RemoteLockManager remote) { - return new ClientLockManager(session, remote, this); - } - - public VersionManager getVersionManager( - Session session, RemoteVersionManager remote) { - return new ClientVersionManager(session, remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlManager getAccessControlManager( - RemoteAccessControlManager remote) { - return new ClientAccessControlManager(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicy getAccessControlPolicy( - RemoteAccessControlPolicy remote) { - if (remote instanceof RemoteAccessControlList) { - return new ClientAccessControlList( - (RemoteAccessControlList) remote, this); - } - return new ClientAccessControlPolicy(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicy[] getAccessControlPolicy( - RemoteAccessControlPolicy[] remote) { - final AccessControlPolicy[] local = new AccessControlPolicy[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getAccessControlPolicy(remote[i]); - } - return local; - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicyIterator getAccessControlPolicyIterator( - RemoteIterator remote) { - return new ClientAccessControlPolicyIterator(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlEntry getAccessControlEntry( - RemoteAccessControlEntry remote) { - return new ClientAccessControlEntry(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlEntry[] getAccessControlEntry( - RemoteAccessControlEntry[] remote) { - final AccessControlEntry[] local = new AccessControlEntry[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getAccessControlEntry(remote[i]); - } - return local; - } - - /** - * {@inheritDoc} - */ - public Principal getPrincipal(RemotePrincipal remote) { - if (remote instanceof RemoteGroup) { - return new ClientGroup(remote, this); - } - return new ClientPrincipal(remote); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public Iterator getPrincipalIterator(RemoteIterator remote) { - return new ClientPrincipalIterator(remote, this); - } - - /** - * {@inheritDoc} - */ - public Privilege getPrivilege(RemotePrivilege remote) { - return new ClientPrivilege(remote, this); - } - - /** - * {@inheritDoc} - */ - public Privilege[] getPrivilege(RemotePrivilege[] remote) { - final Privilege[] local = new Privilege[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getPrivilege(remote[i]); - } - return local; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java deleted file mode 100644 index 901e34004dc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} - * interface. This class makes a remote item locally available using - * the JCR {@link javax.jcr.Item Item} interface. Used mainly as the - * base class for the - * {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} adapters. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.remote.RemoteItem - */ -@Deprecated(forRemoval = true) public class ClientItem extends ClientObject implements Item { - - /** Current session. */ - private Session session; - - /** The adapted remote item. */ - private RemoteItem remote; - - /** - * Creates a local adapter for the given remote item. - * - * @param session current session - * @param remote remote item - * @param factory local adapter factory - */ - public ClientItem(Session session, RemoteItem remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** - * Returns the current session without contacting the remote item. - * - * {@inheritDoc} - */ - public Session getSession() { - return session; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() throws RepositoryException { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getAncestor(int level) throws RepositoryException { - try { - return getItem(getSession(), remote.getAncestor(level)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getParent() throws RepositoryException { - try { - return getNode(getSession(), remote.getParent()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getDepth() throws RepositoryException { - try { - return remote.getDepth(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns false by default without contacting the remote item. - * This method should be overridden by {@link Node Node} subclasses. - * - * {@inheritDoc} - * - * @return false - */ - public boolean isNode() { - return false; - } - - /** {@inheritDoc} */ - public boolean isNew() { - try { - return remote.isNew(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isModified() { - try { - return remote.isModified(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** - * Checks whether this instance represents the same repository item as - * the given other instance. A simple heuristic is used to first check - * some generic conditions (null values, instance equality, type equality), - * after which the item paths are compared to determine sameness. - * A RuntimeException is thrown if the item paths cannot be retrieved. - * - * {@inheritDoc} - * - * @see Item#getPath() - */ - public boolean isSame(Item item) throws RepositoryException { - if (item == null) { - return false; - } else if (equals(item)) { - return true; - } else if (isNode() == item.isNode()) { - return getPath().equals(item.getPath()); - } else { - return false; - } - } - - /** - * Accepts the visitor to visit this item. {@link Node Node} and - * {@link Property Property} subclasses should override this method - * to call the appropriate {@link ItemVisitor ItemVisitor} methods, - * as the default implementation does nothing. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException { - try { - remote.save(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) throws RepositoryException { - try { - remote.refresh(keepChanges); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void remove() throws RepositoryException { - try { - remote.remove(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java deleted file mode 100644 index a602adc16ef..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} - * interface. This class makes a remote item definition locally available using - * the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} interface. Used mainly - * as the base class for the - * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} adapters. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition - */ -@Deprecated(forRemoval = true) public class ClientItemDefinition extends ClientObject implements ItemDefinition { - - /** The adapted remote item definition. */ - private RemoteItemDefinition remote; - - /** - * Creates a local adapter for the given remote item definition. - * - * @param remote remote item definition - * @param factory local adapter factory - */ - public ClientItemDefinition(RemoteItemDefinition remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType getDeclaringNodeType() { - try { - RemoteNodeType nt = remote.getDeclaringNodeType(); - if (nt == null) { - return null; - } else { - return getFactory().getNodeType(nt); - } - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isAutoCreated() { - try { - return remote.isAutoCreated(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMandatory() { - try { - return remote.isMandatory(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public int getOnParentVersion() { - try { - return remote.getOnParentVersion(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isProtected() { - try { - return remote.isProtected(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java deleted file mode 100644 index 39e32ad76fc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.lock.Lock; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} - * interface. This class makes a remote lock locally available using - * the JCR {@link javax.jcr.lock.Lock Lock} interface. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.remote.RemoteLock - */ -@Deprecated(forRemoval = true) public class ClientLock extends ClientObject implements Lock { - - /** Current session. */ - private Session session; - - /** The adapted remote lock. */ - private RemoteLock remote; - - /** - * Creates a local adapter for the given remote lock. - * - * @param session current session - * @param remote remote lock - * @param factory local adapter factory - */ - public ClientLock(Session session, RemoteLock remote, LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Node getNode() { - try { - return getNode(session, remote.getNode()); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } catch (RepositoryException e) { - throw new RuntimeException(e); - } - } - - /** {@inheritDoc} */ - public String getLockOwner() { - try { - return remote.getLockOwner(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isDeep() { - try { - return remote.isDeep(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getLockToken() { - try { - return remote.getLockToken(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLive() throws RepositoryException { - try { - return remote.isLive(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh() throws RepositoryException { - try { - remote.refresh(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isSessionScoped() { - try { - return remote.isSessionScoped(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public long getSecondsRemaining() throws RepositoryException { - try { - return remote.getSecondsRemaining(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLockOwningSession() { - try { - return remote.isLockOwningSession(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java deleted file mode 100644 index 02ca2d94fef..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; - -@Deprecated(forRemoval = true) public class ClientLockManager extends ClientObject implements LockManager { - - /** The current session. */ - private Session session; - - private RemoteLockManager remote; - - public ClientLockManager( - Session session, RemoteLockManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - public String[] getLockTokens() throws RepositoryException { - try { - return remote.getLockTokens(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void addLockToken(String lockToken) throws RepositoryException { - try { - remote.addLockToken(lockToken); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void removeLockToken(String lockToken) throws RepositoryException { - try { - remote.removeLockToken(lockToken); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public Lock getLock(String absPath) throws RepositoryException { - try { - return getFactory().getLock(session, remote.getLock(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public boolean holdsLock(String absPath) throws RepositoryException { - try { - return remote.holdsLock(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public boolean isLocked(String absPath) throws RepositoryException { - try { - return remote.isLocked(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public Lock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) throws RepositoryException { - try { - return getFactory().getLock(session, remote.lock( - absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void unlock(String absPath) throws RepositoryException { - try { - remote.unlock(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java deleted file mode 100644 index 0a95cc576fc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} - * interface. This class makes a remote namespace registry locally available - * using the JCR {@link javax.jcr.NamespaceRegistry NamespaceRegistry} - * interface. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry - */ -@Deprecated(forRemoval = true) public class ClientNamespaceRegistry extends ClientObject implements - NamespaceRegistry { - - /** The adapted remote namespace registry. */ - private RemoteNamespaceRegistry remote; - - /** - * Creates a local adapter for the given remote namespace registry. - * - * @param remote remote namespace registry - * @param factory local adapter factory - */ - public ClientNamespaceRegistry( - RemoteNamespaceRegistry remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public void registerNamespace(String prefix, String uri) - throws RepositoryException { - try { - remote.registerNamespace(prefix, uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unregisterNamespace(String prefix) throws RepositoryException { - try { - remote.unregisterNamespace(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getPrefixes() throws RepositoryException { - try { - return remote.getPrefixes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getURIs() throws RepositoryException { - try { - return remote.getURIs(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getURI(String prefix) throws RepositoryException { - try { - return remote.getURI(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrefix(String uri) throws RepositoryException { - try { - return remote.getPrefix(uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java deleted file mode 100644 index eb970ebeac8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.InputStream; -import java.math.BigDecimal; -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.Item; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.lock.Lock; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} - * interface. This class makes a remote node locally available using - * the JCR {@link javax.jcr.Node Node} interface. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.remote.RemoteNode - */ -@Deprecated(forRemoval = true) public class ClientNode extends ClientItem implements Node { - - /** The adapted remote node. */ - private RemoteNode remote; - - /** - * Creates a local adapter for the given remote node. - * - * @param session current session - * @param remote remote node - * @param factory local adapter factory - */ - public ClientNode( - Session session, RemoteNode remote, LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Returns true without contacting the remote node. - * - * {@inheritDoc} - */ - public boolean isNode() { - return true; - } - - /** - * Calls the {@link ItemVisitor#visit(Node) ItemVisitor.visit(Node)} - * method of the given visitor. Does not contact the remote node, but - * the visitor may invoke other methods that do contact the remote node. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - visitor.visit(this); - } - - /** {@inheritDoc} */ - public Node addNode(String path) throws RepositoryException { - try { - return getNode(getSession(), remote.addNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node addNode(String path, String type) throws RepositoryException { - try { - RemoteNode node = remote.addNode(path, type); - return getNode(getSession(), node); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void orderBefore(String src, String dst) throws RepositoryException { - try { - remote.orderBefore(src, dst); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value value) - throws RepositoryException { - try { - if (value == null) { - remote.setProperty(name, value); - return null; - } else { - RemoteProperty property = remote.setProperty( - name, SerialValueFactory.makeSerialValue(value)); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value[] values) - throws RepositoryException { - try { - if (values == null) { - remote.setProperty(name, values); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(values); - RemoteProperty property = remote.setProperty(name, serials); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String[] strings) - throws RepositoryException { - try { - if (strings == null) { - remote.setProperty(name, (Value[]) null); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(strings); - RemoteProperty property = remote.setProperty(name, serials); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, InputStream value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, boolean value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, double value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, long value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Calendar value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Node value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Binary value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty( - name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, BigDecimal value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty( - name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Node getNode(String path) throws RepositoryException { - try { - return getNode(getSession(), remote.getNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes(String pattern) throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes(pattern)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes(String[] globs) throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes(globs)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property getProperty(String path) throws RepositoryException { - try { - RemoteProperty property = remote.getProperty(path); - return getFactory().getProperty(getSession(), property); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties(String pattern) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties(pattern)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties(String[] globs) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties(globs)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getPrimaryItem() throws RepositoryException { - try { - return getItem(getSession(), remote.getPrimaryItem()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException { - try { - return remote.getIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUUID() throws RepositoryException { - try { - return remote.getUUID(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getReferences() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getReferences()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getReferences(String name) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getReferences(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNode(String path) throws RepositoryException { - try { - return remote.hasNode(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperty(String path) throws RepositoryException { - try { - return remote.hasProperty(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNodes() throws RepositoryException { - try { - return remote.hasNodes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperties() throws RepositoryException { - try { - return remote.hasProperties(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType getPrimaryNodeType() throws RepositoryException { - try { - return getFactory().getNodeType(remote.getPrimaryNodeType()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getMixinNodeTypes() throws RepositoryException { - try { - return getNodeTypeArray(remote.getMixinNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) throws RepositoryException { - try { - return remote.isNodeType(type); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addMixin(String name) throws RepositoryException { - try { - remote.addMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeMixin(String name) throws RepositoryException { - try { - remote.removeMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddMixin(String name) throws RepositoryException { - try { - return remote.canAddMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition getDefinition() throws RepositoryException { - try { - return getFactory().getNodeDef(remote.getDefinition()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version checkin() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.checkin()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void checkout() throws RepositoryException { - try { - remote.checkout(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void update(String workspace) throws RepositoryException { - try { - remote.update(workspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge(String workspace, boolean bestEffort) - throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.merge(workspace, bestEffort)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void cancelMerge(Version version) throws RepositoryException { - try { - remote.cancelMerge(version.getUUID()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void doneMerge(Version version) throws RepositoryException { - try { - remote.doneMerge(version.getUUID()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getCorrespondingNodePath(String workspace) - throws RepositoryException { - try { - return remote.getCorrespondingNodePath(workspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getIndex() throws RepositoryException { - try { - return remote.getIndex(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String version, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByUUID(version.getUUID(), removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, String path, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version.getUUID(), path, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByLabel(label, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String[] strings, int type) - throws RepositoryException { - try { - if (strings == null) { - remote.setProperty(name, (Value[]) null); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(strings); - RemoteProperty property = remote.setProperty(name, serials, type); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value[] values, int type) - throws RepositoryException { - try { - if (values != null) { - values = SerialValueFactory.makeSerialValueArray(values); - } - RemoteProperty property = remote.setProperty(name, values, type); - if (property != null) { - return getFactory().getProperty(getSession(), property); - } else { - return null; - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value value, int type) - throws RepositoryException { - try { - if (value != null) { - value = SerialValueFactory.makeSerialValue(value); - } - RemoteProperty property = remote.setProperty(name, value, type); - if (property != null) { - return getFactory().getProperty(getSession(), property); - } else { - return null; - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String string, int type) - throws RepositoryException { - Value value = null; - if (string != null) { - value = getSession().getValueFactory().createValue(string); - } - return setProperty(name, value, type); - } - - /** {@inheritDoc} */ - public boolean isCheckedOut() throws RepositoryException { - try { - return remote.isCheckedOut(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionHistory getVersionHistory() throws RepositoryException { - try { - return getFactory().getVersionHistory(getSession(), remote.getVersionHistory()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getBaseVersion() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getBaseVersion()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Lock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException { - try { - RemoteLock lock = remote.lock(isDeep, isSessionScoped); - return getFactory().getLock(getSession(), lock); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Lock getLock() throws RepositoryException { - try { - return getFactory().getLock(getSession(), remote.getLock()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unlock() throws RepositoryException { - try { - remote.unlock(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean holdsLock() throws RepositoryException { - try { - return remote.holdsLock(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLocked() throws RepositoryException { - try { - return remote.isLocked(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void followLifecycleTransition(String transition) - throws RepositoryException { - try { - remote.followLifecycleTransition(transition); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAllowedLifecycleTransistions() - throws RepositoryException { - try { - return remote.getAllowedLifecycleTransistions(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getSharedSet() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getSharedSet()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getWeakReferences() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getWeakReferences(String name) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeShare() throws RepositoryException { - try { - remote.removeShare(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeSharedSet() throws RepositoryException { - try { - remote.removeSharedSet(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setPrimaryType(String nodeTypeName) - throws RepositoryException { - try { - remote.setPrimaryType(nodeTypeName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java deleted file mode 100644 index 05cbc568589..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} - * interface. This class makes a remote node definition locally available using - * the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDef} interface. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition - */ -@Deprecated(forRemoval = true) public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { - - /** The adapted remote node definition. */ - private RemoteNodeDefinition remote; - - /** - * Creates a local adapter for the given remote node definition. - * - * @param remote remote node definition - * @param factory local adapter factory - */ - public ClientNodeDefinition(RemoteNodeDefinition remote, LocalAdapterFactory factory) { - super(remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType[] getRequiredPrimaryTypes() { - try { - return getNodeTypeArray(remote.getRequiredPrimaryTypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType getDefaultPrimaryType() { - try { - RemoteNodeType nt = remote.getDefaultPrimaryType(); - if (nt == null) { - return null; - } else { - return getFactory().getNodeType(nt); - } - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean allowsSameNameSiblings() { - try { - return remote.allowsSameNameSiblings(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getDefaultPrimaryTypeName() { - try { - return remote.getDefaultPrimaryTypeName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getRequiredPrimaryTypeNames() { - try { - return remote.getRequiredPrimaryTypeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java deleted file mode 100644 index 37bf473646e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. This class makes a remote node type locally available using - * the JCR {@link javax.jcr.nodetype.NodeType NodeType} interface. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType - */ -@Deprecated(forRemoval = true) public class ClientNodeType extends ClientObject implements NodeType { - - /** The adapted remote node type. */ - private RemoteNodeType remote; - - /** - * Creates a local adapter for the given remote node type. - * - * @param remote remote node type - * @param factory local adapter factory - */ - public ClientNodeType(RemoteNodeType remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** - * Utility method for creating an array of local node definition - * adapters for an array of remote node definitions. The node - * definition adapters are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote node definitions - * @return local node definition array - */ - private NodeDefinition[] getNodeDefArray(RemoteNodeDefinition[] remotes) { - if (remotes != null) { - NodeDefinition[] defs = new NodeDefinition[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - defs[i] = getFactory().getNodeDef(remotes[i]); - } - return defs; - } else { - return new NodeDefinition[0]; // for safety - } - } - - /** - * Utility method for creating an array of local property definition - * adapters for an array of remote property definitions. The property - * definition adapters are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote property definitions - * @return local property definition array - */ - protected PropertyDefinition[] getPropertyDefArray( - RemotePropertyDefinition[] remotes) { - if (remotes != null) { - PropertyDefinition[] defs = new PropertyDefinition[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - defs[i] = getFactory().getPropertyDef(remotes[i]); - } - return defs; - } else { - return new PropertyDefinition[0]; // for safety - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMixin() { - try { - return remote.isMixin(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasOrderableChildNodes() { - try { - return remote.hasOrderableChildNodes(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getSupertypes() { - try { - return getNodeTypeArray(remote.getSupertypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getDeclaredSupertypes() { - try { - return getNodeTypeArray(remote.getDeclaredSupertypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) { - try { - return remote.isNodeType(type); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition[] getPropertyDefinitions() { - try { - return getPropertyDefArray(remote.getPropertyDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition[] getDeclaredPropertyDefinitions() { - try { - return getPropertyDefArray(remote.getDeclaredPropertyDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition[] getChildNodeDefinitions() { - try { - return getNodeDefArray(remote.getChildNodeDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition[] getDeclaredChildNodeDefinitions() { - try { - return getNodeDefArray(remote.getDeclaredChildNodeDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value value) { - try { - return remote.canSetProperty( - name, SerialValueFactory.makeSerialValue(value)); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to serialize value", e); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value[] values) { - try { - Value[] serials = SerialValueFactory.makeSerialValueArray(values); - return remote.canSetProperty(name, serials); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to serialize values", e); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name) { - try { - return remote.canAddChildNode(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name, String type) { - try { - return remote.canAddChildNode(name, type); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveItem(String name) { - try { - return remote.canRemoveItem(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrimaryItemName() { - try { - return remote.getPrimaryItemName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveNode(String nodeName) { - try { - return remote.canRemoveNode(nodeName); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveProperty(String propertyName) { - try { - return remote.canRemoveProperty(propertyName); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getDeclaredSubtypes() { - try { - return getFactory().getNodeTypeIterator(remote.getDeclaredSubtypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getSubtypes() { - try { - return getFactory().getNodeTypeIterator(remote.getSubtypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getDeclaredSupertypeNames() { - try { - return remote.getDeclaredSupertypeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isAbstract() { - try { - return remote.isAbstract(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isQueryable() { - try { - return remote.isQueryable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java deleted file mode 100644 index 2a4555521b5..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.nodetype.NodeDefinitionTemplate; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeDefinition; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.NodeTypeTemplate; -import javax.jcr.nodetype.PropertyDefinitionTemplate; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} - * interface. This class makes a remote node type manager locally available - * using the JCR {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} - * interface. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager - */ -@Deprecated(forRemoval = true) public class ClientNodeTypeManager extends ClientObject - implements NodeTypeManager { - - /** The adapted remote node type manager. */ - private RemoteNodeTypeManager remote; - - /** - * Creates a local adapter for the given remote node type manager. - * - * @param remote remote node type manager - * @param factory local adapter factory - */ - public ClientNodeTypeManager( - RemoteNodeTypeManager remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType getNodeType(String name) throws RepositoryException { - try { - return getFactory().getNodeType(remote.getNodeType(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getAllNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getAllNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getPrimaryNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getMixinNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getMixinNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public NodeDefinitionTemplate createNodeDefinitionTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeTemplate createNodeTypeTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public PropertyDefinitionTemplate createPropertyDefinitionTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public boolean hasNodeType(String name) throws RepositoryException { - try { - return remote.hasNodeType(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public NodeType registerNodeType( - NodeTypeDefinition ntd, boolean allowUpdate) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeIterator registerNodeTypes( - NodeTypeDefinition[] ntds, boolean allowUpdate) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public void unregisterNodeType(String name) throws RepositoryException { - unregisterNodeTypes(new String[] { name }); - } - - public void unregisterNodeTypes(String[] names) throws RepositoryException { - try { - remote.unregisterNodeTypes(names); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java deleted file mode 100644 index 5241619921c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.Session; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Base class for client adapter objects. The only purpose of - * this class is to centralize the handling of the - * local adapter factory used by the client adapters to - * instantiate new adapters. - */ -@Deprecated(forRemoval = true) public class ClientObject { - - /** Local adapter factory. */ - private LocalAdapterFactory factory; - - /** - * Creates a basic client adapter that uses the given factory - * to create new adapters. - * - * @param factory local adapter factory - */ - protected ClientObject(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns the local adapter factory used to create new adapters. - * - * @return local adapter factory - */ - protected LocalAdapterFactory getFactory() { - return factory; - } - - /** - * Utility method to create a local adapter for a remote item. - * This method introspects the remote reference to determine - * whether to instantiate a {@link javax.jcr.Property}, - * a {@link Node Node}, or an {@link Item Item} adapter using - * the local adapter factory. - *

    - * If the remote item is a {@link RemoteNode}, this method delegates - * to {@link #getNode(Session, RemoteNode)}. - * - * @param session current session - * @param remote remote item - * @return local property, node, or item adapter - */ - protected Item getItem(Session session, RemoteItem remote) { - if (remote instanceof RemoteProperty) { - return factory.getProperty(session, (RemoteProperty) remote); - } else if (remote instanceof RemoteNode) { - return getNode(session, (RemoteNode) remote); - } else { - return factory.getItem(session, remote); - } - } - - /** - * Utility method to create a local adapter for a remote node. - * This method introspects the remote reference to determine - * whether to instantiate a {@link Node Node}, - * a {@link javax.jcr.version.VersionHistory VersionHistory}, or a - * {@link javax.jcr.version.Version Version} adapter using - * the local adapter factory. - * - * @param session current session - * @param remote remote node - * @return local node, version, or version history adapter - */ - protected Node getNode(Session session, RemoteNode remote) { - if (remote instanceof RemoteVersion) { - return factory.getVersion(session, (RemoteVersion) remote); - } else if (remote instanceof RemoteVersionHistory) { - return factory.getVersionHistory(session, (RemoteVersionHistory) remote); - } else { - return factory.getNode(session, remote); - } - } - - /** - * Utility method for creating an array of local node type adapters - * for an array of remote node types. The node type adapters are created - * using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote node types - * @return local node type array - */ - protected NodeType[] getNodeTypeArray(RemoteNodeType[] remotes) { - if (remotes != null) { - NodeType[] types = new NodeType[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - types[i] = factory.getNodeType(remotes[i]); - } - return types; - } else { - return new NodeType[0]; // for safety - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java deleted file mode 100644 index e30761eaf8f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.Workspace; -import javax.jcr.observation.EventJournal; -import javax.jcr.observation.EventListener; -import javax.jcr.observation.EventListenerIterator; -import javax.jcr.observation.ObservationManager; - -import org.apache.jackrabbit.rmi.iterator.ArrayEventListenerIterator; -import org.apache.jackrabbit.rmi.observation.ClientEventPoll; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ClientObservationManager class - *

    - * This class uses an instance of the - * {@link org.apache.jackrabbit.rmi.observation.ClientEventPoll} class for the - * actual registration and event dispatching. - *

    - * This class does not require the - * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory} and consequently - * calls the base class constructor with a null factory. - *

    - * See the {@link org.apache.jackrabbit.rmi.observation observation} - * package comment for a description on how event listener registration and - * notification is implemented. - * - * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll - */ -@Deprecated(forRemoval = true) public class ClientObservationManager extends ClientObject implements - ObservationManager { - - /** The remote observation manager */ - private final RemoteObservationManager remote; - - /** The Workspace to which this observation manager belongs. */ - private final Workspace workspace; - - /** The ClientEventPoll class internally used for event dispatching */ - private ClientEventPoll poller; - - /** - * Creates an instance of this class talking to the given remote observation - * manager. - * - * @param remote The {@link RemoteObservationManager} backing this - * client-side observation manager. - * @param workspace The Workspace instance to which this - * observation manager belongs. - */ - public ClientObservationManager(Workspace workspace, - RemoteObservationManager remote) { - super(null); - this.remote = remote; - this.workspace = workspace; - } - - /** {@inheritDoc} */ - public void addEventListener(EventListener listener, int eventTypes, - String absPath, boolean isDeep, String[] uuid, - String[] nodeTypeName, boolean noLocal) - throws RepositoryException { - try { - long listenerId = getClientEventPoll().addListener(listener); - remote.addEventListener(listenerId, eventTypes, absPath, - isDeep, uuid, nodeTypeName, noLocal); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeEventListener(EventListener listener) - throws RepositoryException { - try { - long id = getClientEventPoll().removeListener(listener); - remote.removeEventListener(id); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public EventListenerIterator getRegisteredEventListeners() { - EventListener[] listeners = (poller != null) - ? poller.getListeners() - : new EventListener[0]; - return new ArrayEventListenerIterator(listeners); - } - - public EventJournal getEventJournal() throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public EventJournal getEventJournal( - int eventTypes, String absPath, boolean isDeep, - String[] uuid, String[] nodeTypeName) throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public void setUserData(String userData) throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - //---------- internal ------------------------------------------------------ - - /** - * Returns the {@link ClientEventPoll} instance used by this (client-side) - * observation manager. This method creates the instance on the first call - * and starts the poller thread to wait for remote events. - * - * @return poller instance - */ - private synchronized ClientEventPoll getClientEventPoll() { - if (poller == null) { - poller = new ClientEventPoll(remote, workspace.getSession()); - poller.start(); - } - return poller; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java deleted file mode 100644 index 16f0359f6a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.InputStream; -import java.math.BigDecimal; -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.ItemNotFoundException; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.PathNotFoundException; -import javax.jcr.Property; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.ValueFactory; -import javax.jcr.ValueFormatException; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} - * interface. This class makes a remote property locally available using - * the JCR {@link javax.jcr.Property Property} interface. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.remote.RemoteProperty - */ -@Deprecated(forRemoval = true) public class ClientProperty extends ClientItem implements Property { - - /** The adapted remote property. */ - private RemoteProperty remote; - - /** - * Creates a local adapter for the given remote property. - * - * @param session current session - * @param remote remote property - * @param factory local adapter factory - */ - public ClientProperty( - Session session, RemoteProperty remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Calls the {@link ItemVisitor#visit(Property) ItemVisitor.visit(Property} - * method of the given visitor. Does not contact the remote property, but - * the visitor may invoke other methods that do contact the remote property. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - visitor.visit(this); - } - - /** - * Returns the boolean value of this property. Implemented as - * getValue().getBoolean(). - * - * {@inheritDoc} - */ - public boolean getBoolean() throws RepositoryException { - return getValue().getBoolean(); - } - - /** - * Returns the date value of this property. Implemented as - * getValue().getDate(). - * - * {@inheritDoc} - */ - public Calendar getDate() throws RepositoryException { - return getValue().getDate(); - } - - /** - * Returns the double value of this property. Implemented as - * getValue().getDouble(). - * - * {@inheritDoc} - */ - public double getDouble() throws RepositoryException { - return getValue().getDouble(); - } - - /** - * Returns the long value of this property. Implemented as - * getValue().getLong(). - * - * {@inheritDoc} - */ - public long getLong() throws RepositoryException { - return getValue().getLong(); - } - - /** - * Returns the binary value of this property. Implemented as - * getValue().getBinary(). - * - * {@inheritDoc} - */ - public Binary getBinary() throws RepositoryException { - return getValue().getBinary(); - } - - /** - * Returns the decimal value of this property. Implemented as - * getValue().getDecimal(). - * - * {@inheritDoc} - */ - public BigDecimal getDecimal() throws RepositoryException { - return getValue().getDecimal(); - } - - /** - * Returns the binary value of this property. Implemented as - * getValue().getStream(). - * - * {@inheritDoc} - */ - @SuppressWarnings("deprecation") - public InputStream getStream() throws RepositoryException { - return getValue().getStream(); - } - - /** - * Returns the string value of this property. Implemented as - * getValue().getString(). - * - * {@inheritDoc} - */ - public String getString() throws RepositoryException { - return getValue().getString(); - } - - /** {@inheritDoc} */ - public Value getValue() throws RepositoryException { - try { - return remote.getValue(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException { - try { - return remote.getValues(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Sets the boolean value of this property. Implemented as - * setValue(new BooleanValue(value)). - * - * {@inheritDoc} - */ - public void setValue(boolean value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the date value of this property. Implemented as - * setValue(new DateValue(value)). - * - * {@inheritDoc} - */ - public void setValue(Calendar value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * Sets the double value of this property. Implemented as - * setValue(new DoubleValue(value)). - * - * {@inheritDoc} - */ - public void setValue(double value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the binary value of this property. Implemented as - * setValue(new BinaryValue(value)). - * - * {@inheritDoc} - */ - public void setValue(InputStream value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - ValueFactory factory = getSession().getValueFactory(); - Binary binary = factory.createBinary(value); - try { - setValue(factory.createValue(binary)); - } finally { - binary.dispose(); - } - } - } - - /** - * Sets the long value of this property. Implemented as - * setValue(new LongValue(value)). - * - * {@inheritDoc} - */ - public void setValue(long value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the binary value of this property. - * - * {@inheritDoc} - */ - public void setValue(Binary value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the decimal value of this property. - * - * {@inheritDoc} - */ - public void setValue(BigDecimal value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - - /** - * Sets the reference value of this property. Implemented as - * setValue(new ReferenceValue(value)). - * - * {@inheritDoc} - */ - public void setValue(Node value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * Sets the string value of this property. Implemented as - * setValue(new StringValue(value)). - * - * {@inheritDoc} - */ - public void setValue(String value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * {@inheritDoc} - */ - public void setValue(String[] strings) throws RepositoryException { - try { - Value[] values = null; - if (strings != null) { - values = SerialValueFactory.makeSerialValueArray(strings); - } - remote.setValue(values); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value value) throws RepositoryException { - try { - if (value != null) { - value = SerialValueFactory.makeSerialValue(value); - } - remote.setValue(value); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value[] values) throws RepositoryException { - try { - if (values != null) { - values = SerialValueFactory.makeSerialValueArray(values); - } - remote.setValue(values); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns the reference value of this property. Implemented by - * converting the reference value to an UUID string and using the - * current session to look up the referenced node. - * - * {@inheritDoc} - */ - public Node getNode() throws RepositoryException { - String value = getString(); - - switch (getType()) { - case PropertyType.REFERENCE: - case PropertyType.WEAKREFERENCE: - return getSession().getNodeByIdentifier(value); - - case PropertyType.PATH: - try { - if (value.startsWith("/")) { - return getSession().getNode(value); - } else { - return getParent().getNode(value); - } - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - - case PropertyType.NAME: - try { - return getParent().getNode(value); - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - - case PropertyType.STRING: - try { - // interpret as identifier - Value refValue = getSession().getValueFactory().createValue(value, PropertyType.REFERENCE); - return getSession().getNodeByIdentifier(refValue.getString()); - } catch (ItemNotFoundException e) { - throw e; - } catch (RepositoryException e) { - // try if STRING value can be interpreted as PATH value - Value pathValue = getSession().getValueFactory().createValue(value, PropertyType.PATH); - boolean absolute = value.startsWith("/"); - try { - return (absolute) ? getSession().getNode(pathValue.getString()) : getParent().getNode(pathValue.getString()); - } catch (PathNotFoundException e1) { - throw new ItemNotFoundException(pathValue.getString()); - } - } - - default: - throw new ValueFormatException("Property value cannot be converted to a PATH, REFERENCE or WEAKREFERENCE: " + value); - } - } - - /** {@inheritDoc} */ - public Property getProperty() throws RepositoryException { - if (getType() != PropertyType.PATH && getType() != PropertyType.NAME) { - throw new ValueFormatException("Not a path property"); - } else { - String value = getString(); - try { - if (value.startsWith("/")) { - return getSession().getProperty(value); - } else { - return getParent().getProperty(value); - } - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - } - } - - /** {@inheritDoc} */ - public long getLength() throws RepositoryException { - try { - return remote.getLength(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long[] getLengths() throws RepositoryException { - try { - return remote.getLengths(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition getDefinition() throws RepositoryException { - try { - return getFactory().getPropertyDef(remote.getDefinition()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getType() throws RepositoryException { - try { - return remote.getType(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() throws RepositoryException { - // TODO: Direct remote call for this? - return getDefinition().isMultiple(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java deleted file mode 100644 index 161ba536fd1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Value; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. This class makes a remote property definition locally available - * using the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} interface. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition - */ -@Deprecated(forRemoval = true) public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { - - /** The adapted remote property. */ - private RemotePropertyDefinition remote; - - /** - * Creates a local adapter for the given remote property definition. - * - * @param remote remote property definition - * @param factory local adapter factory - */ - public ClientPropertyDefinition( - RemotePropertyDefinition remote, LocalAdapterFactory factory) { - super(remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public int getRequiredType() { - try { - return remote.getRequiredType(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getValueConstraints() { - try { - return remote.getValueConstraints(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getDefaultValues() { - try { - return remote.getDefaultValues(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() { - try { - return remote.isMultiple(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAvailableQueryOperators() { - try { - return remote.getAvailableQueryOperators(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isFullTextSearchable() { - try { - return remote.isFullTextSearchable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isQueryOrderable() { - try { - return remote.isQueryOrderable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java deleted file mode 100644 index aee001a45b0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Node; -import javax.jcr.Value; -import javax.jcr.query.Query; -import javax.jcr.query.QueryResult; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link RemoteQuery RemoteQuery} - * interface. This class makes a remote query locally available using - * the JCR {@link Query Query} interface. - * - * @see javax.jcr.query.Query Query - * @see org.apache.jackrabbit.rmi.remote.RemoteQuery - */ -@Deprecated(forRemoval = true) public class ClientQuery extends ClientObject implements Query { - - /** The current session */ - private Session session; - - /** The adapted remote query manager. */ - private RemoteQuery remote; - - /** - * Creates a client adapter for the given query. - * - * @param session current session - * @param remote remote query - * @param factory adapter factory - */ - public ClientQuery( - Session session, RemoteQuery remote, LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public QueryResult execute() throws RepositoryException { - try { - return getFactory().getQueryResult(session, remote.execute()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getStatement() { - try { - return remote.getStatement(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getLanguage() { - try { - return remote.getLanguage(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getStoredQueryPath() throws RepositoryException { - try { - return remote.getStoredQueryPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node storeAsNode(String absPath) throws RepositoryException { - try { - return getNode(session, remote.storeAsNode(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void bindValue(String varName, Value value) - throws RepositoryException { - try { - remote.bindValue(varName, value); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getBindVariableNames() throws RepositoryException { - try { - return remote.getBindVariableNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setLimit(long limit) { - try { - remote.setLimit(limit); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void setOffset(long offset) { - try { - remote.setOffset(offset); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java deleted file mode 100644 index 3590c2be6e6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.qom.QueryObjectModelFactory; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteQueryManager RemoteQueryManager} - * interface. This class makes a remote query manager locally available using - * the JCR {@link QueryManager QueryManager} interface. - * - * @see javax.jcr.query.QueryManager QueryManager - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager - */ -@Deprecated(forRemoval = true) public class ClientQueryManager extends ClientObject implements QueryManager { - - /** The current session */ - private Session session; - - /** The adapted remote query manager. */ - private RemoteQueryManager remote; - - /** - * Creates a client adapter for the given remote query manager. - * - * @param session current session - * @param remote remote query manager - * @param factory adapter factory - */ - public ClientQueryManager( - Session session, RemoteQueryManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Query createQuery(String statement, String language) - throws RepositoryException { - try { - RemoteQuery query = remote.createQuery(statement, language); - return getFactory().getQuery(session, query); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Query getQuery(Node node) throws RepositoryException { - try { - // TODO fix this remote node dereferencing hack - RemoteQuery query = remote.getQuery(node.getPath()); - return getFactory().getQuery(session, query); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getSupportedQueryLanguages() throws RepositoryException { - try { - return remote.getSupportedQueryLanguages(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - public QueryObjectModelFactory getQOMFactory() { - throw new RuntimeException("TODO: JCR-3206"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java deleted file mode 100644 index a03b458622f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.QueryResult; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link RemoteQueryResult RemoteQueryResult} - * interface. This class makes a remote query result locally available using - * the JCR {@link QueryResult QueryResult} interface. - * - * @see javax.jcr.query.QueryResult QueryResult - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult - */ -@Deprecated(forRemoval = true) public class ClientQueryResult extends ClientObject implements QueryResult { - - /** The current session */ - private Session session; - - /** The adapted remote query result. */ - private RemoteQueryResult remote; - - /** - * Creates a client adapter for the given remote query result. - * - * @param session current session - * @param remote remote query result - * @param factory adapter factory - */ - public ClientQueryResult( - Session session, RemoteQueryResult remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public String[] getColumnNames() throws RepositoryException { - try { - return remote.getColumnNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RowIterator getRows() throws RepositoryException { - try { - return getFactory().getRowIterator(session, remote.getRows()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(session, remote.getNodes()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public String[] getSelectorNames() throws RepositoryException { - try { - return remote.getSelectorNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java deleted file mode 100644 index 07285c7c9ba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; -import java.util.HashSet; -import java.util.Set; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. This class makes a remote repository locally available using - * the JCR {@link javax.jcr.Repository Repository} interface. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public class ClientRepository implements Repository { - - /** - * The set of standard descriptor keys defined in the - * {@link Repository} interface. - */ - private static final Set STANDARD_KEYS = new HashSet() {{ - add(Repository.IDENTIFIER_STABILITY); - add(Repository.LEVEL_1_SUPPORTED); - add(Repository.LEVEL_2_SUPPORTED); - add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); - add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); - add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); - add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); - add(Repository.OPTION_LIFECYCLE_SUPPORTED); - add(Repository.OPTION_LOCKING_SUPPORTED); - add(Repository.OPTION_OBSERVATION_SUPPORTED); - add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); - add(Repository.OPTION_QUERY_SQL_SUPPORTED); - add(Repository.OPTION_RETENTION_SUPPORTED); - add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); - add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); - add(Repository.OPTION_TRANSACTIONS_SUPPORTED); - add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); - add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); - add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); - add(Repository.OPTION_VERSIONING_SUPPORTED); - add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); - add(Repository.OPTION_XML_EXPORT_SUPPORTED); - add(Repository.OPTION_XML_IMPORT_SUPPORTED); - add(Repository.OPTION_ACTIVITIES_SUPPORTED); - add(Repository.OPTION_BASELINES_SUPPORTED); - - add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); - add(Repository.QUERY_JOINS); - add(Repository.QUERY_LANGUAGES); - add(Repository.QUERY_STORED_QUERIES_SUPPORTED); - add(Repository.QUERY_XPATH_DOC_ORDER); - add(Repository.QUERY_XPATH_POS_INDEX); - add(Repository.REP_NAME_DESC); - add(Repository.REP_VENDOR_DESC); - add(Repository.REP_VENDOR_URL_DESC); - add(Repository.SPEC_NAME_DESC); - add(Repository.SPEC_VERSION_DESC); - add(Repository.WRITE_SUPPORTED); - }}; - - /** The adapted remote repository. */ - private final RemoteRepository remote; - - /** Local adapter factory. */ - private final LocalAdapterFactory factory; - - /** - * Creates a client adapter for the given remote repository. - * - * @param remote remote repository - * @param factory local adapter factory - */ - public ClientRepository( - RemoteRepository remote, LocalAdapterFactory factory) { - this.remote = remote; - this.factory = factory; - } - - /** {@inheritDoc} */ - public String getDescriptor(String name) { - try { - return remote.getDescriptor(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Value getDescriptorValue(String key) { - String descriptor = getDescriptor(key); - if (descriptor != null) { - return SerialValueFactory.getInstance().createValue(descriptor); - } else { - return null; - } - } - - /** {@inheritDoc} */ - public Value[] getDescriptorValues(String key) { - try { - return remote.getDescriptorValues(key); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getDescriptorKeys() { - try { - return remote.getDescriptorKeys(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isSingleValueDescriptor(String key) { - return getDescriptor(key) != null; - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - try { - RemoteSession session = remote.login(credentials, workspace); - return factory.getSession(this, session); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns true if the given key identifies a standard descriptor. - * - * @param key descriptor key - * @return true if the key identifies a standard descriptor, - * false otherwise - */ - public boolean isStandardDescriptor(String key) { - return STANDARD_KEYS.contains(key); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null arguments. - * - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * the given credentials and a null workspace name. - * - * @param credentials login credentials - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null credentials and the given workspace name. - * - * @param workspace workspace name - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java deleted file mode 100644 index dd785636835..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.net.MalformedURLException; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; -import java.util.Hashtable; - -import javax.jcr.Repository; -import javax.naming.Context; -import javax.naming.Name; -import javax.naming.RefAddr; -import javax.naming.Reference; -import javax.naming.spi.ObjectFactory; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Object factory for JCR-RMI clients. This factory can be used either - * directly or as a JNDI object factory. - * - * @see ClientRepository - */ -@Deprecated(forRemoval = true) public class ClientRepositoryFactory implements ObjectFactory { - - /** - * The JNDI parameter name for configuring the RMI URL of - * a remote repository. - */ - public static final String URL_PARAMETER = "url"; - - /** - * Local adapter factory. - */ - private LocalAdapterFactory factory; - - /** - * Creates a JCR-RMI client factory with the default adapter factory. - */ - public ClientRepositoryFactory() { - this(new ClientAdapterFactory()); - } - - /** - * Creates a JCR-RMI client factory with the given adapter factory. - * - * @param factory local adapter factory - */ - public ClientRepositoryFactory(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns a client wrapper for a remote content repository. The remote - * repository is looked up from the RMI registry using the given URL by - * the returned {@link SafeClientRepository} instance. - *

    - * The current implementation of this method will not throw any of the - * declared exceptions (because of the {@link SafeClientRepository} being - * used), but the throws clauses are kept for backwards compatibility and - * potential future use. Clients should be prepared to handle exceptions - * from this method. - * - * @param url the RMI URL of the remote repository - * @return repository client - * @throws MalformedURLException if the given URL is malfored - * @throws NotBoundException if the given URL points to nothing - * @throws ClassCastException if the given URL points to something unknown - * @throws RemoteException if the remote repository can not be accessed - */ - public Repository getRepository(final String url) - throws MalformedURLException, NotBoundException, - ClassCastException, RemoteException { - return new SafeClientRepository(factory) { - - protected RemoteRepository getRemoteRepository() - throws RemoteException { - try { - return (RemoteRepository) Naming.lookup(url); - } catch (MalformedURLException e) { - throw new RemoteException("Malformed URL: " + url, e); - } catch (NotBoundException e) { - throw new RemoteException("No target found: " + url, e); - } catch (ClassCastException e) { - throw new RemoteException("Unknown target: " + url, e); - } - } - - }; - } - - /** - * JNDI factory method for creating JCR-RMI clients. Creates a lazy - * client repository instance that uses the reference parameter "url" - * as the RMI URL where the remote repository is looked up when accessed. - * - * @param object reference parameters - * @param name unused - * @param context unused - * @param environment unused - * @return repository client - */ - public Object getObjectInstance( - Object object, Name name, Context context, Hashtable environment) { - if (object instanceof Reference) { - Reference reference = (Reference) object; - RefAddr url = reference.get(URL_PARAMETER); - if (url != null && url.getContent() != null) { - try { - return getRepository(url.getContent().toString()); - } catch (Exception e) { - return null; - } - } - } - return null; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java deleted file mode 100644 index 38701da7629..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.query.Row; - -import org.apache.jackrabbit.rmi.remote.RemoteRow; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteRow RemoteRow} - * interface. This class makes a remote query row locally available using - * the JCR {@link Row Row} interface. - * - * @see javax.jcr.query.Row Row - * @see org.apache.jackrabbit.rmi.remote.RemoteRow - */ -@Deprecated(forRemoval = true) public class ClientRow extends ClientObject implements Row { - - /** Current session. */ - private Session session; - - /** The remote query row. */ - private RemoteRow remote; - - /** - * Creates a client adapter for the given remote query row. - * - * @param remote remote query row - */ - public ClientRow(Session session, RemoteRow remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException { - try { - return remote.getValues(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getValue(String s) throws RepositoryException { - try { - return remote.getValue(s); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode() throws RepositoryException { - try { - return getFactory().getNode(session, remote.getNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode(String selectorName) throws RepositoryException { - try { - return getFactory().getNode(session, remote.getNode(selectorName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath(String selectorName) throws RepositoryException { - try { - return remote.getPath(selectorName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore() throws RepositoryException { - try { - return remote.getScore(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore(String selectorName) throws RepositoryException { - try { - return remote.getScore(selectorName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java deleted file mode 100644 index a07769bbd8b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java +++ /dev/null @@ -1,589 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.rmi.RemoteException; -import java.security.AccessControlException; - -import javax.jcr.Credentials; -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.Property; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.ValueFactory; -import javax.jcr.Workspace; -import javax.jcr.retention.RetentionManager; -import javax.jcr.security.AccessControlManager; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} - * interface. This class makes a remote session locally available using - * the JCR {@link javax.jcr.Session Session} interface. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.remote.RemoteSession - */ -@Deprecated(forRemoval = true) public class ClientSession extends ClientObject implements Session { - - /** - * Logger instance. - */ - private static final Logger log = - LoggerFactory.getLogger(ClientSession.class); - - /** The current repository. */ - private final Repository repository; - - /** - * Flag indicating whether the session is to be considered live of not. - * This flag is initially set to true and reset to - * false by the {@link #logout()} method. The {@link #isLive()} - * method first checks this flag before asking the remote session. - */ - private boolean live = true; - - /** The adapted remote session. */ - protected final RemoteSession remote; - - /** - * The adapted workspace of this session. This field is set on the first - * call to the {@link #getWorkspace()} method assuming, that a workspace - * instance is not changing during the lifetime of a session, that is, - * each call to the server-side Session.getWorkspace() allways - * returns the same object. - */ - private Workspace workspace; - - /** - * Creates a client adapter for the given remote session. - * - * @param repository current repository - * @param remote remote repository - * @param factory local adapter factory - */ - public ClientSession(Repository repository, RemoteSession remote, - LocalAdapterFactory factory) { - super(factory); - this.repository = repository; - this.remote = remote; - } - - /** - * Returns the current repository without contacting the remote session. - * - * {@inheritDoc} - */ - public Repository getRepository() { - return repository; - } - - /** {@inheritDoc} */ - public String getUserID() { - try { - return remote.getUserID(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Object getAttribute(String name) { - try { - return remote.getAttribute(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAttributeNames() { - try { - return remote.getAttributeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Workspace getWorkspace() { - if (workspace == null) { - try { - workspace = - getFactory().getWorkspace(this, remote.getWorkspace()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - return workspace; - } - - /** {@inheritDoc} */ - public Session impersonate(Credentials credentials) - throws RepositoryException { - try { - RemoteSession session = remote.impersonate(credentials); - return getFactory().getSession(repository, session); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getRootNode() throws RepositoryException { - try { - return getNode(this, remote.getRootNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNodeByIdentifier(String id) throws RepositoryException { - try { - return getNode(this, remote.getNodeByIdentifier(id)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNodeByUUID(String uuid) throws RepositoryException { - try { - return getNode(this, remote.getNodeByUUID(uuid)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getItem(String path) throws RepositoryException { - try { - return getItem(this, remote.getItem(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode(String path) throws RepositoryException { - try { - return getNode(this, remote.getNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property getProperty(String path) throws RepositoryException { - try { - return (Property) getItem(this, remote.getProperty(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean itemExists(String path) throws RepositoryException { - try { - return remote.itemExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean nodeExists(String path) throws RepositoryException { - try { - return remote.nodeExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean propertyExists(String path) throws RepositoryException { - try { - return remote.propertyExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void removeItem(String path) throws RepositoryException { - try { - remote.removeItem(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) throws RepositoryException { - try { - remote.move(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException { - try { - remote.save(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) throws RepositoryException { - try { - remote.refresh(keepChanges); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPendingChanges() throws RepositoryException { - try { - return remote.hasPendingChanges(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns the {@link SerialValueFactory#getInstance()}. - * - * {@inheritDoc} - */ - public ValueFactory getValueFactory() { - return SerialValueFactory.getInstance(); - } - - /** {@inheritDoc} */ - public void checkPermission(String path, String actions) - throws AccessControlException, RepositoryException { - if (!hasPermission(path, actions)) { - throw new AccessControlException( - "No permission for " + actions + " on " + path); - } - } - - /** {@inheritDoc} */ - public boolean hasPermission(String path, String actions) - throws RepositoryException { - try { - return remote.hasPermission(path, actions); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, InputStream xml, int mode) - throws IOException, RepositoryException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - byte[] bytes = new byte[4096]; - for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { - buffer.write(bytes, 0, n); - } - remote.importXML(path, buffer.toByteArray(), mode); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } finally { - // JCR-2903 - try { xml.close(); } catch (IOException ignore) {} - } - } - - /** {@inheritDoc} */ - public ContentHandler getImportContentHandler( - final String path, final int mode) throws RepositoryException { - getItem(path); // Check that the path exists - try { - final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - ContentHandler handler = - SerializingContentHandler.getSerializer(buffer); - return new DefaultContentHandler(handler) { - public void endDocument() throws SAXException { - super.endDocument(); - try { - remote.importXML(path, buffer.toByteArray(), mode); - } catch (Exception e) { - throw new SAXException("XML import failed", e); - } - } - }; - } catch (SAXException e) { - throw new RepositoryException("XML serialization failed", e); - } - } - - /** {@inheritDoc} */ - public void setNamespacePrefix(String prefix, String uri) - throws RepositoryException { - try { - remote.setNamespacePrefix(prefix, uri); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getNamespacePrefixes() throws RepositoryException { - try { - return remote.getNamespacePrefixes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespaceURI(String prefix) throws RepositoryException { - try { - return remote.getNamespaceURI(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespacePrefix(String uri) throws RepositoryException { - try { - return remote.getNamespacePrefix(uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void logout() { - - // ignore if we are not alive any more. - if (!isLive()) { - return; - } - - try { - remote.logout(); - } catch (RemoteException ex) { - // JCRRMI-3: Just log a warning, the connection is dead anyway - log.warn("Remote logout failed", ex); - } finally { - // mark "dead" - live = false; - } - } - - /** {@inheritDoc} */ - public void addLockToken(String name) { - try { - remote.addLockToken(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getLockTokens() { - try { - return remote.getLockTokens(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void removeLockToken(String name) { - try { - remote.removeLockToken(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** - * Exports the XML system view of the specified repository location - * to the given XML content handler. This method first requests the - * raw XML data from the remote session, and then uses an identity - * transformation to feed the data to the given XML content handler. - * Possible IO and transformer exceptions are thrown as SAXExceptions. - * - * {@inheritDoc} - */ - public void exportSystemView( - String path, ContentHandler handler, - boolean binaryAsLink, boolean noRecurse) - throws SAXException, RepositoryException { - try { - byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); - - Source source = new StreamSource(new ByteArrayInputStream(xml)); - Result result = new SAXResult(handler); - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.transform(source, result); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } catch (IOException ex) { - throw new SAXException(ex); - } catch (TransformerConfigurationException ex) { - throw new SAXException(ex); - } catch (TransformerException ex) { - throw new SAXException(ex); - } - } - - /** - * Exports the XML system view of the specified repository location - * to the given output stream. This method first requests the - * raw XML data from the remote session, and then writes the data to - * the output stream. - * - * {@inheritDoc} - */ - public void exportSystemView( - String path, OutputStream output, - boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException { - try { - byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); - output.write(xml); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Exports the XML document view of the specified repository location - * to the given XML content handler. This method first requests the - * raw XML data from the remote session, and then uses an identity - * transformation to feed the data to the given XML content handler. - * Possible IO and transformer exceptions are thrown as SAXExceptions. - * - * {@inheritDoc} - */ - public void exportDocumentView( - String path, ContentHandler handler, - boolean binaryAsLink, boolean noRecurse) - throws SAXException, RepositoryException { - try { - byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); - - Source source = new StreamSource(new ByteArrayInputStream(xml)); - Result result = new SAXResult(handler); - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.transform(source, result); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } catch (IOException ex) { - throw new SAXException(ex); - } catch (TransformerConfigurationException ex) { - throw new SAXException(ex); - } catch (TransformerException ex) { - throw new SAXException(ex); - } - } - - /** - * Exports the XML document view of the specified repository location - * to the given output stream. This method first requests the - * raw XML data from the remote session, and then writes the data to - * the output stream. - * - * {@inheritDoc} - */ - public void exportDocumentView( - String path, OutputStream output, - boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException { - try { - byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); - output.write(xml); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * {@inheritDoc} - */ - public boolean isLive() { - try { - return live && remote.isLive(); - } catch (RemoteException e) { - log.warn("Failed to test remote session state", e); - return false; - } - } - - public AccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, RepositoryException { - try { - return getFactory().getAccessControlManager( - remote.getAccessControlManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public RetentionManager getRetentionManager() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public boolean hasCapability( - String methodName, Object target, Object[] arguments) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java deleted file mode 100644 index c48b605a74c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteVersion; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} - * interface. This class makes a remote version locally available using - * the JCR {@link javax.jcr.version.Version Version} interface. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.remote.RemoteVersion - */ -@Deprecated(forRemoval = true) public class ClientVersion extends ClientNode implements Version { - - /** The adapted remote version. */ - private RemoteVersion remote; - - /** - * Creates a local adapter for the given remote version. - * - * @param session current session - * @param remote remote version - * @param factory local adapter factory - */ - public ClientVersion(Session session, RemoteVersion remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Utility method for creating a version array for an array - * of remote versions. The versions in the returned array - * are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote versions - * @return local version array - */ - private Version[] getVersionArray(RemoteVersion[] remotes) { - if (remotes != null) { - Version[] versions = new Version[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - versions[i] = getFactory().getVersion(getSession(), remotes[i]); - } - return versions; - } else { - return new Version[0]; // for safety - } - } - - - /** {@inheritDoc} */ - public Calendar getCreated() throws RepositoryException { - try { - return remote.getCreated(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version[] getSuccessors() throws RepositoryException { - try { - return getVersionArray(remote.getSuccessors()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version[] getPredecessors() throws RepositoryException { - try { - return getVersionArray(remote.getPredecessors()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionHistory getContainingHistory() throws RepositoryException { - try { - return getFactory().getVersionHistory(getSession(), remote.getContainingHistory()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getFrozenNode() throws RepositoryException { - try { - return getFactory().getNode(getSession(), remote.getFrozenNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getLinearPredecessor() throws RepositoryException { - try { - RemoteVersion linearPredecessor = remote.getLinearPredecessor(); - if (linearPredecessor == null) { - return null; - } else { - return getFactory().getVersion(getSession(), linearPredecessor); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getLinearSuccessor() throws RepositoryException { - try { - RemoteVersion linearSuccessor = remote.getLinearSuccessor(); - if (linearSuccessor == null) { - return null; - } else { - return getFactory().getVersion(getSession(), linearSuccessor); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java deleted file mode 100644 index 6e6887b8d8e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionException; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} - * interface. This class makes a remote version history locally available using - * the JCR {@link javax.jcr.version.VersionHistory VersionHistory} interface. - * - * @see javax.jcr.version.VersionHistory - * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory - */ -@Deprecated(forRemoval = true) public class ClientVersionHistory extends ClientNode implements VersionHistory { - - /** The adapted remote version history. */ - private RemoteVersionHistory remote; - - /** - * Creates a local adapter for the given remote version history. - * - * @param session current session - * @param remote remote version history - * @param factory local adapter factory - */ - public ClientVersionHistory(Session session, RemoteVersionHistory remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public Version getRootVersion() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getRootVersion()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionIterator getAllVersions() throws RepositoryException { - try { - return getFactory().getVersionIterator( - getSession(), remote.getAllVersions()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getVersion(String versionName) throws VersionException, - RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getVersion(versionName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getVersionByLabel(String label) throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getVersionByLabel(label)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addVersionLabel(String versionName, String label, - boolean moveLabel) throws VersionException, RepositoryException { - try { - remote.addVersionLabel(versionName, label, moveLabel); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersionLabel(String label) - throws VersionException, RepositoryException { - try { - remote.removeVersionLabel(label); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String label) throws RepositoryException { - try { - return remote.hasVersionLabel(label); - } catch (RemoteException ex) { - // grok the exception and assume label is missing - return false; - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(Version version, String label) - throws VersionException, RepositoryException { - try { - String versionIdentifier = version.getIdentifier(); - return remote.hasVersionLabel(versionIdentifier, label); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels() throws RepositoryException { - try { - return remote.getVersionLabels(); - } catch (RemoteException ex) { - // grok the exception and return an empty array - return new String[0]; - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels(Version version) - throws VersionException, RepositoryException { - try { - String versionIdentifier = version.getIdentifier(); - return remote.getVersionLabels(versionIdentifier); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersion(String versionName) - throws UnsupportedRepositoryOperationException, VersionException, - RepositoryException { - try { - remote.removeVersion(versionName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} - * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be - * used instead. - */ - public String getVersionableUUID() throws RepositoryException { - try { - return remote.getVersionableUUID(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getAllFrozenNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getAllFrozenNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getAllLinearFrozenNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getAllLinearFrozenNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionIterator getAllLinearVersions() throws RepositoryException { - try { - return getFactory().getVersionIterator(getSession(), remote.getAllLinearVersions()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getVersionableIdentifier() throws RepositoryException { - try { - return remote.getVersionableIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java deleted file mode 100644 index 502146b85da..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; - -@Deprecated(forRemoval = true) public class ClientVersionManager extends ClientObject - implements VersionManager { - - /** The current session. */ - private Session session; - - private RemoteVersionManager remote; - - public ClientVersionManager( - Session session, RemoteVersionManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public void cancelMerge(String absPath, Version version) - throws RepositoryException { - try { - remote.cancelMerge(absPath, version.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version checkin(String absPath) throws RepositoryException { - try { - return getFactory().getVersion(session, remote.checkin(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void checkout(String absPath) throws RepositoryException { - try { - remote.checkout(absPath); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version checkpoint(String absPath) throws RepositoryException { - try { - return getFactory().getVersion(session, remote.checkpoint(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node createActivity(String title) - throws RepositoryException { - try { - return getFactory().getNode(session, remote.createActivity(title)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node createConfiguration(String absPath) - throws RepositoryException { - try { - return getFactory().getNode( - session, remote.createConfiguration(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void doneMerge(String absPath, Version version) - throws RepositoryException { - try { - remote.doneMerge(absPath, version.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node getActivity() throws RepositoryException { - try { - RemoteNode activity = remote.getActivity(); - if (activity == null) { - return null; - } else { - return getFactory().getNode(session, activity); - } - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version getBaseVersion(String absPath) throws RepositoryException { - try { - return getFactory().getVersion( - session, remote.getBaseVersion(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public VersionHistory getVersionHistory(String absPath) - throws RepositoryException { - try { - return getFactory().getVersionHistory( - session, remote.getVersionHistory(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public boolean isCheckedOut(String absPath) throws RepositoryException { - try { - return remote.isCheckedOut(absPath); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge(Node activityNode) throws RepositoryException { - try { - RemoteIterator iterator = remote.merge(activityNode.getIdentifier()); - return getFactory().getNodeIterator(session, iterator); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge( - String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException { - try { - return getFactory().getNodeIterator( - session, remote.merge(absPath, srcWorkspace, bestEffort)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge( - String absPath, String srcWorkspace, boolean bestEffort, - boolean isShallow) throws RepositoryException { - try { - return getFactory().getNodeIterator(session, remote.merge( - absPath, srcWorkspace, bestEffort, isShallow)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void removeActivity(Node activityNode) throws RepositoryException { - try { - remote.removeActivity(activityNode.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(Version[] versions, boolean removeExisting) - throws RepositoryException { - try { - String[] versionIdentifiers = new String[versions.length]; - for (int i = 0; i < versions.length; i++) { - versionIdentifiers[i] = versions[i].getIdentifier(); - } - remote.restore(versionIdentifiers, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version.getIdentifier(), removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore( - String absPath, String versionName, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(absPath, versionName, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(String absPath, Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreVI(absPath, version.getIdentifier(), removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel( - String absPath, String versionLabel, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByLabel(absPath, versionLabel, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node setActivity(Node activity) throws RepositoryException { - try { - RemoteNode remoteActivity; - if (activity == null) { - remoteActivity = remote.setActivity(null); - } else { - remoteActivity = remote.setActivity(activity.getIdentifier()); - } - if (remoteActivity == null) { - return null; - } else { - return getFactory().getNode(session, remoteActivity); - } - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java deleted file mode 100644 index ec8e74e5394..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.QueryManager; -import javax.jcr.version.Version; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteWorkspace RemoteWorkspace} - * interface. This class makes a remote workspace locally available using - * the JCR {@link Workspace Workspace} interface. - * - * @see javax.jcr.Workspace - * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace - */ -@Deprecated(forRemoval = true) public class ClientWorkspace extends ClientObject implements Workspace { - - /** The current session. */ - private Session session; - - /** The adapted remote workspace. */ - private RemoteWorkspace remote; - - /** - * The adapted observation manager of this workspace. This field is set on - * the first call to the {@link #getObservationManager()()} method assuming, - * that the observation manager instance is not changing during the lifetime - * of a workspace instance, that is, each call to the server-side - * Workspace.getObservationManager() allways returns the same - * object. - */ - private ObservationManager observationManager; - - private LockManager lockManager; - - private VersionManager versionManager; - - /** - * Creates a client adapter for the given remote workspace. - * - * @param session current session - * @param remote remote workspace - * @param factory local adapter factory - */ - public ClientWorkspace( - Session session, RemoteWorkspace remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** - * Returns the current session without contacting the remote workspace. - * - * {@inheritDoc} - */ - public Session getSession() { - return session; - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String from, String to) throws RepositoryException { - try { - remote.copy(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String workspace, String from, String to) - throws RepositoryException { - try { - remote.copy(workspace, from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) throws RepositoryException { - try { - remote.move(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public QueryManager getQueryManager() throws RepositoryException { - try { - RemoteQueryManager manager = remote.getQueryManager(); - return getFactory().getQueryManager(session, manager); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NamespaceRegistry getNamespaceRegistry() throws RepositoryException { - try { - RemoteNamespaceRegistry registry = remote.getNamespaceRegistry(); - return getFactory().getNamespaceRegistry(registry); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeManager getNodeTypeManager() throws RepositoryException { - try { - RemoteNodeTypeManager manager = remote.getNodeTypeManager(); - return getFactory().getNodeTypeManager(manager); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public ObservationManager getObservationManager() - throws RepositoryException { - if (observationManager == null) { - try { - observationManager = - getFactory(). - getObservationManager(this, remote.getObservationManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return observationManager; - } - - /** {@inheritDoc} */ - public void clone( - String workspace, String src, String dst, boolean removeExisting) - throws RepositoryException { - try { - remote.clone(workspace, src, dst, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAccessibleWorkspaceNames() throws RepositoryException { - try { - return remote.getAccessibleWorkspaceNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public ContentHandler getImportContentHandler( - final String path, final int mode) throws RepositoryException { - getSession().getItem(path); // Check that the path exists - try { - final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - return new DefaultContentHandler( - SerializingContentHandler.getSerializer(buffer)) { - public void endDocument() throws SAXException { - super.endDocument(); - try { - remote.importXML(path, buffer.toByteArray(), mode); - } catch (Exception e) { - throw new SAXException("XML import failed", e); - } - } - }; - } catch (SAXException e) { - throw new RepositoryException("XML serialization failed", e); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, InputStream xml, int uuidBehaviour) - throws IOException, RepositoryException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - byte[] bytes = new byte[4096]; - for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { - buffer.write(bytes, 0, n); - } - remote.importXML(path, buffer.toByteArray(), uuidBehaviour); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } finally { - // JCR-2903 - try { xml.close(); } catch (IOException ignore) {} - } - } - - /** {@inheritDoc} */ - public void restore(Version[] versions, boolean removeExisting) - throws RepositoryException { - getVersionManager().restore(versions, removeExisting); - } - - public void createWorkspace(String name) throws RepositoryException { - try { - remote.createWorkspace(name, null); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void createWorkspace(String name, String srcWorkspace) - throws RepositoryException { - try { - remote.createWorkspace(name, srcWorkspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void deleteWorkspace(String name) throws RepositoryException { - try { - remote.deleteWorkspace(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public LockManager getLockManager() throws RepositoryException { - if (lockManager == null) { - try { - lockManager = getFactory().getLockManager( - session, remote.getLockManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return lockManager; - } - - public VersionManager getVersionManager() throws RepositoryException { - if (versionManager == null) { - try { - versionManager = getFactory().getVersionManager( - session, remote.getVersionManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return versionManager; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java deleted file mode 100644 index d9fcb0f12ff..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import javax.jcr.Repository; - -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.SerializableXid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteXASession RemoteXASession} - * interface. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ClientXASession extends ClientSession implements XAResource { - - /** - * The adapted remote transaction enabled session. - */ - private RemoteXASession remote; - - /** - * Creates a client adapter for the given remote session which is - * transaction enabled. - */ - public ClientXASession( - Repository repository, RemoteXASession remote, - LocalAdapterFactory factory) { - super(repository, remote, factory); - this.remote = remote; - } - - /** - * Returns true if the given object is a local - * adapter that refers to the same remote XA resource. - * - * @see http://blogs.sun.com/fkieviet/entry/j2ee_jca_resource_adapters_the - */ - public boolean isSameRM(XAResource xares) throws XAException { - return xares instanceof ClientXASession - && remote == ((ClientXASession) xares).remote; - } - - private XAException getXAException(RemoteException e) { - XAException exception = new XAException("Remote operation failed"); - exception.initCause(e); - return exception; - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - remote.commit(new SerializableXid(xid), onePhase); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - remote.end(new SerializableXid(xid), flags); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void forget(Xid xid) throws XAException { - try { - remote.forget(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public int getTransactionTimeout() throws XAException { - try { - return remote.getTransactionTimeout(); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public int prepare(Xid xid) throws XAException { - try { - return remote.prepare(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public Xid[] recover(int flag) throws XAException { - try { - return remote.recover(flag); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void rollback(Xid xid) throws XAException { - try { - remote.rollback(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - try { - return remote.setTransactionTimeout(seconds); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - remote.start(new SerializableXid(xid), flags); - } catch (RemoteException e) { - throw getXAException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java deleted file mode 100644 index c2d1765dec3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Adapter class for exposing a {@link ContentHandler} instance as - * {@link DefaultHandler} object. - */ -@Deprecated(forRemoval = true) class DefaultContentHandler extends DefaultHandler { - - /** - * The adapted content handler instance. - */ - private final ContentHandler handler; - - /** - * Creates a {@link DefaultHandler} adapter for the given content - * handler. - * - * @param handler content handler - */ - public DefaultContentHandler(ContentHandler handler) { - this.handler = handler; - } - - //------------------------------------------------------< ContentHandler > - - /** - * Delegated to {@link #handler}. - * - * @param ch passed through - * @param start passed through - * @param length passed through - * @throws SAXException if an error occurs - */ - public void characters(char[] ch, int start, int length) - throws SAXException { - handler.characters(ch, start, length); - } - - /** - * Delegated to {@link #handler}. - * - * @throws SAXException if an error occurs - */ - public void endDocument() throws SAXException { - handler.endDocument(); - } - - /** - * Delegated to {@link #handler}. - * - * @param namespaceURI passed through - * @param localName passed through - * @param qName passed through - * @throws SAXException if an error occurs - */ - public void endElement( - String namespaceURI, String localName, String qName) - throws SAXException { - handler.endElement(namespaceURI, localName, qName); - } - - /** - * Delegated to {@link #handler}. - * - * @param prefix passed through - * @throws SAXException if an error occurs - */ - public void endPrefixMapping(String prefix) throws SAXException { - handler.endPrefixMapping(prefix); - } - - /** - * Delegated to {@link #handler}. - * - * @param ch passed through - * @param start passed through - * @param length passed through - * @throws SAXException if an error occurs - */ - public void ignorableWhitespace(char[] ch, int start, int length) - throws SAXException { - handler.ignorableWhitespace(ch, start, length); - } - - /** - * Delegated to {@link #handler}. - * - * @param target passed through - * @param data passed through - * @throws SAXException if an error occurs - */ - public void processingInstruction(String target, String data) - throws SAXException { - handler.processingInstruction(target, data); - } - - /** - * Delegated to {@link #handler}. - * - * @param locator passed through - */ - public void setDocumentLocator(Locator locator) { - handler.setDocumentLocator(locator); - } - - /** - * Delegated to {@link #handler}. - * - * @param name passed through - * @throws SAXException if an error occurs - */ - public void skippedEntity(String name) throws SAXException { - handler.skippedEntity(name); - } - - /** - * Delegated to {@link #handler}. - * - * @throws SAXException if an error occurs - */ - public void startDocument() throws SAXException { - handler.startDocument(); - } - - /** - * Delegated to {@link #handler}. - * - * @param namespaceURI passed through - * @param localName passed through - * @param qName passed through - * @param atts passed through - * @throws SAXException if an error occurs - */ - public void startElement( - String namespaceURI, String localName, String qName, - Attributes atts) throws SAXException { - handler.startElement(namespaceURI, localName, qName, atts); - } - - /** - * Delegated to {@link #handler}. - * - * @param prefix passed through - * @param uri passed through - * @throws SAXException if an error occurs - */ - public void startPrefixMapping(String prefix, String uri) - throws SAXException { - handler.startPrefixMapping(prefix, uri); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java deleted file mode 100644 index 611860c072c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for creating local adapters for remote references. - * This interface defines how remote JCR-RMI references are adapted - * back to the normal JCR interfaces. The adaption mechanism can be - * modified (for example to add extra features) by changing the - * local adapter factory used by the repository client. - *

    - * Note that the - * {@link org.apache.jackrabbit.rmi.client.ClientObject ClientObject} - * base class provides a number of utility methods designed to work with - * a local adapter factory. Adapter implementations may want to inherit - * that functionality by subclassing from ClientObject. - * - * @see org.apache.jackrabbit.rmi.server.RemoteAdapterFactory - * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory - * @see org.apache.jackrabbit.rmi.client.ClientObject - */ -@Deprecated(forRemoval = true) public interface LocalAdapterFactory { - - /** - * Factory method for creating a local adapter for a remote repository. - * - * @param remote remote repository - * @return local repository adapter - */ - Repository getRepository(RemoteRepository remote); - - /** - * Factory method for creating a local adapter for a remote session. - * - * @param repository current repository - * @param remote remote session - * @return local session adapter - */ - Session getSession(Repository repository, RemoteSession remote); - - /** - * Factory method for creating a local adapter for a remote workspace. - * - * @param session current session - * @param remote remote workspace - * @return local workspace adapter - */ - Workspace getWorkspace(Session session, RemoteWorkspace remote); - - /** - * Factory method for creating a local adapter for a remote observation - * manager. - * - * @param workspace current workspace - * @param remote remote observation manager - * @return local observation manager adapter - */ - ObservationManager getObservationManager(Workspace workspace, - RemoteObservationManager remote); - - /** - * Factory method for creating a local adapter for a remote namespace - * registry. - * - * @param remote remote namespace registry - * @return local namespace registry adapter - */ - NamespaceRegistry getNamespaceRegistry(RemoteNamespaceRegistry remote); - - /** - * Factory method for creating a local adapter for a remote node type - * manager. - * - * @param remote remote node type manager - * @return local node type manager adapter - */ - NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote); - - /** - * Factory method for creating a local adapter for a remote item. - * Note that before calling this method, the client may want to - * introspect the remote item reference to determine whether to use the - * {@link #getNode(Session, RemoteNode) getNode} or - * {@link #getProperty(Session, RemoteProperty) getProperty} method - * instead, as the adapter returned by this method will only cover - * the basic {@link Item Item} interface. - * - * @param session current session - * @param remote remote item - * @return local item adapter - */ - Item getItem(Session session, RemoteItem remote); - - /** - * Factory method for creating a local adapter for a remote property. - * - * @param session current session - * @param remote remote property - * @return local property adapter - */ - Property getProperty(Session session, RemoteProperty remote); - - /** - * Factory method for creating a local adapter for a remote node. - * - * @param session current session - * @param remote remote node - * @return local node adapter - */ - Node getNode(Session session, RemoteNode remote); - - /** - * Factory method for creating a local adapter for a remote version. - * - * @param session current session - * @param remote remote version - * @return local version adapter - */ - Version getVersion(Session session, RemoteVersion remote); - - /** - * Factory method for creating a local adapter for a remote version history. - * - * @param session current session - * @param remote remote version history - * @return local version history adapter - */ - VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote); - - /** - * Factory method for creating a local adapter for a remote node type. - * - * @param remote remote node type - * @return local node type adapter - */ - NodeType getNodeType(RemoteNodeType remote); - - /** - * Factory method for creating a local adapter for a remote item - * definition. Note that before calling this method, the client may want to - * introspect the remote item definition to determine whether to use the - * {@link #getNodeDef(RemoteNodeDefinition) getNodeDef} or - * {@link #getPropertyDef(RemotePropertyDefinition) getPropertyDef} method - * instead, as the adapter returned by this method will only cover - * the {@link ItemDefinition ItemDef} base interface. - * - * @param remote remote item definition - * @return local item definition adapter - */ - ItemDefinition getItemDef(RemoteItemDefinition remote); - - /** - * Factory method for creating a local adapter for a remote node - * definition. - * - * @param remote remote node definition - * @return local node definition adapter - */ - NodeDefinition getNodeDef(RemoteNodeDefinition remote); - - /** - * Factory method for creating a local adapter for a remote property - * definition. - * - * @param remote remote property definition - * @return local property definition adapter - */ - PropertyDefinition getPropertyDef(RemotePropertyDefinition remote); - - /** - * Factory method for creating a local adapter for a remote lock. - * - * @param session current session - * @param remote remote lock - * @return local lock adapter - */ - Lock getLock(Session session, RemoteLock remote); - - /** - * Factory method for creating a local adapter for a remote query manager. - * - * @param session current session - * @param remote remote query manager - * @return local query manager adapter - */ - QueryManager getQueryManager(Session session, RemoteQueryManager remote); - - /** - * Factory method for creating a local adapter for a remote query. - * - * @param session current session - * @param remote remote query - * @return local query adapter - */ - Query getQuery(Session session, RemoteQuery remote); - - /** - * Factory method for creating a local adapter for a remote query result. - * - * @param session current session - * @param remote remote query result - * @return local query result adapter - */ - QueryResult getQueryResult(Session session, RemoteQueryResult remote); - - /** - * Factory method for creating a local adapter for a remote query row. - * - * @param session current session - * @param remote remote query row - * @return local query row adapter - */ - Row getRow(Session session, RemoteRow remote); - - /** - * Factory method for creating a local adapter for a remote node iterator. - * - * @param session current session - * @param remote remote node iterator - * @return local node iterator adapter - */ - NodeIterator getNodeIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote property iterator. - * - * @param session current session - * @param remote remote property iterator - * @return local property iterator adapter - */ - PropertyIterator getPropertyIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote version iterator. - * - * @param session current session - * @param remote remote version iterator - * @return local version iterator adapter - */ - VersionIterator getVersionIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote - * node type iterator. - * - * @param remote remote node type iterator - * @return local node type iterator adapter - */ - NodeTypeIterator getNodeTypeIterator(RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote row iterator. - * - * @param session current session - * @param remote remote row iterator - * @return local row iterator adapter - */ - RowIterator getRowIterator(Session session, RemoteIterator remote); - - LockManager getLockManager(Session session, RemoteLockManager lockManager); - - VersionManager getVersionManager( - Session session, RemoteVersionManager versionManager); - - /** - * Factory method for creating a local adapter for a remote access control - * manager - * - * @param remote remote access control manager - * @return local access control manager - */ - AccessControlManager getAccessControlManager( - RemoteAccessControlManager remote); - - /** - * Factory method for creating a local adapter for a remote access control - * policy - * - * @param remote remote access control policy - * @return local access control policy - */ - AccessControlPolicy getAccessControlPolicy(RemoteAccessControlPolicy remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote access control policies - * - * @param remote array of remote access control policies - * @return array of local access control policies - */ - AccessControlPolicy[] getAccessControlPolicy( - RemoteAccessControlPolicy[] remote); - - /** - * Factory method for creating a local adapter for a remote access control - * policy iterator - * - * @param remote access control policy iterator - * @return local access control policy iterator - */ - AccessControlPolicyIterator getAccessControlPolicyIterator( - RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote access control - * entry - * - * @param remote remote access control entry - * @return local access control entry - */ - AccessControlEntry getAccessControlEntry(RemoteAccessControlEntry remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote access control entry - * - * @param remote array of remote access control entry - * @return local array of access control entry - */ - AccessControlEntry[] getAccessControlEntry(RemoteAccessControlEntry[] remote); - - /** - * Factory method for creating a local adapter for a remote principal. - *

    - * If remote is a {@link RemoteGroup} the - * principal returned implements the org.apache.jackrabbit.api.security.principal.GroupPrincipal - * interface. - * - * @param remote principal - * @return local principal - */ - Principal getPrincipal(RemotePrincipal remote); - - /** - * Factory method for creating a local adapter for a remote principal - * iterator. - *

    - * Each entry in the remote iterator which is a - * {@link RemoteGroup} will be - * provided as a principal implementing the - * org.apache.jackrabbit.api.security.principal.GroupPrincipal interface. - * - * @param remote remote principal iterator - * @return local principal iterator - */ - Iterator getPrincipalIterator(RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote privilege - * - * @param remote remote privilege - * @return local privilege - */ - Privilege getPrivilege(RemotePrivilege remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote privilege - * - * @param remote array of remote privilege - * @return array of local privilege - */ - Privilege[] getPrivilege(RemotePrivilege[] remote); - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java deleted file mode 100644 index ef22fd94cbe..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR-RMI remote exception. Used by the JCR-RMI client to wrap RMI errors - * into RepositoryExceptions to avoid breaking the JCR interfaces. - *

    - * Note that if a RemoteException is received by call with no declared - * exceptions, then the RemoteException is wrapped into a - * RemoteRuntimeException. - */ -@Deprecated(forRemoval = true) public class RemoteRepositoryException extends RepositoryException { - - /** - * Creates a RemoteRepositoryException based on the given RemoteException. - * - * @param ex the remote exception - */ - public RemoteRepositoryException(RemoteException ex) { - super(ex); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java deleted file mode 100644 index a446e51179d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR-RMI remote runtime exception. Used by the JCR-RMI client to wrap - * RMI errors into RuntimeExceptions to avoid breaking the JCR interfaces. - *

    - * Note that if a RemoteException is received by call that declares to - * throw RepositoryExceptions, then the RemoteException is wrapped into - * a RemoteRepositoryException. - */ -@Deprecated(forRemoval = true) public class RemoteRuntimeException extends RuntimeException { - - /** - * Creates a RemoteRuntimeException based on the given RemoteException. - * - * @param ex the remote exception - */ - public RemoteRuntimeException(RemoteException ex) { - super(ex); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java deleted file mode 100644 index c9981ba0092..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A "safe" local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. This class uses an abstract factory method for loading - * (and reloading) the remote repository instance that is made locally - * available through the JCR {@link Repository} interface. If the remote - * reference breaks (a RemoteException is thrown by a remote call), then - * this adapter attempts to reload the remote reference once before failing. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public abstract class SafeClientRepository extends ClientObject - implements Repository { - - /** The adapted remote repository. */ - private RemoteRepository remote; - - /** - * Creates a client adapter for the given remote repository. - * - * @param factory local adapter factory - */ - public SafeClientRepository(LocalAdapterFactory factory) { - super(factory); - try { - remote = getRemoteRepository(true); - } catch (RemoteException e) { - remote = new BrokenRemoteRepository(e); - } - } - - /** - * Abstract factory class for getting the remote repository. - * - * @return remote repository - * @throws RemoteException if the remote repository could not be accessed - */ - protected abstract RemoteRepository getRemoteRepository() - throws RemoteException; - - /** - * Method to obtain the remote remote repository. - * If initialize is true and a RepositoryException will be thrown no {@link BrokenRemoteRepository} - * will be created. - * - * @return remote repository - * @throws RemoteException if the remote repository could not be accessed - */ - protected RemoteRepository getRemoteRepository(boolean initialize) - throws RemoteException { - if (initialize) { - try { - return getRemoteRepository(); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } else { - return getRemoteRepository(); - } - } - - /** {@inheritDoc} */ - public synchronized String getDescriptor(String name) { - try { - return remote.getDescriptor(name); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptor(name); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized String[] getDescriptorKeys() { - try { - return remote.getDescriptorKeys(); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorKeys(); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - private synchronized RemoteSession remoteLogin( - Credentials credentials, String workspace) - throws RepositoryException { - try { - return remote.login(credentials, workspace); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.login(credentials, workspace); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRepositoryException(e2); - } - } - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - RemoteSession session = remoteLogin(credentials, workspace); - return getFactory().getSession(this, session); - } - - /** {@inheritDoc} */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** {@inheritDoc} */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** {@inheritDoc} */ - public synchronized Value getDescriptorValue(String key) { - try { - return remote.getDescriptorValue(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorValue(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized Value[] getDescriptorValues(String key) { - try { - return remote.getDescriptorValues(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorValues(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized boolean isSingleValueDescriptor(String key) { - try { - return remote.isSingleValueDescriptor(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.isSingleValueDescriptor(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized boolean isStandardDescriptor(String key) { - try { - return remote.isStandardDescriptor(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.isStandardDescriptor(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java deleted file mode 100644 index a50bcdafe45..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.OutputStream; -import java.io.StringWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Result; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; -import javax.xml.transform.stream.StreamResult; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.AttributesImpl; -import org.xml.sax.helpers.DefaultHandler; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A {@link ContentHandler} that serializes SAX events to a given - * {@link Result} instance. The JAXP {@link SAXTransformerFactory} - * facility is used for the serialization. - *

    - * This class explicitly ensures that all namespace prefixes are also - * present as xmlns attributes in the serialized XML document. This avoids - * problems with Xalan's serialization behaviour which was (at least during - * JDK 1.4) to ignore namespaces if they were not present as xmlns attributes. - *

    - * NOTE: The code in this class was originally written for Apache Cocoon and - * is included with some modifications here in Apache Jackrabbit. See the - * org.apache.cocoon.serialization.AbstractTextSerializer class in the - * cocoon-pipeline-impl component for the original code. - */ -@Deprecated(forRemoval = true) class SerializingContentHandler extends DefaultContentHandler { - - /** - * The character encoding used for serialization (UTF-8). - * The encoding is fixed to make the text/xml content type safer to use. - * - * @see https://issues.apache.org/jira/browse/JCR-1621 - */ - public static final String ENCODING = "UTF-8"; - - /** The URI for xml namespaces */ - private static final String XML = "http://www.w3.org/XML/1998/namespace"; - - /** - * The factory used to create serializing SAX transformers. - */ - private static final SAXTransformerFactory FACTORY = - // Note that the cast from below is strictly speaking only valid when - // the factory instance supports the SAXTransformerFactory.FEATURE - // feature. But since this class would be useless without this feature, - // it's no problem to fail with a ClassCastException here and prevent - // this class from even being loaded. AFAIK all common JAXP - // implementations do support this feature. - (SAXTransformerFactory) TransformerFactory.newInstance(); - - /** - * Flag that indicates whether we need to work around the issue of - * the serializer not automatically generating the required xmlns - * attributes for the namespaces used in the document. - */ - private static final boolean NEEDS_XMLNS_ATTRIBUTES = - needsXmlnsAttributes(); - - /** - * Probes the available XML serializer for xmlns support. Used to set - * the value of the {@link #NEEDS_XMLNS_ATTRIBUTES} flag. - * - * @return whether the XML serializer needs explicit xmlns attributes - */ - private static boolean needsXmlnsAttributes() { - try { - StringWriter writer = new StringWriter(); - TransformerHandler probe = FACTORY.newTransformerHandler(); - probe.setResult(new StreamResult(writer)); - probe.startDocument(); - probe.startPrefixMapping("p", "uri"); - probe.startElement("uri", "e", "p:e", new AttributesImpl()); - probe.endElement("uri", "e", "p:e"); - probe.endPrefixMapping("p"); - probe.endDocument(); - return writer.toString().indexOf("xmlns") == -1; - } catch (Exception e) { - throw new UnsupportedOperationException("XML serialization fails"); - } - } - - /** - * Creates a serializing content handler that writes to the given stream. - * - * @param stream serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(OutputStream output) - throws SAXException { - return getSerializer(new StreamResult(output)); - } - - /** - * Creates a serializing content handler that writes to the given writer. - * - * @param writer serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(Writer writer) - throws SAXException { - return getSerializer(new StreamResult(writer)); - } - - /** - * Creates a serializing content handler that writes to the given result. - * - * @param result serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(Result result) - throws SAXException { - try { - TransformerHandler handler = FACTORY.newTransformerHandler(); - handler.setResult(result); - - // Specify the output properties to avoid surprises especially in - // character encoding or the output method (might be html for some - // documents!) - Transformer transformer = handler.getTransformer(); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING); - transformer.setOutputProperty(OutputKeys.INDENT, "no"); - - if (NEEDS_XMLNS_ATTRIBUTES) { - // The serializer does not output xmlns declarations, - // so we need to do it explicitly with this wrapper - return new SerializingContentHandler(handler); - } else { - return new DefaultContentHandler(handler); - } - } catch (TransformerConfigurationException e) { - throw new SAXException("Failed to initialize XML serializer", e); - } - } - - /** - * The prefixes of startPrefixMapping() declarations for the coming element. - */ - private List prefixList = new ArrayList(); - - /** - * The URIs of startPrefixMapping() declarations for the coming element. - */ - private List uriList = new ArrayList(); - - /** - * Maps of URI<->prefix mappings. Used to work around a bug in the Xalan - * serializer. - */ - private Map uriToPrefixMap = new HashMap(); - private Map prefixToUriMap = new HashMap(); - - /** - * True if there has been some startPrefixMapping() for the coming element. - */ - private boolean hasMappings = false; - - /** - * Stack of the prefixes of explicitly generated prefix mapping calls - * per each element level. An entry is appended at the beginning of each - * {@link #startElement(String, String, String, Attributes)} call and - * removed at the end of each {@link #endElement(String, String, String)} - * call. By default the entry for each element is null to - * avoid losing performance, but whenever the code detects a new prefix - * mapping that needs to be registered, the null entry is - * replaced with a list of explicitly registered prefixes for that node. - * When that element is closed, the listed prefixes get unmapped. - * - * @see #checkPrefixMapping(String, String) - * @see JCR-1767 - */ - private final List addedPrefixMappings = new ArrayList(); - - private SerializingContentHandler(ContentHandler handler) { - super(handler); - } - - public void startDocument() throws SAXException { - // Cleanup - this.uriToPrefixMap.clear(); - this.prefixToUriMap.clear(); - clearMappings(); - super.startDocument(); - } - - /** - * Track mappings to be able to add xmlns: attributes - * in startElement(). - */ - public void startPrefixMapping(String prefix, String uri) throws SAXException { - // Store the mappings to reconstitute xmlns:attributes - // except prefixes starting with "xml": these are reserved - // VG: (uri != null) fixes NPE in startElement - if (uri != null && !prefix.startsWith("xml")) { - this.hasMappings = true; - this.prefixList.add(prefix); - this.uriList.add(uri); - - // append the prefix colon now, in order to save concatenations later, but - // only for non-empty prefixes. - if (prefix.length() > 0) { - this.uriToPrefixMap.put(uri, prefix + ":"); - } else { - this.uriToPrefixMap.put(uri, prefix); - } - - this.prefixToUriMap.put(prefix, uri); - } - super.startPrefixMapping(prefix, uri); - } - - /** - * Checks whether a prefix mapping already exists for the given namespace - * and generates the required {@link #startPrefixMapping(String, String)} - * call if the mapping is not found. By default the registered prefix - * is taken from the given qualified name, but a different prefix is - * automatically selected if that prefix is already used. - * - * @see JCR-1767 - * @param uri namespace URI - * @param qname element name with the prefix, or null - * @throws SAXException if the prefix mapping can not be added - */ - private void checkPrefixMapping(String uri, String qname) - throws SAXException { - // Only add the prefix mapping if the URI is not already known - if (uri != null && uri.length() > 0 && !uri.startsWith("xml") - && !uriToPrefixMap.containsKey(uri)) { - // Get the prefix - String prefix = "ns"; - if (qname != null && qname.length() > 0) { - int colon = qname.indexOf(':'); - if (colon != -1) { - prefix = qname.substring(0, colon); - } - } - - // Make sure that the prefix is unique - String base = prefix; - for (int i = 2; prefixToUriMap.containsKey(prefix); i++) { - prefix = base + i; - } - - int last = addedPrefixMappings.size() - 1; - List prefixes = (List) addedPrefixMappings.get(last); - if (prefixes == null) { - prefixes = new ArrayList(); - addedPrefixMappings.set(last, prefixes); - } - prefixes.add(prefix); - - startPrefixMapping(prefix, uri); - } - } - - /** - * Ensure all namespace declarations are present as xmlns: attributes - * and add those needed before calling superclass. This is a workaround for a Xalan bug - * (at least in version 2.0.1) : org.apache.xalan.serialize.SerializerToXML - * ignores start/endPrefixMapping(). - */ - public void startElement( - String eltUri, String eltLocalName, String eltQName, Attributes attrs) - throws SAXException { - // JCR-1767: Generate extra prefix mapping calls where needed - addedPrefixMappings.add(null); - checkPrefixMapping(eltUri, eltQName); - for (int i = 0; i < attrs.getLength(); i++) { - checkPrefixMapping(attrs.getURI(i), attrs.getQName(i)); - } - - // try to restore the qName. The map already contains the colon - if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { - eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; - } - if (this.hasMappings) { - // Add xmlns* attributes where needed - - // New Attributes if we have to add some. - AttributesImpl newAttrs = null; - - int mappingCount = this.prefixList.size(); - int attrCount = attrs.getLength(); - - for (int mapping = 0; mapping < mappingCount; mapping++) { - - // Build infos for this namespace - String uri = (String) this.uriList.get(mapping); - String prefix = (String) this.prefixList.get(mapping); - String qName = prefix.equals("") ? "xmlns" : ("xmlns:" + prefix); - - // Search for the corresponding xmlns* attribute - boolean found = false; - for (int attr = 0; attr < attrCount; attr++) { - if (qName.equals(attrs.getQName(attr))) { - // Check if mapping and attribute URI match - if (!uri.equals(attrs.getValue(attr))) { - throw new SAXException("URI in prefix mapping and attribute do not match"); - } - found = true; - break; - } - } - - if (!found) { - // Need to add this namespace - if (newAttrs == null) { - // Need to test if attrs is empty or we go into an infinite loop... - // Well know SAX bug which I spent 3 hours to remind of :-( - if (attrCount == 0) { - newAttrs = new AttributesImpl(); - } else { - newAttrs = new AttributesImpl(attrs); - } - } - - if (prefix.equals("")) { - newAttrs.addAttribute(XML, qName, qName, "CDATA", uri); - } else { - newAttrs.addAttribute(XML, prefix, qName, "CDATA", uri); - } - } - } // end for mapping - - // Cleanup for the next element - clearMappings(); - - // Start element with new attributes, if any - super.startElement(eltUri, eltLocalName, eltQName, newAttrs == null ? attrs : newAttrs); - } else { - // Normal job - super.startElement(eltUri, eltLocalName, eltQName, attrs); - } - } - - - /** - * Receive notification of the end of an element. - * Try to restore the element qName. - */ - public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException { - // try to restore the qName. The map already contains the colon - if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { - eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; - } - - super.endElement(eltUri, eltLocalName, eltQName); - - // JCR-1767: Generate extra prefix un-mapping calls where needed - int last = addedPrefixMappings.size() - 1; - List prefixes = (List) addedPrefixMappings.remove(last); - if (prefixes != null) { - Iterator iterator = prefixes.iterator(); - while (iterator.hasNext()) { - endPrefixMapping((String) iterator.next()); - } - } - } - - /** - * End the scope of a prefix-URI mapping: - * remove entry from mapping tables. - */ - public void endPrefixMapping(String prefix) throws SAXException { - // remove mappings for xalan-bug-workaround. - // Unfortunately, we're not passed the uri, but the prefix here, - // so we need to maintain maps in both directions. - if (this.prefixToUriMap.containsKey(prefix)) { - this.uriToPrefixMap.remove(this.prefixToUriMap.get(prefix)); - this.prefixToUriMap.remove(prefix); - } - - if (hasMappings) { - // most of the time, start/endPrefixMapping calls have an element event between them, - // which will clear the hasMapping flag and so this code will only be executed in the - // rather rare occasion when there are start/endPrefixMapping calls with no element - // event in between. If we wouldn't remove the items from the prefixList and uriList here, - // the namespace would be incorrectly declared on the next element following the - // endPrefixMapping call. - int pos = prefixList.lastIndexOf(prefix); - if (pos != -1) { - prefixList.remove(pos); - uriList.remove(pos); - } - } - - super.endPrefixMapping(prefix); - } - - public void endDocument() throws SAXException { - // Cleanup - this.uriToPrefixMap.clear(); - this.prefixToUriMap.clear(); - clearMappings(); - super.endDocument(); - } - - private void clearMappings() { - this.hasMappings = false; - this.prefixList.clear(); - this.uriList.clear(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java deleted file mode 100644 index dfc4123c1c2..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A buffering local adapter for the JCR-RMI {@link RemoteIterator} - * interface. This class makes the remote iterator locally available - * using the JCR {@link RangeIterator} interface. The element arrays - * returned by the remote iterator are buffered locally. - *

    - * See the subclasses for type-specific versions of this abstract class. - */ -@Deprecated(forRemoval = true) public abstract class ClientIterator extends ClientObject - implements RangeIterator { - - /** The adapted remote iterator. */ - private final RemoteIterator remote; - - /** - * The cached number of elements in the iterator, -1 if the iterator - * size is unknown, or -2 if the size has not been retrieved from the - * remote iterator. - */ - private long size; - - /** The position of the buffer within the iteration. */ - private long positionOfBuffer; - - /** The position within the buffer of the iteration. */ - private int positionInBuffer; - - /** - * The element buffer. Set to null when the end of the - * iteration has been reached. - */ - private Object[] buffer; - - /** - * Creates a local adapter for the given remote iterator. The element - * buffer is initially empty. - * - * @param remote remote iterator - * @param factory local adapter factory - */ - public ClientIterator(RemoteIterator remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - this.size = -2; - this.positionOfBuffer = 0; - this.positionInBuffer = 0; - this.buffer = new Object[0]; - } - - /** - * Returns the current position within the iterator. - * - * @return current position - * @see RangeIterator#getPosition() - */ - public long getPosition() { - return positionOfBuffer + positionInBuffer; - } - - /** - * Returns the size (the total number of elements) of this iteration. - * Returns -1 if the size is unknown. - *

    - * To minimize the number of remote method calls, the size is retrieved - * when this method is first called and cached for subsequent invocations. - * - * @return number of elements in the iteration, or -1 - * @throws RemoteRuntimeException on RMI errors - * @see RangeIterator#getSize() - */ - public long getSize() throws RemoteRuntimeException { - if (size == -2) { - try { - size = remote.getSize(); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - return size; - } - - /** - * Skips the given number of elements in this iteration. - *

    - * The elements in the local element buffer are skipped first, and - * a remote skip method call is made only if more elements are being - * skipped than remain in the local buffer. - * - * @param skipNum the number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteRuntimeException on RMI errors - * @see RangeIterator#skip(long) - */ - public void skip(long skipNum) - throws NoSuchElementException, RemoteRuntimeException { - if (skipNum < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (buffer == null && skipNum > 0) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (positionInBuffer + skipNum <= buffer.length) { - positionInBuffer += skipNum; - } else { - try { - skipNum -= buffer.length - positionInBuffer; - remote.skip(skipNum); - positionInBuffer = buffer.length; - positionOfBuffer += skipNum; - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } catch (NoSuchElementException e) { - buffer = null; // End of iterator reached - throw e; - } - } - } - - /** - * Advances the element buffer if there are no more elements in it. The - * element buffer is set to null if the end of the iteration - * has been reached. - * - * @throws RemoteException on RMI errors - */ - private void advance() throws RemoteException { - if (buffer != null && positionInBuffer == buffer.length) { - positionOfBuffer += buffer.length; - positionInBuffer = 0; - buffer = remote.nextObjects(); - if (buffer == null) { - size = positionOfBuffer; - } - } - } - - /** - * Checks if there are more elements in this iteration. - * - * @return true if there are more elements, - * false otherwise - * @throws RemoteRuntimeException on RMI errors - */ - public boolean hasNext() throws RemoteRuntimeException { - try { - advance(); - return buffer != null; - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - - /** - * Returns a local adapter for the given remote object. This abstract - * method is used by {@link #next()} to convert the remote references - * returned by the remote iterator to local adapters. - *

    - * Subclasses should implement this method to use the local adapter - * factory to create local adapters of the specific element type. - * - * @param remote remote object - * @return local adapter - */ - protected abstract Object getObject(Object remote); - - /** - * Returns the next element in this iteration. - * - * @return next element - * @throws NoSuchElementException if there are no more elements - * @throws RemoteRuntimeException on RMI errors - */ - public Object next() throws NoSuchElementException, RemoteRuntimeException { - try { - advance(); - if (buffer == null) { - throw new NoSuchElementException("End of iterator reached"); - } else { - return getObject(buffer[positionInBuffer++]); - } - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - - /** - * Not supported. - * - * @throws UnsupportedOperationException always thrown - */ - public void remove() throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java deleted file mode 100644 index 71c7e121489..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote nodes. - */ -@Deprecated(forRemoval = true) public class ClientNodeIterator extends ClientIterator implements NodeIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientNodeIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientNodeIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote node. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getNode(session, (RemoteNode) remote); - } - - /** - * Returns the next node in this iteration. - * - * @return next node - * @see NodeIterator#nextNode() - */ - public Node nextNode() { - return (Node) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java deleted file mode 100644 index 8bf80cbf30b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote node types. - */ -@Deprecated(forRemoval = true) public class ClientNodeTypeIterator extends ClientIterator - implements NodeTypeIterator { - - /** - * Creates a ClientNodeTypeIterator instance. - * - * @param iterator remote iterator - * @param factory local adapter factory - */ - public ClientNodeTypeIterator( - RemoteIterator iterator, LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** - * Creates and returns a local adapter for the given remote node. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getNodeType((RemoteNodeType) remote); - } - - /** - * Returns the next node type in this iteration. - * - * @return next node type - * @see NodeTypeIterator#nextNodeType() - */ - public NodeType nextNodeType() { - return (NodeType) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java deleted file mode 100644 index 47e7a35ffae..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote properties. - */ -@Deprecated(forRemoval = true) public class ClientPropertyIterator extends ClientIterator - implements PropertyIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientPropertyIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientPropertyIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote property. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getProperty(session, (RemoteProperty) remote); - } - - /** - * Returns the next property in this iteration. - * - * @return next property - * @see PropertyIterator#nextProperty() - */ - public Property nextProperty() { - return (Property) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java deleted file mode 100644 index 6774b10ce07..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Session; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteRow; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote rows. - */ -@Deprecated(forRemoval = true) public class ClientRowIterator extends ClientIterator implements RowIterator { - - /** Current session. */ - private Session session; - - /** - * Creates a ClientRowIterator instance. - * - * @param iterator remote iterator - * @param factory local adapter factory - */ - public ClientRowIterator(Session session, - RemoteIterator iterator, LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote row. - * - * @param remote remote reference - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getRow(session, (RemoteRow) remote); - } - - /** - * Returns the next row in this iteration. - * - * @return next row - * @see RowIterator#nextRow() - */ - public Row nextRow() { - return (Row) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java deleted file mode 100644 index 4d1cd98ccad..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote versions. - */ -@Deprecated(forRemoval = true) public class ClientVersionIterator extends ClientIterator - implements VersionIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientVersionIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientVersionIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote version. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getVersion(session, (RemoteVersion) remote); - } - - /** - * Returns the next version in this iteration. - * - * @return next version - * @see VersionIterator#nextVersion() - */ - public Version nextVersion() { - return (Version) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java deleted file mode 100755 index ad196f8e5b6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java deleted file mode 100755 index 75e643f9218..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java deleted file mode 100644 index 8953b1acbba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Enumeration; -import java.util.Iterator; - -import org.apache.jackrabbit.api.security.principal.GroupPrincipal; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface. - * - * @see RemoteGroup - */ -@Deprecated(forRemoval = true) public class ClientGroup extends ClientPrincipal implements GroupPrincipal { - - private final LocalAdapterFactory factory; - - public ClientGroup(final RemotePrincipal p, - final LocalAdapterFactory factory) { - super(p); - this.factory = factory; - } - - /** - * @return false - this method is not implemented yet - */ - public boolean addMember(Principal user) { - // no support for adding member here - return false; - } - - public boolean isMember(Principal member) { - try { - return ((RemoteGroup) getRemotePrincipal()).isMember(member.getName()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - public Enumeration members() { - try { - final RemoteIterator remote = ((RemoteGroup) getRemotePrincipal()).members(); - final Iterator pi = factory.getPrincipalIterator(remote); - return new Enumeration() { - public boolean hasMoreElements() { - return pi.hasNext(); - } - - public Principal nextElement() { - return pi.next(); - } - }; - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** - * @return false - this method is not implemented yet - */ - public boolean removeMember(Principal user) { - // no support for removing member here - return false; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java deleted file mode 100644 index 24420e51817..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import java.rmi.RemoteException; -import java.security.Principal; - -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal} - * interface. This class makes a remote principal locally available using the - * Java {@link Principal} interface. - * - * @see Principal - * @see RemotePrincipal - */ -@Deprecated(forRemoval = true) public class ClientPrincipal implements Principal { - - private final RemotePrincipal p; - - public ClientPrincipal(final RemotePrincipal p) { - this.p = p; - } - - /** {@inheritDoc} */ - public String getName() { - try { - return p.getName(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** - * Returns the {@link RemotePrincipal} encapsulated in this instance. - *

    - * NOTE: This method is intended to only be used in the JCR RMI - * implementation to be able to "send back" remote principals to the server - * for implementation of the remote JCR API. - * - * @return the {@link RemotePrincipal} encapsulated in this instance. - */ - public final RemotePrincipal getRemotePrincipal() { - return p; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java deleted file mode 100644 index 31f893b9e10..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote principals - */ -@Deprecated(forRemoval = true) public class ClientPrincipalIterator extends ClientIterator { - - public ClientPrincipalIterator(final RemoteIterator iterator, - final LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** {@inheritDoc} */ - @Override - protected Object getObject(Object remote) { - return getFactory().getPrincipal((RemotePrincipal) remote); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java deleted file mode 100755 index 8dd28b896ab..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("4.0.0") -package org.apache.jackrabbit.rmi.client.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java deleted file mode 100644 index 1e1b3251c3d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry - * RemoteAccessControlEntry} interface. This class makes a remote - * AccessControlEntry locally available using the JCR {@link AccessControlEntry - * AccessControlEntry} interface. - * - * @see javax.jcr.security.AccessControlEntry - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry - */ -@Deprecated(forRemoval = true) public class ClientAccessControlEntry extends ClientObject implements - AccessControlEntry { - - private final RemoteAccessControlEntry race; - - public ClientAccessControlEntry(final RemoteAccessControlEntry race, - final LocalAdapterFactory factory) { - super(factory); - this.race = race; - } - - /** {@inheritDoc} */ - public Principal getPrincipal() { - try { - return getFactory().getPrincipal(race.getPrincipal()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public Privilege[] getPrivileges() { - try { - return getFactory().getPrivilege(race.getPrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - RemoteAccessControlEntry getRemoteAccessControlEntry() { - return race; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java deleted file mode 100644 index c497d95bac0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlList - * RemoteAccessControlList} interface. This class makes a remote - * AccessControlList locally available using the JCR {@link AccessControlList - * AccessControlList} interface. - * - * @see javax.jcr.security.AccessControlList - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList - */ -@Deprecated(forRemoval = true) public class ClientAccessControlList extends ClientAccessControlPolicy - implements AccessControlList { - - public ClientAccessControlList(final RemoteAccessControlList racl, - final LocalAdapterFactory factory) { - super(racl, factory); - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public boolean addAccessControlEntry(Principal principal, - Privilege[] privileges) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException( - "addAccessControlEntry"); - } - - /** {@inheritDoc} */ - public AccessControlEntry[] getAccessControlEntries() - throws RepositoryException { - try { - return getFactory().getAccessControlEntry( - ((RemoteAccessControlList) getRemoteAccessControlPolicy()).getAccessControlEntries()); - } catch (RemoteException re) { - throw new RemoteRepositoryException(re); - } - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void removeAccessControlEntry(AccessControlEntry ace) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException( - "removeAccessControlEntry"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java deleted file mode 100644 index d8c4fd96d75..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; - -import javax.jcr.AccessDeniedException; -import javax.jcr.PathNotFoundException; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.security.AccessControlException; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlManager - * RemoteAccessControlManager} interface. This class makes a remote - * AccessControlManager locally available using the JCR - * {@link AccessControlManager AccessControlManager} interface. - * - * @see javax.jcr.security.AccessControlManager - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager - */ -@Deprecated(forRemoval = true) public class ClientAccessControlManager extends ClientObject implements - AccessControlManager { - - private final RemoteAccessControlManager racm; - - public ClientAccessControlManager(final RemoteAccessControlManager racm, - final LocalAdapterFactory factory) { - super(factory); - this.racm = racm; - } - - /** {@inheritDoc} */ - public AccessControlPolicyIterator getApplicablePolicies(String absPath) - throws RepositoryException { - try { - return getFactory().getAccessControlPolicyIterator( - racm.getApplicablePolicies(absPath)); - } catch (RemoteException re) { - throw new RemoteRepositoryException(re); - } - } - - /** {@inheritDoc} */ - public AccessControlPolicy[] getEffectivePolicies(String absPath) - throws PathNotFoundException, AccessDeniedException, - RepositoryException { - try { - return getFactory().getAccessControlPolicy( - racm.getEffectivePolicies(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public AccessControlPolicy[] getPolicies(String absPath) - throws PathNotFoundException, AccessDeniedException, - RepositoryException { - try { - return getFactory().getAccessControlPolicy( - racm.getPolicies(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Privilege[] getPrivileges(String absPath) - throws PathNotFoundException, RepositoryException { - try { - return getFactory().getPrivilege(racm.getPrivileges(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Privilege[] getSupportedPrivileges(String absPath) - throws PathNotFoundException, RepositoryException { - try { - return getFactory().getPrivilege( - racm.getSupportedPrivileges(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPrivileges(String absPath, Privilege[] privileges) - throws PathNotFoundException, RepositoryException { - String[] privNames = new String[privileges.length]; - for (int i = 0; i < privNames.length; i++) { - privNames[i] = privileges[i].getName(); - } - - try { - return racm.hasPrivileges(absPath, privNames); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - - } - - /** {@inheritDoc} */ - public Privilege privilegeFromName(String privilegeName) - throws AccessControlException, RepositoryException { - try { - return getFactory().getPrivilege( - racm.privilegeFromName(privilegeName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void removePolicy(String absPath, AccessControlPolicy policy) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException("removePolicy"); - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void setPolicy(String absPath, AccessControlPolicy policy) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException("setPolicy"); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java deleted file mode 100644 index 30c12bd3ec6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import javax.jcr.security.AccessControlPolicy; -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy - * RemoteAccessControlPolicy} interface. This class makes a remote - * AccessControlPolicy locally available using the JCR - * {@link AccessControlPolicy AccessControlPolicy} interface. - * - * @see javax.jcr.security.AccessControlPolicy - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy - */ -@Deprecated(forRemoval = true) public class ClientAccessControlPolicy extends ClientObject implements - AccessControlPolicy { - - private final RemoteAccessControlPolicy racp; - - public ClientAccessControlPolicy(final RemoteAccessControlPolicy racp, - final LocalAdapterFactory factory) { - super(factory); - this.racp = racp; - } - - RemoteAccessControlPolicy getRemoteAccessControlPolicy() { - return racp; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java deleted file mode 100644 index 80ac1bb0759..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote access control policies. - */ -@Deprecated(forRemoval = true) public class ClientAccessControlPolicyIterator extends ClientIterator implements - AccessControlPolicyIterator { - - public ClientAccessControlPolicyIterator(RemoteIterator iterator, - LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** {@inheritDoc} */ - protected Object getObject(Object remote) { - return getFactory().getAccessControlPolicy( - (RemoteAccessControlList) remote); - } - - /** {@inheritDoc} */ - public AccessControlPolicy nextAccessControlPolicy() { - return (AccessControlPolicy) next(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java deleted file mode 100644 index 0bcfb22b1c1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemotePrivilege RemotePrivilege} - * interface. This class makes a remote Privilege locally available using the - * JCR {@link Privilege Privilege} interface. - * - * @see javax.jcr.security.Privilege - * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege - */ -@Deprecated(forRemoval = true) public class ClientPrivilege extends ClientObject implements Privilege { - - private final RemotePrivilege rp; - - public ClientPrivilege(final RemotePrivilege rp, - final LocalAdapterFactory factory) { - super(factory); - this.rp = rp; - } - - /** {@inheritDoc} */ - public Privilege[] getAggregatePrivileges() { - try { - return getFactory().getPrivilege(rp.getAggregatePrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public Privilege[] getDeclaredAggregatePrivileges() { - try { - return getFactory().getPrivilege( - rp.getDeclaredAggregatePrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return rp.getName(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public boolean isAbstract() { - try { - return rp.isAbstract(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public boolean isAggregate() { - try { - return rp.isAggregate(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj == null) { - return false; - } - - if (obj instanceof Privilege) { - return getName().equals(((Privilege) obj).getName()); - } - - return false; - } - - public int hashCode() { - return getName().hashCode(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java deleted file mode 100755 index fef0d6cec51..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java deleted file mode 100644 index 7b84b842279..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.observation.EventIterator EventIterator} interface. - * This class is used by the JCR-RMI client adapters to convert - * node arrays to iterators. - */ -@Deprecated(forRemoval = true) public class ArrayEventIterator extends ArrayIterator implements EventIterator { - - /** - * Creates an iterator for the given array of events. - * - * @param nodes the nodes to iterate - */ - public ArrayEventIterator(Event[] nodes) { - super(nodes); - } - - /** {@inheritDoc} */ - public Event nextEvent() { - return (Event) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java deleted file mode 100644 index 1abc13e4cc4..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import javax.jcr.observation.EventListener; -import javax.jcr.observation.EventListenerIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.observation.EventListenerIterator EventListenerIterator} interface. - * This class is used by the JCR-RMI client adapters to convert - * listener arrays to iterators. - */ -@Deprecated(forRemoval = true) public class ArrayEventListenerIterator extends ArrayIterator - implements EventListenerIterator { - - /** - * Creates an iterator for the given array of listeners. - * - * @param listeners the listeners to iterate - */ - public ArrayEventListenerIterator(EventListener[] listeners) { - super(listeners); - } - - /** {@inheritDoc} */ - public EventListener nextEventListener() { - return (EventListener) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java deleted file mode 100644 index bdc89d6f277..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.RangeIterator RangeIterator} interface. This class - * implements the RangeIterator functionality for an underlying array - * of objects. Used as the base class for the type-specific iterator - * classes defined in this package. - */ -@Deprecated(forRemoval = true) public class ArrayIterator implements RangeIterator { - - /** The current iterator position. */ - private int position; - - /** The underlying array of objects. */ - private Object[] array; - - /** - * Creates an iterator for the given array of objects. - * - * @param array the objects to iterate - */ - public ArrayIterator(Object[] array) { - this.position = 0; - this.array = array; - } - - /** {@inheritDoc} */ - public boolean hasNext() { - return (position < array.length); - } - - /** {@inheritDoc} */ - public Object next() { - return array[position++]; - } - - /** {@inheritDoc} */ - public void remove() { - throw new UnsupportedOperationException(); - } - - /** {@inheritDoc} */ - public void skip(long items) { - position += items; - if (position > array.length) { - position = array.length; - throw new NoSuchElementException( - "Skipped past the last element of the iterator"); - } - } - - /** {@inheritDoc} */ - public long getSize() { - return array.length; - } - - /** {@inheritDoc} */ - public long getPosition() { - return position; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java deleted file mode 100755 index 06af128a016..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java deleted file mode 100644 index 5fcfb5ba432..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.jackrabbit; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * @deprecated Use the normal {@link ClientAdapterFactory} instead - */ -@Deprecated(forRemoval = true) public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java deleted file mode 100755 index 09727fd1bba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.jackrabbit; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java deleted file mode 100644 index a30ebd589a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.rmi.RemoteException; -import java.util.HashMap; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.EventListener; - -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.iterator.ArrayEventIterator; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ClientEventPoll class is the registry for client-side - * event listeners on behalf of the - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class. In - * addition this class extends the java.lang.Thread class able - * to be run in a separate thread to constantly poll the server-side observation - * manager for new events. - *

    - * Notes: - *

      - *
    1. Only one instance of this class should be instantiated for each instance - * of a {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager} class. - *
    2. EventListeners registered with this class must properly - * implement the Object.hashCode() and Object.equals() - * contracts for them to be handled correctly by this class. - *
    - * - * @see #run() - */ -@Deprecated(forRemoval = true) public class ClientEventPoll extends Thread { - - /** logger */ - private static final Logger log = - LoggerFactory.getLogger(ClientEventPoll.class); - - /** - * The time in milliseconds the {@link #run()} method should be waiting - * for remote events. - * @see #run() - */ - private static final long POLL_TIMEOUT = 5000; - - /** The thread name */ - private static final String THREAD_NAME = "Client Event Poller"; - - /** The primitive unique identifier generator. */ - private static long counter = 0; - - /** The {@link RemoteObservationManager} called for the new events. */ - private final RemoteObservationManager remote; - - /** - * The Session checked by the {@link #run} method whether it - * is still alive or the thread should terminate. - */ - private final Session session; - - /** The map of locally registered listeners indexed by the unique identifier */ - private Map listenerMap = new HashMap(); - - /** The map of unique identifieres indexed by the registered listeners */ - private Map idMap = new HashMap(); - - /** - * Flag indicating whether the {@link #run()} method should terminate. - * @see #run() - */ - private boolean running = true; - - /** - * Creates an instance of this class talking to the given - * {@link RemoteObservationManager}. - * - * @param remote The remote observation manager which is asked for new - * events. This must not be null. - * @param session The Session which is asked whether it is - * alive by the {@link #run()} method. This must not be null. - * - * @throws NullPointerException if remote or session - * is null. - */ - public ClientEventPoll(RemoteObservationManager remote, Session session) - throws NullPointerException { - super(THREAD_NAME); - - // check remote and session - if (remote == null) { - throw new NullPointerException("remote"); - } - if (session == null) { - throw new NullPointerException("session"); - } - - this.remote = remote; - this.session = session; - } - - /** - * Registers the given local listener with this instance and returns the - * unique identifier assigned to it. - * - * @param listener The EventListener to register. - * - * @return The unique identifier assigned to the newly registered event - * listener. - */ - public synchronized long addListener(EventListener listener) { - Long id = new Long(counter++); - listenerMap.put(id, listener); - idMap.put(listener, id); - return id.longValue(); - } - - /** - * Unregisters the given local listener from this instance and returns the - * unique identifier assigned to it. - * - * @param listener The EventListener to unregister. - * - * @return The unique identifier assigned to the unregistered event listener - * or -1 if the listener was not registered. - */ - public synchronized long removeListener(EventListener listener) { - Long key = (Long) idMap.remove(listener); - if (key != null) { - listenerMap.remove(key); - return key.longValue(); - } - - return -1; - } - - /** - * Returns an array of the registered event listeners. - * - * @return registered event listeners - */ - public synchronized EventListener[] getListeners() { - return (EventListener[]) listenerMap.values().toArray( - new EventListener[(listenerMap.size())]); - } - - /** - * Indicates to the {@link #run()} method, that asking for events should - * be terminated. - * - * @see #run() - */ - public void terminate() { - this.running = false; - } - - //---------- Thread overwrite --------------------------------------------- - - /** - * Checks for remote events and dispatches them to the locally registered - * event listeners. This is how this method works: - *
      - *
    1. Continue with next step if {@link #terminate()} has not been called - * yet and the session is still alive. - *
    2. Call the {@link RemoteObservationManager#getNextEvent(long)} method - * waiting for a specified time (5 seconds). - *
    3. If no event was received in the specified time go back to step #1. - *
    4. Extract the unique listener identifier from the remote event and - * find it in the list of locally registered event listeners. Go back to - * step #1 if no such listener exists. - *
    5. Convert the remote event list to an EventIterator and - * call the EventListener.onEvent() method. - *
    6. Go back to step #1. - *
    - */ - public void run() { - while (running && session.isLive()) { - try { - // ask for an event waiting at most POLL_TIMEOUT milliseconds - RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT); - - // poll time out, check running and ask again - if (remoteEvent == null) { - continue; - } - - // extract the listener id from the remote event and find - // the locally registered event listener - Long id = new Long(remoteEvent.getListenerId()); - EventListener listener = (EventListener) listenerMap.get(id); - - // if the listener is not registered (anymore), the event is - // silently ignored, running is checked and the server asked again - if (listener == null) { - continue; - } - - // otherwise convert the remote events into an EventIterator - // and the listener is called - RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents(); - EventIterator events = toEvents(remoteEvents); - try { - listener.onEvent(events); - } catch (Exception e) { - log.error("Unexpected failure of Listener " + listener, e); - } - - } catch (RemoteException re) { - log.error("Problem handling event. Looking for next one.", re); - } - } - } - - //---------- internal ----------------------------------------------------- - - /** - * Converts an array of {@link RemoteEventCollection.RemoteEvent} instances to an - * instance of EventIterator suitable to be sent to the - * event listener. - * - * @param remoteEvents array of remote events - * @return event iterator - * @throws RemoteException on RMI errors - */ - private EventIterator toEvents(RemoteEventCollection.RemoteEvent[] remoteEvents) - throws RemoteException { - Event[] events = new Event[remoteEvents.length]; - for (int i = 0; i < events.length; i++) { - events[i] = new JCREvent(remoteEvents[i]); - } - return new ArrayEventIterator(events); - } - - /** - * The JCREvent class is a simple implementation of the JCR - * Event interface to be sent to the locally registered - * event listeners. - * - * @author Felix Meschberger - */ - private static class JCREvent implements Event { - - /** The adapted remote event. */ - private final RemoteEventCollection.RemoteEvent remote; - - /** - * Creates an instance of this class from the contents of the given - * remoteEvent. - * - * @param remoteEvent The {@link RemoteEventCollection.RemoteEvent} instance - * providing the data for this event. - */ - private JCREvent(RemoteEventCollection.RemoteEvent remoteEvent) { - remote = remoteEvent; - } - - /** {@inheritDoc} */ - public int getType() { - try { - return remote.getType(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUserID() { - try { - return remote.getUserID(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public long getDate() throws RepositoryException { - try { - return remote.getDate(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException { - try { - return remote.getIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Map getInfo() throws RepositoryException { - try { - return remote.getInfo(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUserData() throws RepositoryException { - try { - return remote.getUserData(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java deleted file mode 100644 index 5b39287157f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.util.LinkedList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The Queue class is a very simple queue assuming that there is - * at least one consumer and potentially multiple producers. This class poses - * no restrictions on the size of the queue. - */ -@Deprecated(forRemoval = true) public class Queue { - - /** The linked list implementing the queue of data */ - private final LinkedList queue; - - /** - * Creates an instance of this queue. - */ - public Queue() { - queue = new LinkedList(); - } - - /** - * Appends the given object to the end of the queue. - *

    - * After appending the element, the queue is notified such that threads - * waiting to retrieve an element from the queue are woken up. - * - * @param object the object to be added - */ - public void put(Object object) { - synchronized (queue) { - queue.addLast(object); - queue.notifyAll(); - } - } - - /** - * Returns the first element from the queue. If the queue is currently empty - * the method waits at most the given number of milliseconds. - * - * @param timeout The maximum number of milliseconds to wait for an entry in - * the queue if the queue is empty. If zero, the method waits forever - * for an element. - * - * @return The first element of the queue or null if the method - * timed out waiting for an entry. - * - * @throws InterruptedException Is thrown if the current thread is - * interrupted while waiting for the queue to get at least one entry. - */ - public Object get(long timeout) throws InterruptedException { - synchronized (queue) { - // wait for data if the queue is empty - if (queue.isEmpty()) { - queue.wait(timeout); - } - - // return null if queue is (still) empty - if (queue.isEmpty()) { - return null; - } - - // return first if queue has content now - return queue.removeFirst(); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java deleted file mode 100644 index 94f78b6d13a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.rmi.RemoteException; - -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.EventListener; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ServerEventListenerProxy class is the server-side event - * listener proxy registered on behalf of a client-side event listener identified - * with the unique identifier. - *

    - * The term Server in this class indicates, that this is a server-side - * class. In contrast to the classes in the - * {@link org.apache.jackrabbit.rmi.server} package, this class neither extends - * the {@link org.apache.jackrabbit.rmi.server.ServerObject} class nor does it - * implement any of the remote interfaces in the - * {@link org.apache.jackrabbit.rmi.remote} package because it only is - * instantiated to be used on the server side. - *

    - * See the package overview for an explanation of the mechanisms implemented for - * event dispatching. - */ -@Deprecated(forRemoval = true) public class ServerEventListenerProxy implements EventListener { - - /** logger */ - private static final Logger log = - LoggerFactory.getLogger(ServerEventListenerProxy.class); - - /** The factory used to convert event iterators to remote events */ - private final RemoteAdapterFactory factory; - - /** - * The unique indentifier of the client-side event listener on whose - * behalf this listener proxy is registered. - */ - private final long listenerId; - - /** - * The queue to which remote events are queue for them to be picked up - * by calls to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager#getNextEvent(long)} - * method. - */ - private final Queue queue; - - /** - * Creates a new instance of this listener proxy. - * - * @param factory The {@link RemoteAdapterFactory} used to convert the - * {@link EventIterator} instances to {@link RemoteEventCollection} objects. - * @param listenerId The unique identifier of the client-side event listener - * on whose behalf this proxy works. - * @param queue The sink to which events to be dispatched to the client are - * queued to be picked up. - */ - public ServerEventListenerProxy(RemoteAdapterFactory factory, - long listenerId, Queue queue) { - this.factory = factory; - this.listenerId = listenerId; - this.queue = queue; - } - - /** - * Converts the {@link javax.jcr.observation.Event} instances in the given - * iterator to an instance of {@link RemoteEventCollection} for them to be dispatched - * to the client-side event listener. - * - * @param events The {@link javax.jcr.observation.Event Events} to be - * dispatched. - */ - public void onEvent(EventIterator events) { - try { - RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events); - queue.put(remoteEvent); - } catch (RemoteException re) { - Throwable t = (re.getCause() == null) ? re : re.getCause(); - log.error("Problem creating remote event for " + listenerId, t); - } - } - - //---------- Object overwrite ---------------------------------------------- - - /** - * Returns the client-side listener identifier as its hash code. - * - * @return hash code - */ - public int hashCode() { - return (int) listenerId; - } - - /** - * Returns true if obj is either the same as this - * or a proxy for the same client-side listener, which is identicated by the - * same listener identifier. - * - * @param obj The object to compare to. - * - * @return true if obj is the same or a proxy for - * the same client-side listener. - */ - public boolean equals(Object obj) { - if (this == obj) { - return true; - } else if (obj instanceof ServerEventListenerProxy) { - return listenerId == ((ServerEventListenerProxy) obj).listenerId; - } else { - return false; - } - } - - /** - * Returns the a string representation of this instance, which is an - * indication of this class's name and the unique identifier of the real - * event listener. - * - * @return string representation - */ - public String toString() { - return "EventListenerProxy: listenerId=" + listenerId; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java deleted file mode 100755 index c78b4f6d8e9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.observation; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java deleted file mode 100644 index 146f1479a63..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A simple array-based remote iterator. Used when the iteration is - * short enough for all the elements to be sent over the network in - * one go. - */ -@Deprecated(forRemoval = true) public class ArrayIterator implements RemoteIterator, Serializable { - - /** - * The elements in this iterator. Set to null when - * all elements have been iterated. - */ - private Object[] elements; - - /** - * The position of this iterator. Set to the size of the iterator - * when all elements have been iterated. - */ - private int position; - - /** - * Creates an array-based remote iterator from the given array - * of remote references or serializable objects. - * - * @param elements elements of the iteration - */ - public ArrayIterator(Object[] elements) { - this.elements = elements; - this.position = 0; - } - - /** - * Returns the size of the iterator. - * - * @return length of the iterator - * @see RemoteIterator#getSize() - */ - public long getSize() { - if (elements == null) { - return position; - } else { - return elements.length; - } - } - - /** - * Skips the first items elements in the array. - * {@inheritDoc} - */ - public void skip(long items) - throws IllegalArgumentException, NoSuchElementException { - if (items < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (elements == null || items > elements.length) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (items == elements.length) { - position = elements.length; - elements = null; - } else { - Object[] tmp = new Object[elements.length - (int) items]; - System.arraycopy(elements, (int) items, tmp, 0, tmp.length); - elements = tmp; - position += items; - } - } - - /** - * Returns the underlying array. - * {@inheritDoc} - */ - public Object[] nextObjects() throws IllegalArgumentException { - if (elements == null) { - return null; - } else { - Object[] tmp = elements; - position += elements.length; - elements = null; - return tmp; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java deleted file mode 100644 index 43d8e7d0082..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A buffered remote iterator. Used to transfer a remote iterator reference - * along with a buffer of the first few iterator elements in one network - * transmission. - */ -@Deprecated(forRemoval = true) public class BufferIterator implements RemoteIterator, Serializable { - - /** The element buffer. Set to null when the iterator ends. */ - private Object[] buffer; - - /** Cached size of the iterator. */ - private final long size; - - /** Remote iterator reference. */ - private final RemoteIterator remote; - - /** - * Creates a new buffered remote iterator. - * - * @param buffer first elements in the iterator - * @param size total iterator size - * @param remote reference to the remaining iterator - */ - public BufferIterator(Object[] buffer, long size, RemoteIterator remote) { - this.buffer = buffer; - this.size = size; - this.remote = remote; - } - - /** - * Returns the cached size of the iterator. - * - * @return iterator size, or -1 if unknown - * @see RemoteIterator#getSize() - */ - public long getSize() { - return size; - } - - /** - * Skips the given number of elements. First discards elements from the - * element buffer and only then contacts the remote iterator. - * - * @param items number of items to skip - * @throws IllegalArgumentException if items is negative - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - * @see RemoteIterator#skip(long) - */ - public void skip(long items) - throws IllegalArgumentException, NoSuchElementException, - RemoteException { - if (items < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (buffer == null && items > 0) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (items > buffer.length) { - remote.skip(items - buffer.length); - buffer = remote.nextObjects(); - } else { - Object[] tmp = new Object[buffer.length - (int) items]; - System.arraycopy(buffer, (int) items, tmp, 0, tmp.length); - buffer = tmp; - } - } - - /** - * Returns the currently buffered elements and fills in the buffer - * with next elements. - * - * @return buffered elements, or null if the iterator has ended - * @throws RemoteException on RMI errors - * @see RemoteIterator#nextObjects() - */ - public Object[] nextObjects() throws RemoteException { - if (buffer == null) { - return null; - } else { - Object[] tmp = buffer; - buffer = remote.nextObjects(); - return tmp; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java deleted file mode 100644 index 0013e31881a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.Map; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The RemoteEventCollection class serves as a container for - * notifications sent to registered event listeners. Instances of this class are - * created by the server-side event listener proxies and sent to the client-side - * event poller. On the client-side the enclosed list of events is then sent to - * the listener identified by the contained listener identifier. - */ -@Deprecated(forRemoval = true) public interface RemoteEventCollection extends Remote { - - /** - * Returns unique identifier of the client-side listener to which the - * enclosed events should be sent. - * - * @return unique listener identifier - * @throws RemoteException on RMI errors - */ - long getListenerId() throws RemoteException; - - /** - * Returns the list of events to be sent to the client-side listener - * identified by {@link #getListenerId()}. - * - * @return list of events - * @throws RemoteException on RMI errors - */ - RemoteEvent[] getEvents() throws RemoteException; - - /** - * The RemoteEvent class provides an encapsulation of single - * events in an event list sent to a registered listener. - */ - public static interface RemoteEvent extends Remote { - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getType() Event.getType()} method. - * - * @return the type of this event. - * @throws RemoteException on RMI errors - */ - int getType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getPath() Event.getPath()} method. - * - * @return the absolute path associated with this event or - * null. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getUserID() Event.getUserID()} method. - * - * @return the user ID. - * @throws RemoteException on RMI errors - */ - String getUserID() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getIdentifier() Event.getIdentifier()} method. - * - * @return the identifier associated with this event or null. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getInfo() Event.getInfo()} method. - * - * @return A Map containing parameter information for instances - * of a NODE_MOVED event. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Map getInfo() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getUserData() Event.getUserData()} method. - * - * @return The user data string. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getUserData() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getDate() Event.getDate()} method. - * - * @return the date when the change was persisted that caused this event. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getDate() throws RepositoryException, RemoteException; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java deleted file mode 100644 index bc459dc06cf..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Item Item} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerItem ServerItem} - * and {@link org.apache.jackrabbit.rmi.client.ClientItem ClientItem} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Item method. The remote object will simply forward - * the method call to the underlying Item instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (Items and Nodes) are returned as remote references - * to the corresponding remote interfaces. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.client.ClientItem - * @see org.apache.jackrabbit.rmi.server.ServerItem - */ -@Deprecated(forRemoval = true) public interface RemoteItem extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Item#getPath() Item.getPath()} method. - * - * @return item path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getName() Item.getName()} method. - * - * @return item name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getName() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getAncestor(int) Item.getAncestor(int)} method. - * - * @param level ancestor level - * @return ancestor item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getAncestor(int level) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getParent() Item.getParent()} method. - * - * @return parent node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getParent() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getDepth() Item.getDepth()} method. - * - * @return item depth - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getDepth() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#isNew() Item.isNew()} method. - * - * @return true if the item is new, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isNew() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#isModified() Item.isModified()} method. - * - * @return true if the item is modified, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isModified() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#save() Item.save()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void save() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#refresh(boolean) Item.refresh(boolean)} method. - * - * @param keepChanges flag to keep transient changes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh(boolean keepChanges) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#remove() Item.remove()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void remove() throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java deleted file mode 100644 index fdfedb991cb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerItemDefinition ServerItemDefinition} and - * {@link org.apache.jackrabbit.rmi.client.ClientItemDefinition ClientItemDefinition} - * adapter base classes to provide transparent RMI access to remote item - * definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding ItemDef method. The remote object will simply forward - * the method call to the underlying ItemDef instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex {@link javax.jcr.nodetype.NodeType NodeType} return values - * are returned as remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.client.ClientItemDefinition - * @see org.apache.jackrabbit.rmi.server.ServerItemDefinition - */ -@Deprecated(forRemoval = true) public interface RemoteItemDefinition extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getDeclaringNodeType() ItemDef.getDeclaringNodeType()} - * method. - * - * @return declaring node type - * @throws RemoteException on RMI errors - */ - RemoteNodeType getDeclaringNodeType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getName() ItemDef.getName()} method. - * - * @return item name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isAutoCreated() ItemDef.isAutoCreate()} - * method. - * - * @return true if the item is automatically created, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isAutoCreated() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isMandatory() ItemDef.isMandatory()} - * method. - * - * @return true if the item is mandatory, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMandatory() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getOnParentVersion() ItemDef.getOnParentVersion()} - * method. - * - * @return parent version behaviour - * @throws RemoteException on RMI errors - */ - int getOnParentVersion() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isProtected() ItemDef.isProtected()} - * method. - * - * @return true if the item is protected, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isProtected() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java deleted file mode 100644 index 42604b88223..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.RangeIterator} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.iterator.ServerIterator} and - * {@link org.apache.jackrabbit.rmi.client.iterator.ClientIterator} classes to - * provide transparent RMI access to remote iterators. - *

    - * This interface allows both the client and server side to control the - * amount of buffering used to increase performance. - */ -@Deprecated(forRemoval = true) public interface RemoteIterator extends Remote { - - /** - * Returns the size of the iteration, or -1 if the - * size is unknown. - * - * @return size of the iteration, or -1 if unknown - * @throws RemoteException on RMI errors - * @see javax.jcr.RangeIterator#getSize() - */ - long getSize() throws RemoteException; - - /** - * Skips the given number of elements in this iteration. - * - * @param items number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - * @see javax.jcr.RangeIterator#skip(long) - */ - void skip(long items) throws NoSuchElementException, RemoteException; - - /** - * Returns an array of remote references to the next elements in this - * iterator. Returns null if the end of this iteration has - * been reached. - *

    - * To reduce the amount of remote method calls, this method returns an - * array of one or more elements in this iteration. - * - * @return array of remote references, or null - * @throws IllegalArgumentException if maxItems is not positive - * @throws RemoteException on RMI errors - * @see java.util.Iterator#next() - */ - Object[] nextObjects() throws IllegalArgumentException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java deleted file mode 100644 index d9ba20e269b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.lock.Lock} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerLock ServerLock} - * and {@link org.apache.jackrabbit.rmi.client.ClientLock ClientLock} - * adapter classes to provide transparent RMI access to remote locks. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Lock method. The remote object will simply forward - * the method call to the underlying Lock instance. Return values and - * possible exceptions are copied over the network. RMI errors are signaled - * with RemoteExceptions. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.client.ClientLock - * @see org.apache.jackrabbit.rmi.server.ServerLock - */ -@Deprecated(forRemoval = true) public interface RemoteLock extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getNode() Lock.getNode()} method. - * - * @return remote node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @since JCR-RMI 2.0 - */ - RemoteNode getNode() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getLockOwner() Lock.getLockOwner()} method. - * - * @return lock owner - * @throws RemoteException on RMI errors - */ - String getLockOwner() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isDeep() Lock.isDeep()} method. - * - * @return true if the lock is deep, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isDeep() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getLockToken() Lock.getLockToken()} method. - * - * @return lock token - * @throws RemoteException on RMI errors - */ - String getLockToken() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isLive() Lock.isLive()} method. - * - * @return true if the lock is live, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isLive() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#refresh() Lock.refresh()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isSessionScoped()} () Lock.isSessionScoped()} method. - * - * @return true if the lock is live, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isSessionScoped() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getSecondsRemaining()} () Lock.getSecondsRemaining()} method. - * - * @return the number of seconds remaining until this lock times out. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getSecondsRemaining() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isLockOwningSession()} () Lock.isLockOwningSession()} method. - * - * @return a boolean. - * @throws RemoteException on RMI errors - */ - boolean isLockOwningSession() throws RemoteException; - - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java deleted file mode 100644 index 894fee12f1f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface RemoteLockManager extends Remote { - - String[] getLockTokens() throws RepositoryException, RemoteException; - - void addLockToken(String lockToken) - throws RepositoryException, RemoteException; - - void removeLockToken(String lockToken) - throws RepositoryException, RemoteException; - - RemoteLock getLock(String absPath) - throws RepositoryException, RemoteException; - - boolean holdsLock(String absPath) - throws RepositoryException, RemoteException; - - boolean isLocked(String absPath) - throws RepositoryException, RemoteException; - - RemoteLock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) - throws RepositoryException, RemoteException; - - void unlock(String absPath) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java deleted file mode 100644 index a241f0cc1ac..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR - * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry ServerNamespaceRegistry} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry ClientNamespaceRegistry} - * adapters to provide transparent RMI access to remote namespace registries. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NamespaceRegistry method. The remote object will - * simply forward the method call to the underlying NamespaceRegistry instance. - * Argument and return values, as well as possible exceptions, are copied - * over the network. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry - * @see org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry - */ -@Deprecated(forRemoval = true) public interface RemoteNamespaceRegistry extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#registerNamespace(String,String) NamespaceRegistry.registerNamespace(String,String)} - * method. - * - * @param prefix namespace prefix - * @param uri namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void registerNamespace(String prefix, String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#unregisterNamespace(String) NamespaceRegistry.unregisterNamespace(String)} - * method. - * - * @param prefix namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void unregisterNamespace(String prefix) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getPrefixes() NamespaceRegistry.getPrefixes()} - * method. - * - * @return namespace prefixes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getPrefixes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getURIs() NamespaceRegistry,getURIs()} - * method. - * - * @return namespace uris - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getURIs() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getURI(String) NamespaceRegistry.getURI(String)} - * method. - * - * @param prefix namespace prefix - * @return namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getURI(String prefix) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getPrefix(String) NamespaceRegistry.getPrefix(String)} - * method. - * - * @param uri namespace uri - * @return namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPrefix(String uri) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java deleted file mode 100644 index 886cfe2bd41..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java +++ /dev/null @@ -1,745 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Node Node} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} - * and {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} - * adapters to provide transparent RMI access to remote nodes. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Node method. The remote object will simply forward - * the method call to the underlying Node instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (like Nodes and Properties) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - *

    - * Note that only two generic setProperty methods are included in this - * interface. Clients should implement the type-specific setProperty - * methods by wrapping the argument values into generic Value objects - * and calling the generic setProperty methods. Note also that the - * Value objects must be serializable and implemented using classes - * available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy these requirements. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.client.ClientNode - * @see org.apache.jackrabbit.rmi.server.ServerNode - */ -@Deprecated(forRemoval = true) public interface RemoteNode extends RemoteItem { - - /** - * Remote version of the - * {@link javax.jcr.Node#addNode(String) Node.addNode(Sring)} method. - * - * @param path relative path - * @return new node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode addNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#addNode(String,String) Node.addNode(String,String)} - * method. - * - * @param path relative path - * @param type node type name - * @return new node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode addNode(String path, String type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperty(String) Node.getProperty(String)} - * method. - * - * @param path relative path - * @return node property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties() Node.getProperties()} method. - * - * @return node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties(String) Node.getProperties(String)} - * method. - * - * @param pattern property name pattern - * @return matching node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties(String pattern) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties(String[]) Node.getProperties(String[])} - * method. - * - * @param globs property name globs - * @return matching node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties(String[] globs) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getPrimaryItem() Node.getPrimaryItem()} method. - * - * @return primary item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getPrimaryItem() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getIdentifier() Node.getIdentifier()} method. - * - * @return node identifier - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getUUID() Node.getUUID()} method. - * - * @return node uuid - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getUUID() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getReferences() Node.getReferences()} method. - * - * @return reference properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getReferences() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getReferences(String) Node.getReferences(String)} method. - * - * @param name reference property name - * @return reference properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getReferences(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes() Node.getNodes()} method. - * - * @return child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes(String) Node.getNodes(String)} method. - * - * @param pattern node name pattern - * @return matching child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes(String pattern) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes(String[]) Node.getNodes(String[])} method. - * - * @param globs node name globs - * @return matching child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes(String[] globs) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasNode(String) Node.hasNode(String)} method. - * - * @param path relative path - * @return true if the identified node exists, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasProperty(String) Node.hasProperty()} method. - * - * @param path relative path - * @return true if the identified property exists, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasProperty(String path) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasNodes() Node.hasNodes()} method. - * - * @return true if this node has child nodes, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasProperties() Node.hasProperties()} method. - * - * @return true if this node has properties, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasProperties() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getPrimaryNodeType() Node.getPrimaryNodeType()} - * method. - * - * @return primary node type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType getPrimaryNodeType() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getMixinNodeTypes() Node.getMixinNodeTypes()} - * method. - * - * @return mixin node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getMixinNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isNodeType(String) Node.isNodeType(String)} method. - * - * @param type node type name - * @return true if this node is an instance of the - * identified type, false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isNodeType(String type) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNode(String) Node.getNode(String)} method. - * - * @param path relative path - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#orderBefore(String,String) Node.orderBefore(String,String)} - * method. - * - * @param src source path - * @param dst destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void orderBefore(String src, String dst) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value) Node.setProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value value) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value,int) Node.setProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @param type property type - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value value, int type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value[]) Node.setProperty(String,Value[])} - * method. - * - * @param name property name - * @param values property values - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value[] values) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#addMixin(String) Node.addMixin(String)} method. - * - * @param name mixin type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void addMixin(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeMixin(String) Node.removeMixin(String)} - * method. - * - * @param name mixin type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeMixin(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#canAddMixin(String) Node.canAddMixin(String)} - * method. - * - * @param name mixin type name - * @return true if the mixin type can be added, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean canAddMixin(String name) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getDefinition() Node.getDefinition()} method. - * - * @return node definition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition getDefinition() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#checkin() Node.checkin()} method. - * - * @return checked in version - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkin() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#checkout() Node.checkout()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void checkout() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#update(String) Node.update(String)} method. - * - * @param workspace source workspace name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void update(String workspace) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#merge(String,boolean) Node.merge(String,boolean)} - * method. - * - * @param workspace source workspace name - * @param bestEffort best effort flag - * @return nodes that failed to merge - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator merge(String workspace, boolean bestEffort) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#cancelMerge(javax.jcr.version.Version) Node.cancelMerge(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void cancelMerge(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#doneMerge(javax.jcr.version.Version) Node.doneMerge(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void doneMerge(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getCorrespondingNodePath(String) Node.getCorrespondingNodePath(String)} - * method. - * - * @param workspace workspace name - * @return corresponding node path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getCorrespondingNodePath(String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getIndex() Node.getIndex()} method. - * - * @return node index - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getIndex() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(String,boolean) Node.restore(String,boolean)} - * method. - * - * @param version version name - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restore(String version, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(javax.jcr.version.Version, boolean) Node.restore(Version,boolean)} - * method. - *

    - * This method has been rename to prevent a naming clash with - * {@link #restore(String, boolean)}. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restoreByUUID(String versionUUID, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(javax.jcr.version.Version, String, boolean) Node.restore(Version,String,boolean)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param path the path to which the version is to be restored - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restore(String versionUUID, String path, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restoreByLabel(String,boolean) Node.restoreByLabel(String,boolean)} - * method. - * - * @param label version label - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#unlock() Node.unlock()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void unlock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#holdsLock() Node.holdsLock()} method. - * - * @return true if this node holds a lock, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean holdsLock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isLocked() Node.isLocked()} method. - * - * @return true if this node is locked, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isLocked() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isCheckedOut() Node.isCheckedOut()} method. - * - * @return true if this node is checked out, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isCheckedOut() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getVersionHistory() Node.getVersionHistory()} method. - * - * @return the remote version history. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getVersionHistory() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getBaseVersion() Node.getBaseVersion()} method. - * - * @return the remote base version - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion getBaseVersion() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value[],int) Node.setProperty(String,Value[],int)} - * method. - * - * @param name property name - * @param values property values - * @param type property type - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value[] values, int type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#lock(boolean,boolean) Node.lock(boolean,boolean)} - * method. - * - * @param isDeep flag to create a deep lock - * @param isSessionScoped flag to create a session-scoped lock - * @return lock - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteLock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getLock() Node.getLock()} method. - * - * @return lock - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteLock getLock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getSharedSet() Node.getSharedSet()} method. - * - * @return a NodeIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getSharedSet() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#followLifecycleTransition(String) Node.followLifecycleTransition(String)} - * method. - * - * @param transition a state transition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void followLifecycleTransition(String transition) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getAllowedLifecycleTransistions() Node.getAllowedLifecycleTransistions()} - * method. - * - * @return a String array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getAllowedLifecycleTransistions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getWeakReferences() Node.getWeakReferences()} - * method. - * - * @return A PropertyIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getWeakReferences() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getWeakReferences(String) Node.getWeakReferences(String)} - * method. - * - * @param name name of referring WEAKREFERENCE properties to be - * returned; if null then all referring - * WEAKREFERENCEs are returned. - * @return A PropertyIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getWeakReferences(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeShare() Node.removeShare()} - * method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeShare() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeSharedSet() Node.removeSharedSet()} - * method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeSharedSet() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setPrimaryType(String) Node.setPrimaryType(String)} - * method. - * - * @param nodeTypeName the node type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setPrimaryType(String nodeTypeName) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java deleted file mode 100644 index 49c9ce9497a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} - * adapters to provide transparent RMI access to remote node definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeDef method. The remote object will simply forward - * the method call to the underlying NodeDef instance. Return values - * and possible exceptions are copied over the network. Complex - * {@link javax.jcr.nodetype.NodeType NodeType} return values - * are returned as remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.client.ClientNodeDefinition - * @see org.apache.jackrabbit.rmi.server.ServerNodeDefinition - */ -@Deprecated(forRemoval = true) public interface RemoteNodeDefinition extends RemoteItemDefinition { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypes() NodeDef.getRequiredPrimaryTypes()} - * method. - * - * @return required primary node types - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryType() NodeDef.getDefaultPrimaryType()} - * method. - * - * @return default primary node type - * @throws RemoteException on RMI errors - */ - RemoteNodeType getDefaultPrimaryType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#allowsSameNameSiblings() NodeDef.allowSameNameSibs()} - * method. - * - * @return true if same name siblings are allowed, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean allowsSameNameSiblings() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryTypeName() NodeDef.getDefaultPrimaryTypeName()} - * method. - * - * @return a String - * @throws RemoteException on RMI errors - */ - String getDefaultPrimaryTypeName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypeNames() NodeDef.getRequiredPrimaryTypeNames()} - * method. - * - * @return a String array - * @throws RemoteException on RMI errors - */ - String[] getRequiredPrimaryTypeNames() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java deleted file mode 100644 index 08240e1e494..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.NodeType NodeType} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeType ServerNodeType} and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeType ClientNodeType} - * adapters to provide transparent RMI access to remote node types. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeType method. The remote object will simply forward - * the method call to the underlying NodeType instance. Return values - * and possible exceptions are copied over the network. Complex return - * values (like NodeTypes and PropertyDefs) are returned as remote - * references to the corresponding remote interfaces. RMI errors are - * signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.client.ClientNodeType - * @see org.apache.jackrabbit.rmi.server.ServerNodeType - */ -@Deprecated(forRemoval = true) public interface RemoteNodeType extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getName() NodeType.getName()} method. - * - * @return node type name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isMixin() NodeType.isMixin()} method. - * - * @return true if this is a mixin type, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMixin() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isAbstract() NodeType.isAbstract()} method. - * - * @return true if this is an abstract type, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isAbstract() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#hasOrderableChildNodes() NodeType.hasOrderableChildNodes()} - * method. - * - * @return true if nodes of this type has orderable - * child nodes, false otherwise - * @throws RemoteException on RMI errors - */ - boolean hasOrderableChildNodes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getSupertypes() NodeType.getSupertypes()} - * method. - * - * @return supertypes - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getSupertypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypes() NodeType.getDeclaredSupertypes()} - * method. - * - * @return declared supertypes - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getDeclaredSupertypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isNodeType(String) NodeType.isNodeType(String)} - * method. - * - * @param type node type name - * @return true if this node type is or extends the - * given node type, false otherwise - * @throws RemoteException on RMI errors - */ - boolean isNodeType(String type) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getPropertyDefinitions() NodeType.getPropertyDefinitions()} - * method. - * - * @return property definitions - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition[] getPropertyDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredPropertyDefinitions() NodeType.getDeclaredPropertyDefinitions()} - * method. - * - * @return declared property definitions - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition[] getDeclaredPropertyDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getChildNodeDefinitions() NodeType.getChildNodeDefinitions()} - * method. - * - * @return child node definitions - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredChildNodeDefinitions() NodeType.getDeclaredChildNodeDefinitions()} - * method. - * - * @return declared child node definitions - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value) NodeType.canSetProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @return true if the property can be set, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canSetProperty(String name, Value value) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value[]) NodeType.canSetProperty(String,Value[])} - * method. - * - * @param name property name - * @param values property values - * @return true if the property can be set, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canSetProperty(String name, Value[] values) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String) NodeType.canAddChildNode(String)} - * method. - * - * @param name child node name - * @return true if the child node can be added, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canAddChildNode(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String,String) NodeType.canAddChildNode(String,String)} - * method. - * - * @param name child node name - * @param type child node type - * @return true if the child node can be added, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canAddChildNode(String name, String type) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveItem(String) NodeType.canRemoveItem(String)} - * method. - * - * @param name item name - * @return true if the item can be removed, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canRemoveItem(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getPrimaryItemName() NodeType.getPrimaryItemName()} - * method. - * - * @return primary item name - * @throws RemoteException on RMI errors - */ - String getPrimaryItemName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveNode(String) NodeType.canRemoveNode()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean canRemoveNode(String nodeName) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveProperty(String) NodeType.canRemoveProperty()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean canRemoveProperty(String propertyName) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypeNames() NodeType.getDeclaredSupertypeNames()} - * method. - * - * @return a String[] - * @throws RemoteException on RMI errors - */ - String[] getDeclaredSupertypeNames() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isQueryable() NodeType.isQueryable()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isQueryable() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSubtypes() NodeType.getDeclaredSubtypes()} - * method. - * - * @return RemoteIterator - * @throws RemoteException on RMI errors - */ - RemoteIterator getDeclaredSubtypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getSubtypes() NodeType.getSubtypes()} - * method. - * - * @return RemoteIterator - * @throws RemoteException on RMI errors - */ - RemoteIterator getSubtypes() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java deleted file mode 100644 index ba74f0981e3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR - * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeTypeManager ServerNodeTypeManager} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeTypeManager ClientNodeTypeManager} - * adapters to provide transparent RMI access to remote node type managers. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeTypeManager method. The remote object will - * simply forward the method call to the underlying NodeTypeManager instance. - * Arguments and possible exceptions are copied over the network. Complex - * {@link javax.jcr.nodetype.NodeType NodeType} values are returned as - * remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. Iterator values are transmitted as object arrays. RMI errors - * are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.client.ClientNodeTypeManager - * @see org.apache.jackrabbit.rmi.server.ServerNodeTypeManager - */ -@Deprecated(forRemoval = true) public interface RemoteNodeTypeManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getNodeType(String) NodeTypeManager.getNodeType(String)} - * method. - * - * @param name node type name - * @return node type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType getNodeType(String name) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes() NodeTypeManager.getAllNodeTypes()} - * method. - * - * @return all node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes() NodeTypeManager.getPrimaryNodeTypes()} - * method. - * - * @return primary node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getPrimaryNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes() NodeTypeManager.getMixinNodeTypes()} - * method. - * - * @return mixin node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getMixinNodeTypes() - throws RepositoryException, RemoteException; - - boolean hasNodeType(String name) - throws RepositoryException, RemoteException; - - void unregisterNodeTypes(String[] names) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java deleted file mode 100644 index 3bab8ecdb67..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.observation.ObservationManager ObservationManager} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerObservationManager ServerObservationManager} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager ClientObservationManager} - * adapter base classes to provide transparent RMI access to remote observation - * managers. - *

    - * See the observation - * package comment for a description on how event listener registration and - * notification is implemented. - * - * @see javax.jcr.observation.ObservationManager - * @see org.apache.jackrabbit.rmi.client.ClientObservationManager - * @see org.apache.jackrabbit.rmi.server.ServerObservationManager - */ -@Deprecated(forRemoval = true) public interface RemoteObservationManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.observation.ObservationManager#addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean) ObservationManager.addEventListener()} - * method. See class comment for an explanation on how the - * listenerId is used. - * - * @param listenerId The identification of the listener on the client - * side to which events will be directed. - * @param eventTypes The mask of event types to be sent to this listener. - * @param absPath The root item defining a subtree for which events are to - * be delivered. - * @param isDeep true if the events from the complete subtree - * rooted at absPath are to be sent or only for the item - * at the given path. - * @param uuid An optional list of node UUIDs for which events are to be - * sent. If null this parameter is ignored. - * @param nodeTypeName An optional list of node type names for which events - * are to be sent. If null this parameter is ignored. - * @param noLocal true if only events are to be sent which do - * not originate from the session to which this instance belongs. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void addEventListener(long listenerId, int eventTypes, - String absPath, boolean isDeep, String[] uuid, - String[] nodeTypeName, boolean noLocal) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.ObservationManager#removeEventListener(javax.jcr.observation.EventListener) ObservationManager.removeEventListener()} - * method. See class comment for an explanation on how the - * listenerId is used. - * - * @param listenerId The identification of the listener on the client - * side to which events will be directed. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeEventListener(long listenerId) - throws RepositoryException, RemoteException; - - /** - * Returns the next event to be dispatched to registered event listeners. If - * no event is available, this method blocks until one is available or until - * the given timeout expires. - * - * @param timeout The time in milliseconds to wait for the next event - * available to be dispatched. If negative or zero, this method waits - * for ever. - * - * @return The {@link RemoteEventCollection} to be dispatched. null is - * returned if the method timed out waiting for an event to be - * dispatched. - * - * @throws RemoteException on RMI errors - */ - RemoteEventCollection getNextEvent(long timeout) - throws RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java deleted file mode 100644 index 6b61f89a517..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Property Property} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} - * and {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} - * adapters to provide transparent RMI access to remote properties. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Property method. The remote object will simply forward - * the method call to the underlying Property instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} return values - * are returned as remote references to the corresponding - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. RMI errors are signaled with RemoteExceptions. - *

    - * Note that only the generic getValue and setValue methods are included - * in this interface. Clients should implement the type-specific value - * getters and setters wrapping using the generic methods. Note also that the - * Value objects must be serializable and implemented using classes - * available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy these requirements. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.client.ClientProperty - * @see org.apache.jackrabbit.rmi.server.ServerProperty - */ -@Deprecated(forRemoval = true) public interface RemoteProperty extends RemoteItem { - - /** - * Remote version of the - * {@link javax.jcr.Property#getValue() Property.getValue()} method. - * - * @return property value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value getValue() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getValues() Property.getValues()} method. - * - * @return property values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value[] getValues() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#setValue(Value) Property.setValue(Value)} - * method. - * - * @param value property value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setValue(Value value) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#setValue(Value[]) Property.setValue(Value[])} - * method. - * - * @param values property values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setValue(Value[] values) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getLength() Property.getLength()} - * method. - * - * @return value length - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getLength() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getLengths() Property.getLengths()} - * method. - * - * @return value lengths - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long[] getLengths() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getDefinition() Property.getDefinition()} - * method. - * - * @return property definition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition getDefinition() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getType() Property.getType()} method. - * - * @return property type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getType() throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java deleted file mode 100644 index 7c0ffc78fd6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} - * adapters to provide transparent RMI access to remote property definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding PropertyDef method. The remote object will simply - * forward the method call to the underlying PropertyDef instance. Return - * values and possible exceptions are copied over the network. RMI errors - * are signaled with RemoteExceptions. - *

    - * Note that the returned Value objects must be serializable and implemented - * using classes available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy this requirement. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.client.ClientPropertyDefinition - * @see org.apache.jackrabbit.rmi.server.ServerPropertyDefinition - */ -@Deprecated(forRemoval = true) public interface RemotePropertyDefinition extends RemoteItemDefinition { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getRequiredType() PropertyDefinition.getRequiredType()} - * method. - * - * @return required type - * @throws RemoteException on RMI errors - */ - int getRequiredType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getValueConstraints() PropertyDefinition.getValueConstraints()} - * method. - * - * @return value constraints - * @throws RemoteException on RMI errors - */ - String[] getValueConstraints() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getDefaultValues() PropertyDefinition.getDefaultValues()} - * method. - * - * @return default values - * @throws RemoteException on RMI errors - */ - Value[] getDefaultValues() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isMultiple() PropertyDefinition.isMultiple()} - * method. - * - * @return true if the property is multi-valued, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMultiple() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getAvailableQueryOperators() PropertyDefinition.getAvailableQueryOperators()} - * method. - * - * @return a String[] - * @throws RemoteException on RMI errors - */ - String[] getAvailableQueryOperators() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isFullTextSearchable() PropertyDefinition.isFullTextSearchable()} - * method. - * - * @return a boolean - * @throws RemoteException on RMI errors - */ - boolean isFullTextSearchable() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isQueryOrderable() PropertyDefinition.isQueryOrderable()} - * method. - * - * @return a boolean - * @throws RemoteException on RMI errors - */ - boolean isQueryOrderable() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java deleted file mode 100644 index 638700400d3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.Query Query} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQuery ServerQuery} - * and {@link org.apache.jackrabbit.rmi.client.ClientQuery ClientQuery} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.Query - * @see org.apache.jackrabbit.rmi.client.ClientQuery - * @see org.apache.jackrabbit.rmi.server.ServerQuery - */ -@Deprecated(forRemoval = true) public interface RemoteQuery extends Remote { - - /** - * @see javax.jcr.query.Query#execute() - * - * @return a QueryResult - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQueryResult execute() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#setLimit(long) - * - * @param limit a long - * @throws RemoteException on RMI errors - */ - void setLimit(long limit) throws RemoteException; - - /** - * @see javax.jcr.query.Query#setOffset(long) - * - * @param offset a long - * @throws RemoteException on RMI errors - */ - void setOffset(long offset) throws RemoteException; - - /** - * @see javax.jcr.query.Query#getStatement() - * - * @return the query statement. - * @throws RemoteException on RMI errors - */ - String getStatement() throws RemoteException; - - /** - * @see javax.jcr.query.Query#getLanguage() - * - * @return the query language. - * @throws RemoteException on RMI errors - */ - String getLanguage() throws RemoteException; - - /** - * @see javax.jcr.query.Query#getStoredQueryPath() - * - * @return path of the node representing this query. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getStoredQueryPath() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#storeAsNode(String) - * - * @param absPath path at which to persist this query. - * @return stored node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode storeAsNode(String absPath) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#bindValue(String, Value) - * - * @param varName name of variable in query - * @param value value to bind - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void bindValue(String varName, Value value) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#getBindVariableNames() - * - * @return the names of the bind variables in this query. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - public String[] getBindVariableNames() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java deleted file mode 100644 index fd4e25fdaff..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.query.Query; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.QueryManager QueryManager} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryManager ServerQueryManager} - * and {@link org.apache.jackrabbit.rmi.client.ClientQueryManager ClientQueryManager} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.QueryManager - * @see org.apache.jackrabbit.rmi.client.ClientQueryManager - * @see org.apache.jackrabbit.rmi.server.ServerQueryManager - */ -@Deprecated(forRemoval = true) public interface RemoteQueryManager extends Remote { - - /** - * @see javax.jcr.query.QueryManager#createQuery - * - * @param statement query statement - * @param language query language - * @return query - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQuery createQuery(String statement, String language) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryManager#getQuery - * - * @param absPath node path of a persisted query (that is, a node of type nt:query). - * @return a Query object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQuery getQuery(String absPath) - throws RepositoryException, RemoteException; - - /** - * See {@link Query}. - * - * @see javax.jcr.query.QueryManager#getSupportedQueryLanguages - * @return An string array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getSupportedQueryLanguages() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java deleted file mode 100644 index 84bff566655..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryResult ServerQueryResult} - * and {@link org.apache.jackrabbit.rmi.client.ClientQueryResult ClientQueryResult} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.QueryResult - * @see org.apache.jackrabbit.rmi.client.ClientQueryResult - * @see org.apache.jackrabbit.rmi.server.ServerQueryResult - */ -@Deprecated(forRemoval = true) public interface RemoteQueryResult extends Remote { - /** - * @see javax.jcr.query.QueryResult#getColumnNames() - * - * @return a PropertyIterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getColumnNames() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getRows() - * - * @return a RowIterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getRows() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getNodes() - * - * @return a remote node iterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getSelectorNames() - * - * @return a String array holding the selector names. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - public String[] getSelectorNames() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java deleted file mode 100644 index f1189b628ea..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Repository Repository} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerRepository ServerRepository} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientRepository ClientRepository} - * adapters to provide transparent RMI access to remote repositories. -*

    - * The methods in this interface are documented only with a reference - * to a corresponding Repository method. The remote object will simply - * forward the method call to the underlying Repository instance. - * {@link javax.jcr.Session Session} objects are returned as remote references - * to the {@link RemoteSession RemoteSession} interface. Simple return - * values and possible exceptions are copied over the network to the client. - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.client.ClientRepository - * @see org.apache.jackrabbit.rmi.server.ServerRepository - */ -@Deprecated(forRemoval = true) public interface RemoteRepository extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptor(String) Repository.getDescriptor(String)} - * method. - * - * @param key descriptor key - * @return descriptor value - * @throws RemoteException on RMI errors - */ - String getDescriptor(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorKeys() Repository.getDescriptorKeys()} - * method. - * - * @return descriptor keys - * @throws RemoteException on RMI errors - */ - String[] getDescriptorKeys() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login() Repository.login(}} method. - * - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(String) Repository.login(String}} - * method. - * - * @param workspace workspace name - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(Credentials) Repository.login(Credentials}} - * method. - * - * @param credentials client credentials - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(Credentials credentials) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(Credentials,String) Repository.login(Credentials,String}} - * method. - * - * @param credentials client credentials - * @param workspace workspace name - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(Credentials credentials, String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorValue(String) Repository.getDescriptorValue(String)} - * method. - * - * @return descriptor value - * @throws RemoteException on RMI errors - */ - Value getDescriptorValue(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorValues(String) Repository.getDescriptorValues(String)} - * method. - * - * @return descriptor value array - * @throws RemoteException on RMI errors - */ - Value[] getDescriptorValues(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#isSingleValueDescriptor(String) Repository.isSingleValueDescriptor(String)} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isSingleValueDescriptor(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#isStandardDescriptor(String) Repository.isStandardDescriptor(String)} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isStandardDescriptor(String key) throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java deleted file mode 100644 index ae9419b54a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.Row Row} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerRow ServerRow} - * and {@link org.apache.jackrabbit.rmi.client.ClientRow ClientRow} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.Row - * @see org.apache.jackrabbit.rmi.client.ClientRow - * @see org.apache.jackrabbit.rmi.server.ServerRow - */ -@Deprecated(forRemoval = true) public interface RemoteRow extends Remote { - - /** - * @see javax.jcr.query.Row#getValues() - * - * @return row values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value[] getValues() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getValue(String) - * - * @param propertyName property name - * @return identified value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value getValue(String propertyName) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getNode() - * - * @return a node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getNode(String) - * - * @param selectorName - * @return a node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String selectorName) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getPath() - * - * @return the path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getPath(String) - * - * @param selectorName - * @return the path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath(String selectorName) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getScore() - * - * @return the score - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - double getScore() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getScore(String) - * - * @param selectorName - * @return the score - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - double getScore(String selectorName) throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java deleted file mode 100644 index 6ac8f47908d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.IOException; -import java.rmi.Remote; -import java.rmi.RemoteException; -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; - -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Session Session} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerSession ServerSession} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientSession ClientSession} - * adapters to provide transparent RMI access to remote sessions. - *

    - * Most of the methods in this interface are documented only with a reference - * to a corresponding Session method. In these cases the remote object - * will simply forward the method call to the underlying Session instance. - * Complex return values like workspaces and other objects are returned - * as remote references to the corresponding remote interface. Simple - * return values and possible exceptions are simply copied over the network - * to the client. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.client.ClientSession - * @see org.apache.jackrabbit.rmi.server.ServerSession - */ -@Deprecated(forRemoval = true) public interface RemoteSession extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Session#getUserID() Session.getUserID()} method. - * - * @return user id - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#getUserID() - */ - String getUserID() throws RemoteException; - - /** - * Returns the named attribute. Note that only serializable - * attribute values can be transmitted over the network and that - * the client should have (or be able to fetch) the object class - * to access the returned value. Failures to meet these conditions - * are signalled with RemoteExceptions. - * - * @param name attribute name - * @return attribute value - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#getAttribute(java.lang.String) - */ - Object getAttribute(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getAttributeNames() Session.getAttributeNames()} - * method. - * - * @return attribute names - * @throws RemoteException on RMI errors - */ - String[] getAttributeNames() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getWorkspace() Session.getWorkspace()} method. - * - * @return workspace - * @see javax.jcr.Session#getWorkspace() - * @throws RemoteException on RMI errors - */ - RemoteWorkspace getWorkspace() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#impersonate(Credentials) Session.impersonate(Credentials)} - * method. - * - * @param credentials credentials for the new session - * @return new session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession impersonate(Credentials credentials) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNodeByIdentifier(String) Session.getNodeByIdentifier(String)} - * method. - * - * @param id node identifier - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNodeByIdentifier(String id) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNodeByUUID(String) Session.getNodeByUUID(String)} - * method. - * - * @param uuid node uuid - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNodeByUUID(String uuid) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getItem(String) Session.getItem(String)} - * method. - * - * @param path item path - * @return item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getItem(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNode(String) Session.getNode(String)} - * method. - * - * @param path node path - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getProperty(String) Session.getProperty(String)} - * method. - * - * @param path property path - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty getProperty(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#itemExists(String) Session.itemExists(String)} - * method. - * - * @param path item path - * @return true if the item exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean itemExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#nodeExists(String) Session.nodeExists(String)} - * method. - * - * @param path node path - * @return true if the node exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean nodeExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#propertyExists(String) Session.propertyExists(String)} - * method. - * - * @param path property path - * @return true if the property exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean propertyExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#removeItem(String) Session.removeItem(String)} - * method. - * - * @param path item path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeItem(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#move(String,String) Session.move(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void move(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#save() Session.save()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void save() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#refresh(boolean) Session.refresh(boolean)} - * method. - * - * @param keepChanges flag to keep transient changes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh(boolean keepChanges) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#logout() Session.logout()} - * method. - * - * @throws RemoteException on RMI errors - */ - void logout() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#isLive() Session.isLive()} - * method. - * - * @return true if the session is live, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isLive() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getRootNode() Session.getRootNode()} method. - * - * @return root node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getRootNode() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#hasPendingChanges() Session.hasPendingChanges()} - * method. - * - * @return true if the session has pending changes, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasPendingChanges() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#hasPermission(String,String) Session.hasPermission(String,String)} - * method. - * - * @param path item path - * @param actions actions - * @return true if permission is granted, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasPermission(String path, String actions) - throws RepositoryException, RemoteException; - - /** - * Imports the system or document view XML data into a subtree of - * the identified node. Note that the entire XML stream is transferred - * as a single byte array over the network. This may cause problems with - * large XML streams. The remote server will wrap the XML data into - * a {@link java.io.ByteArrayInputStream ByteArrayInputStream} and feed - * it to the normal importXML method. - * - * @param path node path - * @param xml imported XML document - * @param uuidBehaviour UUID handling mode - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#importXML(java.lang.String, java.io.InputStream, int) - */ - void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#setNamespacePrefix(String,String) Session.setNamespacePrefix(String,String)} - * method. - * - * @param prefix namespace prefix - * @param uri namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setNamespacePrefix(String prefix, String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespacePrefixes() Session.getNamespacePrefixes()} - * method. - * - * @return namespace prefixes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getNamespacePrefixes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespaceURI(String) Session.getNamespaceURI(String)} - * method. - * - * @param prefix namespace prefix - * @return namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getNamespaceURI(String prefix) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespacePrefix(String) Session.getNamespacePrefix(String)} - * method. - * - * @param uri namespace uri - * @return namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getNamespacePrefix(String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#addLockToken(String) Session.addLockToken(String)} - * method. - * - * @param name lock token - * @throws RemoteException on RMI errors - */ - void addLockToken(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getLockTokens() Session.getLockTokens()} - * method. - * - * @return lock tokens - * @throws RemoteException on RMI errors - */ - String[] getLockTokens() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#removeLockToken(String) Session.removeLockToken(String)} - * method. - * - * @param name lock token - * @throws RemoteException on RMI errors - */ - void removeLockToken(String name) throws RemoteException; - - /** - * Exports the identified repository subtree as a system view XML - * stream. Note that the entire XML stream is transferred as a - * single byte array over the network. This may cause problems with - * large exports. The remote server uses a - * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture - * the XML data written by the normal exportSysView method. - * - * @param path node path - * @param skipBinary binary skip flag - * @param noRecurse no recursion flag - * @return exported XML document - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#exportSystemView - */ - byte[] exportSystemView(String path, boolean skipBinary, boolean noRecurse) - throws IOException, RepositoryException, RemoteException; - - /** - * Exports the identified repository subtree as a document view XML - * stream. Note that the entire XML stream is transferred as a - * single byte array over the network. This may cause problems with - * large exports. The remote server uses a - * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture - * the XML data written by the normal exportDocView method. - * - * @param path node path - * @param skipBinary skip binary flag - * @param noRecurse no recursion flag - * @return exported XML document - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#exportDocumentView - */ - byte[] exportDocumentView(String path, boolean skipBinary, boolean noRecurse) - throws IOException, RepositoryException, RemoteException; - - /** - * Remote version of the {@link javax.jcr.Session#getAccessControlManager() - * Session.getAccessControlManager()} method. - * - * @throws UnsupportedRepositoryOperationException if the remote session - * does not support this method - * @throws RepositoryException if an error occurred getting the access - * control manager - * @throws RemoteException on RMI errors - */ - RemoteAccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, - RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java deleted file mode 100644 index b0ccc6eb11b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.version.Version Version} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerVersion ServerVersion} - * and {@link org.apache.jackrabbit.rmi.client.ClientVersion ClientVersion} - * adapters to provide transparent RMI access to remote versions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Version method. The remote object will simply forward - * the method call to the underlying Version instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (like Versions) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.client.ClientVersion - * @see org.apache.jackrabbit.rmi.server.ServerVersion - */ -@Deprecated(forRemoval = true) public interface RemoteVersion extends RemoteNode { - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getContainingHistory() Version.getContainingHistory()} method. - * - * @return a RemoteVersionHistory object. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getCreated() Version.getCreated()} method. - * - * @return a Calendar object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Calendar getCreated() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getLinearSuccessor() Version.getLinearSuccessor()} method. - * - * @return a RemoteVersion or null if no linear - * successor exists. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see RemoteVersionHistory#getAllLinearVersions - */ - RemoteVersion getLinearSuccessor() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getSuccessors() Version.getSuccessors()} method. - * - * @return a RemoteVersion array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getLinearPredecessor() Version.getLinearPredecessor()} method. - * - * @return a RemoteVersion or null if no linear - * predecessor exists. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see RemoteVersionHistory#getAllLinearVersions - */ - RemoteVersion getLinearPredecessor() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getPredecessors() Version.getPredecessors()} method. - * - * @return a RemoteVersion array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getFrozenNode() Version.getFrozenNode()} method. - * - * @return a RemoteNode object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getFrozenNode() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java deleted file mode 100644 index 21ee15fd0db..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JC - * {@link javax.jcr.version.VersionHistory VersionHistory} interface. Used by - * the - * {@link org.apache.jackrabbit.rmi.server.ServerVersionHistory ServerVersionHistory} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientVersionHistory ClientVersionHistory} - * adapters to provide transparent RMI access to remote version histories. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding VersionHistory method. The remote object will simply - * forward the method call to the underlying VersionHistory instance. Argument - * and return values, as well as possible exceptions, are copied over the - * network. Complex return values (like Versions) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.client.ClientVersionHistory - * @see org.apache.jackrabbit.rmi.server.ServerVersionHistory - */ -@Deprecated(forRemoval = true) public interface RemoteVersionHistory extends RemoteNode { - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionableUUID()} VersionHistory.getVersionableUUID()} - * method. - * - * @return the uuid of the versionable node - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be - * used instead. - */ - String getVersionableUUID() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionableIdentifier()} VersionHistory.getVersionableIdentifier()} - * method. - * - * @return the identifier of the versionable node - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - String getVersionableIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getRootVersion() VersionHistory.getRootVersion()} - * method. - * - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getRootVersion() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllLinearVersions() VersionHistory.getAllLinearVersions()} - * method. - * - * @return linear remote versions - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllLinearVersions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllVersions() VersionHistory.getAllVersions()} - * method. - * - * @return remote versions - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllVersions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllLinearFrozenNodes() VersionHistory.getAllLinearFrozenNodes()} - * method. - * - * @return linear remote frozen nodes - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllFrozenNodes() VersionHistory.getAllFrozenNodes()} - * method. - * - * @return remote frozen nodes - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllFrozenNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersion(String) VersionHistory.getVersion(String)} - * method. - * - * @param versionName a version name - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getVersion(String versionName) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionByLabel(String) VersionHistory.getVersionByLabel(String)} - * method. - * - * @param label a version label - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getVersionByLabel(String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#addVersionLabel(String, String, boolean) - * VersionHistory.addVersionLabel(String, String, boolean)} - * method. - * - * @param versionName the name of the version to which the label is to be added. - * @param label the label to be added. - * @param moveLabel if true, then if label is already assigned to a version in - * this version history, it is moved to the new version specified; if false, then attempting - * to assign an already used label will throw a VersionException. - * - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void addVersionLabel(String versionName, String label, boolean moveLabel) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#removeVersionLabel(String) VersionHistory.removeVersionLabel(String)} - * method. - * - * @param label a version label - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void removeVersionLabel(String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#hasVersionLabel(String) VersionHistory.hasVersionLabel(String)} - * method. - * - * @param label a version label - * @return a boolean - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasVersionLabel(String label) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#hasVersionLabel(javax.jcr.version.Version, String) hasVersionLabel(Version, String)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param label a version label - * @return a boolean. - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - boolean hasVersionLabel(String versionUUID, String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionLabels() VersionHistory.getVersionLabels()} - * method. - * - * @return a String array containing all the labels of the version history - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getVersionLabels() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionLabels(javax.jcr.version.Version) VersionHistory.getVersionLabels(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @return a String array containing all the labels of the given version - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - String[] getVersionLabels(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#removeVersion(String) VersionHistory.removeVersion(String)} - * method. - * - * @param versionName the name of a version in this version history. - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void removeVersion(String versionName) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java deleted file mode 100644 index 232476319a6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface RemoteVersionManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkin(String) VersionManager.checkin(String)} - * method. - * - * @param absPath an absolute path. - * @return the created version. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkin(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkout(String) VersionManager.checkout(String)} - * method. - * - * @param absPath an absolute path. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void checkout(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkpoint(String) VersionManager.checkpoint(String)} - * method. - * - * @param absPath an absolute path. - * @return the created version. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkpoint(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#isCheckedOut(String) VersionManager.isCheckedOut(String)} - * method. - * - * @param absPath an absolute path. - * @return a boolean - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isCheckedOut(String absPath) throws RepositoryException, RemoteException; - - RemoteVersionHistory getVersionHistory(String absPath) throws RepositoryException, RemoteException; - - RemoteVersion getBaseVersion(String absPath) throws RepositoryException, RemoteException; - - void restore(String[] versionIdentifiers, boolean removeExisting) throws RepositoryException, RemoteException; - - void restore(String absPath, String versionName, boolean removeExisting) throws RepositoryException, RemoteException; - - void restore(String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; - - void restoreVI(String absPath, String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; - - void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws RepositoryException, RemoteException; - - RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException, RemoteException; - - RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort, boolean isShallow) - throws RepositoryException, RemoteException; - - void doneMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; - - void cancelMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; - - RemoteNode createConfiguration(String absPath) throws RepositoryException, RemoteException; - - RemoteNode setActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; - - RemoteNode getActivity() throws RepositoryException, RemoteException; - - RemoteNode createActivity(String title) throws RepositoryException, RemoteException; - - void removeActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; - - RemoteIterator merge(String activityNodeIdentifier) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java deleted file mode 100644 index 82b8a66bb4b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.IOException; -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Workspace Workspace} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerWorkspace ServerWorkspace} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientWorkspace ClientWorkspace} - * adapters to provide transparent RMI access to remote workspaces. - *

    - * Most of the methods in this interface are documented only with a reference - * to a corresponding Workspace method. In these cases the remote object - * will simply forward the method call to the underlying Workspace instance. - * Complex return values like namespace registries and other objects are - * returned as remote references to the corresponding remote interface. Simple - * return values and possible exceptions are copied over the network - * to the client. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Workspace - * @see org.apache.jackrabbit.rmi.client.ClientWorkspace - * @see org.apache.jackrabbit.rmi.server.ServerWorkspace - */ -@Deprecated(forRemoval = true) public interface RemoteWorkspace extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getName() Workspace.getName()} method. - * - * @return workspace name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#copy(String,String) Workspace.copy(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void copy(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#copy(String,String,String) Workspace.copy(String,String,String)} - * method. - * - * @param workspace source workspace - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void copy(String workspace, String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#clone(String,String,String,boolean) Workspace.clone(String,String,String,boolean)} - * method. - * - * @param workspace source workspace - * @param from source path - * @param to destination path - * @param removeExisting flag to remove existing items - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void clone(String workspace, String from, String to, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#move(String,String) Workspace.move(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void move(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getNodeTypeManager() Workspace.getNodeTypeManager()} - * method. - * - * @return node type manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeTypeManager getNodeTypeManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getNamespaceRegistry() Workspace.getNamespaceRegistry()} - * method. - * - * @return namespace registry - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNamespaceRegistry getNamespaceRegistry() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getQueryManager() Workspace.getQueryManager()} - * method. - * - * @return query manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQueryManager getQueryManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getObservationManager() Workspace.getObservationManager()} - * method. - * - * @return observation manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteObservationManager getObservationManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getAccessibleWorkspaceNames() Workspace.getAccessibleWorkspaceNames()} - * method. - * - * @return accessible workspace names - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getAccessibleWorkspaceNames() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#importXML(String,java.io.InputStream,int) Workspace.importXML(String,InputStream,int)} - * method. - * - * @param path node path - * @param xml imported XML document - * @param uuidBehaviour uuid behaviour flag - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException; - - void createWorkspace(String name, String source) - throws RepositoryException, RemoteException; - - void deleteWorkspace(String name) - throws RepositoryException, RemoteException; - - RemoteLockManager getLockManager() - throws RepositoryException, RemoteException; - - RemoteVersionManager getVersionManager() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java deleted file mode 100644 index 356c1cfb9e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.Xid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the {@link org.apache.jackrabbit.api.XASession} - * interface. - */ -@Deprecated(forRemoval = true) public interface RemoteXASession extends RemoteSession, Remote { - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#commit(Xid, boolean)} method. - */ - void commit(Xid xid, boolean onePhase) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#end(Xid, int)} method. - */ - void end(Xid xid, int flags) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#forget(Xid)} method. - */ - void forget(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#getTransactionTimeout()} method. - */ - int getTransactionTimeout() throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#prepare(Xid)} method. - */ - int prepare(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#recover(int)} method. - */ - Xid[] recover(int flag) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#rollback(Xid)} method. - */ - void rollback(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#setTransactionTimeout(int)} method. - */ - boolean setTransactionTimeout(int seconds) - throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#start(Xid, int)} method. - */ - void start(Xid xid, int flags) throws XAException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java deleted file mode 100644 index e7bf5e19e5e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.util.Arrays; - -import javax.transaction.xa.Xid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Serializable {@link Xid}. - * - * @since Jackrabbit JCR-RMI 1.5 - */ -@Deprecated(forRemoval = true) public class SerializableXid implements Serializable, Xid { - - private final int formatId; - - private final byte[] globalTransactionId; - - private final byte[] branchQualifier; - - private final int hashCode; - - public SerializableXid(Xid xid) { - formatId = xid.getFormatId(); - globalTransactionId = xid.getGlobalTransactionId(); - branchQualifier = xid.getBranchQualifier(); - hashCode = xid.hashCode(); - } - - public int getFormatId() { - return formatId; - } - - public byte[] getGlobalTransactionId() { - return globalTransactionId; - } - - public byte[] getBranchQualifier() { - return branchQualifier; - } - - public int hashCode() { - return hashCode; - } - - public boolean equals(Object xid) { - return (xid instanceof Xid) - && formatId == ((Xid) xid).getFormatId() - && Arrays.equals( - globalTransactionId, ((Xid) xid).getGlobalTransactionId()) - && Arrays.equals( - branchQualifier, ((Xid) xid).getBranchQualifier()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java deleted file mode 100755 index 1292557dc2a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java deleted file mode 100644 index 36fc05d892f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.principal; - -import java.rmi.RemoteException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal GroupPrincipal} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.principal.ServerGroup - * ServerGroup} and - * {@link org.apache.jackrabbit.rmi.client.principal.ClientGroup ClientGroup} - * adapter base classes to provide transparent RMI access to remote item - * definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Group method. The remote object will simply forward the method - * call to the underlying Group instance. Argument and return values, as well as - * possible exceptions, are copied over the network. Complex return values are - * returned as remote references to the corresponding remote interface. RMI - * errors are signaled with RemoteExceptions. - * - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal - * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup - * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup - */ -@Deprecated(forRemoval = true) public interface RemoteGroup extends RemotePrincipal { - - /** - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#isMember(java.security.Principal) - */ - boolean isMember(String member) throws RemoteException; - - /** - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#members() - */ - RemoteIterator members() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java deleted file mode 100644 index 10bb5dd024d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.principal; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link java.security.Principal Principal} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.principal.ServerPrincipal - * ServerPrincipal} and - * {@link org.apache.jackrabbit.rmi.client.principal.ClientPrincipal - * ClientPrincipal} adapter base classes to provide transparent RMI access to - * remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Principal method. The remote object will simply forward the - * method call to the underlying Principal instance. Argument and return values, - * as well as possible exceptions, are copied over the network. Complex return - * values are returned as remote references to the corresponding remote - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see java.security.Principal - * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal - * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal - */ -@Deprecated(forRemoval = true) public interface RemotePrincipal extends Remote { - - /** - * @see java.security.Principal#getName() - */ - public String getName() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java deleted file mode 100755 index f7a35d50ae4..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java deleted file mode 100644 index eb5dea06e67..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlEntry - * AccessControlEntry} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry - * ServerAccessControlEntry} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry - * ClientAccessControlEntry} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlEntry method. The remote object will simply - * forward the method call to the underlying AccessControlEntry instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlEntry - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlEntry extends Remote { - - /** - * @see javax.jcr.security.AccessControlEntry#getPrincipal() - */ - public RemotePrincipal getPrincipal() throws RemoteException; - - /** - * @see javax.jcr.security.AccessControlEntry#getPrivileges() - */ - public RemotePrivilege[] getPrivileges() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java deleted file mode 100644 index 832eaf95798..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlList - * AccessControlList} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlList - * ServerAccessControlList} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlList - * ClientAccessControlList} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlList method. The remote object will simply forward - * the method call to the underlying AccessControlList instance. Argument and - * return values, as well as possible exceptions, are copied over the network. - * Complex return values are returned as remote references to the corresponding - * remote interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.security.AccessControlList - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlList extends RemoteAccessControlPolicy { - - /** - * @see javax.jcr.security.AccessControlList#getAccessControlEntries() - */ - public RemoteAccessControlEntry[] getAccessControlEntries() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java deleted file mode 100644 index baf3d49917d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlManager - * AccessControlManager} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager - * ServerAccessControlManager} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager - * ClientAccessControlManager} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlManager method. The remote object will simply - * forward the method call to the underlying AccessControlManager instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlManager - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlManager extends Remote { - - /** - * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String) - */ - public RemoteIterator getApplicablePolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getEffectivePolicies(String) - */ - public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getPolicies(String) - */ - public RemoteAccessControlPolicy[] getPolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getPrivileges(String) - */ - public RemotePrivilege[] getPrivileges(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getSupportedPrivileges(String) - */ - public RemotePrivilege[] getSupportedPrivileges(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#privilegeFromName(String) - */ - public RemotePrivilege privilegeFromName(String privilegeName) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#hasPrivileges(String, - * javax.jcr.security.Privilege[]) - */ - public boolean hasPrivileges(String absPath, String[] privileges) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java deleted file mode 100644 index 353393139ae..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlPolicy - * AccessControlPolicy} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy - * ServerAccessControlPolicy} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy - * ClientAccessControlPolicy} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlPolicy method. The remote object will simply - * forward the method call to the underlying AccessControlPolicy instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlPolicy - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlPolicy extends Remote { - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java deleted file mode 100644 index f09982f30dd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.Privilege Privilege} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerPrivilege - * ServerPrivilege} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientPrivilege - * ClientPrivilege} adapter base classes to provide transparent RMI access to - * remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Privilege method. The remote object will simply forward the - * method call to the underlying Privilege instance. Argument and return values, - * as well as possible exceptions, are copied over the network. Complex return - * values are returned as remote references to the corresponding remote - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.security.Privilege - * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege - * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege - */ -@Deprecated(forRemoval = true) public interface RemotePrivilege extends Remote { - - /** - * @see javax.jcr.security.Privilege#getAggregatePrivileges() - */ - public RemotePrivilege[] getAggregatePrivileges() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#getDeclaredAggregatePrivileges() - */ - public RemotePrivilege[] getDeclaredAggregatePrivileges() - throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#getName() - */ - public String getName() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#isAbstract() - */ - public boolean isAbstract() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#isAggregate() - */ - public boolean isAggregate() throws RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java deleted file mode 100755 index ba87be38ddb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java deleted file mode 100644 index 1b29ac184ee..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Abstract base class for repository factories that make a remote repository - * available locally. Subclasses need to implement the - * {@link #getRemoteRepository()} method to actually retrieve the remote - * repository reference. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public abstract class AbstractRemoteRepositoryFactory - implements RepositoryFactory { - - /** - * Local adapter factory. - */ - private final LocalAdapterFactory factory; - - /** - * Creates a factory for looking up a repository from the given RMI URL. - * - * @param factory local adapter factory - */ - protected AbstractRemoteRepositoryFactory(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns a local adapter for the remote repository. - * - * @return local adapter for the remote repository - * @throws RepositoryException if the remote repository is not available - */ - public Repository getRepository() throws RepositoryException { - return factory.getRepository(getRemoteRepository()); - } - - /** - * Returns the remote repository reference. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected abstract RemoteRepository getRemoteRepository() - throws RepositoryException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java deleted file mode 100644 index df577ce1022..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository bound in JNDI. The configured repository is - * looked up from JNDI lazily during each method call. Thus the JNDI entry - * does not need to exist when this class is instantiated. The JNDI entry - * can also be replaced with another repository during the lifetime of an - * instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class JNDIRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for a remote repository in JNDI. - * - * @param factory local adapter factory - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepository( - LocalAdapterFactory factory, Context context, String location) { - super(new JNDIRemoteRepositoryFactory(factory, context, location)); - } - - /** - * Creates a proxy for the remote repository in JNDI. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepository(Context context, String location) { - this(new ClientAdapterFactory(), context, location); - } - - /** - * Creates a proxy for the remote repository in JNDI. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param location JNDI location in default context - * @throws NamingException if the default JNDI context is not available - */ - public JNDIRemoteRepository(String location) throws NamingException { - this(new InitialContext(), location); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java deleted file mode 100644 index 943b904aab6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.RepositoryException; -import javax.naming.Context; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from JNDI. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class JNDIRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * JNDI context of the remote repository. - */ - private final Context context; - - /** - * JNDI location of the remote repository. - */ - private final String location; - - /** - * Creates a factory for looking up a remote repository from JNDI. - * - * @param factory local adapter factory - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepositoryFactory( - LocalAdapterFactory factory, Context context, String location) { - super(factory); - this.context = context; - this.location = location; - } - - /** - * Looks up a remote repository from JNDI. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - Object remote = context.lookup(location); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else if (remote == null) { - throw new RepositoryException( - "Remote repository not found: The JNDI entry " - + location + " is null"); - } else { - throw new RepositoryException( - "Invalid remote repository: The JNDI entry " - + location + " is an instance of " - + remote.getClass().getName()); - } - } catch (NamingException e) { - throw new RepositoryException( - "Remote repository not found: The JNDI entry " + location - + " could not be looked up", e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java deleted file mode 100644 index e5dd0afe10f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.util.HashSet; -import java.util.Set; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Repository that proxies all method calls to another repository. - * The other repository is accessed lazily using a - * {@link RepositoryFactory repository factory}. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ProxyRepository implements Repository { - - /** - * The set of standard descriptor keys defined in the - * {@link Repository} interface. - */ - private static final Set STANDARD_KEYS = new HashSet() {{ - add(Repository.IDENTIFIER_STABILITY); - add(Repository.LEVEL_1_SUPPORTED); - add(Repository.LEVEL_2_SUPPORTED); - add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); - add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); - add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); - add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); - add(Repository.OPTION_LIFECYCLE_SUPPORTED); - add(Repository.OPTION_LOCKING_SUPPORTED); - add(Repository.OPTION_OBSERVATION_SUPPORTED); - add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); - add(Repository.OPTION_QUERY_SQL_SUPPORTED); - add(Repository.OPTION_RETENTION_SUPPORTED); - add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); - add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); - add(Repository.OPTION_TRANSACTIONS_SUPPORTED); - add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); - add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); - add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); - add(Repository.OPTION_VERSIONING_SUPPORTED); - add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); - add(Repository.OPTION_XML_EXPORT_SUPPORTED); - add(Repository.OPTION_XML_IMPORT_SUPPORTED); - add(Repository.OPTION_ACTIVITIES_SUPPORTED); - add(Repository.OPTION_BASELINES_SUPPORTED); - - add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); - add(Repository.QUERY_JOINS); - add(Repository.QUERY_LANGUAGES); - add(Repository.QUERY_STORED_QUERIES_SUPPORTED); - add(Repository.QUERY_XPATH_DOC_ORDER); - add(Repository.QUERY_XPATH_POS_INDEX); - add(Repository.REP_NAME_DESC); - add(Repository.REP_VENDOR_DESC); - add(Repository.REP_VENDOR_URL_DESC); - add(Repository.SPEC_NAME_DESC); - add(Repository.SPEC_VERSION_DESC); - add(Repository.WRITE_SUPPORTED); - }}; - - /** - * Factory for accessing the proxied repository. - */ - private final RepositoryFactory factory; - - /** - * Creates a proxy for the repository (or repositories) accessible - * through the given factory. - * - * @param factory repository factory - */ - public ProxyRepository(RepositoryFactory factory) { - this.factory = factory; - } - - /** - * Returns the descriptor keys of the proxied repository, or an empty - * array if the proxied repository can not be accessed. - * - * @return descriptor keys (possibly empty) - */ - public String[] getDescriptorKeys() { - try { - return factory.getRepository().getDescriptorKeys(); - } catch (RepositoryException e) { - return new String[0]; - } - } - - /** - * Checks whether the given key identifies a valid single-valued - * descriptor key in the proxied repository. Returns false - * if the proxied repository can not be accessed. - * - * @return true if the key identifies a valid single-valued - * descriptor in the proxied repository, - * false otherwise - */ - public boolean isSingleValueDescriptor(String key) { - try { - return factory.getRepository().isSingleValueDescriptor(key); - } catch (RepositoryException e) { - return false; - } - } - - /** - * Returns the descriptor with the given key from the proxied repository. - * Returns null if the descriptor does not exist or if the - * proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor value, or null - */ - public String getDescriptor(String key) { - try { - return factory.getRepository().getDescriptor(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Returns the value of the descriptor with the given key from the proxied - * repository. Returns null if the descriptor does not exist - * or if the proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor value, or null - */ - public Value getDescriptorValue(String key) { - try { - return factory.getRepository().getDescriptorValue(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Returns the values of the descriptor with the given key from the proxied - * repository. Returns null if the descriptor does not exist - * or if the proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor values, or null - */ - public Value[] getDescriptorValues(String key) { - try { - return factory.getRepository().getDescriptorValues(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Logs in to the proxied repository and returns the resulting session. - *

    - * Note that the {@link Session#getRepository()} method of the resulting - * session will return the proxied repository, not this repository proxy! - * - * @throws RepositoryException if the proxied repository can not be - * accessed, or if the login in the proxied - * repository fails - */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - return factory.getRepository().login(credentials, workspace); - } - - /** - * Returns true if the given key identifies a standard descriptor. - * - * @param key descriptor key - * @return true if the key identifies a standard descriptor, - * false otherwise - */ - public boolean isStandardDescriptor(String key) { - return STANDARD_KEYS.contains(key); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null arguments. - * - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * the given credentials and a null workspace name. - * - * @param credentials login credentials - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null credentials and the given workspace name. - * - * @param workspace workspace name - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java deleted file mode 100644 index 979dc7e0ccd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository bound in RMI. The configured repository is - * looked up from RMI lazily during each method call. Thus the RMI entry - * does not need to exist when this class is instantiated. The RMI entry - * can also be replaced with another repository during the lifetime of an - * instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class RMIRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for the remote repository in the given RMI URL. - * - * @param factory local adapter factory - * @param url RMI URL of the remote repository - */ - public RMIRemoteRepository(LocalAdapterFactory factory, String url) { - super(new RMIRemoteRepositoryFactory(factory, url)); - } - - /** - * Creates a proxy for the remote repository in the given RMI URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - */ - public RMIRemoteRepository(String url) { - this(new ClientAdapterFactory(), url); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java deleted file mode 100644 index 370ec3aea36..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.net.MalformedURLException; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from an RMI registry. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class RMIRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * RMI URL of the remote repository. - */ - private final String url; - - /** - * Creates a factory for looking up a remote repository from - * an RMI registry. - * - * @param factory local adapter factory - * @param url RMI URL of the repository - */ - public RMIRemoteRepositoryFactory(LocalAdapterFactory factory, String url) { - super(factory); - this.url = url; - } - - /** - * Looks up a remote repository from the RMI registry. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - return (RemoteRepository) Naming.lookup(url); - } catch (MalformedURLException e) { - throw new RepositoryException("Invalid repository URL: " + url, e); - } catch (NotBoundException e) { - throw new RepositoryException("Repository not found: " + url, e); - } catch (ClassCastException e) { - throw new RepositoryException("Invalid repository: " + url, e); - } catch (RemoteException e) { - throw new RepositoryException("Repository access error: " + url, e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java deleted file mode 100644 index b16f85c1d83..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for JCR content repositories. - */ -@Deprecated(forRemoval = true) interface RepositoryFactory { - - /** - * Returns a content repository. - * - * @return content repository - * @throws RepositoryException if a repository is not available - */ - Repository getRepository() throws RepositoryException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java deleted file mode 100644 index 8a7b3aa99dc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; -import java.util.Hashtable; -import java.util.Map; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.RepositoryFactory; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.SafeClientRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -@Deprecated(forRemoval = true) public class RmiRepositoryFactory implements RepositoryFactory { - - private static final String REPOSITORY_URI = - "org.apache.jackrabbit.repository.uri"; - - @SuppressWarnings({"unchecked", "rawtypes"}) - public Repository getRepository(Map parameters) throws RepositoryException { - if (parameters != null && parameters.containsKey(REPOSITORY_URI)) { - URI uri; - try { - uri = new URI(parameters.get(REPOSITORY_URI).toString().trim()); - } catch (URISyntaxException e) { - return null; - } - - String scheme = uri.getScheme(); - if ("rmi".equalsIgnoreCase(scheme)) { - return getRmiRepository(uri.getSchemeSpecificPart()); - } else if ("jndi".equalsIgnoreCase(scheme)) { - Hashtable environment = new Hashtable(parameters); - environment.remove(REPOSITORY_URI); - return getJndiRepository( - uri.getSchemeSpecificPart(), environment); - } else { - try { - return getUrlRepository(uri.toURL()); - } catch (MalformedURLException e) { - return null; - } - } - } else { - return null; - } - } - - private Repository getUrlRepository(final URL url) - throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - InputStream stream = url.openStream(); - try { - Object remote = new ObjectInputStream(stream).readObject(); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else { - throw new RemoteException("The resource at URL " + url - + " is not a remote repository stub: " + remote); - } - } finally { - if (stream != null) { - stream.close(); - } - } - } catch (ClassNotFoundException e) { - throw new RemoteException("The resource at URL " + url - + " requires a class that is not available", e); - } catch (IOException e) { - throw new RemoteException("Failed to read the resource at URL " - + url, e); - } - } - }; - } - - @SuppressWarnings("rawtypes") - private Repository getJndiRepository(final String name, - final Hashtable environment) throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - Object value = new InitialContext(environment).lookup(name); - if (value instanceof RemoteRepository) { - return (RemoteRepository) value; - } else { - throw new RemoteException("The JNDI resource " + name - + " is not a remote repository stub: " + value); - } - } catch (NamingException e) { - throw new RemoteException( - "Failed to look up the JNDI resource " + name, e); - } - } - }; - } - - private Repository getRmiRepository(final String name) - throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - Object value = Naming.lookup(name); - if (value instanceof RemoteRepository) { - return (RemoteRepository) value; - } else { - throw new RemoteException("The RMI resource " + name - + " is not a remote repository stub: " + value); - } - } catch (NotBoundException e) { - throw new RemoteException( - "RMI resource " + name + " not found", e); - } catch (MalformedURLException e) { - throw new RemoteException("Invalid RMI name: " + name, e); - } catch (RemoteException e) { - throw new RemoteException("Failed to look up the RMI resource " - + name, e); - } - } - }; - } - - /** - * Basic SafeClientRepository for the different lookup types of a rmi repository - */ - private static class RmiSafeClientRepository extends SafeClientRepository { - - public RmiSafeClientRepository(LocalAdapterFactory factory) { - super(factory); - } - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - return null; - } - - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java deleted file mode 100644 index 4d8095e7d19..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository accessed via a URL. The configured URL is - * dereferenced lazily during each method call. Thus the resource pointed to - * by the URL does not need to exist when this class is instantiated. The - * resource can also be replaced with another remote repository instance - * during the lifetime of an instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class URLRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for the remote repository at the given URL. - * - * @param factory local adapter factory - * @param url URL of the remote repository - */ - public URLRemoteRepository(LocalAdapterFactory factory, URL url) { - super(new URLRemoteRepositoryFactory(factory, url)); - } - - /** - * Creates a proxy for the remote repository at the given URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - */ - public URLRemoteRepository(URL url) { - this(new ClientAdapterFactory(), url); - } - - /** - * Creates a proxy for the remote repository at the given URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - * @throws MalformedURLException if the given URL is malformed - */ - public URLRemoteRepository(String url) throws MalformedURLException { - this(new URL(url)); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java deleted file mode 100644 index cc950fa3e02..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.net.URL; - -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from a given URL. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class URLRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * URL of the remote repository. - */ - private final URL url; - - /** - * Creates a factory for looking up a remote repository from a URL. - * - * @param factory local adapter factory - * @param url URL or the remote repository - */ - public URLRemoteRepositoryFactory(LocalAdapterFactory factory, URL url) { - super(factory); - this.url = url; - } - - /** - * Looks up and returns a remote repository from the configured URL. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - ObjectInputStream input = new ObjectInputStream(url.openStream()); - try { - Object remote = input.readObject(); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else if (remote == null) { - throw new RepositoryException( - "Remote repository not found: The resource at " - + url + " is null"); - } else { - throw new RepositoryException( - "Invalid remote repository: The resource at " - + url + " is an instance of " - + remote.getClass().getName()); - } - } finally { - input.close(); - } - } catch (ClassNotFoundException e) { - throw new RepositoryException( - "Invalid remote repository: The resource at " + url - + " is an instance of an unknown class", e); - } catch (IOException e) { - throw new RepositoryException( - "Remote repository not found: The resource at " + url - + " could not be retrieved", e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java deleted file mode 100755 index 33e6942b6d8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.repository; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java deleted file mode 100644 index d30e5d1b03f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for creating remote adapters for local resources. - * This interface defines how the local JCR interfaces are adapted to - * remote JCR-RMI references. The adaption mechanism can be - * modified (for example to add extra features) by changing the - * remote adapter factory used by the repository server. - *

    - * Note that the {@link ServerObject ServerObject} base class provides - * a number of utility methods designed to work with a remote adapter - * factory. Adapter implementations may want to inherit that functionality - * by subclassing from ServerObject. - * - * @see org.apache.jackrabbit.rmi.client.LocalAdapterFactory - * @see org.apache.jackrabbit.rmi.server.ServerAdapterFactory - * @see org.apache.jackrabbit.rmi.server.ServerObject - */ -@Deprecated(forRemoval = true) public interface RemoteAdapterFactory { - - /** - * Returns the port number to which the server objects created by - * this factory are bound. This method is mostly used internally by - * the {@link ServerObject} constructor to determine which port number - * to use. - * - * @return port number, or 0 for a random port - */ - int getPortNumber(); - - /** - * Returns a remote adapter for the given local repository. - * - * @param repository local repository - * @return remote repository adapter - * @throws RemoteException on RMI errors - */ - RemoteRepository getRemoteRepository(Repository repository) - throws RemoteException; - - /** - * Returns a remote adapter for the given local session. - * - * @param session local session - * @return remote session adapter - * @throws RemoteException on RMI errors - */ - RemoteSession getRemoteSession(Session session) throws RemoteException; - - /** - * Returns a remote adapter for the given local workspace. - * - * @param workspace local workspace - * @return remote workspace adapter - * @throws RemoteException on RMI errors - */ - RemoteWorkspace getRemoteWorkspace(Workspace workspace) - throws RemoteException; - - /** - * Returns a remote adapter for the given local observation manager. - * - * @param observationManager local observation manager - * @return remote observation manager adapter - * @throws RemoteException on RMI errors - */ - RemoteObservationManager getRemoteObservationManager( - ObservationManager observationManager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local namespace registry. - * - * @param registry local namespace registry - * @return remote namespace registry adapter - * @throws RemoteException on RMI errors - */ - RemoteNamespaceRegistry getRemoteNamespaceRegistry( - NamespaceRegistry registry) throws RemoteException; - - /** - * Returns a remote adapter for the given local node type manager. - * - * @param manager local node type manager - * @return remote node type manager adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeTypeManager getRemoteNodeTypeManager(NodeTypeManager manager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local item. This method - * will return an adapter that implements only the - * {@link Item Item} interface. The caller may want to introspect - * the local item to determine whether to use either the - * {@link #getRemoteNode(Node) getRemoteNode} or the - * {@link #getRemoteProperty(Property) getRemoteProperty} method instead. - * - * @param item local item - * @return remote item adapter - * @throws RemoteException on RMI errors - */ - RemoteItem getRemoteItem(Item item) throws RemoteException; - - /** - * Returns a remote adapter for the given local property. - * - * @param property local property - * @return remote property adapter - * @throws RemoteException on RMI errors - */ - RemoteProperty getRemoteProperty(Property property) throws RemoteException; - - /** - * Returns a remote adapter for the given local node. - * - * @param node local node - * @return remote node adapter - * @throws RemoteException on RMI errors - */ - RemoteNode getRemoteNode(Node node) throws RemoteException; - - /** - * Returns a remote adapter for the given local version. - * - * @param version local version - * @return remote version adapter - * @throws RemoteException on RMI errors - */ - RemoteVersion getRemoteVersion(Version version) throws RemoteException; - - /** - * Returns a remote adapter for the given local version history. - * - * @param versionHistory local version history - * @return remote version history adapter - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getRemoteVersionHistory(VersionHistory versionHistory) - throws RemoteException; - - /** - * Returns a remote adapter for the given local node type. - * - * @param type local node type - * @return remote node type adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeType getRemoteNodeType(NodeType type) throws RemoteException; - - /** - * Returns a remote adapter for the given local item definition. - * This method will return an adapter that implements only the - * {@link ItemDefinition ItemDefinition} interface. The caller may want to introspect - * the local item definition to determine whether to use either the - * {@link #getRemoteNodeDefinition(NodeDefinition) getRemoteNodeDef} or the - * {@link #getRemotePropertyDefinition(PropertyDefinition) getRemotePropertyDef} - * method instead. - * - * @param def local item definition - * @return remote item definition adapter - * @throws RemoteException on RMI errors - */ - RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) throws RemoteException; - - /** - * Returns a remote adapter for the given local node definition. - * - * @param def local node definition - * @return remote node definition adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) throws RemoteException; - - /** - * Returns a remote adapter for the given local property definition. - * - * @param def local property definition - * @return remote property definition adapter - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition getRemotePropertyDefinition(PropertyDefinition def) - throws RemoteException; - - /** - * Returns a remote adapter for the given local lock. - * - * @param lock local lock - * @return remote lock adapter - * @throws RemoteException on RMI errors - */ - RemoteLock getRemoteLock(Lock lock) throws RemoteException; - - /** - * Returns a remote adapter for the given local query manager. - * - * @param session current session - * @param manager local query manager - * @return remote query manager adapter - * @throws RemoteException on RMI errors - */ - RemoteQueryManager getRemoteQueryManager( - Session session, QueryManager manager) throws RemoteException; - - /** - * Returns a remote adapter for the given local query. - * - * @param query local query - * @return remote query adapter - * @throws RemoteException on RMI errors - */ - RemoteQuery getRemoteQuery(Query query) throws RemoteException; - - /** - * Returns a remote adapter for the given local query result. - * - * @param result local query result - * @return remote query result adapter - * @throws RemoteException on RMI errors - */ - RemoteQueryResult getRemoteQueryResult(QueryResult result) - throws RemoteException; - - /** - * Returns a remote adapter for the given local query row. - * - * @param row local query row - * @return remote query row adapter - * @throws RemoteException on RMI errors - */ - RemoteRow getRemoteRow(Row row) throws RemoteException; - - /** - * Returns a remote adapter for the given local events. - * - * @param listenerId The listener identifier to which the events are to be - * dispatched. - * @param events the local events - * @return remote event iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteEventCollection getRemoteEvent(long listenerId, EventIterator events) - throws RemoteException; - - - /** - * Returns a remote adapter for the given local node iterator. - * - * @param iterator local node iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteNodeIterator(NodeIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local property iterator. - * - * @param iterator local property iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local version iterator. - * - * @param iterator local version iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteVersionIterator(VersionIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local node type iterator. - * - * @param iterator local node type iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local row iterator. - * - * @param iterator local row iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteRowIterator(RowIterator iterator) - throws RemoteException; - - RemoteLockManager getRemoteLockManager(LockManager lockManager) - throws RemoteException; - - RemoteVersionManager getRemoteVersionManager(Session session, VersionManager versionManager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @param acm local access control manager - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - RemoteAccessControlManager getRemoteAccessControlManager( - AccessControlManager acm) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrivilege getRemotePrivilege(final Privilege local) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlPolicy getRemoteAccessControlPolicy( - final AccessControlPolicy local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( - final AccessControlPolicy[] local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteIterator getRemoteAccessControlPolicyIterator( - AccessControlPolicyIterator iterator) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlEntry getRemoteAccessControlEntry( - final AccessControlEntry local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlEntry[] getRemoteAccessControlEntry( - final AccessControlEntry[] local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrincipal getRemotePrincipal(final Principal principal) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteIterator getRemotePrincipalIterator( - final Iterator principals) throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java deleted file mode 100644 index 2b5e1220537..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java +++ /dev/null @@ -1,531 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; -import javax.transaction.xa.XAResource; - -import org.apache.jackrabbit.rmi.remote.ArrayIterator; -import org.apache.jackrabbit.rmi.remote.BufferIterator; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.iterator.ServerNodeIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerNodeTypeIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerPropertyIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerRowIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerVersionIterator; -import org.apache.jackrabbit.rmi.server.principal.ServerGroup; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipalIterator; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlList; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicyIterator; -import org.apache.jackrabbit.rmi.server.security.ServerPrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Default implementation of the {@link RemoteAdapterFactory - * RemoteAdapterFactory} interface. This factory uses the server adapters - * defined in this package as the default adapter implementations. Subclasses - * can override or extend the default adapters by implementing the corresponding - * factory methods. - *

    - * The bufferSize property can be used to configure the size of the - * buffer used by iterators to speed up iterator traversal over the network. - */ -@Deprecated(forRemoval = true) public class ServerAdapterFactory implements RemoteAdapterFactory { - - /** The default iterator buffer size. */ - private static final int DEFAULT_BUFFER_SIZE = 100; - - /** The buffer size of iterators created by this factory. */ - private int bufferSize = DEFAULT_BUFFER_SIZE; - - /** - * The port number for server objects. Initializes to the value of the - * org.apache.jackrabbit.rmi.port system property, or to 0 if - * the property is not set. Value 0 means that the server objects should use - * a random anonymous port. - */ - private int portNumber = Integer.getInteger( - "org.apache.jackrabbit.rmi.port", 0).intValue(); - - /** - * Returns the iterator buffer size. - * - * @return iterator buffer size - */ - public int getBufferSize() { - return bufferSize; - } - - /** - * Sets the iterator buffer size. - * - * @param bufferSize iterator buffer size - */ - public void setBufferSize(int bufferSize) { - this.bufferSize = bufferSize; - } - - /** - * Returns the port number for server objects. - * - * @return port number, or 0 for the default - */ - public int getPortNumber() { - return portNumber; - } - - /** - * Sets the port number for server objects. - * - * @param portNumber port number, or 0 for the default - */ - public void setPortNumber(int portNumber) { - this.portNumber = portNumber; - } - - /** - * Creates a {@link ServerRepository ServerRepository} instance. - * {@inheritDoc} - */ - public RemoteRepository getRemoteRepository(Repository repository) - throws RemoteException { - return new ServerRepository(repository, this); - } - - /** - * Creates a {@link ServerSession ServerSession} instance. In case the - * underlying session is transaction enabled, the remote interface is will - * be transaction enabled too through the {@link ServerXASession}. - * {@inheritDoc} - */ - public RemoteSession getRemoteSession(Session session) - throws RemoteException { - if (session instanceof XAResource) { - return new ServerXASession(session, (XAResource) session, this); - } else { - return new ServerSession(session, this); - } - } - - /** - * Creates a {@link ServerWorkspace ServerWorkspace} instance. {@inheritDoc} - */ - public RemoteWorkspace getRemoteWorkspace(Workspace workspace) - throws RemoteException { - return new ServerWorkspace(workspace, this); - } - - /** - * Creates a {@link ServerObservationManager ServerObservationManager} - * instance. {@inheritDoc} - */ - public RemoteObservationManager getRemoteObservationManager( - ObservationManager observationManager) throws RemoteException { - return new ServerObservationManager(observationManager, this); - } - - /** - * Creates a {@link ServerNamespaceRegistry ServerNamespaceRegistry} - * instance. {@inheritDoc} - */ - public RemoteNamespaceRegistry getRemoteNamespaceRegistry( - NamespaceRegistry registry) throws RemoteException { - return new ServerNamespaceRegistry(registry, this); - } - - /** - * Creates a {@link ServerNodeTypeManager ServerNodeTypeManager} instance. - * {@inheritDoc} - */ - public RemoteNodeTypeManager getRemoteNodeTypeManager( - NodeTypeManager manager) throws RemoteException { - return new ServerNodeTypeManager(manager, this); - } - - /** - * Creates a {@link ServerItem ServerItem} instance. {@inheritDoc} - */ - public RemoteItem getRemoteItem(Item item) throws RemoteException { - return new ServerItem(item, this); - } - - /** - * Creates a {@link ServerProperty ServerProperty} instance. {@inheritDoc} - */ - public RemoteProperty getRemoteProperty(Property property) - throws RemoteException { - return new ServerProperty(property, this); - } - - /** - * Creates a {@link ServerNode ServerNode} instance. {@inheritDoc} - */ - public RemoteNode getRemoteNode(Node node) throws RemoteException { - return new ServerNode(node, this); - } - - /** - * Creates a {@link ServerVersion ServerVersion} instance. {@inheritDoc} - */ - public RemoteVersion getRemoteVersion(Version version) - throws RemoteException { - return new ServerVersion(version, this); - } - - /** - * Creates a {@link ServerVersionHistory ServerVersionHistory} instance. - * {@inheritDoc} - */ - public RemoteVersionHistory getRemoteVersionHistory( - VersionHistory versionHistory) throws RemoteException { - return new ServerVersionHistory(versionHistory, this); - } - - /** - * Creates a {@link ServerNodeType ServerNodeType} instance. {@inheritDoc} - */ - public RemoteNodeType getRemoteNodeType(NodeType type) - throws RemoteException { - return new ServerNodeType(type, this); - } - - /** - * Creates a {@link ServerItemDefinition ServerItemDefinition} instance. - * {@inheritDoc} - */ - public RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) - throws RemoteException { - return new ServerItemDefinition(def, this); - } - - /** - * Creates a {@link ServerNodeDefinition ServerNodeDefinition} instance. - * {@inheritDoc} - */ - public RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) - throws RemoteException { - return new ServerNodeDefinition(def, this); - } - - /** - * Creates a {@link ServerPropertyDefinition ServerPropertyDefinition} - * instance. {@inheritDoc} - */ - public RemotePropertyDefinition getRemotePropertyDefinition( - PropertyDefinition def) throws RemoteException { - return new ServerPropertyDefinition(def, this); - } - - /** - * Creates a {@link ServerLock ServerLock} instance. {@inheritDoc} - */ - public RemoteLock getRemoteLock(Lock lock) throws RemoteException { - return new ServerLock(lock, this); - } - - /** - * Creates a {@link ServerQueryManager ServerQueryManager} instance. - * {@inheritDoc} - */ - public RemoteQueryManager getRemoteQueryManager(Session session, - QueryManager manager) throws RemoteException { - return new ServerQueryManager(session, manager, this); - } - - /** - * Creates a {@link ServerQuery ServerQuery} instance. {@inheritDoc} - */ - public RemoteQuery getRemoteQuery(Query query) throws RemoteException { - return new ServerQuery(query, this); - } - - /** - * Creates a {@link ServerQueryResult ServerQueryResult} instance. - * {@inheritDoc} - */ - public RemoteQueryResult getRemoteQueryResult(QueryResult result) - throws RemoteException { - return new ServerQueryResult(result, this); - } - - /** - * Creates a {@link ServerQueryResult ServerQueryResult} instance. - * {@inheritDoc} - */ - public RemoteRow getRemoteRow(Row row) throws RemoteException { - return new ServerRow(row, this); - } - - /** - * Creates a {@link ServerEventCollection ServerEventCollection} instances. - * {@inheritDoc} - */ - public RemoteEventCollection getRemoteEvent(long listenerId, - EventIterator events) throws RemoteException { - RemoteEventCollection.RemoteEvent[] remoteEvents; - if (events != null) { - List eventList = new ArrayList(); - while (events.hasNext()) { - Event event = events.nextEvent(); - eventList - .add(new ServerEventCollection.ServerEvent(event, this)); - } - remoteEvents = eventList.toArray(new RemoteEventCollection.RemoteEvent[eventList.size()]); - } else { - remoteEvents = new RemoteEventCollection.RemoteEvent[0]; // for - // safety - } - - return new ServerEventCollection(listenerId, remoteEvents, this); - } - - /** - * Optimizes the given remote iterator for transmission across the network. - * This method retrieves the first set of elements from the iterator by - * calling {@link RemoteIterator#nextObjects()} and then asks for the total - * size of the iterator. If the size is unkown or greater than the length of - * the retrieved array, then the elements, the size, and the remote iterator - * reference are wrapped into a {@link BufferIterator} instance that gets - * passed over the network. If the retrieved array of elements contains all - * the elements in the iterator, then the iterator instance is discarded and - * just the elements are wrapped into a {@link ArrayIterator} instance to be - * passed to the client. - *

    - * Subclasses can override this method to provide alternative optimizations. - * - * @param remote remote iterator - * @return optimized remote iterator - * @throws RemoteException on RMI errors - */ - protected RemoteIterator optimizeIterator(RemoteIterator remote) - throws RemoteException { - Object[] elements = remote.nextObjects(); - long size = remote.getSize(); - if (size == -1 || (elements != null && size > elements.length)) { - return new BufferIterator(elements, size, remote); - } else { - return new ArrayIterator(elements); - } - } - - /** - * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteNodeIterator(NodeIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerNodeIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerPropertyIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerPropertyIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerVersionIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteVersionIterator(VersionIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerVersionIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerNodeTypeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerNodeTypeIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerRowIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteRowIterator(RowIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerRowIterator(iterator, this, - bufferSize)); - } - - public RemoteLockManager getRemoteLockManager(LockManager lockManager) - throws RemoteException { - return new ServerLockManager(lockManager, this); - } - - public RemoteVersionManager getRemoteVersionManager(Session session, - VersionManager versionManager) throws RemoteException { - return new ServerVersionManager(session, versionManager, this); - } - - /** - * Creates a - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager} - * instance. {@inheritDoc} - */ - public RemoteAccessControlManager getRemoteAccessControlManager( - AccessControlManager acm) throws RemoteException { - return new ServerAccessControlManager(acm, this); - } - - public RemotePrivilege getRemotePrivilege(final Privilege local) - throws RemoteException { - return new ServerPrivilege(local, this); - } - - public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) - throws RemoteException { - RemotePrivilege[] remote = new RemotePrivilege[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemotePrivilege(local[i]); - } - return remote; - } - - public RemoteAccessControlPolicy getRemoteAccessControlPolicy( - final AccessControlPolicy local) throws RemoteException { - if (local instanceof AccessControlList) { - return new ServerAccessControlList((AccessControlList) local, this); - } - return new ServerAccessControlPolicy(local, this); - } - - public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( - final AccessControlPolicy[] local) throws RemoteException { - RemoteAccessControlPolicy[] remote = new RemoteAccessControlPolicy[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemoteAccessControlPolicy(local[i]); - } - return remote; - } - - /** - * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteAccessControlPolicyIterator( - AccessControlPolicyIterator iterator) throws RemoteException { - return optimizeIterator(new ServerAccessControlPolicyIterator(iterator, - this, bufferSize)); - } - - public RemoteAccessControlEntry getRemoteAccessControlEntry( - final AccessControlEntry local) throws RemoteException { - return new ServerAccessControlEntry(local, this); - } - - public RemoteAccessControlEntry[] getRemoteAccessControlEntry( - final AccessControlEntry[] local) throws RemoteException { - RemoteAccessControlEntry[] remote = new RemoteAccessControlEntry[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemoteAccessControlEntry(local[i]); - } - return remote; - } - - public RemotePrincipal getRemotePrincipal(final Principal principal) throws RemoteException { - if (ServerGroup.isGroup(principal)) { - return new ServerGroup(principal, this); - } - - return new ServerPrincipal(principal, this); - } - - public RemoteIterator getRemotePrincipalIterator( - Iterator principals) throws RemoteException { - return optimizeIterator(new ServerPrincipalIterator(principals, this, - bufferSize)); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java deleted file mode 100644 index b88192ca798..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.observation.Event; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ServerEventCollection class implements the - * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection}event to - * actually sent the server-side event to the client. - *

    - * This class does not directly relate to any JCR class because beside the list - * of events the unique identifier of the client-side listener has to be - * provided such that the receiving listener may be identified on the - * client-side. - */ -@Deprecated(forRemoval = true) public class ServerEventCollection extends ServerObject implements - RemoteEventCollection { - - /** The unique identifier of the receiving listener */ - private final long listenerId; - - /** - * The list of - * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection.RemoteEvent}. - */ - private final RemoteEvent[] events; - - /** - * Creates an instance of this class. - * - * @param listenerId The unique identifier of the client-side listener to - * which the events should be sent. - * @param events The list of {@link RemoteEvent remote events}. - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - ServerEventCollection( - long listenerId, RemoteEvent[] events, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - - this.listenerId = listenerId; - this.events = events; - } - - /** {@inheritDoc} */ - public long getListenerId() { - return listenerId; - } - - /** {@inheritDoc} */ - public RemoteEvent[] getEvents() { - return events; - } - - /** - * Server side implementation of the {@link RemoteEvent} interface. - * - * {@inheritDoc} - */ - public static class ServerEvent extends ServerObject implements RemoteEvent { - - /** The adapted local event. */ - private Event event; - - /** - * Creates an instance of this class. - * @param type The event type. - * @param path The absolute path to the underlying item. - * @param userId The userID of the originating session. - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - ServerEvent(Event event, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.event = event; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - return event.getPath(); - } - - /** {@inheritDoc} */ - public int getType() { - return event.getType(); - } - - /** {@inheritDoc} */ - public String getUserID() { - return event.getUserID(); - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException, - RemoteException { - return event.getIdentifier(); - } - - /** {@inheritDoc} */ - public Map getInfo() throws RepositoryException, RemoteException { - return event.getInfo(); - } - - /** {@inheritDoc} */ - public String getUserData() throws RepositoryException, RemoteException { - return event.getUserData(); - } - - /** {@inheritDoc} */ - public long getDate() throws RepositoryException, RemoteException { - return event.getDate(); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java deleted file mode 100644 index d6bf0b24bc3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Item Item} interface. - * This class makes a local item available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} - * interface. Used mainly as the base class for the - * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} - * and {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} - * adapters. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.remote.RemoteItem - */ -@Deprecated(forRemoval = true) public class ServerItem extends ServerObject implements RemoteItem { - - /** The adapted local item. */ - private Item item; - - /** - * Creates a remote adapter for the given local item. - * - * @param item local item to be adapted - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerItem(Item item, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.item = item; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException, RemoteException { - try { - return item.getPath(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() throws RepositoryException, RemoteException { - try { - return item.getName(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException, RemoteException { - try { - item.save(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getAncestor(int level) - throws RepositoryException, RemoteException { - try { - return getRemoteItem(item.getAncestor(level)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getDepth() throws RepositoryException, RemoteException { - try { - return item.getDepth(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getParent() throws RepositoryException, RemoteException { - try { - return getRemoteNode(item.getParent()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isModified() throws RemoteException { - return item.isModified(); - } - - /** {@inheritDoc} */ - public boolean isNew() throws RemoteException { - return item.isNew(); - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) - throws RepositoryException, RemoteException { - try { - item.refresh(keepChanges); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void remove() throws RepositoryException, RemoteException { - try { - item.remove(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java deleted file mode 100644 index f9ad98d8c7b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDefinition} - * interface. This class makes a local item definition available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} - * interface. Used mainly as the base class for the - * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} - * adapters. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition - */ -@Deprecated(forRemoval = true) public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { - - /** The adapted local item definition. */ - private ItemDefinition def; - - /** - * Creates a remote adapter for the given local item definition. - * - * @param def local item definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerItemDefinition(ItemDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.def = def; - } - - /** {@inheritDoc} */ - public RemoteNodeType getDeclaringNodeType() throws RemoteException { - NodeType nt = def.getDeclaringNodeType(); - if (nt == null) { - return null; - } else { - return getFactory().getRemoteNodeType(nt); - } - } - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return def.getName(); - } - - /** {@inheritDoc} */ - public boolean isAutoCreated() throws RemoteException { - return def.isAutoCreated(); - } - - /** {@inheritDoc} */ - public boolean isMandatory() throws RemoteException { - return def.isMandatory(); - } - - /** {@inheritDoc} */ - public int getOnParentVersion() throws RemoteException { - return def.getOnParentVersion(); - } - - /** {@inheritDoc} */ - public boolean isProtected() throws RemoteException { - return def.isProtected(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java deleted file mode 100644 index 59db0f39fcb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.lock.Lock; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.lock.Lock Lock} interface. - * This class makes a local lock available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} - * interface. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.remote.RemoteLock - */ -@Deprecated(forRemoval = true) public class ServerLock extends ServerObject implements RemoteLock { - - /** The adapted local lock. */ - private Lock lock; - - /** - * Creates a remote adapter for the given local lock. - * - * @param lock local lock - * @throws RemoteException on RMI errors - */ - public ServerLock(Lock lock, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.lock = lock; - } - - /** {@inheritDoc} */ - public RemoteNode getNode() throws RemoteException { - return getRemoteNode(lock.getNode()); - } - - /** {@inheritDoc} */ - public String getLockOwner() throws RemoteException { - return lock.getLockOwner(); - } - - /** {@inheritDoc} */ - public boolean isDeep() throws RemoteException { - return lock.isDeep(); - } - - /** {@inheritDoc} */ - public String getLockToken() throws RemoteException { - return lock.getLockToken(); - } - - /** {@inheritDoc} */ - public boolean isLive() throws RepositoryException, RemoteException { - return lock.isLive(); - } - - /** {@inheritDoc} */ - public void refresh() throws RepositoryException, RemoteException { - lock.refresh(); - } - - /** {@inheritDoc} */ - public boolean isSessionScoped() throws RemoteException { - return lock.isSessionScoped(); - } - - /** {@inheritDoc} */ - public long getSecondsRemaining() throws RepositoryException, RemoteException { - return lock.getSecondsRemaining(); - } - - /** {@inheritDoc} */ - public boolean isLockOwningSession() throws RemoteException { - return lock.isLockOwningSession(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java deleted file mode 100644 index 9221f8c6b01..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.lock.LockManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; - -@Deprecated(forRemoval = true) public class ServerLockManager extends ServerObject - implements RemoteLockManager { - - /** The adapted local lock manager. */ - private LockManager manager; - - public ServerLockManager(LockManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.manager = manager; - } - - public String[] getLockTokens() throws RepositoryException { - try { - return manager.getLockTokens(); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void addLockToken(String lockToken) throws RepositoryException { - try { - manager.addLockToken(lockToken); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void removeLockToken(String lockToken) throws RepositoryException { - try { - manager.removeLockToken(lockToken); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean isLocked(String absPath) throws RepositoryException { - try { - return manager.isLocked(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean holdsLock(String absPath) throws RepositoryException { - try { - return manager.holdsLock(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteLock getLock(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(manager.getLock(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteLock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(manager.lock( - absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void unlock(String absPath) throws RepositoryException { - try { - manager.unlock(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java deleted file mode 100644 index 445ea42d2e8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. - * This class makes a local namespace registry available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} - * interface. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry - */ -@Deprecated(forRemoval = true) public class ServerNamespaceRegistry extends ServerObject implements - RemoteNamespaceRegistry { - - /** The adapted local namespace registry. */ - private NamespaceRegistry registry; - - /** - * Creates a remote adapter for the given local namespace registry. - * - * @param registry local namespace registry - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNamespaceRegistry( - NamespaceRegistry registry, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.registry = registry; - } - - /** {@inheritDoc} */ - public void registerNamespace(String prefix, String uri) - throws RepositoryException, RemoteException { - try { - registry.registerNamespace(prefix, uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unregisterNamespace(String prefix) - throws RepositoryException, RemoteException { - try { - registry.unregisterNamespace(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getPrefixes() throws RepositoryException, RemoteException { - try { - return registry.getPrefixes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getURIs() throws RepositoryException, RemoteException { - try { - return registry.getURIs(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getURI(String prefix) - throws RepositoryException, RemoteException { - try { - return registry.getURI(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrefix(String uri) - throws RepositoryException, RemoteException { - try { - return registry.getPrefix(uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java deleted file mode 100644 index cb2aa90c5aa..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java +++ /dev/null @@ -1,688 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.lock.Lock; -import javax.jcr.version.Version; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Node Node} interface. - * This class makes a local node available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} - * interface. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.remote.RemoteNode - */ -@Deprecated(forRemoval = true) public class ServerNode extends ServerItem implements RemoteNode { - - /** The adapted local node. */ - private Node node; - - /** - * Creates a remote adapter for the given local node. - * - * @param node local node - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNode(Node node, RemoteAdapterFactory factory) - throws RemoteException { - super(node, factory); - this.node = node; - } - - /** {@inheritDoc} */ - public RemoteNode addNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.addNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode addNode(String path, String type) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.addNode(path, type)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteProperty(node.getProperty(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getPrimaryItem() - throws RepositoryException, RemoteException { - try { - return getRemoteItem(node.getPrimaryItem()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties(String pattern) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties(pattern)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties(String[] globs) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties(globs)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getReferences() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getReferences()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getReferences(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getReferences(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException, RemoteException { - try { - return node.getIdentifier(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - @SuppressWarnings("deprecation") - public String getUUID() throws RepositoryException, RemoteException { - try { - return node.getUUID(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNodes() throws RepositoryException, RemoteException { - try { - return node.hasNodes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperties() throws RepositoryException, RemoteException { - try { - return node.hasProperties(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperty(String path) - throws RepositoryException, RemoteException { - try { - return node.hasProperty(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getMixinNodeTypes() - throws RepositoryException, RemoteException { - try { - return getRemoteNodeTypeArray(node.getMixinNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeType getPrimaryNodeType() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeType(node.getPrimaryNodeType()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) - throws RepositoryException, RemoteException { - try { - return node.isNodeType(type); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes(String pattern) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes(pattern)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes(String[] globs) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes(globs)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.getNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNode(String path) - throws RepositoryException, RemoteException { - try { - return node.hasNode(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value value) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteProperty(node.setProperty(name, value)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value value, int type) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, value, type); - if (property == null) { - return null; - } else { - return getFactory().getRemoteProperty(property); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addMixin(String name) - throws RepositoryException, RemoteException { - try { - node.addMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddMixin(String name) - throws RepositoryException, RemoteException { - try { - return node.canAddMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeMixin(String name) - throws RepositoryException, RemoteException { - try { - node.removeMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void orderBefore(String src, String dst) - throws RepositoryException, RemoteException { - try { - node.orderBefore(src, dst); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value[] values) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, values); - if (property == null) { - return null; - } else { - return getFactory().getRemoteProperty(property); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition getDefinition() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeDefinition(node.getDefinition()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion checkin() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(node.checkin()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void checkout() throws RepositoryException, RemoteException { - try { - node.checkout(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getCorrespondingNodePath(String workspace) - throws RepositoryException, RemoteException { - try { - return node.getCorrespondingNodePath(workspace); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getIndex() throws RepositoryException, RemoteException { - try { - return node.getIndex(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator merge(String workspace, boolean bestEffort) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.merge(workspace, bestEffort)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void cancelMerge(String versionUUID) - throws RepositoryException, RemoteException { - try { - node.cancelMerge(getVersionByUUID(versionUUID)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void doneMerge(String versionUUID) - throws RepositoryException, RemoteException { - try { - node.doneMerge(getVersionByUUID(versionUUID)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String version, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(version, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByUUID(String versionUUID, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(getVersionByUUID(versionUUID), removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String versionUUID, String path, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(getVersionByUUID(versionUUID), path, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restoreByLabel(label, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void update(String workspace) - throws RepositoryException, RemoteException { - try { - node.update(workspace); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean holdsLock() throws RepositoryException, RemoteException { - try { - return node.holdsLock(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isCheckedOut() throws RepositoryException, RemoteException { - try { - return node.isCheckedOut(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersionHistory getVersionHistory() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory(node.getVersionHistory()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getBaseVersion() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(node.getBaseVersion()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLocked() throws RepositoryException, RemoteException { - try { - return node.isLocked(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value[] values, int type) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, values, type); - return getFactory().getRemoteProperty(property); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unlock() throws RepositoryException, RemoteException { - try { - node.unlock(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteLock getLock() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(node.getLock()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteLock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException, RemoteException { - try { - Lock lock = node.lock(isDeep, isSessionScoped); - return getFactory().getRemoteLock(lock); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getSharedSet() - throws RepositoryException, RemoteException { - try { - NodeIterator sharedSet = node.getSharedSet(); - return getFactory().getRemoteNodeIterator(sharedSet); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void followLifecycleTransition(String transition) - throws RepositoryException, RemoteException { - try { - node.followLifecycleTransition(transition); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAllowedLifecycleTransistions() - throws RepositoryException, RemoteException { - try { - return node.getAllowedLifecycleTransistions(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getWeakReferences() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getWeakReferences()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getWeakReferences(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getWeakReferences(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeShare() throws RepositoryException, RemoteException { - try { - node.removeShare(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeSharedSet() throws RepositoryException, RemoteException { - try { - node.removeSharedSet(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setPrimaryType(String nodeTypeName) - throws RepositoryException, RemoteException { - try { - node.setPrimaryType(nodeTypeName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - //---------- Implementation helper ----------------------------------------- - - /** - * Returns the {@link Version} instance for the given UUID. - * - * @param versionUUID The UUID of the version. - * - * @return The version node. - * - * @throws RepositoryException if an error occurrs accessing the version - * node or if the UUID does not denote a version. - */ - protected Version getVersionByUUID(String versionUUID) - throws RepositoryException { - - // get the version node by its UUID from the version history's session - Session session = node.getSession(); - Node versionNode = session.getNodeByUUID(versionUUID); - - // check whether the node is a session, which it should be according - // to the spec (methods returning nodes should automatically return - // the correct type). - if (versionNode instanceof Version) { - return (Version) versionNode; - } - - // otherwise fail - throw new RepositoryException("Cannot find version " + versionUUID); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java deleted file mode 100644 index 9239a3e6542..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} - * interface. This class makes a local node definition available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} - * interface. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition - */ -@Deprecated(forRemoval = true) public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { - - /** The adapted node definition. */ - private NodeDefinition def; - - /** - * Creates a remote adapter for the given local node definition. - * - * @param def local node definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeDefinition(NodeDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(def, factory); - this.def = def; - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException { - return getRemoteNodeTypeArray(def.getRequiredPrimaryTypes()); - } - - /** {@inheritDoc} */ - public RemoteNodeType getDefaultPrimaryType() throws RemoteException { - NodeType nt = def.getDefaultPrimaryType(); - if (nt == null) { - return null; - } else { - return getFactory().getRemoteNodeType(def.getDefaultPrimaryType()); - } - } - - /** {@inheritDoc} */ - public boolean allowsSameNameSiblings() throws RemoteException { - return def.allowsSameNameSiblings(); - } - - /** {@inheritDoc} */ - public String getDefaultPrimaryTypeName() throws RemoteException { - return def.getDefaultPrimaryTypeName(); - } - - /** {@inheritDoc} */ - public String[] getRequiredPrimaryTypeNames() throws RemoteException { - return def.getRequiredPrimaryTypeNames(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java deleted file mode 100644 index c8881db8a53..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Value; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeType NodeType} - * interface. This class makes a local node type available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType - */ -@Deprecated(forRemoval = true) public class ServerNodeType extends ServerObject implements RemoteNodeType { - - /** The adapted local node type. */ - private NodeType type; - - /** - * Creates a remote adapter for the given local node type. - * - * @param type local node type - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeType(NodeType type, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.type = type; - } - - /** - * Utility method for creating an array of remote references for - * local node definitions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param defs local node definition array - * @return remote node definition array - * @throws RemoteException on RMI errors - */ - private RemoteNodeDefinition[] getRemoteNodeDefArray(NodeDefinition[] defs) - throws RemoteException { - if (defs != null) { - RemoteNodeDefinition[] remotes = - new RemoteNodeDefinition[defs.length]; - for (int i = 0; i < defs.length; i++) { - remotes[i] = getFactory().getRemoteNodeDefinition(defs[i]); - } - return remotes; - } else { - return new RemoteNodeDefinition[0]; // for safety - } - } - - /** - * Utility method for creating an array of remote references for - * local property definitions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param defs local property definition array - * @return remote property definition array - * @throws RemoteException on RMI errors - */ - private RemotePropertyDefinition[] getRemotePropertyDefArray( - PropertyDefinition[] defs) throws RemoteException { - if (defs != null) { - RemotePropertyDefinition[] remotes = - new RemotePropertyDefinition[defs.length]; - for (int i = 0; i < defs.length; i++) { - remotes[i] = getFactory().getRemotePropertyDefinition(defs[i]); - } - return remotes; - } else { - return new RemotePropertyDefinition[0]; // for safety - } - } - - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return type.getName(); - } - - /** {@inheritDoc} */ - public boolean isMixin() throws RemoteException { - return type.isMixin(); - } - - /** {@inheritDoc} */ - public boolean isAbstract() throws RemoteException { - return type.isAbstract(); - } - - /** {@inheritDoc} */ - public boolean hasOrderableChildNodes() throws RemoteException { - return type.hasOrderableChildNodes(); - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getSupertypes() throws RemoteException { - return getRemoteNodeTypeArray(type.getSupertypes()); - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getDeclaredSupertypes() throws RemoteException { - return getRemoteNodeTypeArray(type.getDeclaredSupertypes()); - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) throws RemoteException { - return this.type.isNodeType(type); - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition[] getPropertyDefs() throws RemoteException { - PropertyDefinition[] defs = type.getPropertyDefinitions(); - return getRemotePropertyDefArray(defs); - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition[] getDeclaredPropertyDefs() - throws RemoteException { - PropertyDefinition[] defs = type.getDeclaredPropertyDefinitions(); - return getRemotePropertyDefArray(defs); - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException { - return getRemoteNodeDefArray(type.getChildNodeDefinitions()); - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException { - return getRemoteNodeDefArray(type.getDeclaredChildNodeDefinitions()); - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value value) - throws RemoteException { - return type.canSetProperty(name, value); - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value[] values) - throws RemoteException { - return type.canSetProperty(name, values); - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name) throws RemoteException { - return type.canAddChildNode(name); - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name, String type) - throws RemoteException { - return this.type.canAddChildNode(name, type); - } - - /** {@inheritDoc} */ - public boolean canRemoveItem(String name) throws RemoteException { - return type.canRemoveItem(name); - } - - /** {@inheritDoc} */ - public String getPrimaryItemName() throws RemoteException { - return type.getPrimaryItemName(); - } - - /** {@inheritDoc} */ - public boolean canRemoveNode(String nodeName) { - return type.canRemoveNode(nodeName); - } - - /** {@inheritDoc} */ - public boolean canRemoveProperty(String propertyName) { - return type.canRemoveProperty(propertyName); - } - - /** {@inheritDoc} */ - public String[] getDeclaredSupertypeNames() { - return type.getDeclaredSupertypeNames(); - } - - /** {@inheritDoc} */ - public boolean isQueryable() { - return type.isQueryable(); - } - - /** {@inheritDoc} */ - public RemoteIterator getDeclaredSubtypes() throws RemoteException { - return getFactory().getRemoteNodeTypeIterator(type.getDeclaredSubtypes()); - } - - /** {@inheritDoc} */ - public RemoteIterator getSubtypes() throws RemoteException { - return getFactory().getRemoteNodeTypeIterator(type.getSubtypes()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java deleted file mode 100644 index 0da63de8771..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.nodetype.NodeTypeManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} - * interface. This class makes a local node type manager available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} - * interface. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager - */ -@Deprecated(forRemoval = true) public class ServerNodeTypeManager extends ServerObject - implements RemoteNodeTypeManager { - - /** The adapted local node type manager. */ - private NodeTypeManager manager; - - /** - * Creates a remote adapter for the given local node type manager. - * - * @param manager local node type manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeTypeManager( - NodeTypeManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.manager = manager; - } - - /** {@inheritDoc} */ - public RemoteNodeType getNodeType(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeType(manager.getNodeType(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getAllNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getPrimaryNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getPrimaryNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getMixinNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getMixinNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public boolean hasNodeType(String name) - throws RepositoryException, RemoteException { - try { - return manager.hasNodeType(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public void unregisterNodeTypes(String[] names) - throws RepositoryException, RemoteException { - try { - manager.unregisterNodeTypes(names); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java deleted file mode 100644 index 5a604f0f034..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.Serializable; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.util.ArrayList; -import java.util.List; - -import javax.jcr.AccessDeniedException; -import javax.jcr.InvalidItemStateException; -import javax.jcr.InvalidSerializedDataException; -import javax.jcr.Item; -import javax.jcr.ItemExistsException; -import javax.jcr.ItemNotFoundException; -import javax.jcr.LoginException; -import javax.jcr.MergeException; -import javax.jcr.NamespaceException; -import javax.jcr.NoSuchWorkspaceException; -import javax.jcr.Node; -import javax.jcr.PathNotFoundException; -import javax.jcr.Property; -import javax.jcr.ReferentialIntegrityException; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.Value; -import javax.jcr.ValueFormatException; -import javax.jcr.lock.LockException; -import javax.jcr.nodetype.ConstraintViolationException; -import javax.jcr.nodetype.NoSuchNodeTypeException; -import javax.jcr.nodetype.NodeType; -import javax.jcr.query.InvalidQueryException; -import javax.jcr.security.AccessControlException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionException; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Base class for remote adapters. The purpose of this class is to - * centralize the handling of the RemoteAdapterFactory instance used - * to instantiate new server adapters. - */ -@Deprecated(forRemoval = true) public class ServerObject extends UnicastRemoteObject { - - /** Factory for creating server adapters. */ - private RemoteAdapterFactory factory; - - /** - * Creates a basic server adapter that uses the given factory - * to create new adapters. - * - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - protected ServerObject(RemoteAdapterFactory factory) - throws RemoteException { - super(factory.getPortNumber()); - this.factory = factory; - } - - /** - * Returns the remote adapter factory used to create new adapters. - * - * @return remote adapter factory - */ - protected RemoteAdapterFactory getFactory() { - return factory; - } - - /** - * Returns a cleaned version of the given exception. In some cases - * the underlying repository implementation may throw exceptions - * that are either unserializable, use exception subclasses that are - * only locally available, contain references to unserializable or - * only locally available classes. This method returns a cleaned - * version of such an exception. The returned exception contains only - * the message string from the original exception, and uses the public - * JCR exception class that most specifically matches the original - * exception. - * - * @param ex the original exception - * @return clean exception - */ - protected RepositoryException getRepositoryException( - RepositoryException ex) { - if (ex instanceof AccessDeniedException) { - return new AccessDeniedException(ex.getMessage()); - } else if (ex instanceof ConstraintViolationException) { - return new ConstraintViolationException(ex.getMessage()); - } else if (ex instanceof InvalidItemStateException) { - return new InvalidItemStateException(ex.getMessage()); - } else if (ex instanceof InvalidQueryException) { - return new InvalidQueryException(ex.getMessage()); - } else if (ex instanceof InvalidSerializedDataException) { - return new InvalidSerializedDataException(ex.getMessage()); - } else if (ex instanceof ItemExistsException) { - return new ItemExistsException(ex.getMessage()); - } else if (ex instanceof ItemNotFoundException) { - return new ItemNotFoundException(ex.getMessage()); - } else if (ex instanceof LockException) { - return new LockException(ex.getMessage()); - } else if (ex instanceof LoginException) { - return new LoginException(ex.getMessage()); - } else if (ex instanceof MergeException) { - return new MergeException(ex.getMessage()); - } else if (ex instanceof NamespaceException) { - return new NamespaceException(ex.getMessage()); - } else if (ex instanceof NoSuchNodeTypeException) { - return new NoSuchNodeTypeException(ex.getMessage()); - } else if (ex instanceof NoSuchWorkspaceException) { - return new NoSuchWorkspaceException(ex.getMessage()); - } else if (ex instanceof PathNotFoundException) { - return new PathNotFoundException(ex.getMessage()); - } else if (ex instanceof ReferentialIntegrityException) { - return new ReferentialIntegrityException(ex.getMessage()); - } else if (ex instanceof UnsupportedRepositoryOperationException) { - return new UnsupportedRepositoryOperationException(ex.getMessage()); - } else if (ex instanceof ValueFormatException) { - return new ValueFormatException(ex.getMessage()); - } else if (ex instanceof VersionException) { - return new VersionException(ex.getMessage()); - } else if (ex instanceof AccessControlException) { - return new AccessControlException(ex.getMessage()); - } else { - return new RepositoryException(ex.getMessage()); - } - } - - /** - * Utility method for creating a remote reference for a local item. - * Unlike the factory method for creating remote item references, this - * method introspects the type of the local item and returns the - * corresponding node, property, or item remote reference using the - * remote adapter factory. - *

    - * If the item, this method calls the - * {@link #getRemoteNode(Node)} to return the correct remote type. - * - * @param item local node, property, or item - * @return remote node, property, or item reference - * @throws RemoteException on RMI errors - */ - protected RemoteItem getRemoteItem(Item item) throws RemoteException { - if (item instanceof Property) { - return factory.getRemoteProperty((Property) item); - } else if (item instanceof Node) { - return getRemoteNode((Node) item); - } else { - return factory.getRemoteItem(item); - } - } - - /** - * Utility method for creating a remote reference for a local node. - * Unlike the factory method for creating remote node references, this - * method introspects the type of the local node and returns the - * corresponding node, version, or version history remote reference using - * the remote adapter factory. - * - * @param node local version, versionhistory, or normal node - * @return remote node, property, or item reference - * @throws RemoteException on RMI errors - */ - protected RemoteNode getRemoteNode(Node node) throws RemoteException { - if (node instanceof Version) { - return factory.getRemoteVersion((Version) node); - } else if (node instanceof VersionHistory) { - return factory.getRemoteVersionHistory((VersionHistory) node); - } else { - return factory.getRemoteNode(node); - } - } - - /** - * Utility method for creating an array of remote references for - * local node types. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param types local node type array - * @return remote node type array - * @throws RemoteException on RMI errors - */ - protected RemoteNodeType[] getRemoteNodeTypeArray(NodeType[] types) - throws RemoteException { - if (types != null) { - RemoteNodeType[] remotes = new RemoteNodeType[types.length]; - for (int i = 0; i < types.length; i++) { - remotes[i] = factory.getRemoteNodeType(types[i]); - } - return remotes; - } else { - return new RemoteNodeType[0]; // for safety - } - } - - /** - * Utility method for preparing an array of values for serialization. - * The returned array will contain serializable versions of all the - * given values. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the values to be decorated - * @return array of decorated values - * @throws RepositoryException if the values can not be serialized - */ - protected Value[] getSerialValues(Value[] values) - throws RepositoryException { - List serials = new ArrayList(); - if (values != null) { - for (Value value : values) { - if (value != null) { - serials.add(getSerialValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Utility method for decorating a value. Note that the contents of the - * original values will only be copied when the decorators are serialized. - * Null referenced and already serializable values are passed as-is. - * - * @param value the value to be decorated, or null - * @return the decorated value, or null - * @throws RepositoryException if the value can not be serialized - */ - protected Value getSerialValue(Value value) throws RepositoryException { - // if the value is null or already serializable, just return it - if (value == null || value instanceof Serializable) { - return value; - } else { - return SerialValueFactory.makeSerialValue(value); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java deleted file mode 100644 index e1589876867..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.HashMap; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.observation.ObservationManager; - -import org.apache.jackrabbit.rmi.observation.Queue; -import org.apache.jackrabbit.rmi.observation.ServerEventListenerProxy; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.observation.ObservationManager ObservationManager} interface. - * This class makes a local item available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager RemoteObservationManager} - * interface. - *

    - * This class works in conjunction with the - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class to - * implement the distributed the event listener registration described in - * observation package - * comment. - * - * @see javax.jcr.observation.ObservationManager - * @see org.apache.jackrabbit.rmi.remote.RemoteObservationManager - */ -@Deprecated(forRemoval = true) public class ServerObservationManager extends ServerObject implements - RemoteObservationManager { - - /** The adapted local observation manager. */ - private ObservationManager observationManager; - - /** - * The map of event listener proxies indexed by the unique identifier. - */ - private Map proxyMap; - - /** - * The queue to which event listener proxies post events to be reported - * by the {@link #getNextEvent(long)} method. - */ - private Queue queue; - - /** - * Creates a remote adapter for the given local workspace. - * - * @param observationManager local observation manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerObservationManager(ObservationManager observationManager, - RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.observationManager = observationManager; - } - - /** {@inheritDoc} */ - public void addEventListener(long listenerId, int eventTypes, - String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, - boolean noLocal) throws RepositoryException, RemoteException { - - // find the proxy or create one - ServerEventListenerProxy proxy; - synchronized (this) { - if (proxyMap == null) { - proxyMap = new HashMap(); - } - - Long id = Long.valueOf(listenerId); - proxy = proxyMap.get(id); - if (proxy == null) { - proxy = new ServerEventListenerProxy(getFactory(), listenerId, - getQueue()); - proxyMap.put(id, proxy); - } - } - - // register the proxy with the observation manager - observationManager.addEventListener(proxy, eventTypes, absPath, - isDeep, uuid, nodeTypeName, noLocal); - } - - /** {@inheritDoc} */ - public void removeEventListener(long listenerId) - throws RepositoryException, RemoteException { - - // try to find the proxy in the map - ServerEventListenerProxy proxy; - synchronized (this) { - if (proxyMap == null) { - return; - } - - Long id = new Long(listenerId); - proxy = (ServerEventListenerProxy) proxyMap.remove(id); - if (proxy == null) { - return; - } - } - - // register the proxy with the observation manager - observationManager.removeEventListener(proxy); - } - - /** {@inheritDoc} */ - public RemoteEventCollection getNextEvent(long timeout) throws RemoteException { - // need the queue - checkQueue(); - - try { - if (timeout < 0) { - timeout = 0; - } - return (RemoteEventCollection) queue.get(timeout); - } catch (InterruptedException ie) { - // don't retry, but log - } - - // did not get anything, fall back to nothing - return null; - } - - //---------- internal ------------------------------------------------------ - - /** - * Makes sure, the {@link #queue} field is assigned a value. - */ - private synchronized void checkQueue() { - if (queue == null) { - queue = new Queue(); - } - } - - /** - * Returns the Channel allocating it if required. - * - * @return queue - */ - private Queue getQueue() { - checkQueue(); - return queue; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java deleted file mode 100644 index 1b1ab01d14f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Property Property} - * interface. This class makes a local property available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} - * interface. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.remote.RemoteProperty - */ -@Deprecated(forRemoval = true) public class ServerProperty extends ServerItem implements RemoteProperty { - - /** The adapted local property. */ - private Property property; - - /** - * Creates a remote adapter for the given local property. - * - * @param property local property - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerProperty(Property property, RemoteAdapterFactory factory) - throws RemoteException { - super(property, factory); - this.property = property; - } - - /** {@inheritDoc} */ - public Value getValue() throws RepositoryException, RemoteException { - try { - return SerialValueFactory.makeSerialValue(property.getValue()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException, RemoteException { - try { - return getSerialValues(property.getValues()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value value) - throws RepositoryException, RemoteException { - try { - property.setValue(value); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value[] values) - throws RepositoryException, RemoteException { - try { - property.setValue(values); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long getLength() throws RepositoryException, RemoteException { - try { - return property.getLength(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long[] getLengths() throws RepositoryException, RemoteException { - try { - return property.getLengths(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition getDefinition() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyDefinition(property.getDefinition()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getType() throws RepositoryException, RemoteException { - try { - return property.getType(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java deleted file mode 100644 index 647831ed2ab..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} interface. This - * class makes a local property definition available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition - */ -@Deprecated(forRemoval = true) public class ServerPropertyDefinition extends ServerItemDefinition - implements RemotePropertyDefinition { - - /** The adapted local property definition. */ - private PropertyDefinition def; - - /** - * Creates a remote adapter for the given local property definition. - * - * @param def local property definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerPropertyDefinition(PropertyDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(def, factory); - this.def = def; - } - - /** {@inheritDoc} */ - public int getRequiredType() throws RemoteException { - return def.getRequiredType(); - } - - /** {@inheritDoc} */ - public String[] getValueConstraints() throws RemoteException { - return def.getValueConstraints(); - } - - /** {@inheritDoc} */ - public Value[] getDefaultValues() throws RemoteException { - try { - return getSerialValues(def.getDefaultValues()); - } catch (RepositoryException e) { - throw new RemoteException("Unable to serialize default values"); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() throws RemoteException { - return def.isMultiple(); - } - - /** {@inheritDoc} */ - public String[] getAvailableQueryOperators() throws RemoteException { - return def.getAvailableQueryOperators(); - } - - /** {@inheritDoc} */ - public boolean isFullTextSearchable() throws RemoteException { - return def.isFullTextSearchable(); - } - - /** {@inheritDoc} */ - public boolean isQueryOrderable() throws RemoteException { - return def.isQueryOrderable(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java deleted file mode 100644 index 5cc63f8d4a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.query.Query; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.Query Query} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQuery RemoteQuery} - * interface. - * - * @see javax.jcr.query.Query - * @see org.apache.jackrabbit.rmi.remote.RemoteQuery - */ -@Deprecated(forRemoval = true) public class ServerQuery extends ServerObject implements RemoteQuery { - - /** The adapted local query manager. */ - private Query query; - - /** - * Creates a remote adapter for the given local Query. - * - * @param query local Query - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQuery(Query query, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.query = query; - } - - /** {@inheritDoc} */ - public RemoteQueryResult execute() - throws RepositoryException, RemoteException { - return getFactory().getRemoteQueryResult(query.execute()); - } - - /** {@inheritDoc} */ - public String getStatement() throws RemoteException { - return query.getStatement(); - } - - /** {@inheritDoc} */ - public String getLanguage() throws RemoteException { - return query.getLanguage(); - } - - /** {@inheritDoc} */ - public String getStoredQueryPath() - throws RepositoryException, RemoteException { - return query.getStoredQueryPath(); - } - - /** {@inheritDoc} */ - public RemoteNode storeAsNode(String absPath) - throws RepositoryException, RemoteException { - return getRemoteNode(query.storeAsNode(absPath)); - } - - /** {@inheritDoc} */ - public void bindValue(String varName, Value value) - throws RepositoryException, RemoteException { - query.bindValue(varName, value); - } - - /** {@inheritDoc} */ - public String[] getBindVariableNames() - throws RepositoryException, RemoteException { - try { - return query.getBindVariableNames(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setLimit(long limit) throws RemoteException { - query.setLimit(limit); - } - - /** {@inheritDoc} */ - public void setOffset(long offset) throws RemoteException { - query.setOffset(offset); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java deleted file mode 100644 index 4310bfc51eb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.InvalidQueryException; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.QueryManager QueryManager} - * interface. This class makes a local query manager available as an RMI - * service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryManager RemoteQueryManager} - * interface. - * - * @see javax.jcr.query.QueryManager - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager - */ -@Deprecated(forRemoval = true) public class ServerQueryManager extends ServerObject - implements RemoteQueryManager { - - /** The current session. */ - private Session session; - - /** The adapted local query manager. */ - private QueryManager manager; - - /** - * Creates a remote adapter for the given local query manager. - * - * @param session current session - * @param manager local query manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQueryManager( - Session session, QueryManager manager, ServerAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - this.manager = manager; - } - - /** {@inheritDoc} */ - public RemoteQuery createQuery(String statement, String language) - throws RepositoryException, RemoteException { - try { - Query query = manager.createQuery(statement, language); - return getFactory().getRemoteQuery(query); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteQuery getQuery(String absPath) - throws RepositoryException, RemoteException { - try { - Item item = session.getItem(absPath); - if (!item.isNode()) { - throw new InvalidQueryException("Not a query node: " + absPath); - } - return getFactory().getRemoteQuery(manager.getQuery((Node) item)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getSupportedQueryLanguages() - throws RepositoryException, RemoteException { - try { - return manager.getSupportedQueryLanguages(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java deleted file mode 100644 index 2a4cc66b298..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.query.QueryResult; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryResult RemoteQueryResult} - * interface. - * - * @see javax.jcr.query.QueryResult - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult - */ -@Deprecated(forRemoval = true) public class ServerQueryResult extends ServerObject - implements RemoteQueryResult { - - /** The adapted local query result. */ - private QueryResult result; - - /** - * Creates a remote adapter for the given local QueryResult. - * - * @param result local QueryResult - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQueryResult(QueryResult result, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.result = result; - } - - /** {@inheritDoc} */ - public String[] getColumnNames() - throws RepositoryException, RemoteException { - return result.getColumnNames(); - } - - /** {@inheritDoc} */ - public RemoteIterator getRows() throws RepositoryException, RemoteException { - return getFactory().getRemoteRowIterator(result.getRows()); - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes() throws RepositoryException, RemoteException { - return getFactory().getRemoteNodeIterator(result.getNodes()); - } - - /** {@inheritDoc} */ - public String[] getSelectorNames() throws RepositoryException, RemoteException { - return result.getSelectorNames(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java deleted file mode 100644 index 0cac82f6e25..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Repository Repository} - * interface. This class makes a local repository available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public class ServerRepository extends ServerObject implements RemoteRepository { - - /** The adapted local repository. */ - private Repository repository; - - /** - * Creates a remote adapter for the given local repository. - * - * @param repository local repository - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerRepository( - Repository repository, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.repository = repository; - } - - /** {@inheritDoc} */ - public String getDescriptor(String name) throws RemoteException { - return repository.getDescriptor(name); - } - - /** {@inheritDoc} */ - public String[] getDescriptorKeys() throws RemoteException { - return repository.getDescriptorKeys(); - } - - /** {@inheritDoc} */ - public RemoteSession login() throws RepositoryException, RemoteException { - try { - Session session = repository.login(); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(String workspace) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(workspace); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(Credentials credentials) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(credentials); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(Credentials credentials, String workspace) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(credentials, workspace); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getDescriptorValue(String key) throws RemoteException { - try { - return SerialValueFactory.makeSerialValue(repository.getDescriptorValue(key)); - } catch (RepositoryException ex) { - throw new RemoteException(ex.getMessage(), ex); - } - } - - /** {@inheritDoc} */ - public Value[] getDescriptorValues(String key) throws RemoteException { - try { - return SerialValueFactory.makeSerialValueArray(repository.getDescriptorValues(key)); - } catch (RepositoryException ex) { - throw new RemoteException(ex.getMessage(), ex); - } - } - - /** {@inheritDoc} */ - public boolean isSingleValueDescriptor(String key) throws RemoteException { - return repository.isSingleValueDescriptor(key); - } - - /** {@inheritDoc} */ - public boolean isStandardDescriptor(String key) throws RemoteException { - return repository.isStandardDescriptor(key); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java deleted file mode 100644 index f41571bdf5e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.query.Row; - -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.Row Row} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteRow RemoteRow} - * interface. - * - * @see javax.jcr.query.Row - * @see org.apache.jackrabbit.rmi.remote.RemoteRow - */ -@Deprecated(forRemoval = true) public class ServerRow extends ServerObject implements RemoteRow { - - /** The adapted local row. */ - private Row row; - - /** - * Creates a remote adapter for the given local query row. - * - * @param row local query row - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerRow(Row row, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.row = row; - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException, RemoteException { - try { - return getSerialValues(row.getValues()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getValue(String propertyName) - throws RepositoryException, RemoteException { - try { - return SerialValueFactory.makeSerialValue(row.getValue(propertyName)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode() - throws RepositoryException, RemoteException { - try { - return getRemoteNode(row.getNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String selectorName) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(row.getNode(selectorName)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() - throws RepositoryException, RemoteException { - try { - return row.getPath(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath(String selectorName) - throws RepositoryException, RemoteException { - try { - return row.getPath(selectorName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore() - throws RepositoryException, RemoteException { - try { - return row.getScore(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore(String selectorName) - throws RepositoryException, RemoteException { - try { - return row.getScore(selectorName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java deleted file mode 100644 index f5ce9c04c12..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Session Session} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} - * interface. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.remote.RemoteSession - */ -@Deprecated(forRemoval = true) public class ServerSession extends ServerObject implements RemoteSession { - - /** The adapted local session. */ - private Session session; - - /** - * The server workspace for this session. This field is assigned on demand - * by the first call to {@link #getWorkspace()}. The assumption is that - * there is only one workspace instance per session and that each call to - * the Session.getWorkspace() method of a single session will - * allways return the same object. - */ - private RemoteWorkspace remoteWorkspace; - - /** - * Creates a remote adapter for the given local session. - * - * @param session local session - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerSession(Session session, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - } - - /** {@inheritDoc} */ - public String getUserID() throws RemoteException { - return session.getUserID(); - } - - /** {@inheritDoc} */ - public Object getAttribute(String name) throws RemoteException { - return session.getAttribute(name); - } - - /** {@inheritDoc} */ - public String[] getAttributeNames() throws RemoteException { - return session.getAttributeNames(); - } - - /** {@inheritDoc} */ - public RemoteSession impersonate(Credentials credentials) - throws RepositoryException, RemoteException { - try { - Session newSession = session.impersonate(credentials); - return getFactory().getRemoteSession(newSession); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteWorkspace getWorkspace() throws RemoteException { - if (remoteWorkspace == null) { - remoteWorkspace = - getFactory().getRemoteWorkspace(session.getWorkspace()); - } - - return remoteWorkspace; - } - - /** {@inheritDoc} */ - public boolean hasPermission(String path, String actions) - throws RepositoryException, RemoteException { - return session.hasPermission(path, actions); - } - - /** {@inheritDoc} */ - public String getNamespacePrefix(String uri) - throws RepositoryException, RemoteException { - try { - return session.getNamespacePrefix(uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getNamespacePrefixes() - throws RepositoryException, RemoteException { - try { - return session.getNamespacePrefixes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespaceURI(String prefix) - throws RepositoryException, RemoteException { - try { - return session.getNamespaceURI(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setNamespacePrefix(String prefix, String uri) - throws RepositoryException, RemoteException { - try { - session.setNamespacePrefix(prefix, uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean itemExists(String path) throws RepositoryException, RemoteException { - return session.itemExists(path); - } - - /** {@inheritDoc} */ - public boolean nodeExists(String path) throws RepositoryException, RemoteException { - return session.nodeExists(path); - } - - /** {@inheritDoc} */ - public boolean propertyExists(String path) throws RepositoryException, RemoteException { - return session.propertyExists(path); - } - - /** {@inheritDoc} */ - public RemoteNode getNodeByIdentifier(String id) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNodeByIdentifier(id)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - @SuppressWarnings("deprecation") - public RemoteNode getNodeByUUID(String uuid) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNodeByUUID(uuid)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getRootNode() - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getRootNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getItem(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteItem(session.getItem(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException { - try { - return (RemoteProperty) getRemoteItem(session.getProperty(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPendingChanges() - throws RepositoryException, RemoteException { - try { - return session.hasPendingChanges(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeItem(String path) - throws RepositoryException, RemoteException { - try { - session.removeItem(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) - throws RepositoryException, RemoteException { - try { - session.move(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException, RemoteException { - try { - session.save(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) - throws RepositoryException, RemoteException { - try { - session.refresh(keepChanges); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void logout() throws RemoteException { - session.logout(); - } - - /** {@inheritDoc} */ - public boolean isLive() throws RemoteException { - return session.isLive(); - } - - /** {@inheritDoc} */ - public void importXML(String path, byte[] xml, int mode) - throws IOException, RepositoryException, RemoteException { - try { - session.importXML(path, new ByteArrayInputStream(xml), mode); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addLockToken(String token) throws RemoteException { - session.addLockToken(token); - } - - /** {@inheritDoc} */ - public String[] getLockTokens() throws RemoteException { - return session.getLockTokens(); - } - - /** {@inheritDoc} */ - public void removeLockToken(String token) throws RemoteException { - session.removeLockToken(token); - } - - /** {@inheritDoc} */ - public byte[] exportDocumentView( - String path, boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException, RemoteException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - session.exportDocumentView(path, buffer, binaryAsLink, noRecurse); - return buffer.toByteArray(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public byte[] exportSystemView( - String path, boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException, RemoteException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - session.exportSystemView(path, buffer, binaryAsLink, noRecurse); - return buffer.toByteArray(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteAccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, - RepositoryException, RemoteException { - try { - return getFactory().getRemoteAccessControlManager( - session.getAccessControlManager()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java deleted file mode 100644 index 2dda97f12aa..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.RepositoryException; -import javax.jcr.version.Version; - -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.version.Version Version} interface. - * This class makes a local version available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} - * interface. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.remote.RemoteVersion - */ -@Deprecated(forRemoval = true) public class ServerVersion extends ServerNode implements RemoteVersion { - - /** The adapted local version. */ - private Version version; - - /** - * Creates a remote adapter for the given local version. - * - * @param version local version - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerVersion(Version version, RemoteAdapterFactory factory) - throws RemoteException { - super(version, factory); - this.version = version; - } - - /** - * Utility method for creating an array of remote references for - * local versions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param versions local version array - * @return remote version array - * @throws RemoteException on RMI errors - */ - private RemoteVersion[] getRemoteVersionArray(Version[] versions) - throws RemoteException { - if (versions != null) { - RemoteVersion[] remotes = new RemoteVersion[versions.length]; - for (int i = 0; i < remotes.length; i++) { - remotes[i] = getFactory().getRemoteVersion(versions[i]); - } - return remotes; - } else { - return new RemoteVersion[0]; // for safety - } - } - - /** {@inheritDoc} */ - public RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory(version.getContainingHistory()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Calendar getCreated() throws RepositoryException { - try { - return version.getCreated(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getLinearSuccessor() throws RepositoryException, - RemoteException { - try { - Version linearSuccessor = version.getLinearSuccessor(); - if (linearSuccessor == null) { - return null; - } else { - return getFactory().getRemoteVersion(linearSuccessor); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException { - try { - return getRemoteVersionArray(version.getSuccessors()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getLinearPredecessor() throws RepositoryException, - RemoteException { - try { - Version linearPredecessor = version.getLinearPredecessor(); - if (linearPredecessor == null) { - return null; - } else { - return getFactory().getRemoteVersion(linearPredecessor); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException { - try { - return getRemoteVersionArray(version.getPredecessors()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getFrozenNode() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNode(version.getFrozenNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java deleted file mode 100644 index ac31de6c573..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.version.VersionHistory VersionHistory} - * interface. This class makes a local version history available as an RMI - * service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} - * interface. - * - * @see javax.jcr.version.VersionHistory - * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory - */ -@Deprecated(forRemoval = true) public class ServerVersionHistory extends ServerNode - implements RemoteVersionHistory { - - /** The adapted local version history. */ - private VersionHistory versionHistory; - - /** - * Creates a remote adapter for the given local version history. - * - * @param versionHistory local version history - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerVersionHistory(VersionHistory versionHistory, - RemoteAdapterFactory factory) throws RemoteException { - super(versionHistory, factory); - this.versionHistory = versionHistory; - } - - /** {@inheritDoc} */ - public String getVersionableIdentifier() throws RepositoryException, - RemoteException { - try { - return versionHistory.getVersionableIdentifier(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getRootVersion() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(versionHistory.getRootVersion()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllLinearVersions() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteVersionIterator( - versionHistory.getAllLinearVersions()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllVersions() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionIterator( - versionHistory.getAllVersions()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNodeIterator( - versionHistory.getAllLinearFrozenNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllFrozenNodes() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNodeIterator( - versionHistory.getAllFrozenNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getVersion(String versionName) - throws RepositoryException, RemoteException { - try { - Version version = versionHistory.getVersion(versionName); - return getFactory().getRemoteVersion(version); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getVersionByLabel(String label) - throws RepositoryException, RemoteException { - try { - Version version = versionHistory.getVersionByLabel(label); - return getFactory().getRemoteVersion(version); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addVersionLabel(String versionName, String label, - boolean moveLabel) throws RepositoryException, RemoteException { - try { - versionHistory.addVersionLabel(versionName, label, moveLabel); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersionLabel(String label) throws RepositoryException, - RemoteException { - try { - versionHistory.removeVersionLabel(label); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String label) throws RepositoryException, RemoteException { - return versionHistory.hasVersionLabel(label); - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String versionUUID, String label) - throws RepositoryException, RemoteException { - try { - Version version = getVersionByUUID(versionUUID); - return versionHistory.hasVersionLabel(version, label); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels() throws RepositoryException, RemoteException { - return versionHistory.getVersionLabels(); - } - - /** {@inheritDoc} */ - public String[] getVersionLabels(String versionUUID) - throws RepositoryException, RemoteException { - try { - Version version = getVersionByUUID(versionUUID); - return versionHistory.getVersionLabels(version); - } catch (ClassCastException cce) { - // we do not expect this here as nodes should be returned correctly - throw getRepositoryException(new RepositoryException(cce)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersion(String versionName) - throws RepositoryException, RemoteException { - try { - versionHistory.removeVersion(versionName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getVersionableUUID() throws RepositoryException, RemoteException { - return versionHistory.getVersionableUUID(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java deleted file mode 100644 index 61d2fd6f94d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; - -@Deprecated(forRemoval = true) public class ServerVersionManager extends ServerObject - implements RemoteVersionManager { - - private final Session session; - - private final VersionManager manager; - - public ServerVersionManager(Session session, - VersionManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - this.manager = manager; - } - - public RemoteVersion checkin(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(manager.checkin(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void checkout(String absPath) throws RepositoryException { - try { - manager.checkout(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersion checkpoint(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(manager.checkpoint(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode createActivity(String title) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNode(manager.createActivity(title)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode createConfiguration(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNode( - manager.createConfiguration(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode getActivity() - throws RepositoryException, RemoteException { - try { - Node activity = manager.getActivity(); - if (activity == null) { - return null; - } else { - return getFactory().getRemoteNode(activity); - } - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersion getBaseVersion(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion( - manager.getBaseVersion(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersionHistory getVersionHistory(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory( - manager.getVersionHistory(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean isCheckedOut(String absPath) - throws RepositoryException { - try { - return manager.isCheckedOut(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteIterator merge( - String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator( - manager.merge(absPath, srcWorkspace, bestEffort)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteIterator merge( - String absPath, String srcWorkspace, boolean bestEffort, - boolean isShallow) throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator( - manager.merge(absPath, srcWorkspace, bestEffort, isShallow)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void restore( - String absPath, String versionName, boolean removeExisting) - throws RepositoryException { - try { - manager.restore(absPath, versionName, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void restoreByLabel( - String absPath, String versionLabel, boolean removeExisting) - throws RepositoryException { - try { - manager.restoreByLabel(absPath, versionLabel, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void cancelMerge(String absPath, String versionIdentifier) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.cancelMerge(absPath, version); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void doneMerge(String absPath, String versionIdentifier) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.doneMerge(absPath, version); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restore(String[] versionIdentifiers, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - Version[] versions = new Version[versionIdentifiers.length]; - for (int i = 0; i < versions.length; i++) { - Version version = (Version) session.getNodeByIdentifier(versionIdentifiers[i]); - versions[i] = version; - } - manager.restore(versions, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restore(String versionIdentifier, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.restore(version, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public RemoteNode setActivity(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node newActivityNode; - if (activityNodeIdentifier == null) { - newActivityNode = null; - } else { - newActivityNode = session.getNodeByIdentifier(activityNodeIdentifier); - } - Node oldActivityNode = manager.setActivity(newActivityNode); - if (oldActivityNode == null) { - return null; - } else { - return getFactory().getRemoteNode(oldActivityNode); - } - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void removeActivity(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); - manager.removeActivity(activityNode); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public RemoteIterator merge(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); - return getFactory().getRemoteNodeIterator(manager.merge(activityNode)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restoreVI(String absPath, String versionIdentifier, - boolean removeExisting) throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.restore(absPath, version, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java deleted file mode 100644 index f3c18efbf40..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; -import javax.jcr.Workspace; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.QueryManager; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link Workspace Workspace} interface. - * This class makes a local workspace available as an RMI service using the - * {@link RemoteWorkspace RemoteWorkspace} interface. - * - * @see Workspace - * @see RemoteWorkspace - */ -@Deprecated(forRemoval = true) public class ServerWorkspace extends ServerObject implements RemoteWorkspace { - - /** The adapted local workspace. */ - private Workspace workspace; - - /** - * The remote observation manager for this workspace. This field is assigned - * on demand by the first call to {@link #getObservationManager()}. The - * assumption is that there is only one observation manager instance per - * workspace and that each call to the - * Workspace.getObservationManager() method of a single - * workspace will allways return the same object. - */ - private RemoteObservationManager remoteObservationManager; - - private RemoteLockManager remoteLockManager; - - private RemoteVersionManager remoteVersionManager; - - /** - * Creates a remote adapter for the given local workspace. - * - * @param workspace local workspace - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerWorkspace(Workspace workspace, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.workspace = workspace; - } - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return workspace.getName(); - } - - /** {@inheritDoc} */ - public void copy(String from, String to) - throws RepositoryException, RemoteException { - try { - workspace.copy(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String workspace, String from, String to) - throws RepositoryException, RemoteException { - try { - this.workspace.copy(workspace, from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void clone( - String workspace, String from, String to, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - this.workspace.clone(workspace, from, to, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) - throws RepositoryException, RemoteException { - try { - workspace.move(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeTypeManager getNodeTypeManager() - throws RepositoryException, RemoteException { - try { - NodeTypeManager manager = workspace.getNodeTypeManager(); - return getFactory().getRemoteNodeTypeManager(manager); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNamespaceRegistry getNamespaceRegistry() - throws RepositoryException, RemoteException { - try { - NamespaceRegistry registry = workspace.getNamespaceRegistry(); - return getFactory().getRemoteNamespaceRegistry(registry); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteQueryManager getQueryManager() - throws RepositoryException, RemoteException { - try { - QueryManager queryManager = workspace.getQueryManager(); - return getFactory().getRemoteQueryManager( - workspace.getSession(), queryManager); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteObservationManager getObservationManager() - throws RepositoryException, RemoteException { - try { - if (remoteObservationManager == null) { - ObservationManager observationManager = - workspace.getObservationManager(); - remoteObservationManager = - getFactory().getRemoteObservationManager(observationManager); - } - return remoteObservationManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAccessibleWorkspaceNames() - throws RepositoryException, RemoteException { - try { - return workspace.getAccessibleWorkspaceNames(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException { - try { - workspace.importXML( - path, new ByteArrayInputStream(xml), uuidBehaviour); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public void createWorkspace(String name, String source) - throws RepositoryException, RemoteException { - if (source != null) { - workspace.createWorkspace(name, source); - } else { - workspace.createWorkspace(name); - } - } - - public void deleteWorkspace(String name) - throws RepositoryException, RemoteException { - workspace.deleteWorkspace(name); - } - - /** {@inheritDoc} */ - public RemoteLockManager getLockManager() - throws RepositoryException, RemoteException { - try { - if (remoteLockManager == null) { - LockManager lockManager = workspace.getLockManager(); - remoteLockManager = - getFactory().getRemoteLockManager(lockManager); - } - return remoteLockManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public RemoteVersionManager getVersionManager() - throws RepositoryException, RemoteException { - try { - if (remoteVersionManager == null) { - VersionManager versionManager = workspace.getVersionManager(); - remoteVersionManager = - getFactory().getRemoteVersionManager(workspace.getSession(), versionManager); - } - return remoteVersionManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java deleted file mode 100644 index 661c027f8ce..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Session; -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.SerializableXid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for XA-enabled sessions. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ServerXASession extends ServerSession implements RemoteXASession { - - /** - * The adapted local XA resource - */ - private final XAResource resource; - - /** - * Creates a remote adapter for the given local, transaction enabled, - * session. - */ - public ServerXASession( - Session session, XAResource resource, RemoteAdapterFactory factory) - throws RemoteException { - super(session, factory); - this.resource = resource; - } - - private static XAException getXAException(XAException e) { - return new XAException(e.getMessage()); - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - resource.commit(xid, onePhase); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - resource.end(xid, flags); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void forget(Xid xid) throws XAException { - try { - resource.forget(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public int getTransactionTimeout() throws XAException { - try { - return resource.getTransactionTimeout(); - } catch (XAException e) { - throw getXAException(e); - } - } - - public int prepare(Xid xid) throws XAException { - try { - return resource.prepare(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public Xid[] recover(int flag) throws XAException { - try { - Xid[] xids = resource.recover(flag); - for (int i = 0; i < xids.length; i++) { - xids[i] = new SerializableXid(xids[i]); - } - return xids; - } catch (XAException e) { - throw getXAException(e); - } - } - - public void rollback(Xid xid) throws XAException { - try { - resource.rollback(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - try { - return resource.setTransactionTimeout(seconds); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - resource.start(xid, flags); - } catch (XAException e) { - throw getXAException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java deleted file mode 100644 index f675dd453a8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link RangeIterator} interface. This - * class makes a local iterator available as an RMI service using the - * {@link RemoteIterator} interface. - */ -@Deprecated(forRemoval = true) public abstract class ServerIterator extends ServerObject - implements RemoteIterator { - - /** The adapted local iterator. */ - private final RangeIterator iterator; - - /** The maximum number of elements to send per request. */ - private final int maxBufferSize; - - /** - * The cached number of elements in the iterator, -1 if the iterator - * size is unknown, or -2 if the size has not been retrieved from the - * adapted local iterator. This variable is useful in cases when the - * underlying iterator does not know its sizes (getSize() returns -1) - * but we reach the end of the iterator in a nextObjects() call and - * can thus determine the size of the iterator. - */ - private long size; - - /** - * Creates a remote adapter for the given local item. - * - * @param iterator local iterator to be adapted - * @param factory remote adapter factory - * @param maxBufferSize maximum buffer size - * @throws RemoteException on RMI errors - */ - public ServerIterator( - RangeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(factory); - this.iterator = iterator; - this.maxBufferSize = maxBufferSize; - this.size = -2; - } - - /** - * Returns the size of the iterator. The size is cached by invoking the - * adapted local iterator when this method is first called or by - * determining the size from an end-of-iterator condition in nextObjects(). - * - * @return size of the iterator - * @throws RemoteException on RMI errors - */ - @Override - public long getSize() throws RemoteException { - if (size == -2) { - size = iterator.getSize(); - } - return size; - } - - /** - * Skips the given number of elements. - * - * @param items number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - */ - @Override - public void skip(long items) - throws NoSuchElementException, RemoteException { - try { - iterator.skip(items); - } catch (NoSuchElementException e) { - throw new NoSuchElementException(e.getMessage()); - } - } - - /** - * Returns a remote adapter for the given local object. This abstract - * method is used by {@link #nextObjects()} to convert the local - * objects to remote references to be sent to the client. - *

    - * Subclasses should implement this method to use the remote adapter - * factory to create remote adapters of the specific element type. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - */ - protected abstract Object getRemoteObject(Object object) - throws RemoteException; - - /** - * Returns an array of remote references to the next elements in this - * iteration. - * - * @return array of remote references, or null - * @throws RemoteException on RMI errors - */ - @Override - public Object[] nextObjects() throws RemoteException { - ArrayList items = new ArrayList(); - while (items.size() < maxBufferSize && iterator.hasNext()) { - items.add(getRemoteObject(iterator.next())); - } - if (items.size() > 0) { - return items.toArray(new Object[items.size()]); - } else { - size = iterator.getPosition(); - return null; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java deleted file mode 100644 index 471e6859be2..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating nodes. - */ -@Deprecated(forRemoval = true) public class ServerNodeIterator extends ServerIterator { - - /** - * Creates a ServerNodeIterator instance. - * - * @param iterator local node iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerNodeIterator( - NodeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given node. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getRemoteNode((Node) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java deleted file mode 100644 index 5e817880f84..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating node types. - */ -@Deprecated(forRemoval = true) public class ServerNodeTypeIterator extends ServerIterator { - - /** - * Creates a ServerNodeTypeIterator instance. - * - * @param iterator local node type iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerNodeTypeIterator( - NodeTypeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given node type. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteNodeType((NodeType) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java deleted file mode 100644 index 47862666941..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.Property; -import javax.jcr.PropertyIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating properties. - */ -@Deprecated(forRemoval = true) public class ServerPropertyIterator extends ServerIterator { - - /** - * Creates a ServerPropertyIterator instance. - * - * @param iterator local property iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerPropertyIterator( - PropertyIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given property. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteProperty((Property) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java deleted file mode 100644 index 07ea0a3a8e8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating rows. - */ -@Deprecated(forRemoval = true) public class ServerRowIterator extends ServerIterator { - - /** - * Creates a ServerRowIterator instance. - * - * @param iterator local row iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerRowIterator( - RowIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given row. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteRow((Row) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java deleted file mode 100644 index b235f259344..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.version.Version; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating versions. - */ -@Deprecated(forRemoval = true) public class ServerVersionIterator extends ServerIterator { - - /** - * Creates a ServerVersionIterator instance. - * - * @param iterator local version iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerVersionIterator( - VersionIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given version.. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteVersion((Version) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java deleted file mode 100755 index a6b11fd475a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java deleted file mode 100644 index 62b10c3e543..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.jmx; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.Properties; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; -import javax.naming.InitialContext; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * MBean that registers a JCR RMI server through JNDI. - */ -@Deprecated(forRemoval = true) public class JCRServer implements JCRServerMBean { - - /** - * local repository address - */ - private String localAddress; - - /** - * remote repository address - */ - private String remoteAddress; - - /** - * Optional local JNDI environment properties - */ - private String localEnvironment; - - /** - * Optional remote JNDI environment properties - */ - private String remoteEnvironment; - - /** - * Remote repository instance - */ - RemoteRepository remote; - - /** - * Local repository instance - */ - private Repository localRepository; - - public void start() throws Exception { - - if (this.localAddress == null) { - throw new IllegalStateException("local repository address is null"); - } - - if (this.remoteAddress == null) { - throw new IllegalStateException("remote repository address is null"); - } - - // local repository - InitialContext localContext = createInitialContext(localEnvironment); - localRepository = (Repository) localContext.lookup(this.localAddress); - if (localRepository == null) { - throw new IllegalArgumentException("local repository not found at " - + this.localAddress); - } - - // remote repository - InitialContext remoteContext = createInitialContext(remoteEnvironment); - RemoteAdapterFactory factory = new ServerAdapterFactory(); - remote = factory.getRemoteRepository(localRepository); - - // bind remote server - remoteContext.bind(this.remoteAddress, remote); - } - - /** - * - * @param jndiProps - * jndi environment properties - * @return an InitialContext for the given environment properties - * @throws Exception - * if any error occurs - */ - private InitialContext createInitialContext(String jndiProps) - throws Exception { - InitialContext initialContext = null; - if (jndiProps != null) { - InputStream is = new ByteArrayInputStream(jndiProps.getBytes()); - Properties props = new Properties(); - props.load(is); - initialContext = new InitialContext(props); - } else { - initialContext = new InitialContext(); - } - return initialContext; - } - - public void stop() throws Exception { - // unbind remote server - InitialContext ctx = new InitialContext(); - ctx.unbind(this.remoteAddress); - remote = null; - } - - public void createWorkspace( - String username, String password, String name) - throws RepositoryException { - Session session = localRepository.login( - new SimpleCredentials(username, password.toCharArray())); - try { - session.getWorkspace().createWorkspace(name); - } finally { - session.logout(); - } - } - - public String getLocalAddress() { - return localAddress; - } - - public void setLocalAddress(String localAddress) { - this.localAddress = localAddress; - } - - public String getRemoteAddress() { - return remoteAddress; - } - - public void setRemoteAddress(String remoteAddress) { - this.remoteAddress = remoteAddress; - } - - public String getLocalEnvironment() { - return localEnvironment; - } - - public void setLocalEnvironment(String localEnvironment) { - this.localEnvironment = localEnvironment; - } - - public String getRemoteEnvironment() { - return remoteEnvironment; - } - - public void setRemoteEnvironment(String remoteEnvironment) { - this.remoteEnvironment = remoteEnvironment; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java deleted file mode 100644 index cb8a76a48bb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.jmx; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface JCRServerMBean { - - void start() throws Exception; - - void stop() throws Exception; - - /** - * Creates a workspace in the managed repository. - * - * @param username administrator username - * @param password administrator password - * @param workspace name of the workspace to create - * @throws RepositoryException if the workspace could not be created - */ - void createWorkspace(String username, String password, String workspace) - throws RepositoryException; - - String getLocalAddress(); - - void setLocalAddress(String address); - - String getRemoteAddress(); - - void setRemoteAddress(String address); - - String getRemoteEnvironment(); - - void setRemoteEnvironment(String remoteEnvironment); - - String getLocalEnvironment(); - - void setLocalEnvironment(String localEnvironment); - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java deleted file mode 100755 index 26c77efd422..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.jmx; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java deleted file mode 100755 index 99ee18d2327..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java deleted file mode 100644 index 256929b7ea9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Iterator; - -import org.apache.jackrabbit.api.security.principal.GroupPrincipal; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -@Deprecated(forRemoval = true) public class ServerGroup extends ServerPrincipal implements RemoteGroup { - - public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory) - throws RemoteException { - super(principal, factory); - } - - public ServerGroup(final Principal principal, final RemoteAdapterFactory factory) - throws RemoteException { - super(principal, factory); - } - - public boolean isMember(String member) { - return isMember(member, getPrincipal()); - } - - public RemoteIterator members() throws RemoteException { - Iterator members = new Iterator() { - final Enumeration base = members(getPrincipal()); - - public boolean hasNext() { - return base.hasMoreElements(); - } - - public Principal next() { - return base.nextElement(); - } - - public void remove() { - throw new UnsupportedOperationException("remove"); - } - }; - return getFactory().getRemotePrincipalIterator(members); - } - - private static boolean isMember(final String memberName, final Principal group) { - Enumeration pe = members(group); - while (pe.hasMoreElements()) { - Principal p = pe.nextElement(); - if (memberName.equals(p.getName())) { - return true; - } - - if (isGroup(p) && isMember(memberName, p)) { - return true; - } - } - return false; - } - - public static boolean isGroup(Principal principal) { - return principal instanceof GroupPrincipal; - } - - private static Enumeration members(Principal principal) { - if (principal instanceof GroupPrincipal) { - return ((GroupPrincipal) principal).members(); - } - return Collections.emptyEnumeration(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java deleted file mode 100644 index c7d3dc414b3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerPrincipal extends ServerObject implements RemotePrincipal { - - private final Principal principal; - - public ServerPrincipal(final Principal principal, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.principal = principal; - } - - public String getName() { - return principal.getName(); - } - - /** - * Returns the {@link Principal} encapsulated in this instance. - *

    - * NOTE: This method is intended to only be used in the JCR RMI - * implementation to be able to "send back" remote principals to the server - * for implementation of the remote JCR API. - * - * @return the {@link Principal} encapsulated in this instance. - */ - public Principal getPrincipal() { - return principal; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java deleted file mode 100644 index 1d5cb1c1bc7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Iterator; -import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; - -@Deprecated(forRemoval = true) public class ServerPrincipalIterator extends ServerIterator { - - public ServerPrincipalIterator(Iterator iterator, - RemoteAdapterFactory factory, int maxBufferSize) - throws RemoteException { - super(new RangeIteratorAdapter(iterator), factory, maxBufferSize); - } - - /** - * {@inheritDoc} - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemotePrincipal((Principal) object); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java deleted file mode 100755 index a51fb001028..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("4.0.0") -package org.apache.jackrabbit.rmi.server.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java deleted file mode 100644 index ae6ed38cfe7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlEntry; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlEntry extends ServerObject implements - RemoteAccessControlEntry { - - private final AccessControlEntry ace; - - public ServerAccessControlEntry(final AccessControlEntry ace, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.ace = ace; - } - - public RemotePrincipal getPrincipal() throws RemoteException { - return getFactory().getRemotePrincipal(ace.getPrincipal()); - } - - public RemotePrivilege[] getPrivileges() throws RemoteException { - return getFactory().getRemotePrivilege(ace.getPrivileges()); - } - - AccessControlEntry getAccessControlEntry() { - return ace; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java deleted file mode 100644 index d4e3bf475a7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.RepositoryException; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; - -@Deprecated(forRemoval = true) public class ServerAccessControlList extends ServerAccessControlPolicy - implements RemoteAccessControlList { - - public ServerAccessControlList(final AccessControlList acl, - final RemoteAdapterFactory factory) throws RemoteException { - super(acl, factory); - } - - public RemoteAccessControlEntry[] getAccessControlEntries() - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlEntry( - ((AccessControlList) getAccessControlPolicy()).getAccessControlEntries()); - } - - public boolean addAccessControlEntry(RemotePrincipal principal, - RemotePrivilege[] privileges) throws RepositoryException { - - Principal p = null; - if (principal instanceof ServerPrincipal) { - p = ((ServerPrincipal) principal).getPrincipal(); - } - Privilege[] privs = new Privilege[privileges.length]; - for (int i = 0; privs != null && i < privs.length; i++) { - if (privileges[i] instanceof ServerPrivilege) { - privs[i] = ((ServerPrivilege) privileges[i]).getPrivilege(); - } else { - // not a compatible remote privilege, abort - privs = null; - } - } - - if (p != null && privs != null) { - return ((AccessControlList) getAccessControlPolicy()).addAccessControlEntry( - p, privs); - } - - throw new RepositoryException("Unsupported Remote types"); - } - - public void removeAccessControlEntry(RemoteAccessControlEntry ace) - throws RepositoryException { - if (ace instanceof ServerAccessControlEntry) { - AccessControlEntry lace = ((ServerAccessControlEntry) ace).getAccessControlEntry(); - ((AccessControlList) getAccessControlPolicy()).removeAccessControlEntry(lace); - } else { - throw new RepositoryException( - "Unsupported RemoteAccessControlEntry type " + ace.getClass()); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java deleted file mode 100644 index 84b451156ee..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlManager extends ServerObject implements - RemoteAccessControlManager { - - private final AccessControlManager acm; - - public ServerAccessControlManager(AccessControlManager acm, - RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.acm = acm; - } - - public RemoteIterator getApplicablePolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicyIterator( - acm.getApplicablePolicies(absPath)); - } - - public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicy( - acm.getEffectivePolicies(absPath)); - } - - public RemoteAccessControlPolicy[] getPolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicy( - acm.getPolicies(absPath)); - } - - public RemotePrivilege[] getPrivileges(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege(acm.getPrivileges(absPath)); - } - - public RemotePrivilege[] getSupportedPrivileges(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege( - acm.getSupportedPrivileges(absPath)); - } - - public boolean hasPrivileges(String absPath, String[] privileges) - throws RepositoryException { - Privilege[] privs = new Privilege[privileges.length]; - for (int i = 0; i < privs.length; i++) { - privs[i] = acm.privilegeFromName(privileges[i]); - } - - return acm.hasPrivileges(absPath, privs); - } - - public RemotePrivilege privilegeFromName(String privilegeName) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege( - acm.privilegeFromName(privilegeName)); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java deleted file mode 100644 index 0e6c75cb2d3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlPolicy; - -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlPolicy extends ServerObject implements - RemoteAccessControlPolicy { - - private final AccessControlPolicy acp; - - public ServerAccessControlPolicy(final AccessControlPolicy acp, - final RemoteAdapterFactory factory) - - throws RemoteException { - super(factory); - this.acp = acp; - } - - AccessControlPolicy getAccessControlPolicy() { - return acp; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java deleted file mode 100644 index 5f17ca941d9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating rows. - */ -@Deprecated(forRemoval = true) public class ServerAccessControlPolicyIterator extends ServerIterator { - - /** - * Creates a ServerRowIterator instance. - * - * @param iterator local row iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerAccessControlPolicyIterator( - AccessControlPolicyIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given row. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteAccessControlPolicy( - (AccessControlPolicy) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java deleted file mode 100644 index 8fd174319e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; -import java.rmi.server.RemoteStub; - -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerPrivilege extends ServerObject implements RemotePrivilege { - - private final Privilege privilege; - - public ServerPrivilege(final Privilege privilege, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.privilege = privilege; - } - - public RemotePrivilege[] getAggregatePrivileges() throws RemoteException { - return getFactory().getRemotePrivilege( - privilege.getAggregatePrivileges()); - } - - public RemotePrivilege[] getDeclaredAggregatePrivileges() - throws RemoteException { - return getFactory().getRemotePrivilege( - privilege.getDeclaredAggregatePrivileges()); - } - - public String getName() { - return privilege.getName(); - } - - public boolean isAbstract() { - return privilege.isAbstract(); - } - - public boolean isAggregate() { - return privilege.isAggregate(); - } - - Privilege getPrivilege() { - return privilege; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java deleted file mode 100755 index ebf25621192..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java deleted file mode 100644 index d4a5bf109f0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.FilterInputStream; -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.nio.charset.StandardCharsets; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Abstract base class for {@link Value} implementations. This class - * implements all {@link Value} methods except getString and - * getType. - *

    - * Most of the default value getters always throw {@link ValueFormatException}s - * and expect type-specific subclasses to override that behaviour with the - * appropriate value conversions. - *

    - * The {@link #getBinary()} method is implemented based on the abstract - * {@link #getString()} method, but subclasses can override that default - * implementation. - *

    - * The {@link #getStream()} method uses {@link #getBinary()} to implement - * the deprecated JCR 1.0 behaviour. This method must not be overridden. - */ -@Deprecated(forRemoval = true) abstract class AbstractValue implements Value, Serializable { - - /** - * Serial version UID - */ - private static final long serialVersionUID = -1989277354799918598L; - - /** - * The stream instance returned by {@link #getStream()}. Note that - * the stream is not included when serializing the value. - */ - private transient InputStream stream = null; - - /** - * Returns the stream representation of this value. This method implements - * the deprecated JCR 1.0 behaviour of always returning the same stream - * instance. The stream is retrieved from a {@link Binary} instance - * returned by {@link #getBinary()}. - * - * @return stream representation of this value - * @throws RepositoryException if the stream can not be created - */ - public synchronized final InputStream getStream() - throws RepositoryException { - if (stream == null) { - final Binary binary = getBinary(); - try { - stream = new FilterInputStream(binary.getStream()) { - @Override - public void close() throws IOException { - super.close(); - binary.dispose(); - } - }; - } finally { - // Proper cleanup also when binary.getStream() fails - if (stream == null) { - binary.dispose(); - } - } - } - return stream; - } - - /** - * Returns the binary representation of this value. The default - * implementation uses the UTF-8 serialization of the string returned - * by {@link #getString()}. Subclasses - */ - public Binary getBinary() throws RepositoryException { - final byte[] value = getString().getBytes(StandardCharsets.UTF_8); - return new Binary() { - public int read(byte[] b, long position) { - if (position >= value.length) { - return -1; - } else { - int p = (int) position; - int n = Math.min(b.length, value.length - p); - System.arraycopy(value, p, b, 0, n); - return n; - } - } - public InputStream getStream() { - return new ByteArrayInputStream(value); - } - public long getSize() { - return value.length; - } - public void dispose() { - } - }; - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to boolean is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * boolean. - */ - public boolean getBoolean() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_BOOLEAN); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to Calender is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * Calendar instance. - */ - public Calendar getDate() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_DATE); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to a {@link BigDecimal} is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * {@link BigDecimal}. - */ - public BigDecimal getDecimal() throws RepositoryException { - throw getValueFormatException(PropertyType.TYPENAME_DECIMAL); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to double is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * double. - */ - public double getDouble() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_DOUBLE); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to long is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * long. - */ - public long getLong() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_LONG); - } - - /** - * Returns a ValueFormatException with a message indicating - * what kind of type conversion is not supported. - * - * @return nothing - * @param destType The name of the value type to which this value cannot - * be converted. - */ - protected ValueFormatException getValueFormatException(String destType) { - return new ValueFormatException( - "Cannot convert value \"" + this + "\" of type " - + PropertyType.nameFromValue(getType()) + " to " + destType); - } - - //--------------------------------------------------------------< Object > - - /** - * Compares values as defined in the JCR specification. - * - * @param object value for comparison - * @return true if the values are equal, - * false otherwise - * @see JCRRMI-16 - */ - public boolean equals(Object object) { - try { - return (object instanceof Value) - && getType() == ((Value) object).getType() - && getString().equals(((Value) object).getString()); - } catch (RepositoryException e) { - return false; - } - } - - /** - * Returns a hash code that's in line with how the {@link #equals(Object)} - * method is implemented. - * - * @return hash code of this value - */ - public int hashCode() { - try { - return getType() + getString().hashCode(); - } catch (RepositoryException e) { - return getType(); - } - } - - /** - * Returns a string representation of this value. - * - * @return value string - */ - public String toString() { - try { - return getString(); - } catch (RepositoryException e) { - return PropertyType.nameFromValue(getType()); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java deleted file mode 100644 index 3ab01d1b2bd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.Serializable; -import java.math.BigDecimal; -import java.nio.charset.StandardCharsets; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Binary value. - */ -@Deprecated(forRemoval = true) class BinaryValue implements Value, Serializable { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 1719020811685971215L; - - /** - * The binary value - */ - private final Binary value; - - /** - * The stream instance returned by {@link #getStream()}. Note that - * the stream is not included when serializing the value. - */ - private transient InputStream stream = null; - - /** - * Creates a binary value. - */ - public BinaryValue(Binary value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#BINARY}. - */ - public int getType() { - return PropertyType.BINARY; - } - - public Binary getBinary() { - return value; - } - - public String getString() throws RepositoryException { - try { - InputStream stream = value.getStream(); - try { - Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8); - StringBuilder builder = new StringBuilder(); - char[] buffer = new char[1024]; - int n = reader.read(buffer); - while (n != -1) { - builder.append(buffer, 0, n); - n = reader.read(buffer); - } - return builder.toString(); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RepositoryException("Unable to read the binary value", e); - } - } - - public synchronized InputStream getStream() throws RepositoryException { - if (stream == null) { - stream = value.getStream(); - } - return stream; - } - - public boolean getBoolean() throws RepositoryException { - return new StringValue(getString()).getBoolean(); - } - - public Calendar getDate() throws RepositoryException { - return new StringValue(getString()).getDate(); - } - - public BigDecimal getDecimal() throws RepositoryException { - return new StringValue(getString()).getDecimal(); - } - - public double getDouble() throws RepositoryException { - return new StringValue(getString()).getDouble(); - } - - public long getLong() throws RepositoryException { - return new StringValue(getString()).getLong(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java deleted file mode 100644 index 030dc5622b0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Boolean value. - */ -@Deprecated(forRemoval = true) class BooleanValue extends AbstractValue { - - /** - * Serial version UID - */ - private static final long serialVersionUID = 5266937874230536517L; - - /** - * The boolean value - */ - private final boolean value; - - /** - * Creates an instance for the given boolean value. - */ - public BooleanValue(boolean value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#BOOLEAN}. - */ - public int getType() { - return PropertyType.BOOLEAN; - } - - /** - * Returns the boolean value. - */ - @Override - public boolean getBoolean() { - return value; - } - - /** - * The boolean is converted using {@link Boolean#toString()}. - */ - public String getString() { - return Boolean.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java deleted file mode 100644 index 51e0931bd82..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Date value. - */ -@Deprecated(forRemoval = true) class DateValue extends AbstractValue { - - /** - * Serial version UID - */ - private static final long serialVersionUID = -2382837055824423966L; - - // misc. numeric formats used in formatting - private static final DecimalFormat XX_FORMAT = new DecimalFormat("00"); - private static final DecimalFormat XXX_FORMAT = new DecimalFormat("000"); - private static final DecimalFormat XXXX_FORMAT = new DecimalFormat("0000"); - - /** - * The date value - */ - private final Calendar value; - - /** - * Creates an instance for the given date value. - * - * @param value the date value - */ - public DateValue(Calendar value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DATE}. - */ - public int getType() { - return PropertyType.DATE; - } - - /** - * Returns a copy of this Calendar value. Modifying the - * returned Calendar does not change the value of this - * instance. - */ - @Override - public Calendar getDate() { - return (Calendar) value.clone(); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - */ - @Override - public BigDecimal getDecimal() { - return new BigDecimal(value.getTimeInMillis()); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number - * is out-of-range for a double, a ValueFormatException is thrown. - */ - @Override - public double getDouble() { - return value.getTimeInMillis(); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number - * is out-of-range for a long, a ValueFormatException is thrown. - */ - @Override - public long getLong() { - return value.getTimeInMillis(); - } - - /** - * The date is converted to the following format: - * sYYYY-MM-DDThh:mm:ss.sssTZD - * where: - *

    - *
    sYYYY
    - *
    - * Four-digit year with optional leading positive (โ€˜+โ€™) or - * negative (โ€˜-โ€™) sign. 0000 , -0000 and +0000 all indicate - * the year 1 BCE. โ€“YYYY where YYYY is the number y indicates - * the year (y+1) BCE. The absence of a sign or the presence - * of a positive sign indicates a year CE. For example, -0054 - * would indicate the year 55 BCE, while +1969 and 1969 - * indicate the year 1969 CE. - *
    - *
    MM
    - *
    - * Two-digit month (01 = January, etc.) - *
    - *
    DD
    - *
    - * Two-digit day of month (01 through 31) - *
    - *
    hh
    - *
    - * Two digits of hour (00 through 23, or 24 if mm is 00 and - * ss.sss is 00.000) - *
    - *
    mm
    - *
    - * Two digits of minute (00 through 59) - *
    - *
    ss.sss
    - *
    - * Seconds, to three decimal places (00.000 through 59.999 or - * 60.999 in the case of leap seconds) - *
    - *
    TZD
    - *
    - * Time zone designator (either Z for Zulu, i.e. UTC, or +hh:mm or - * -hh:mm, i.e. an offset from UTC) - *
    - *
    - *

    - * Note that the โ€œTโ€ separating the date from the time and the - * separators โ€œ-โ€and โ€œ:โ€ appear literally in the string. - *

    - * This format is a subset of the format defined by ISO 8601:2004. - * If the DATE value cannot be represented in this format a - * {@link ValueFormatException} is thrown. - */ - public String getString() { - // determine era and adjust year if necessary - int year = value.get(Calendar.YEAR); - if (value.isSet(Calendar.ERA) - && value.get(Calendar.ERA) == GregorianCalendar.BC) { - // calculate year using astronomical system: - // year n BCE => astronomical year - n + 1 - year = 0 - year + 1; - } - - // note that we cannot use java.text.SimpleDateFormat for - // formatting because it can't handle years <= 0 and TZD's - StringBuilder buf = new StringBuilder(32); - - // year ([-]YYYY) - buf.append(XXXX_FORMAT.format(year)); - buf.append('-'); - // month (MM) - buf.append(XX_FORMAT.format(value.get(Calendar.MONTH) + 1)); - buf.append('-'); - // day (DD) - buf.append(XX_FORMAT.format(value.get(Calendar.DAY_OF_MONTH))); - buf.append('T'); - // hour (hh) - buf.append(XX_FORMAT.format(value.get(Calendar.HOUR_OF_DAY))); - buf.append(':'); - // minute (mm) - buf.append(XX_FORMAT.format(value.get(Calendar.MINUTE))); - buf.append(':'); - // second (ss) - buf.append(XX_FORMAT.format(value.get(Calendar.SECOND))); - buf.append('.'); - // millisecond (SSS) - buf.append(XXX_FORMAT.format(value.get(Calendar.MILLISECOND))); - - // time zone designator (Z or +00:00 or -00:00) - TimeZone tz = value.getTimeZone(); - // time zone offset (in minutes) from UTC (including daylight saving) - int offset = tz.getOffset(value.getTimeInMillis()) / 1000 / 60; - if (offset != 0) { - int hours = Math.abs(offset / 60); - int minutes = Math.abs(offset % 60); - buf.append(offset < 0 ? '-' : '+'); - buf.append(XX_FORMAT.format(hours)); - buf.append(':'); - buf.append(XX_FORMAT.format(minutes)); - } else { - buf.append('Z'); - } - - return buf.toString(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java deleted file mode 100644 index 718907220c7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Decimal value. - */ -@Deprecated(forRemoval = true) class DecimalValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 2077767642124007133L; - - /** - * The minimum value for date conversion. - */ - private static final BigDecimal MIN_DATE = - BigDecimal.valueOf(Long.MIN_VALUE); - - /** - * The maximum value for date conversion. - */ - private static final BigDecimal MAX_DATE = - BigDecimal.valueOf(Long.MAX_VALUE); - - /** - * The decimal value. - */ - private final BigDecimal value; - - /** - * Creates an instance for the given decimal value. - */ - public DecimalValue(BigDecimal value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DECIMAL}. - */ - public int getType() { - return PropertyType.DECIMAL; - } - - /** - * The decimal is converted to a long and interpreted as the number of - * milliseconds since 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - * If the resulting value is out of range for a date, - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - if (value.compareTo(MIN_DATE) >= 0 && value.compareTo(MAX_DATE) <= 0) { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis(getLong()); - return date; - } else { - throw new ValueFormatException( - "Decimal value is outside the date range: " + value); - } - } - - /** - * Returns the decimal value. - */ - @Override - public BigDecimal getDecimal() { - return value; - } - - /** - * The decimal is converted using {@link BigDecimal#doubleValue()}. - */ - @Override - public double getDouble() { - return value.doubleValue(); - } - - /** - * The decimal is converted using {@link BigDecimal#longValue()}. - */ - @Override - public long getLong() { - return value.longValue(); - } - - /** - * The decimal is converted using {@link BigDecimal#toString()}. - */ - public String getString() { - return value.toString(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java deleted file mode 100644 index e11828313da..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Double value. - */ -@Deprecated(forRemoval = true) class DoubleValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -2767063038068929611L; - - /** - * The double value. - */ - private final double value; - - /** - * Creates an instance for the given double value. - */ - public DoubleValue(double value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DOUBLE}. - */ - public int getType() { - return PropertyType.DOUBLE; - } - - /** - * Returns a Calendar instance interpreting the double as the - * time in milliseconds since the epoch (1.1.1970, 0:00, UTC). If the - * resulting value is out of range for a date, - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - if (Long.MIN_VALUE <= value && value <= Long.MAX_VALUE) { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis((long) value); - return date; - } else { - throw new ValueFormatException( - "Double value is outside the date range: " + value); - } - } - - /** - * The double is converted using the constructor - * {@link BigDecimal#BigDecimal(double)}. - */ - @Override - public BigDecimal getDecimal() { - return new BigDecimal(value); - } - - /** - * Returns the double value. - */ - @Override - public double getDouble() { - return value; - } - - /** - * Standard Java type coercion is used. - */ - @Override - public long getLong() { - return (long) value; - } - - /** - * The double is converted using {@link Double#toString(double)}. - */ - public String getString() { - return Double.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java deleted file mode 100644 index 4e813f1d94d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Long value. - */ -@Deprecated(forRemoval = true) class LongValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -5983072186237752887L; - - /** The long value */ - private final long value; - - /** - * Creates an instance for the given long value. - */ - public LongValue(long value) { - this.value = value; - } - - /** - * Returns PropertyType.LONG. - */ - public int getType() { - return PropertyType.LONG; - } - - /** - * The long is interpreted as the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - */ - @Override - public Calendar getDate() { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis(value); - return date; - } - - /** - * The long is converted using the method {@link BigDecimal#valueOf(long)}. - */ - @Override - public BigDecimal getDecimal() { - return BigDecimal.valueOf(value); - } - - /** - * Standard Java type coercion is used. - */ - @Override - public double getDouble() { - return value; - } - - /** - * Returns the long value. - */ - @Override - public long getLong() { - return value; - } - - /** - * The long is converted using {@link Long#toString(long)}. - */ - public String getString() { - return Long.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java deleted file mode 100644 index 5c26a5cec58..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The NameValue class implements the committed value state for - * Name values as a part of the State design pattern (Gof) used by this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class NameValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 4598175360244278453L; - - /** The name value. */ - private final String value; - - /** - * Creates an instance for the given name value. - */ - protected NameValue(String value) throws ValueFormatException { - // TODO: Check name format - this.value = value; - } - - /** - * Returns PropertyType.NAME. - */ - public int getType() { - return PropertyType.NAME; - } - - /** - * Returns the string representation of the Name value. - */ - public String getString() throws RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java deleted file mode 100644 index 1efe3f5ef3e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The PathValue class implements the committed value state for - * Path values as a part of the State design pattern (Gof) used by this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class PathValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 6233090249008329224L; - - /** The path value. */ - private final String value; - - /** - * Creates an instance for the given path value. - */ - protected PathValue(String value) throws ValueFormatException { - // TODO: Check path format - this.value = value; - } - - /** - * Returns PropertyType.PATH. - */ - public int getType() { - return PropertyType.PATH; - } - - /** - * Returns the string representation of the path value. - */ - public String getString() throws ValueFormatException, RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java deleted file mode 100644 index 6e55a573c60..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ReferenceValue class implements the committed value state - * for Reference values as a part of the State design pattern (Gof) used by - * this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class ReferenceValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 5245358709465803351L; - - /** The reference value */ - private final String value; - - /** - * Creates an instance for the given reference value. - */ - protected ReferenceValue(String value) throws ValueFormatException { - // TODO: check syntax - this.value = value; - } - - /** - * Returns PropertyType.REFERENCE. - */ - public int getType() { - return PropertyType.REFERENCE; - } - - /** - * Returns the string representation of the reference value. - */ - public String getString() throws ValueFormatException, RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java deleted file mode 100644 index 9d1173fb1f8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.List; - -import javax.jcr.Binary; -import javax.jcr.Node; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.ValueFactory; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The SerialValueFactory class is used in the RMI infrastructure - * to create serializable Value instances on the client side. - *

    - * This class works in conjunction with the implementations of the - * javax.jcr.Value interface found in this package. - *

    - * This class may be extended to overwrite any of the - * createXXXValue methods to create instances of the respective - * type of {@link Value} implementation. The - * methods of the ValueFactory interface are declared final to - * guard against breaking the rules. - */ -@Deprecated(forRemoval = true) public class SerialValueFactory implements ValueFactory { - - /** The singleton value factory instance */ - private static final SerialValueFactory INSTANCE = new SerialValueFactory(); - - /** - * Returns the ValueFactory instance, which currently is a - * singleton instance of this class. - *

    - * Future revisions will support some kind of configuration to specify - * which concrete class should be used. - */ - public static final SerialValueFactory getInstance() { - return INSTANCE; - } - - /** - * Utility method for decorating an array of values. The returned array will - * contain serializable value decorators for all the given values. Note that - * the contents of the original values will only be copied when the - * decorators are serialized. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the values to be decorated - * @return array of decorated values - * @throws RepositoryException if the values can not be serialized - */ - public static Value[] makeSerialValueArray(Value[] values) - throws RepositoryException { - List serials = new ArrayList(); - if (values != null) { - for (Value value : values) { - if (value != null) { - serials.add(makeSerialValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Utility method for decorating a value. Note that the contents of the - * original values will only be copied when the decorators are serialized. - * Null referenced and already serializable values are passed as-is. - * - * @param value the value to be decorated, or null - * @return the decorated value, or null - * @throws RepositoryException if the value can not be serialized - */ - public static Value makeSerialValue(Value value) throws RepositoryException { - // if the value is null or already serializable, just return it - if (value == null || value instanceof Serializable) { - return value; - } else { - return INSTANCE.createValue(value); - } - } - - /** - * Utility method for converting an array of strings to serializable - * string values. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the string array - * @return array of string values - */ - public static Value[] makeSerialValueArray(String[] values) { - List serials = new ArrayList(); - if (values != null) { - for (String value : values) { - if (value != null) { - serials.add(INSTANCE.createValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Default constructor only visible to extensions of this class. See - * class comments for details. - */ - protected SerialValueFactory() { - } - - /** {@inheritDoc} */ - public Value createValue(String value) { - return new StringValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(String value, int type) - throws ValueFormatException { - try { - return createValue(new StringValue(value), type); - } catch (ValueFormatException e) { - throw e; - } catch (RepositoryException e) { - throw new ValueFormatException( - "Unexpected error when creating value: " + value, e); - } - } - - private Value createValue(Value value) throws RepositoryException { - return createValue(value, value.getType()); - } - - private Value createValue(Value value, int type) - throws RepositoryException { - switch (type) { - case PropertyType.BINARY: - Binary binary = value.getBinary(); - try { - return createValue(binary.getStream()); - } finally { - binary.dispose(); - } - case PropertyType.BOOLEAN: - return createValue(value.getBoolean()); - case PropertyType.DATE: - return createValue(value.getDate()); - case PropertyType.DECIMAL: - return createValue(value.getDecimal()); - case PropertyType.DOUBLE: - return createValue(value.getDouble()); - case PropertyType.LONG: - return createValue(value.getLong()); - case PropertyType.NAME: - return new NameValue(value.getString()); - case PropertyType.PATH: - return new PathValue(value.getString()); - case PropertyType.REFERENCE: - return new ReferenceValue(value.getString()); - case PropertyType.STRING: - return createValue(value.getString()); - default: - throw new ValueFormatException("Unknown value type " + type); - } - } - - /** {@inheritDoc} */ - public final Value createValue(long value) { - return new LongValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(double value) { - return new DoubleValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(boolean value) { - return new BooleanValue(value); - } - - /** {@inheritDoc} */ - public Value createValue(BigDecimal value) { - return new DecimalValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(Calendar value) { - return new DateValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(InputStream value) { - try { - return createValue(createBinary(value)); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to create a binary value", e); - } - } - - /** {@inheritDoc} */ - public final Value createValue(Node value) throws RepositoryException { - return createValue(value.getUUID(), PropertyType.REFERENCE); - } - - public Binary createBinary(InputStream stream) throws RepositoryException { - try { - try { - return new SerializableBinary(stream); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RepositoryException("Unable to read binary stream", e); - } - } - - public Value createValue(Binary value) { - return new BinaryValue(value); - } - - public Value createValue(Node value, boolean weak) - throws RepositoryException { - return new ReferenceValue(value.getUUID()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java deleted file mode 100644 index 8da0a56a920..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.io.RandomAccessFile; -import java.io.Serializable; - -import javax.jcr.Binary; -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Serializable binary. - */ -@Deprecated(forRemoval = true) class SerializableBinary implements Binary, Serializable { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -7742179594834275853L; - - private static final int BUFFER_SIZE = 64 * 1024; - - private transient long length; - - private transient byte[] data; - - private transient File file; - - /** - * Creates a binary from the given stream. The stream is not closed. - * - * @param stream binary stream - */ - public SerializableBinary(InputStream stream) throws IOException { - length = 0; - data = null; - file = null; - - OutputStream output = null; - try { - byte[] buffer = new byte[BUFFER_SIZE]; - int n = stream.read(buffer); - while (n != -1) { - length += n; - if (length < buffer.length) { - n = stream.read( - buffer, (int) length, buffer.length - (int) length); - } else { - if (file == null) { - file = File.createTempFile("jackrabbit-jcr-rmi-", null); - output = new FileOutputStream(file); - output.write(buffer); - } else { - output.write(buffer, 0, n); - } - n = stream.read(buffer); - } - } - if (file == null) { - data = new byte[(int) length]; - System.arraycopy(buffer, 0, data, 0, (int) length); - } - } finally { - if (output != null) { - output.close(); - } - } - } - - public synchronized int read(byte[] b, long position) - throws RepositoryException { - if (position < 0 || position >= length) { - return -1; - } else if (data != null) { - int n = Math.min(b.length, data.length - (int) position); - System.arraycopy(data, (int) position, b, 0, n); - return n; - } else if (file != null) { - try { - RandomAccessFile random = new RandomAccessFile(file, "r"); - try { - random.seek(position); - return random.read(b); - } finally { - random.close(); - } - } catch (FileNotFoundException e) { - throw new RepositoryException("Binary file is missing", e); - } catch (IOException e) { - throw new RepositoryException("Unable to read the binary", e); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - public synchronized InputStream getStream() throws RepositoryException { - if (data != null) { - return new ByteArrayInputStream(data); - } else if (file != null) { - try { - return new FileInputStream(file); - } catch (FileNotFoundException e) { - throw new RepositoryException("Binary file is missing", e); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - public long getSize() { - return length; - } - - public synchronized void dispose() { - data = null; - if (file != null) { - file.delete(); - file = null; - } - } - - private synchronized void writeObject(ObjectOutputStream stream) - throws IOException { - stream.writeLong(length); - if (data != null) { - stream.write(data); - } else if (file != null) { - InputStream input = new FileInputStream(file); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - int n = input.read(buffer); - while (n != -1) { - stream.write(buffer, 0, n); - n = input.read(buffer); - } - } finally { - input.close(); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - private void readObject(ObjectInputStream stream) - throws IOException { - length = stream.readLong(); - if (length <= BUFFER_SIZE) { - data = new byte[(int) length]; - stream.readFully(data); - file = null; - } else { - data = null; - file = File.createTempFile("jackrabbit-jcr-rmi-", null); - OutputStream output = new FileOutputStream(file); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - long count = 0; - int n = stream.read(buffer); - while (n != -1 && count < length) { - output.write(buffer, 0, n); - count += n; - n = stream.read(buffer, 0, Math.min( - buffer.length, (int) (length - count))); - } - } finally { - output.close(); - } - } - } - - public void finalize() { - dispose(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java deleted file mode 100644 index 8d9ffb85ccd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * String value. - */ -@Deprecated(forRemoval = true) class StringValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 220963478492833703L; - - /** The string value */ - private final String value; - - /** - * Creates an instance for the given string value. - */ - public StringValue(String value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#STRING}. - */ - public int getType() { - return PropertyType.STRING; - } - - /** - * The string is converted using {@link Boolean#valueOf(String)}. - */ - @Override - public boolean getBoolean() { - return Boolean.valueOf(value); - } - - /** - * If the string is in the format described in - * {@link DateValue#getString()}, it is converted directly, otherwise - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - // check optional leading sign - char sign = '+'; - int start = 0; - if (value.startsWith("-")) { - sign = '-'; - start = 1; - } else if (value.startsWith("+")) { - sign = '+'; - start = 1; - } - - // note that we cannot use java.text.SimpleDateFormat for - // parsing because it can't handle years <= 0 and TZD's - int year, month, day, hour, min, sec, ms; - String tzID; - try { - // year (YYYY) - year = Integer.parseInt(value.substring(start, start + 4)); - start += 4; - // delimiter '-' - if (value.charAt(start) != '-') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // month (MM) - month = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter '-' - if (value.charAt(start) != '-') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // day (DD) - day = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter 'T' - if (value.charAt(start) != 'T') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // hour (hh) - hour = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter ':' - if (value.charAt(start) != ':') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // minute (mm) - min = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter ':' - if (value.charAt(start) != ':') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // second (ss) - sec = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter '.' - if (value.charAt(start) != '.') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // millisecond (SSS) - ms = Integer.parseInt(value.substring(start, start + 3)); - start += 3; - // time zone designator (Z or +00:00 or -00:00) - if (value.charAt(start) == '+' || value.charAt(start) == '-') { - // offset to UTC specified in the format +00:00/-00:00 - tzID = "GMT" + value.substring(start); - } else if (value.substring(start).equals("Z")) { - tzID = "GMT"; - } else { - throw new ValueFormatException( - "Invalid time zone in a date: " + value); - } - } catch (IndexOutOfBoundsException e) { - throw new ValueFormatException("Not a date: " + value, e); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a date: " + value, e); - } - - TimeZone tz = TimeZone.getTimeZone(tzID); - // verify id of returned time zone (getTimeZone defaults to "GMT") - if (!tz.getID().equals(tzID)) { - throw new ValueFormatException( - "Invalid time zone in a date: " + value); - } - - // initialize Calendar object - Calendar cal = Calendar.getInstance(tz); - cal.setLenient(false); - // year and era - if (sign == '-' || year == 0) { - // not CE, need to set era (BCE) and adjust year - cal.set(Calendar.YEAR, year + 1); - cal.set(Calendar.ERA, GregorianCalendar.BC); - } else { - cal.set(Calendar.YEAR, year); - cal.set(Calendar.ERA, GregorianCalendar.AD); - } - // month (0-based!) - cal.set(Calendar.MONTH, month - 1); - // day of month - cal.set(Calendar.DAY_OF_MONTH, day); - // hour - cal.set(Calendar.HOUR_OF_DAY, hour); - // minute - cal.set(Calendar.MINUTE, min); - // second - cal.set(Calendar.SECOND, sec); - // millisecond - cal.set(Calendar.MILLISECOND, ms); - - try { - // the following call will trigger an IllegalArgumentException - // if any of the set values are illegal or out of range - cal.getTime(); - } catch (IllegalArgumentException e) { - throw new ValueFormatException("Not a date: " + value, e); - } - - return cal; - } - - /** - * The string is converted using the constructor - * {@link BigDecimal#BigDecimal(String)}. - */ - @Override - public BigDecimal getDecimal() throws ValueFormatException { - try { - return new BigDecimal(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a decimal value: " + value, e); - } - } - - - /** - * The string is converted using {@link Double#valueOf(String)}. - */ - @Override - public double getDouble() throws ValueFormatException { - try { - return Double.valueOf(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a double value: " + value, e); - } - } - - /** - * The string is converted using {@link Long#valueOf(String)}. - */ - @Override - public long getLong() throws ValueFormatException { - try { - return Long.valueOf(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a long value: " + value, e); - } - } - - /** - * Returns the string value. - */ - public String getString() { - return value; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java deleted file mode 100755 index 05fc56e6e4c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.value; diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html deleted file mode 100644 index 2bcd960b8e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html +++ /dev/null @@ -1,19 +0,0 @@ - - -Local adapters for remote iterators. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html deleted file mode 100644 index bc61b5b85f7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html +++ /dev/null @@ -1,76 +0,0 @@ - - -Client implementation of the transparent JCR-RMI layer. -

    -This package contains the default client implementation of the -transparent JCR-RMI layer. The classes in this package can be used -to make a remote JCR-RMI service seem like a local JCR repository. -

    -The contents of this package is designed using two design patterns, -Factory and Adapter. All the ClientObject subclasses implement the -Adapter pattern to adapt a remote JCR-RMI reference to the corresponding -local JCR interface. The Factory pattern is used to centralize the -creation and configuration of all adapter instances. - -

    Looking up a JCR-RMI client

    -

    -The ClientRepositoryFactory class provides a convenient mechanism for -looking up a remote JCR-RMI repository. The factory can be used either -directly or as a JNDI object factory. -

    -The following example shows how to use the ClientRepositoryFactory -directly: - -

    -    String name = ...; // The RMI URL of the repository
    -    
    -    ClientRepositoryFactory factory = new ClientRepositoryFactory();
    -    Repository repository = factory.getRepository(name);
    -
    - -

    -The ClientRepositoryFactory can also be used via JNDI. The following -example settings and code demonstrate how to configure and use the -transparent JCR-RMI layer in a Tomcat 5.5 web application: - -

    -context.xml:
    -    <Resource name="jcr/Repository" auth="Container"
    -              type="javax.jcr.Repository"
    -              factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
    -              url="..."/>
    -              
    -web.xml:
    -    <resource-env-ref>
    -      <description>The external content repository</description>
    -      <resource-env-ref-name>jcr/Repository</resource-env-ref-name>
    -      <resource-env-ref-type>javac.jcr.Repository</resource-env-ref-type>
    -    </resource-env-ref>
    -
    -...SomeServlet.java:
    -    Context initial = new InitialContext();
    -    Context context = (Context) initial.lookup("java:comp/env");
    -    Repository repository = (Repository) context.lookup("jcr/Repository");
    -
    - -

    -Note that in the example above only the context.xml configuration file -contains a direct references to the JCR-RMI layer. All other parts of the -web application can be implemented using the standard JCR interfaces. - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html deleted file mode 100644 index 00327bdc80e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Utility classes for implementing JCR iterators based on static arrays. -

    -This package contains array-based implementations of the JCR -{@link javax.jcr.RangeIterator RangeIterator} interfaces. -

    -These utility classes were designed for the transparent JCR-RMI layer, -but can easily be used as a part of any JCR repository implementation. -This package depends only on the standard JCR and J2SE APIs. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html deleted file mode 100644 index 79e5eac5cac..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html +++ /dev/null @@ -1,71 +0,0 @@ - - -

    -Helper class used by the observation manager classes. -The JCR observation framework defines a notification mechanism where an -EventListener is registered with the observation manager -to receive certain events during the lifetime of the registration. For -the remote case, where the repository and the application run in different -Java VMs on possibly different hosts, there are issues related to the -observation framework. -

    -The listener mechanism is a call-back mechanism where the server calls -code in the client application. The client application code most probably -hooks into other parts of that application. Therefore it is not practically -feasible to just require the client listener to be serializable to be sent -to the server for several reasons: -

      -
    • The RMI server cannot call any method on the RMI client. To support such -call-back situations, the client side application would have to register -another server, which the server side would have to call. -
    • When trying to "transfer" the listener to the server side, the listener -class would have to be available to the server side - either locally in the -class path or through RMI class loading mechanisms. -
    -

    -To circumvent these issues and still be able to register event listeners, -support for observation events is implemented in a manner similar to the Java -Management Extensions Remote API 1.0 (JSR 160) as laid out in Chapter 2.4, -Adding Remote Listeners: -

    -The ObservationManager interface is not implemented in the RMI layer like -other interfaces, which just forward calls to the API to the corresponding -remote object by means of the RMI framework. Instead the client-side -ObservationManager manages its own list of registered event listeners. Each -listener registered with an ObservationManager is assigned a unique -identifier. -

    -The unique identifier along with the filter configuration (event type, -path, depth flag, uuid list, node type list, local flag) is sent to the -server-side remote observation manager. This latter instantiates a proxy -event listener representing the client side event listener contains the -unique identifier as a ilnk to the client side event listener. The proxy -event listener is the registered to the repository's ObservationManager -with the configuration received from the client side. -

    -When an event arrives at the event listener proxy, the proxy creates a -new RemoteEvent instance, which contains the client-side event listener -identifier along with the Event objects from the EventIterator. This -RemoteEvent instance is added to a server-side queue, which may be -retrieved from the client-side. -

    -The client-side ObservationManager has a helper class ClientEventPoll, -which works in the background asking the server for the RemoteEvents from -the event queue. Each such event is then dispatched to the client-side -event listener by calling the EventListener.onEvent() method. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html deleted file mode 100644 index 4d971e6eefd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html +++ /dev/null @@ -1,35 +0,0 @@ - - -Remote interfaces of the transparent JCR-RMI layer. -

    -This package contains all the interfaces and classes used by both -the client and server sides of the transparent JCR-RMI layer. -The compiled contents of this package should thus be included -in both client and server installations. Note also that RMI stubs and -skeletons need to be generated for all the remote interfaces when using -old JDK versions (stubs for JDK < 1.5, skeletons for JDK < 1.2). -

    -The interfaces in this package are remote versions of the -corresponding interfaces in the javax.jcr packages. They are used by -the adapter classes in the .rmi.client and .rmi.server packages. The server -classes adapt local JCR objects to the remote interfaces, and the client -classes adapt the resulting remote references back to the JCR interfaces. -

    -The SerialValue class is a decorator utility used by both the client and -server classes to safely pass Value objects over the network. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html deleted file mode 100644 index 1fd4bb78e1d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html +++ /dev/null @@ -1,19 +0,0 @@ - - -Remote adapters for local iterators. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html deleted file mode 100644 index 7ee6b820ccb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html +++ /dev/null @@ -1,80 +0,0 @@ - - -Server implementation of the transparent JCR-RMI layer. -

    -This package contains the default server implementation of the -transparent JCR-RMI layer. The classes in this package can be used -to make a local JCR repository available as an RMI service. In addition, -this package offers a straightforward mechanism for extending or modifying -the behaviour of the server layer. -

    -The contents of this package is designed using two design patterns, -Factory and Adapter. All the remotely accessible ServerObject subclasses -implement the Adapter pattern to adapt a local JCR interface to the -corresponding remote JCR-RMI interface. The Factory pattern is used -to centralize the creation and configuration of all adapter instances. - -

    Setting up a JCR-RMI server

    -

    -Setting up the server part of the JCR-RMI layer is quite straightforward. -After instantiating a local JCR repository you need to wrap it into a -remote adapter and create an RMI binding for the repository. A variation -of the following code is usually all that is needed in addition to the -standard RMI setup (starting rmiregistry, etc.): - -

    -    Repository repository = ...; // The local repository
    -    String name = ...; // The RMI URL for the repository
    -    
    -    RemoteAdapterFactory factory = new ServerAdapterFactory();
    -    RemoteRepository remote = factory.getRemoteRepository(repository);
    -    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    -
    - -

    Extending the JCR-RMI server

    -

    -The Factory pattern used by this package makes it easy to extend -the behaviour of the JCR-RMI server. Such changes in behaviour or policy -can be implemented by modifying or replacing the default -ServerAdapterFactory used in the example above. -

    -The following example code adds transparent logging of all session logins -and logouts: - -

    -    Repository repository = ...; // The local repository
    -    String name = ...; // The RMI URL for the repository
    -    
    -    RemoteAdapterFactory factory = new ServerAdapterFactory() {
    -        public RemoteSession getRemoteSession(Session session)
    -                throws RemoteException {
    -            System.out.println("LOGIN: " + session.getUserId());
    -            return new ServerSession(session, this) {
    -                public void logout() {
    -                    System.out.println("LOGOUT: " + session.getUserId());
    -                    super.logout();
    -                }
    -            };
    -        }
    -    };
    -
    -    RemoteRepository remote = factory.getRemoteRepository(repository);
    -    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    -
    - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html deleted file mode 100644 index 8dc61302031..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - -Serializable implementation of the JCR Value interfaces. -

    -This package contains a simple in-memory implementation of the JCR -{@link javax.jcr.Value Value} and {@link javax.jcr.ValueFactory ValueFactory} -interfaces. The implementation has no external dependencies and supports -serialization of Value instances. -

    -

    -Note that the Value instances created by this package are thread safe. -

    - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html deleted file mode 100644 index 9040e137b0e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Utility classes for importing SAX event streams. -

    -The classes in this package can be used for to implement the JCR -{@link javax.jcr.Session#getImportContentHandler(java.lang.String) Session.getImportContentHandler(String)} -and -{@link javax.jcr.Workspace#getImportContentHandler(java.lang.String, int) Workspace.getImportContentHandler(String, int)} -methods in terms of the corresponding importXML() methods. -

    -These utility classes were designed for the transparent JCR-RMI layer, -but can easily be used as a part of any JCR repository implementation. -The public interface of this package depends only on the standard JCR and -J2SE APIs. The implementation uses Xerces as an extra dependency to -serialize the SAX event streams. - diff --git a/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory b/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory deleted file mode 100644 index 26b601efd87..00000000000 --- a/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory diff --git a/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml b/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml deleted file mode 100644 index 3ef2674f748..00000000000 --- a/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - java:jcr/local - jnp://localhost:1099/jcrServer - - - jboss.jca:service=ManagedConnectionFactory,name=jcr/local - - diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java deleted file mode 100644 index 3272ab6c915..00000000000 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi; - -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import org.apache.jackrabbit.test.JCRTestSuite; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR API conformance test suite. - */ -@Deprecated(forRemoval = true) public class ConformanceTest extends TestCase { - - public static TestSuite suite() { - TestSuite suite = new TestSuite(); - if (Boolean.getBoolean("jackrabbit.test.integration")) { - suite.addTest(new JCRTestSuite()); - } - return suite; - } - -} diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java deleted file mode 100644 index 34e7e535633..00000000000 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.rmi.server.RemoteObject; -import java.security.Principal; -import java.util.Properties; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; - -import org.apache.jackrabbit.core.JackrabbitRepositoryStub; -import org.apache.jackrabbit.core.SessionImpl; -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; -import org.apache.jackrabbit.rmi.server.principal.ServerGroup; -import org.apache.jackrabbit.test.RepositoryStubException; - -@Deprecated(forRemoval = true) public class RepositoryStubImpl extends JackrabbitRepositoryStub { - - /** - * A known principal used for access control tests. - */ - private Principal principal; - - private RemoteRepository remote; - - private Repository repository; - - public RepositoryStubImpl(Properties env) { - super(env); - } - - @Override - public synchronized Repository getRepository() - throws RepositoryStubException { - if (repository == null) { - try { - Repository repo = super.getRepository(); - principal = findKnownPrincipal(repo); - - RemoteAdapterFactory raf = new ServerAdapterFactory(); - remote = raf.getRemoteRepository(repo); - - // Make sure that the remote reference survives serialization - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(buffer); - oos.writeObject(RemoteObject.toStub(remote)); - oos.close(); - - ObjectInputStream ois = new ObjectInputStream( - new ByteArrayInputStream(buffer.toByteArray())); - LocalAdapterFactory laf = new ClientAdapterFactory(); - repository = - laf.getRepository((RemoteRepository) ois.readObject()); - } catch (Exception e) { - throw new RepositoryStubException(e); - } - } - return repository; - } - - private static Principal findKnownPrincipal(Repository repo) - throws RepositoryException { - SessionImpl session = (SessionImpl) repo.login( - new SimpleCredentials("admin", "admin".toCharArray())); - try { - for (Principal principal : session.getSubject().getPrincipals()) { - if (!ServerGroup.isGroup(principal)) { - return principal; - } - } - throw new RepositoryException("Known principal not found"); - } finally { - session.logout(); - } - } - - @Override - public Principal getKnownPrincipal(Session ignored) - throws RepositoryException { - return principal; - } - -} diff --git a/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml b/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml deleted file mode 100644 index 15d98f9b73f..00000000000 --- a/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - target/jcr.log - - %date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n - - - - - - - - diff --git a/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties b/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties deleted file mode 100644 index bc101aaba6e..00000000000 --- a/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -# Stub implementation class -javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.rmi.RepositoryStubImpl diff --git a/pom.xml b/pom.xml index ab95758ceb6..cab242596e5 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ jackrabbit-core jackrabbit-webdav jackrabbit-jcr-server - jackrabbit-jcr-rmi jackrabbit-jcr-servlet jackrabbit-webapp jackrabbit-jca From 3e960ce94a5f1490dabc25391e063a2bd872013e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 29 Feb 2024 10:31:23 +0100 Subject: [PATCH 156/271] Revert "JCR-5028: remove RMI support (#163)" This reverts commit 27f19580e030e487b0477861067c39058ec4b93c. --- jackrabbit-jcr-rmi/HEADER.txt | 16 + jackrabbit-jcr-rmi/README.txt | 6 + jackrabbit-jcr-rmi/checkstyle.xml | 164 ++++ .../rmi/client/BrokenRemoteRepository.java | 180 ++++ .../rmi/client/ClientAdapterFactory.java | 459 ++++++++++ .../jackrabbit/rmi/client/ClientItem.java | 212 +++++ .../rmi/client/ClientItemDefinition.java | 117 +++ .../jackrabbit/rmi/client/ClientLock.java | 142 ++++ .../rmi/client/ClientLockManager.java | 110 +++ .../rmi/client/ClientNamespaceRegistry.java | 111 +++ .../jackrabbit/rmi/client/ClientNode.java | 800 ++++++++++++++++++ .../rmi/client/ClientNodeDefinition.java | 104 +++ .../jackrabbit/rmi/client/ClientNodeType.java | 317 +++++++ .../rmi/client/ClientNodeTypeManager.java | 151 ++++ .../jackrabbit/rmi/client/ClientObject.java | 131 +++ .../rmi/client/ClientObservationManager.java | 144 ++++ .../jackrabbit/rmi/client/ClientProperty.java | 447 ++++++++++ .../rmi/client/ClientPropertyDefinition.java | 117 +++ .../jackrabbit/rmi/client/ClientQuery.java | 145 ++++ .../rmi/client/ClientQueryManager.java | 99 +++ .../rmi/client/ClientQueryResult.java | 99 +++ .../rmi/client/ClientRepository.java | 219 +++++ .../rmi/client/ClientRepositoryFactory.java | 137 +++ .../jackrabbit/rmi/client/ClientRow.java | 131 +++ .../jackrabbit/rmi/client/ClientSession.java | 589 +++++++++++++ .../jackrabbit/rmi/client/ClientVersion.java | 154 ++++ .../rmi/client/ClientVersionHistory.java | 219 +++++ .../rmi/client/ClientVersionManager.java | 279 ++++++ .../rmi/client/ClientWorkspace.java | 299 +++++++ .../rmi/client/ClientXASession.java | 146 ++++ .../rmi/client/DefaultContentHandler.java | 176 ++++ .../rmi/client/LocalAdapterFactory.java | 447 ++++++++++ .../rmi/client/RemoteRepositoryException.java | 44 + .../rmi/client/RemoteRuntimeException.java | 42 + .../rmi/client/SafeClientRepository.java | 222 +++++ .../rmi/client/SerializingContentHandler.java | 441 ++++++++++ .../rmi/client/iterator/ClientIterator.java | 222 +++++ .../client/iterator/ClientNodeIterator.java | 72 ++ .../iterator/ClientNodeTypeIterator.java | 66 ++ .../iterator/ClientPropertyIterator.java | 73 ++ .../client/iterator/ClientRowIterator.java | 70 ++ .../iterator/ClientVersionIterator.java | 73 ++ .../rmi/client/iterator/package-info.java | 18 + .../jackrabbit/rmi/client/package-info.java | 18 + .../rmi/client/principal/ClientGroup.java | 91 ++ .../rmi/client/principal/ClientPrincipal.java | 66 ++ .../principal/ClientPrincipalIterator.java | 43 + .../rmi/client/principal/package-info.java | 18 + .../security/ClientAccessControlEntry.java | 75 ++ .../security/ClientAccessControlList.java | 87 ++ .../security/ClientAccessControlManager.java | 161 ++++ .../security/ClientAccessControlPolicy.java | 52 ++ .../ClientAccessControlPolicyIterator.java | 50 ++ .../rmi/client/security/ClientPrivilege.java | 113 +++ .../rmi/client/security/package-info.java | 18 + .../rmi/iterator/ArrayEventIterator.java | 46 + .../iterator/ArrayEventListenerIterator.java | 47 + .../rmi/iterator/ArrayIterator.java | 85 ++ .../jackrabbit/rmi/iterator/package-info.java | 18 + .../JackrabbitClientAdapterFactory.java | 27 + .../rmi/jackrabbit/package-info.java | 18 + .../rmi/observation/ClientEventPoll.java | 344 ++++++++ .../jackrabbit/rmi/observation/Queue.java | 85 ++ .../observation/ServerEventListenerProxy.java | 146 ++++ .../rmi/observation/package-info.java | 18 + .../jackrabbit/rmi/remote/ArrayIterator.java | 104 +++ .../jackrabbit/rmi/remote/BufferIterator.java | 109 +++ .../rmi/remote/RemoteEventCollection.java | 129 +++ .../jackrabbit/rmi/remote/RemoteItem.java | 147 ++++ .../rmi/remote/RemoteItemDefinition.java | 109 +++ .../jackrabbit/rmi/remote/RemoteIterator.java | 71 ++ .../jackrabbit/rmi/remote/RemoteLock.java | 133 +++ .../rmi/remote/RemoteLockManager.java | 50 ++ .../rmi/remote/RemoteNamespaceRegistry.java | 118 +++ .../jackrabbit/rmi/remote/RemoteNode.java | 745 ++++++++++++++++ .../rmi/remote/RemoteNodeDefinition.java | 96 +++ .../jackrabbit/rmi/remote/RemoteNodeType.java | 292 +++++++ .../rmi/remote/RemoteNodeTypeManager.java | 106 +++ .../rmi/remote/RemoteObservationManager.java | 106 +++ .../jackrabbit/rmi/remote/RemoteProperty.java | 142 ++++ .../rmi/remote/RemotePropertyDefinition.java | 121 +++ .../jackrabbit/rmi/remote/RemoteQuery.java | 119 +++ .../rmi/remote/RemoteQueryManager.java | 75 ++ .../rmi/remote/RemoteQueryResult.java | 74 ++ .../rmi/remote/RemoteRepository.java | 161 ++++ .../jackrabbit/rmi/remote/RemoteRow.java | 117 +++ .../jackrabbit/rmi/remote/RemoteSession.java | 464 ++++++++++ .../jackrabbit/rmi/remote/RemoteVersion.java | 121 +++ .../rmi/remote/RemoteVersionHistory.java | 246 ++++++ .../rmi/remote/RemoteVersionManager.java | 109 +++ .../rmi/remote/RemoteWorkspace.java | 200 +++++ .../rmi/remote/RemoteXASession.java | 88 ++ .../rmi/remote/SerializableXid.java | 73 ++ .../jackrabbit/rmi/remote/package-info.java | 18 + .../rmi/remote/principal/RemoteGroup.java | 57 ++ .../rmi/remote/principal/RemotePrincipal.java | 53 ++ .../rmi/remote/principal/package-info.java | 18 + .../security/RemoteAccessControlEntry.java | 59 ++ .../security/RemoteAccessControlList.java | 53 ++ .../security/RemoteAccessControlManager.java | 93 ++ .../security/RemoteAccessControlPolicy.java | 48 ++ .../rmi/remote/security/RemotePrivilege.java | 71 ++ .../rmi/remote/security/package-info.java | 18 + .../AbstractRemoteRepositoryFactory.java | 71 ++ .../rmi/repository/JNDIRemoteRepository.java | 75 ++ .../JNDIRemoteRepositoryFactory.java | 89 ++ .../rmi/repository/ProxyRepository.java | 250 ++++++ .../rmi/repository/RMIRemoteRepository.java | 56 ++ .../RMIRemoteRepositoryFactory.java | 77 ++ .../rmi/repository/RepositoryFactory.java | 37 + .../rmi/repository/RmiRepositoryFactory.java | 175 ++++ .../rmi/repository/URLRemoteRepository.java | 71 ++ .../URLRemoteRepositoryFactory.java | 92 ++ .../rmi/repository/package-info.java | 18 + .../rmi/server/RemoteAdapterFactory.java | 479 +++++++++++ .../rmi/server/ServerAdapterFactory.java | 531 ++++++++++++ .../rmi/server/ServerEventCollection.java | 139 +++ .../jackrabbit/rmi/server/ServerItem.java | 143 ++++ .../rmi/server/ServerItemDefinition.java | 96 +++ .../jackrabbit/rmi/server/ServerLock.java | 100 +++ .../rmi/server/ServerLockManager.java | 108 +++ .../rmi/server/ServerNamespaceRegistry.java | 117 +++ .../jackrabbit/rmi/server/ServerNode.java | 688 +++++++++++++++ .../rmi/server/ServerNodeDefinition.java | 87 ++ .../jackrabbit/rmi/server/ServerNodeType.java | 233 +++++ .../rmi/server/ServerNodeTypeManager.java | 122 +++ .../jackrabbit/rmi/server/ServerObject.java | 263 ++++++ .../rmi/server/ServerObservationManager.java | 166 ++++ .../jackrabbit/rmi/server/ServerProperty.java | 134 +++ .../rmi/server/ServerPropertyDefinition.java | 98 +++ .../jackrabbit/rmi/server/ServerQuery.java | 112 +++ .../rmi/server/ServerQueryManager.java | 104 +++ .../rmi/server/ServerQueryResult.java | 78 ++ .../rmi/server/ServerRepository.java | 143 ++++ .../jackrabbit/rmi/server/ServerRow.java | 136 +++ .../jackrabbit/rmi/server/ServerSession.java | 353 ++++++++ .../jackrabbit/rmi/server/ServerVersion.java | 157 ++++ .../rmi/server/ServerVersionHistory.java | 215 +++++ .../rmi/server/ServerVersionManager.java | 278 ++++++ .../rmi/server/ServerWorkspace.java | 242 ++++++ .../rmi/server/ServerXASession.java | 134 +++ .../rmi/server/iterator/ServerIterator.java | 142 ++++ .../server/iterator/ServerNodeIterator.java | 59 ++ .../iterator/ServerNodeTypeIterator.java | 59 ++ .../iterator/ServerPropertyIterator.java | 59 ++ .../server/iterator/ServerRowIterator.java | 59 ++ .../iterator/ServerVersionIterator.java | 59 ++ .../rmi/server/iterator/package-info.java | 18 + .../jackrabbit/rmi/server/jmx/JCRServer.java | 170 ++++ .../rmi/server/jmx/JCRServerMBean.java | 54 ++ .../rmi/server/jmx/package-info.java | 18 + .../jackrabbit/rmi/server/package-info.java | 18 + .../rmi/server/principal/ServerGroup.java | 92 ++ .../rmi/server/principal/ServerPrincipal.java | 54 ++ .../principal/ServerPrincipalIterator.java | 42 + .../rmi/server/principal/package-info.java | 18 + .../security/ServerAccessControlEntry.java | 51 ++ .../security/ServerAccessControlList.java | 83 ++ .../security/ServerAccessControlManager.java | 89 ++ .../security/ServerAccessControlPolicy.java | 44 + .../ServerAccessControlPolicyIterator.java | 61 ++ .../rmi/server/security/ServerPrivilege.java | 64 ++ .../rmi/server/security/package-info.java | 18 + .../jackrabbit/rmi/value/AbstractValue.java | 247 ++++++ .../jackrabbit/rmi/value/BinaryValue.java | 122 +++ .../jackrabbit/rmi/value/BooleanValue.java | 67 ++ .../jackrabbit/rmi/value/DateValue.java | 209 +++++ .../jackrabbit/rmi/value/DecimalValue.java | 117 +++ .../jackrabbit/rmi/value/DoubleValue.java | 106 +++ .../jackrabbit/rmi/value/LongValue.java | 95 +++ .../jackrabbit/rmi/value/NameValue.java | 62 ++ .../jackrabbit/rmi/value/PathValue.java | 62 ++ .../jackrabbit/rmi/value/ReferenceValue.java | 63 ++ .../rmi/value/SerialValueFactory.java | 254 ++++++ .../rmi/value/SerializableBinary.java | 202 +++++ .../jackrabbit/rmi/value/StringValue.java | 242 ++++++ .../jackrabbit/rmi/value/package-info.java | 18 + .../rmi/client/iterator/package.html | 19 + .../apache/jackrabbit/rmi/client/package.html | 76 ++ .../jackrabbit/rmi/iterator/package.html | 26 + .../jackrabbit/rmi/observation/package.html | 71 ++ .../apache/jackrabbit/rmi/remote/package.html | 35 + .../rmi/server/iterator/package.html | 19 + .../apache/jackrabbit/rmi/server/package.html | 80 ++ .../apache/jackrabbit/rmi/value/package.html | 30 + .../apache/jackrabbit/rmi/xml/package.html | 31 + .../services/javax.jcr.RepositoryFactory | 16 + .../main/resources/jackrabbit-rmi-service.xml | 41 + .../jackrabbit/rmi/ConformanceTest.java | 39 + .../jackrabbit/rmi/RepositoryStubImpl.java | 108 +++ .../src/test/resources/logback-test.xml | 31 + .../resources/repositoryStubImpl.properties | 17 + pom.xml | 1 + 193 files changed, 25053 insertions(+) create mode 100644 jackrabbit-jcr-rmi/HEADER.txt create mode 100644 jackrabbit-jcr-rmi/README.txt create mode 100644 jackrabbit-jcr-rmi/checkstyle.xml create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java create mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java create mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html create mode 100644 jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory create mode 100644 jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml create mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java create mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java create mode 100644 jackrabbit-jcr-rmi/src/test/resources/logback-test.xml create mode 100644 jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties diff --git a/jackrabbit-jcr-rmi/HEADER.txt b/jackrabbit-jcr-rmi/HEADER.txt new file mode 100644 index 00000000000..ae6f28c4a1c --- /dev/null +++ b/jackrabbit-jcr-rmi/HEADER.txt @@ -0,0 +1,16 @@ +/* + * 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. + */ diff --git a/jackrabbit-jcr-rmi/README.txt b/jackrabbit-jcr-rmi/README.txt new file mode 100644 index 00000000000..5cd4cf2f73e --- /dev/null +++ b/jackrabbit-jcr-rmi/README.txt @@ -0,0 +1,6 @@ +=================================================== +Apache Jackrabbit JCR-RMI +=================================================== + +RMI support is deprecated and will be removed in a future version of Jackrabbit; see https://issues.apache.org/jira/browse/JCR-4972 for more information. + diff --git a/jackrabbit-jcr-rmi/checkstyle.xml b/jackrabbit-jcr-rmi/checkstyle.xml new file mode 100644 index 00000000000..33678aa8981 --- /dev/null +++ b/jackrabbit-jcr-rmi/checkstyle.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java new file mode 100644 index 00000000000..1b4c329c985 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java @@ -0,0 +1,180 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Credentials; +import javax.jcr.Value; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteSession; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Dummy remote repository instance that throws a {@link RemoteException} + * whenever any method is invoked. Used as a sentinel object by the + * {@link SafeClientRepository} class. + */ +@Deprecated(forRemoval = true) public class BrokenRemoteRepository implements RemoteRepository { + + /** + * The remote exception thrown by methods of this instance. + */ + private final RemoteException exception; + + /** + * Creates a remote repository whose methods throw the given + * exception. + * + * @param exception remote exception + */ + public BrokenRemoteRepository(RemoteException exception) { + this.exception = exception; + } + + /** + * Creates a remote repository whose methods trow a remote + * exception with the given message. + * + * @param message exception message + */ + public BrokenRemoteRepository(String message) { + this(new RemoteException(message)); + } + + /** + * Creates a remote repository whose methods throw a remote exception. + */ + public BrokenRemoteRepository() { + this(new RemoteException()); + } + + //----------------------------------------------------< RemoteRepository > + + /** + * Throws a {@link RemoteException}. + * + * @param key ignored + * @return nothing + * @throws RemoteException always thrown + */ + public String getDescriptor(String key) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @return nothing + * @throws RemoteException always thrown + */ + public String[] getDescriptorKeys() throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @return nothing + * @throws RemoteException always thrown + */ + public RemoteSession login() throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param workspace ignored + * @return nothing + * @throws RemoteException always thrown + */ + public RemoteSession login(String workspace) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param credentials ignored + * @return nothing + * @throws RemoteException always thrown + */ + public RemoteSession login(Credentials credentials) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param workspace ignored + * @param credentials ignored + * @return nothing + * @throws RemoteException always thrown + */ + public RemoteSession login(Credentials credentials, String workspace) + throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param key ignored + * @return nothing + * @throws RemoteException always thrown + */ + public Value getDescriptorValue(String key) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param key ignored + * @return nothing + * @throws RemoteException always thrown + */ + public Value[] getDescriptorValues(String key) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param key ignored + * @return nothing + * @throws RemoteException always thrown + */ + public boolean isSingleValueDescriptor(String key) throws RemoteException { + throw exception; + } + + /** + * Throws a {@link RemoteException}. + * + * @param key ignored + * @return nothing + * @throws RemoteException always thrown + */ + public boolean isStandardDescriptor(String key) throws RemoteException { + throw exception; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java new file mode 100644 index 00000000000..7b8c50eaac7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java @@ -0,0 +1,459 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.security.Principal; +import java.util.Iterator; + +import javax.jcr.Item; +import javax.jcr.NamespaceRegistry; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.Repository; +import javax.jcr.Session; +import javax.jcr.Workspace; +import javax.jcr.lock.Lock; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.nodetype.PropertyDefinition; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; +import javax.jcr.query.QueryResult; +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; +import javax.jcr.security.Privilege; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.client.iterator.ClientNodeIterator; +import org.apache.jackrabbit.rmi.client.iterator.ClientNodeTypeIterator; +import org.apache.jackrabbit.rmi.client.iterator.ClientPropertyIterator; +import org.apache.jackrabbit.rmi.client.iterator.ClientRowIterator; +import org.apache.jackrabbit.rmi.client.iterator.ClientVersionIterator; +import org.apache.jackrabbit.rmi.client.principal.ClientGroup; +import org.apache.jackrabbit.rmi.client.principal.ClientPrincipal; +import org.apache.jackrabbit.rmi.client.principal.ClientPrincipalIterator; +import org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry; +import org.apache.jackrabbit.rmi.client.security.ClientAccessControlList; +import org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager; +import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy; +import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicyIterator; +import org.apache.jackrabbit.rmi.client.security.ClientPrivilege; +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteRow; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.apache.jackrabbit.rmi.remote.RemoteXASession; +import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Default implementation of the + * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory LocalAdapterFactory} + * interface. This factory uses the client adapters defined in this + * package as the default adapter implementations. Subclasses can + * easily override or extend the default adapters by implementing the + * corresponding factory methods. + */ +@Deprecated(forRemoval = true) public class ClientAdapterFactory implements LocalAdapterFactory { + + /** + * Creates and returns a {@link ClientRepository ClientRepository} + * instance. + * + * {@inheritDoc} + */ + public Repository getRepository(RemoteRepository remote) { + return new ClientRepository(remote, this); + } + + /** + * Creates and returns a {@link ClientSession ClientSession} instance. + * In case the remote session is transaction enabled, the returned session + * will be transaction enabled too through the {@link ClientXASession}. + * + * {@inheritDoc} + */ + public Session getSession(Repository repository, RemoteSession remote) { + if (remote instanceof RemoteXASession) { + return new ClientXASession( + repository, (RemoteXASession) remote, this); + } else { + return new ClientSession(repository, remote, this); + } + } + + /** + * Creates and returns a {@link ClientWorkspace ClientWorkspace} instance. + * + * {@inheritDoc} + */ + public Workspace getWorkspace(Session session, RemoteWorkspace remote) { + return new ClientWorkspace(session, remote, this); + } + + /** + * Creates and returns a + * {@link ClientObservationManager ClientObservationManager} instance. + * + * {@inheritDoc} + */ + public ObservationManager getObservationManager(Workspace workspace, + RemoteObservationManager remote) { + return new ClientObservationManager(workspace, remote); + } + + /** + * Creates and returns a + * {@link ClientNamespaceRegistry ClientClientNamespaceRegistry} instance. + * + * {@inheritDoc} + */ + public NamespaceRegistry getNamespaceRegistry( + RemoteNamespaceRegistry remote) { + return new ClientNamespaceRegistry(remote, this); + } + + /** + * Creates and returns a + * {@link ClientNodeTypeManager ClienNodeTypeManager} instance. + * + * {@inheritDoc} + */ + public NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote) { + return new ClientNodeTypeManager(remote, this); + } + + /** + * Creates and returns a {@link ClientItem ClientItem} instance. + * + * {@inheritDoc} + */ + public Item getItem(Session session, RemoteItem remote) { + return new ClientItem(session, remote, this); + } + + /** + * Creates and returns a {@link ClientProperty ClientProperty} instance. + * + * {@inheritDoc} + */ + public Property getProperty(Session session, RemoteProperty remote) { + return new ClientProperty(session, remote, this); + } + + /** + * Creates and returns a {@link ClientNode ClientNode} instance. + * + * {@inheritDoc} + */ + public Node getNode(Session session, RemoteNode remote) { + return new ClientNode(session, remote, this); + } + + /** + * Creates and returns a {@link ClientVersion ClientVersion} instance. + * + * {@inheritDoc} + */ + public Version getVersion(Session session, RemoteVersion remote) { + return new ClientVersion(session, remote, this); + } + + /** + * Creates and returns a {@link ClientVersionHistory ClientVersionHistory} + * instance. + * + * {@inheritDoc} + */ + public VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote) { + return new ClientVersionHistory(session, remote, this); + } + + /** + * Creates and returns a {@link ClientNodeType ClientNodeType} instance. + * + * {@inheritDoc} + */ + public NodeType getNodeType(RemoteNodeType remote) { + return new ClientNodeType(remote, this); + } + + /** + * Creates and returns a {@link ClientItemDefinition ClientItemDefinition} instance. + * + * {@inheritDoc} + */ + public ItemDefinition getItemDef(RemoteItemDefinition remote) { + return new ClientItemDefinition(remote, this); + } + + /** + * Creates and returns a {@link ClientNodeDefinition ClientNodeDefinition} instance. + * + * {@inheritDoc} + */ + public NodeDefinition getNodeDef(RemoteNodeDefinition remote) { + return new ClientNodeDefinition(remote, this); + } + + /** + * Creates and returns a {@link ClientPropertyDefinition ClientPropertyDefinition} + * instance. + * + * {@inheritDoc} + */ + public PropertyDefinition getPropertyDef(RemotePropertyDefinition remote) { + return new ClientPropertyDefinition(remote, this); + } + + /** + * Creates and returns a {@link ClientLock ClientLock} instance. + * + * {@inheritDoc} + */ + public Lock getLock(Session session, RemoteLock remote) { + return new ClientLock(session, remote, this); + } + + /** + * Creates and returns a {@link ClientQueryManager ClientQueryManager} instance. + * + * {@inheritDoc} + */ + public QueryManager getQueryManager( + Session session, RemoteQueryManager remote) { + return new ClientQueryManager(session, remote, this); + } + + /** + * Creates and returns a {@link ClientQuery ClientQuery} instance. + * + * {@inheritDoc} + */ + public Query getQuery(Session session, RemoteQuery remote) { + return new ClientQuery(session, remote, this); + } + + /** + * Creates and returns a {@link ClientQueryResult ClientQueryResult} instance. + * + * {@inheritDoc} + */ + public QueryResult getQueryResult( + Session session, RemoteQueryResult remote) { + return new ClientQueryResult(session, remote, this); + } + + /** + * Creates and returns a {@link ClientRow ClientRow} instance. + * + * {@inheritDoc} + */ + public Row getRow(Session session, RemoteRow remote) { + return new ClientRow(session, remote, this); + } + + /** + * Creates and returns a {@link ClientNodeIterator} instance. + * {@inheritDoc} + */ + public NodeIterator getNodeIterator( + Session session, RemoteIterator remote) { + return new ClientNodeIterator(remote, session, this); + } + + /** + * Creates and returns a {@link ClientPropertyIterator} instance. + * {@inheritDoc} + */ + public PropertyIterator getPropertyIterator( + Session session, RemoteIterator remote) { + return new ClientPropertyIterator(remote, session, this); + } + + /** + * Creates and returns a {@link ClientVersionIterator} instance. + * {@inheritDoc} + */ + public VersionIterator getVersionIterator( + Session session, RemoteIterator remote) { + return new ClientVersionIterator(remote, session, this); + } + + /** + * Creates and returns a {@link ClientNodeTypeIterator} instance. + * {@inheritDoc} + */ + public NodeTypeIterator getNodeTypeIterator(RemoteIterator remote) { + return new ClientNodeTypeIterator(remote, this); + } + + /** + * Creates and returns a {@link ClientRowIterator} instance. + * {@inheritDoc} + */ + public RowIterator getRowIterator(Session session, RemoteIterator remote) { + return new ClientRowIterator(session, remote, this); + } + + public LockManager getLockManager( + Session session, RemoteLockManager remote) { + return new ClientLockManager(session, remote, this); + } + + public VersionManager getVersionManager( + Session session, RemoteVersionManager remote) { + return new ClientVersionManager(session, remote, this); + } + + /** + * {@inheritDoc} + */ + public AccessControlManager getAccessControlManager( + RemoteAccessControlManager remote) { + return new ClientAccessControlManager(remote, this); + } + + /** + * {@inheritDoc} + */ + public AccessControlPolicy getAccessControlPolicy( + RemoteAccessControlPolicy remote) { + if (remote instanceof RemoteAccessControlList) { + return new ClientAccessControlList( + (RemoteAccessControlList) remote, this); + } + return new ClientAccessControlPolicy(remote, this); + } + + /** + * {@inheritDoc} + */ + public AccessControlPolicy[] getAccessControlPolicy( + RemoteAccessControlPolicy[] remote) { + final AccessControlPolicy[] local = new AccessControlPolicy[remote.length]; + for (int i = 0; i < local.length; i++) { + local[i] = getAccessControlPolicy(remote[i]); + } + return local; + } + + /** + * {@inheritDoc} + */ + public AccessControlPolicyIterator getAccessControlPolicyIterator( + RemoteIterator remote) { + return new ClientAccessControlPolicyIterator(remote, this); + } + + /** + * {@inheritDoc} + */ + public AccessControlEntry getAccessControlEntry( + RemoteAccessControlEntry remote) { + return new ClientAccessControlEntry(remote, this); + } + + /** + * {@inheritDoc} + */ + public AccessControlEntry[] getAccessControlEntry( + RemoteAccessControlEntry[] remote) { + final AccessControlEntry[] local = new AccessControlEntry[remote.length]; + for (int i = 0; i < local.length; i++) { + local[i] = getAccessControlEntry(remote[i]); + } + return local; + } + + /** + * {@inheritDoc} + */ + public Principal getPrincipal(RemotePrincipal remote) { + if (remote instanceof RemoteGroup) { + return new ClientGroup(remote, this); + } + return new ClientPrincipal(remote); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public Iterator getPrincipalIterator(RemoteIterator remote) { + return new ClientPrincipalIterator(remote, this); + } + + /** + * {@inheritDoc} + */ + public Privilege getPrivilege(RemotePrivilege remote) { + return new ClientPrivilege(remote, this); + } + + /** + * {@inheritDoc} + */ + public Privilege[] getPrivilege(RemotePrivilege[] remote) { + final Privilege[] local = new Privilege[remote.length]; + for (int i = 0; i < local.length; i++) { + local[i] = getPrivilege(remote[i]); + } + return local; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java new file mode 100644 index 00000000000..901e34004dc --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java @@ -0,0 +1,212 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Item; +import javax.jcr.ItemVisitor; +import javax.jcr.Node; +import javax.jcr.Property; +import javax.jcr.RepositoryException; +import javax.jcr.Session; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} + * interface. This class makes a remote item locally available using + * the JCR {@link javax.jcr.Item Item} interface. Used mainly as the + * base class for the + * {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} adapters. + * + * @see javax.jcr.Item + * @see org.apache.jackrabbit.rmi.remote.RemoteItem + */ +@Deprecated(forRemoval = true) public class ClientItem extends ClientObject implements Item { + + /** Current session. */ + private Session session; + + /** The adapted remote item. */ + private RemoteItem remote; + + /** + * Creates a local adapter for the given remote item. + * + * @param session current session + * @param remote remote item + * @param factory local adapter factory + */ + public ClientItem(Session session, RemoteItem remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** + * Returns the current session without contacting the remote item. + * + * {@inheritDoc} + */ + public Session getSession() { + return session; + } + + /** {@inheritDoc} */ + public String getPath() throws RepositoryException { + try { + return remote.getPath(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getName() throws RepositoryException { + try { + return remote.getName(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Item getAncestor(int level) throws RepositoryException { + try { + return getItem(getSession(), remote.getAncestor(level)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getParent() throws RepositoryException { + try { + return getNode(getSession(), remote.getParent()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getDepth() throws RepositoryException { + try { + return remote.getDepth(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Returns false by default without contacting the remote item. + * This method should be overridden by {@link Node Node} subclasses. + * + * {@inheritDoc} + * + * @return false + */ + public boolean isNode() { + return false; + } + + /** {@inheritDoc} */ + public boolean isNew() { + try { + return remote.isNew(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isModified() { + try { + return remote.isModified(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** + * Checks whether this instance represents the same repository item as + * the given other instance. A simple heuristic is used to first check + * some generic conditions (null values, instance equality, type equality), + * after which the item paths are compared to determine sameness. + * A RuntimeException is thrown if the item paths cannot be retrieved. + * + * {@inheritDoc} + * + * @see Item#getPath() + */ + public boolean isSame(Item item) throws RepositoryException { + if (item == null) { + return false; + } else if (equals(item)) { + return true; + } else if (isNode() == item.isNode()) { + return getPath().equals(item.getPath()); + } else { + return false; + } + } + + /** + * Accepts the visitor to visit this item. {@link Node Node} and + * {@link Property Property} subclasses should override this method + * to call the appropriate {@link ItemVisitor ItemVisitor} methods, + * as the default implementation does nothing. + * + * {@inheritDoc} + */ + public void accept(ItemVisitor visitor) throws RepositoryException { + } + + /** {@inheritDoc} */ + public void save() throws RepositoryException { + try { + remote.save(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void refresh(boolean keepChanges) throws RepositoryException { + try { + remote.refresh(keepChanges); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void remove() throws RepositoryException { + try { + remote.remove(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java new file mode 100644 index 00000000000..a602adc16ef --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeType; + +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} + * interface. This class makes a remote item definition locally available using + * the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} interface. Used mainly + * as the base class for the + * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} adapters. + * + * @see javax.jcr.nodetype.ItemDefinition + * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition + */ +@Deprecated(forRemoval = true) public class ClientItemDefinition extends ClientObject implements ItemDefinition { + + /** The adapted remote item definition. */ + private RemoteItemDefinition remote; + + /** + * Creates a local adapter for the given remote item definition. + * + * @param remote remote item definition + * @param factory local adapter factory + */ + public ClientItemDefinition(RemoteItemDefinition remote, LocalAdapterFactory factory) { + super(factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public NodeType getDeclaringNodeType() { + try { + RemoteNodeType nt = remote.getDeclaringNodeType(); + if (nt == null) { + return null; + } else { + return getFactory().getNodeType(nt); + } + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getName() { + try { + return remote.getName(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isAutoCreated() { + try { + return remote.isAutoCreated(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isMandatory() { + try { + return remote.isMandatory(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public int getOnParentVersion() { + try { + return remote.getOnParentVersion(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isProtected() { + try { + return remote.isProtected(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java new file mode 100644 index 00000000000..39e32ad76fc --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java @@ -0,0 +1,142 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.lock.Lock; + +import org.apache.jackrabbit.rmi.remote.RemoteLock; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} + * interface. This class makes a remote lock locally available using + * the JCR {@link javax.jcr.lock.Lock Lock} interface. + * + * @see javax.jcr.lock.Lock + * @see org.apache.jackrabbit.rmi.remote.RemoteLock + */ +@Deprecated(forRemoval = true) public class ClientLock extends ClientObject implements Lock { + + /** Current session. */ + private Session session; + + /** The adapted remote lock. */ + private RemoteLock remote; + + /** + * Creates a local adapter for the given remote lock. + * + * @param session current session + * @param remote remote lock + * @param factory local adapter factory + */ + public ClientLock(Session session, RemoteLock remote, LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public Node getNode() { + try { + return getNode(session, remote.getNode()); + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } catch (RepositoryException e) { + throw new RuntimeException(e); + } + } + + /** {@inheritDoc} */ + public String getLockOwner() { + try { + return remote.getLockOwner(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isDeep() { + try { + return remote.isDeep(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getLockToken() { + try { + return remote.getLockToken(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isLive() throws RepositoryException { + try { + return remote.isLive(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void refresh() throws RepositoryException { + try { + remote.refresh(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isSessionScoped() { + try { + return remote.isSessionScoped(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public long getSecondsRemaining() throws RepositoryException { + try { + return remote.getSecondsRemaining(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isLockOwningSession() { + try { + return remote.isLockOwningSession(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java new file mode 100644 index 00000000000..02ca2d94fef --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.lock.Lock; +import javax.jcr.lock.LockManager; + +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; + +@Deprecated(forRemoval = true) public class ClientLockManager extends ClientObject implements LockManager { + + /** The current session. */ + private Session session; + + private RemoteLockManager remote; + + public ClientLockManager( + Session session, RemoteLockManager remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + public String[] getLockTokens() throws RepositoryException { + try { + return remote.getLockTokens(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public void addLockToken(String lockToken) throws RepositoryException { + try { + remote.addLockToken(lockToken); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public void removeLockToken(String lockToken) throws RepositoryException { + try { + remote.removeLockToken(lockToken); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public Lock getLock(String absPath) throws RepositoryException { + try { + return getFactory().getLock(session, remote.getLock(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public boolean holdsLock(String absPath) throws RepositoryException { + try { + return remote.holdsLock(absPath); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public boolean isLocked(String absPath) throws RepositoryException { + try { + return remote.isLocked(absPath); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public Lock lock( + String absPath, boolean isDeep, boolean isSessionScoped, + long timeoutHint, String ownerInfo) throws RepositoryException { + try { + return getFactory().getLock(session, remote.lock( + absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public void unlock(String absPath) throws RepositoryException { + try { + remote.unlock(absPath); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java new file mode 100644 index 00000000000..0a95cc576fc --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java @@ -0,0 +1,111 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.NamespaceRegistry; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} + * interface. This class makes a remote namespace registry locally available + * using the JCR {@link javax.jcr.NamespaceRegistry NamespaceRegistry} + * interface. + * + * @see javax.jcr.NamespaceRegistry + * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry + */ +@Deprecated(forRemoval = true) public class ClientNamespaceRegistry extends ClientObject implements + NamespaceRegistry { + + /** The adapted remote namespace registry. */ + private RemoteNamespaceRegistry remote; + + /** + * Creates a local adapter for the given remote namespace registry. + * + * @param remote remote namespace registry + * @param factory local adapter factory + */ + public ClientNamespaceRegistry( + RemoteNamespaceRegistry remote, LocalAdapterFactory factory) { + super(factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public void registerNamespace(String prefix, String uri) + throws RepositoryException { + try { + remote.registerNamespace(prefix, uri); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void unregisterNamespace(String prefix) throws RepositoryException { + try { + remote.unregisterNamespace(prefix); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getPrefixes() throws RepositoryException { + try { + return remote.getPrefixes(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getURIs() throws RepositoryException { + try { + return remote.getURIs(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getURI(String prefix) throws RepositoryException { + try { + return remote.getURI(prefix); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPrefix(String uri) throws RepositoryException { + try { + return remote.getPrefix(uri); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java new file mode 100644 index 00000000000..eb970ebeac8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java @@ -0,0 +1,800 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.io.InputStream; +import java.math.BigDecimal; +import java.rmi.RemoteException; +import java.util.Calendar; + +import javax.jcr.Binary; +import javax.jcr.Item; +import javax.jcr.ItemVisitor; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; +import javax.jcr.lock.Lock; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; + +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} + * interface. This class makes a remote node locally available using + * the JCR {@link javax.jcr.Node Node} interface. + * + * @see javax.jcr.Node + * @see org.apache.jackrabbit.rmi.remote.RemoteNode + */ +@Deprecated(forRemoval = true) public class ClientNode extends ClientItem implements Node { + + /** The adapted remote node. */ + private RemoteNode remote; + + /** + * Creates a local adapter for the given remote node. + * + * @param session current session + * @param remote remote node + * @param factory local adapter factory + */ + public ClientNode( + Session session, RemoteNode remote, LocalAdapterFactory factory) { + super(session, remote, factory); + this.remote = remote; + } + + /** + * Returns true without contacting the remote node. + * + * {@inheritDoc} + */ + public boolean isNode() { + return true; + } + + /** + * Calls the {@link ItemVisitor#visit(Node) ItemVisitor.visit(Node)} + * method of the given visitor. Does not contact the remote node, but + * the visitor may invoke other methods that do contact the remote node. + * + * {@inheritDoc} + */ + public void accept(ItemVisitor visitor) throws RepositoryException { + visitor.visit(this); + } + + /** {@inheritDoc} */ + public Node addNode(String path) throws RepositoryException { + try { + return getNode(getSession(), remote.addNode(path)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node addNode(String path, String type) throws RepositoryException { + try { + RemoteNode node = remote.addNode(path, type); + return getNode(getSession(), node); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void orderBefore(String src, String dst) throws RepositoryException { + try { + remote.orderBefore(src, dst); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Value value) + throws RepositoryException { + try { + if (value == null) { + remote.setProperty(name, value); + return null; + } else { + RemoteProperty property = remote.setProperty( + name, SerialValueFactory.makeSerialValue(value)); + return getFactory().getProperty(getSession(), property); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Value[] values) + throws RepositoryException { + try { + if (values == null) { + remote.setProperty(name, values); + return null; + } else { + Value[] serials = SerialValueFactory.makeSerialValueArray(values); + RemoteProperty property = remote.setProperty(name, serials); + return getFactory().getProperty(getSession(), property); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, String[] strings) + throws RepositoryException { + try { + if (strings == null) { + remote.setProperty(name, (Value[]) null); + return null; + } else { + Value[] serials = SerialValueFactory.makeSerialValueArray(strings); + RemoteProperty property = remote.setProperty(name, serials); + return getFactory().getProperty(getSession(), property); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, String value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, InputStream value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, boolean value) + throws RepositoryException { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + + /** {@inheritDoc} */ + public Property setProperty(String name, double value) + throws RepositoryException { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + + /** {@inheritDoc} */ + public Property setProperty(String name, long value) + throws RepositoryException { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Calendar value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Node value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty(name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Binary value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty( + name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, BigDecimal value) + throws RepositoryException { + if (value == null) { + return setProperty(name, (Value) null); + } else { + return setProperty( + name, getSession().getValueFactory().createValue(value)); + } + } + + /** {@inheritDoc} */ + public Node getNode(String path) throws RepositoryException { + try { + return getNode(getSession(), remote.getNode(path)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getNodes() throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getNodes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getNodes(String pattern) throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getNodes(pattern)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getNodes(String[] globs) throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getNodes(globs)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property getProperty(String path) throws RepositoryException { + try { + RemoteProperty property = remote.getProperty(path); + return getFactory().getProperty(getSession(), property); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getProperties() throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getProperties()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getProperties(String pattern) + throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getProperties(pattern)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getProperties(String[] globs) + throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getProperties(globs)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Item getPrimaryItem() throws RepositoryException { + try { + return getItem(getSession(), remote.getPrimaryItem()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getIdentifier() throws RepositoryException { + try { + return remote.getIdentifier(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getUUID() throws RepositoryException { + try { + return remote.getUUID(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getReferences() throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getReferences()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getReferences(String name) + throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getReferences(name)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasNode(String path) throws RepositoryException { + try { + return remote.hasNode(path); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasProperty(String path) throws RepositoryException { + try { + return remote.hasProperty(path); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasNodes() throws RepositoryException { + try { + return remote.hasNodes(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasProperties() throws RepositoryException { + try { + return remote.hasProperties(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeType getPrimaryNodeType() throws RepositoryException { + try { + return getFactory().getNodeType(remote.getPrimaryNodeType()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeType[] getMixinNodeTypes() throws RepositoryException { + try { + return getNodeTypeArray(remote.getMixinNodeTypes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isNodeType(String type) throws RepositoryException { + try { + return remote.isNodeType(type); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void addMixin(String name) throws RepositoryException { + try { + remote.addMixin(name); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeMixin(String name) throws RepositoryException { + try { + remote.removeMixin(name); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canAddMixin(String name) throws RepositoryException { + try { + return remote.canAddMixin(name); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeDefinition getDefinition() throws RepositoryException { + try { + return getFactory().getNodeDef(remote.getDefinition()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version checkin() throws RepositoryException { + try { + return getFactory().getVersion(getSession(), remote.checkin()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void checkout() throws RepositoryException { + try { + remote.checkout(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void update(String workspace) throws RepositoryException { + try { + remote.update(workspace); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator merge(String workspace, boolean bestEffort) + throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.merge(workspace, bestEffort)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void cancelMerge(Version version) throws RepositoryException { + try { + remote.cancelMerge(version.getUUID()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void doneMerge(Version version) throws RepositoryException { + try { + remote.doneMerge(version.getUUID()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getCorrespondingNodePath(String workspace) + throws RepositoryException { + try { + return remote.getCorrespondingNodePath(workspace); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getIndex() throws RepositoryException { + try { + return remote.getIndex(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restore(String version, boolean removeExisting) + throws RepositoryException { + try { + remote.restore(version, removeExisting); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restore(Version version, boolean removeExisting) + throws RepositoryException { + try { + remote.restoreByUUID(version.getUUID(), removeExisting); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restore(Version version, String path, boolean removeExisting) + throws RepositoryException { + try { + remote.restore(version.getUUID(), path, removeExisting); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restoreByLabel(String label, boolean removeExisting) + throws RepositoryException { + try { + remote.restoreByLabel(label, removeExisting); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, String[] strings, int type) + throws RepositoryException { + try { + if (strings == null) { + remote.setProperty(name, (Value[]) null); + return null; + } else { + Value[] serials = SerialValueFactory.makeSerialValueArray(strings); + RemoteProperty property = remote.setProperty(name, serials, type); + return getFactory().getProperty(getSession(), property); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Value[] values, int type) + throws RepositoryException { + try { + if (values != null) { + values = SerialValueFactory.makeSerialValueArray(values); + } + RemoteProperty property = remote.setProperty(name, values, type); + if (property != null) { + return getFactory().getProperty(getSession(), property); + } else { + return null; + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, Value value, int type) + throws RepositoryException { + try { + if (value != null) { + value = SerialValueFactory.makeSerialValue(value); + } + RemoteProperty property = remote.setProperty(name, value, type); + if (property != null) { + return getFactory().getProperty(getSession(), property); + } else { + return null; + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property setProperty(String name, String string, int type) + throws RepositoryException { + Value value = null; + if (string != null) { + value = getSession().getValueFactory().createValue(string); + } + return setProperty(name, value, type); + } + + /** {@inheritDoc} */ + public boolean isCheckedOut() throws RepositoryException { + try { + return remote.isCheckedOut(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public VersionHistory getVersionHistory() throws RepositoryException { + try { + return getFactory().getVersionHistory(getSession(), remote.getVersionHistory()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version getBaseVersion() throws RepositoryException { + try { + return getFactory().getVersion(getSession(), remote.getBaseVersion()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Lock lock(boolean isDeep, boolean isSessionScoped) + throws RepositoryException { + try { + RemoteLock lock = remote.lock(isDeep, isSessionScoped); + return getFactory().getLock(getSession(), lock); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Lock getLock() throws RepositoryException { + try { + return getFactory().getLock(getSession(), remote.getLock()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void unlock() throws RepositoryException { + try { + remote.unlock(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean holdsLock() throws RepositoryException { + try { + return remote.holdsLock(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isLocked() throws RepositoryException { + try { + return remote.isLocked(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void followLifecycleTransition(String transition) + throws RepositoryException { + try { + remote.followLifecycleTransition(transition); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAllowedLifecycleTransistions() + throws RepositoryException { + try { + return remote.getAllowedLifecycleTransistions(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getSharedSet() throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getSharedSet()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getWeakReferences() throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyIterator getWeakReferences(String name) + throws RepositoryException { + try { + return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences(name)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeShare() throws RepositoryException { + try { + remote.removeShare(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeSharedSet() throws RepositoryException { + try { + remote.removeSharedSet(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setPrimaryType(String nodeTypeName) + throws RepositoryException { + try { + remote.setPrimaryType(nodeTypeName); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java new file mode 100644 index 00000000000..05cbc568589 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java @@ -0,0 +1,104 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; + +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} + * interface. This class makes a remote node definition locally available using + * the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDef} interface. + * + * @see javax.jcr.nodetype.NodeDefinition + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition + */ +@Deprecated(forRemoval = true) public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { + + /** The adapted remote node definition. */ + private RemoteNodeDefinition remote; + + /** + * Creates a local adapter for the given remote node definition. + * + * @param remote remote node definition + * @param factory local adapter factory + */ + public ClientNodeDefinition(RemoteNodeDefinition remote, LocalAdapterFactory factory) { + super(remote, factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public NodeType[] getRequiredPrimaryTypes() { + try { + return getNodeTypeArray(remote.getRequiredPrimaryTypes()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeType getDefaultPrimaryType() { + try { + RemoteNodeType nt = remote.getDefaultPrimaryType(); + if (nt == null) { + return null; + } else { + return getFactory().getNodeType(nt); + } + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean allowsSameNameSiblings() { + try { + return remote.allowsSameNameSiblings(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getDefaultPrimaryTypeName() { + try { + return remote.getDefaultPrimaryTypeName(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getRequiredPrimaryTypeNames() { + try { + return remote.getRequiredPrimaryTypeNames(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java new file mode 100644 index 00000000000..37bf473646e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java @@ -0,0 +1,317 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.PropertyDefinition; + +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} + * interface. This class makes a remote node type locally available using + * the JCR {@link javax.jcr.nodetype.NodeType NodeType} interface. + * + * @see javax.jcr.nodetype.NodeType + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType + */ +@Deprecated(forRemoval = true) public class ClientNodeType extends ClientObject implements NodeType { + + /** The adapted remote node type. */ + private RemoteNodeType remote; + + /** + * Creates a local adapter for the given remote node type. + * + * @param remote remote node type + * @param factory local adapter factory + */ + public ClientNodeType(RemoteNodeType remote, LocalAdapterFactory factory) { + super(factory); + this.remote = remote; + } + + /** + * Utility method for creating an array of local node definition + * adapters for an array of remote node definitions. The node + * definition adapters are created using the local adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param remotes remote node definitions + * @return local node definition array + */ + private NodeDefinition[] getNodeDefArray(RemoteNodeDefinition[] remotes) { + if (remotes != null) { + NodeDefinition[] defs = new NodeDefinition[remotes.length]; + for (int i = 0; i < remotes.length; i++) { + defs[i] = getFactory().getNodeDef(remotes[i]); + } + return defs; + } else { + return new NodeDefinition[0]; // for safety + } + } + + /** + * Utility method for creating an array of local property definition + * adapters for an array of remote property definitions. The property + * definition adapters are created using the local adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param remotes remote property definitions + * @return local property definition array + */ + protected PropertyDefinition[] getPropertyDefArray( + RemotePropertyDefinition[] remotes) { + if (remotes != null) { + PropertyDefinition[] defs = new PropertyDefinition[remotes.length]; + for (int i = 0; i < remotes.length; i++) { + defs[i] = getFactory().getPropertyDef(remotes[i]); + } + return defs; + } else { + return new PropertyDefinition[0]; // for safety + } + } + + /** {@inheritDoc} */ + public String getName() { + try { + return remote.getName(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isMixin() { + try { + return remote.isMixin(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasOrderableChildNodes() { + try { + return remote.hasOrderableChildNodes(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeType[] getSupertypes() { + try { + return getNodeTypeArray(remote.getSupertypes()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeType[] getDeclaredSupertypes() { + try { + return getNodeTypeArray(remote.getDeclaredSupertypes()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isNodeType(String type) { + try { + return remote.isNodeType(type); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyDefinition[] getPropertyDefinitions() { + try { + return getPropertyDefArray(remote.getPropertyDefs()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyDefinition[] getDeclaredPropertyDefinitions() { + try { + return getPropertyDefArray(remote.getDeclaredPropertyDefs()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeDefinition[] getChildNodeDefinitions() { + try { + return getNodeDefArray(remote.getChildNodeDefs()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeDefinition[] getDeclaredChildNodeDefinitions() { + try { + return getNodeDefArray(remote.getDeclaredChildNodeDefs()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canSetProperty(String name, Value value) { + try { + return remote.canSetProperty( + name, SerialValueFactory.makeSerialValue(value)); + } catch (RepositoryException e) { + throw new RuntimeException("Unable to serialize value", e); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canSetProperty(String name, Value[] values) { + try { + Value[] serials = SerialValueFactory.makeSerialValueArray(values); + return remote.canSetProperty(name, serials); + } catch (RepositoryException e) { + throw new RuntimeException("Unable to serialize values", e); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canAddChildNode(String name) { + try { + return remote.canAddChildNode(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canAddChildNode(String name, String type) { + try { + return remote.canAddChildNode(name, type); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canRemoveItem(String name) { + try { + return remote.canRemoveItem(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getPrimaryItemName() { + try { + return remote.getPrimaryItemName(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canRemoveNode(String nodeName) { + try { + return remote.canRemoveNode(nodeName); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canRemoveProperty(String propertyName) { + try { + return remote.canRemoveProperty(propertyName); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeIterator getDeclaredSubtypes() { + try { + return getFactory().getNodeTypeIterator(remote.getDeclaredSubtypes()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeIterator getSubtypes() { + try { + return getFactory().getNodeTypeIterator(remote.getSubtypes()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getDeclaredSupertypeNames() { + try { + return remote.getDeclaredSupertypeNames(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isAbstract() { + try { + return remote.isAbstract(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isQueryable() { + try { + return remote.isQueryable(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java new file mode 100644 index 00000000000..2a4555521b5 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java @@ -0,0 +1,151 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.nodetype.NodeDefinitionTemplate; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeDefinition; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.nodetype.NodeTypeTemplate; +import javax.jcr.nodetype.PropertyDefinitionTemplate; + +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} + * interface. This class makes a remote node type manager locally available + * using the JCR {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} + * interface. + * + * @see javax.jcr.nodetype.NodeTypeManager + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager + */ +@Deprecated(forRemoval = true) public class ClientNodeTypeManager extends ClientObject + implements NodeTypeManager { + + /** The adapted remote node type manager. */ + private RemoteNodeTypeManager remote; + + /** + * Creates a local adapter for the given remote node type manager. + * + * @param remote remote node type manager + * @param factory local adapter factory + */ + public ClientNodeTypeManager( + RemoteNodeTypeManager remote, LocalAdapterFactory factory) { + super(factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public NodeType getNodeType(String name) throws RepositoryException { + try { + return getFactory().getNodeType(remote.getNodeType(name)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeIterator getAllNodeTypes() throws RepositoryException { + try { + return getFactory().getNodeTypeIterator(remote.getAllNodeTypes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException { + try { + return getFactory().getNodeTypeIterator(remote.getPrimaryNodeTypes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeIterator getMixinNodeTypes() throws RepositoryException { + try { + return getFactory().getNodeTypeIterator(remote.getMixinNodeTypes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public NodeDefinitionTemplate createNodeDefinitionTemplate() + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public NodeTypeTemplate createNodeTypeTemplate() + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public PropertyDefinitionTemplate createPropertyDefinitionTemplate() + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public boolean hasNodeType(String name) throws RepositoryException { + try { + return remote.hasNodeType(name); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public NodeType registerNodeType( + NodeTypeDefinition ntd, boolean allowUpdate) + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public NodeTypeIterator registerNodeTypes( + NodeTypeDefinition[] ntds, boolean allowUpdate) + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public void unregisterNodeType(String name) throws RepositoryException { + unregisterNodeTypes(new String[] { name }); + } + + public void unregisterNodeTypes(String[] names) throws RepositoryException { + try { + remote.unregisterNodeTypes(names); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java new file mode 100644 index 00000000000..5241619921c --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import javax.jcr.Item; +import javax.jcr.Node; +import javax.jcr.Session; +import javax.jcr.nodetype.NodeType; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Base class for client adapter objects. The only purpose of + * this class is to centralize the handling of the + * local adapter factory used by the client adapters to + * instantiate new adapters. + */ +@Deprecated(forRemoval = true) public class ClientObject { + + /** Local adapter factory. */ + private LocalAdapterFactory factory; + + /** + * Creates a basic client adapter that uses the given factory + * to create new adapters. + * + * @param factory local adapter factory + */ + protected ClientObject(LocalAdapterFactory factory) { + this.factory = factory; + } + + /** + * Returns the local adapter factory used to create new adapters. + * + * @return local adapter factory + */ + protected LocalAdapterFactory getFactory() { + return factory; + } + + /** + * Utility method to create a local adapter for a remote item. + * This method introspects the remote reference to determine + * whether to instantiate a {@link javax.jcr.Property}, + * a {@link Node Node}, or an {@link Item Item} adapter using + * the local adapter factory. + *

    + * If the remote item is a {@link RemoteNode}, this method delegates + * to {@link #getNode(Session, RemoteNode)}. + * + * @param session current session + * @param remote remote item + * @return local property, node, or item adapter + */ + protected Item getItem(Session session, RemoteItem remote) { + if (remote instanceof RemoteProperty) { + return factory.getProperty(session, (RemoteProperty) remote); + } else if (remote instanceof RemoteNode) { + return getNode(session, (RemoteNode) remote); + } else { + return factory.getItem(session, remote); + } + } + + /** + * Utility method to create a local adapter for a remote node. + * This method introspects the remote reference to determine + * whether to instantiate a {@link Node Node}, + * a {@link javax.jcr.version.VersionHistory VersionHistory}, or a + * {@link javax.jcr.version.Version Version} adapter using + * the local adapter factory. + * + * @param session current session + * @param remote remote node + * @return local node, version, or version history adapter + */ + protected Node getNode(Session session, RemoteNode remote) { + if (remote instanceof RemoteVersion) { + return factory.getVersion(session, (RemoteVersion) remote); + } else if (remote instanceof RemoteVersionHistory) { + return factory.getVersionHistory(session, (RemoteVersionHistory) remote); + } else { + return factory.getNode(session, remote); + } + } + + /** + * Utility method for creating an array of local node type adapters + * for an array of remote node types. The node type adapters are created + * using the local adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param remotes remote node types + * @return local node type array + */ + protected NodeType[] getNodeTypeArray(RemoteNodeType[] remotes) { + if (remotes != null) { + NodeType[] types = new NodeType[remotes.length]; + for (int i = 0; i < remotes.length; i++) { + types[i] = factory.getNodeType(remotes[i]); + } + return types; + } else { + return new NodeType[0]; // for safety + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java new file mode 100644 index 00000000000..e30761eaf8f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java @@ -0,0 +1,144 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.Workspace; +import javax.jcr.observation.EventJournal; +import javax.jcr.observation.EventListener; +import javax.jcr.observation.EventListenerIterator; +import javax.jcr.observation.ObservationManager; + +import org.apache.jackrabbit.rmi.iterator.ArrayEventListenerIterator; +import org.apache.jackrabbit.rmi.observation.ClientEventPoll; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The ClientObservationManager class + *

    + * This class uses an instance of the + * {@link org.apache.jackrabbit.rmi.observation.ClientEventPoll} class for the + * actual registration and event dispatching. + *

    + * This class does not require the + * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory} and consequently + * calls the base class constructor with a null factory. + *

    + * See the {@link org.apache.jackrabbit.rmi.observation observation} + * package comment for a description on how event listener registration and + * notification is implemented. + * + * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll + */ +@Deprecated(forRemoval = true) public class ClientObservationManager extends ClientObject implements + ObservationManager { + + /** The remote observation manager */ + private final RemoteObservationManager remote; + + /** The Workspace to which this observation manager belongs. */ + private final Workspace workspace; + + /** The ClientEventPoll class internally used for event dispatching */ + private ClientEventPoll poller; + + /** + * Creates an instance of this class talking to the given remote observation + * manager. + * + * @param remote The {@link RemoteObservationManager} backing this + * client-side observation manager. + * @param workspace The Workspace instance to which this + * observation manager belongs. + */ + public ClientObservationManager(Workspace workspace, + RemoteObservationManager remote) { + super(null); + this.remote = remote; + this.workspace = workspace; + } + + /** {@inheritDoc} */ + public void addEventListener(EventListener listener, int eventTypes, + String absPath, boolean isDeep, String[] uuid, + String[] nodeTypeName, boolean noLocal) + throws RepositoryException { + try { + long listenerId = getClientEventPoll().addListener(listener); + remote.addEventListener(listenerId, eventTypes, absPath, + isDeep, uuid, nodeTypeName, noLocal); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeEventListener(EventListener listener) + throws RepositoryException { + try { + long id = getClientEventPoll().removeListener(listener); + remote.removeEventListener(id); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public EventListenerIterator getRegisteredEventListeners() { + EventListener[] listeners = (poller != null) + ? poller.getListeners() + : new EventListener[0]; + return new ArrayEventListenerIterator(listeners); + } + + public EventJournal getEventJournal() throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public EventJournal getEventJournal( + int eventTypes, String absPath, boolean isDeep, + String[] uuid, String[] nodeTypeName) throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public void setUserData(String userData) throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + //---------- internal ------------------------------------------------------ + + /** + * Returns the {@link ClientEventPoll} instance used by this (client-side) + * observation manager. This method creates the instance on the first call + * and starts the poller thread to wait for remote events. + * + * @return poller instance + */ + private synchronized ClientEventPoll getClientEventPoll() { + if (poller == null) { + poller = new ClientEventPoll(remote, workspace.getSession()); + poller.start(); + } + return poller; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java new file mode 100644 index 00000000000..16f0359f6a3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java @@ -0,0 +1,447 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.io.InputStream; +import java.math.BigDecimal; +import java.rmi.RemoteException; +import java.util.Calendar; + +import javax.jcr.Binary; +import javax.jcr.ItemNotFoundException; +import javax.jcr.ItemVisitor; +import javax.jcr.Node; +import javax.jcr.PathNotFoundException; +import javax.jcr.Property; +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; +import javax.jcr.ValueFactory; +import javax.jcr.ValueFormatException; +import javax.jcr.nodetype.PropertyDefinition; + +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} + * interface. This class makes a remote property locally available using + * the JCR {@link javax.jcr.Property Property} interface. + * + * @see javax.jcr.Property + * @see org.apache.jackrabbit.rmi.remote.RemoteProperty + */ +@Deprecated(forRemoval = true) public class ClientProperty extends ClientItem implements Property { + + /** The adapted remote property. */ + private RemoteProperty remote; + + /** + * Creates a local adapter for the given remote property. + * + * @param session current session + * @param remote remote property + * @param factory local adapter factory + */ + public ClientProperty( + Session session, RemoteProperty remote, + LocalAdapterFactory factory) { + super(session, remote, factory); + this.remote = remote; + } + + /** + * Calls the {@link ItemVisitor#visit(Property) ItemVisitor.visit(Property} + * method of the given visitor. Does not contact the remote property, but + * the visitor may invoke other methods that do contact the remote property. + * + * {@inheritDoc} + */ + public void accept(ItemVisitor visitor) throws RepositoryException { + visitor.visit(this); + } + + /** + * Returns the boolean value of this property. Implemented as + * getValue().getBoolean(). + * + * {@inheritDoc} + */ + public boolean getBoolean() throws RepositoryException { + return getValue().getBoolean(); + } + + /** + * Returns the date value of this property. Implemented as + * getValue().getDate(). + * + * {@inheritDoc} + */ + public Calendar getDate() throws RepositoryException { + return getValue().getDate(); + } + + /** + * Returns the double value of this property. Implemented as + * getValue().getDouble(). + * + * {@inheritDoc} + */ + public double getDouble() throws RepositoryException { + return getValue().getDouble(); + } + + /** + * Returns the long value of this property. Implemented as + * getValue().getLong(). + * + * {@inheritDoc} + */ + public long getLong() throws RepositoryException { + return getValue().getLong(); + } + + /** + * Returns the binary value of this property. Implemented as + * getValue().getBinary(). + * + * {@inheritDoc} + */ + public Binary getBinary() throws RepositoryException { + return getValue().getBinary(); + } + + /** + * Returns the decimal value of this property. Implemented as + * getValue().getDecimal(). + * + * {@inheritDoc} + */ + public BigDecimal getDecimal() throws RepositoryException { + return getValue().getDecimal(); + } + + /** + * Returns the binary value of this property. Implemented as + * getValue().getStream(). + * + * {@inheritDoc} + */ + @SuppressWarnings("deprecation") + public InputStream getStream() throws RepositoryException { + return getValue().getStream(); + } + + /** + * Returns the string value of this property. Implemented as + * getValue().getString(). + * + * {@inheritDoc} + */ + public String getString() throws RepositoryException { + return getValue().getString(); + } + + /** {@inheritDoc} */ + public Value getValue() throws RepositoryException { + try { + return remote.getValue(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Value[] getValues() throws RepositoryException { + try { + return remote.getValues(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Sets the boolean value of this property. Implemented as + * setValue(new BooleanValue(value)). + * + * {@inheritDoc} + */ + public void setValue(boolean value) throws RepositoryException { + setValue(getSession().getValueFactory().createValue(value)); + } + + /** + * Sets the date value of this property. Implemented as + * setValue(new DateValue(value)). + * + * {@inheritDoc} + */ + public void setValue(Calendar value) throws RepositoryException { + if (value == null) { + setValue((Value) null); + } else { + setValue(getSession().getValueFactory().createValue(value)); + } + } + + /** + * Sets the double value of this property. Implemented as + * setValue(new DoubleValue(value)). + * + * {@inheritDoc} + */ + public void setValue(double value) throws RepositoryException { + setValue(getSession().getValueFactory().createValue(value)); + } + + /** + * Sets the binary value of this property. Implemented as + * setValue(new BinaryValue(value)). + * + * {@inheritDoc} + */ + public void setValue(InputStream value) throws RepositoryException { + if (value == null) { + setValue((Value) null); + } else { + ValueFactory factory = getSession().getValueFactory(); + Binary binary = factory.createBinary(value); + try { + setValue(factory.createValue(binary)); + } finally { + binary.dispose(); + } + } + } + + /** + * Sets the long value of this property. Implemented as + * setValue(new LongValue(value)). + * + * {@inheritDoc} + */ + public void setValue(long value) throws RepositoryException { + setValue(getSession().getValueFactory().createValue(value)); + } + + /** + * Sets the binary value of this property. + * + * {@inheritDoc} + */ + public void setValue(Binary value) throws RepositoryException { + setValue(getSession().getValueFactory().createValue(value)); + } + + /** + * Sets the decimal value of this property. + * + * {@inheritDoc} + */ + public void setValue(BigDecimal value) throws RepositoryException { + setValue(getSession().getValueFactory().createValue(value)); + } + + + /** + * Sets the reference value of this property. Implemented as + * setValue(new ReferenceValue(value)). + * + * {@inheritDoc} + */ + public void setValue(Node value) throws RepositoryException { + if (value == null) { + setValue((Value) null); + } else { + setValue(getSession().getValueFactory().createValue(value)); + } + } + + /** + * Sets the string value of this property. Implemented as + * setValue(new StringValue(value)). + * + * {@inheritDoc} + */ + public void setValue(String value) throws RepositoryException { + if (value == null) { + setValue((Value) null); + } else { + setValue(getSession().getValueFactory().createValue(value)); + } + } + + /** + * {@inheritDoc} + */ + public void setValue(String[] strings) throws RepositoryException { + try { + Value[] values = null; + if (strings != null) { + values = SerialValueFactory.makeSerialValueArray(strings); + } + remote.setValue(values); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setValue(Value value) throws RepositoryException { + try { + if (value != null) { + value = SerialValueFactory.makeSerialValue(value); + } + remote.setValue(value); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setValue(Value[] values) throws RepositoryException { + try { + if (values != null) { + values = SerialValueFactory.makeSerialValueArray(values); + } + remote.setValue(values); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Returns the reference value of this property. Implemented by + * converting the reference value to an UUID string and using the + * current session to look up the referenced node. + * + * {@inheritDoc} + */ + public Node getNode() throws RepositoryException { + String value = getString(); + + switch (getType()) { + case PropertyType.REFERENCE: + case PropertyType.WEAKREFERENCE: + return getSession().getNodeByIdentifier(value); + + case PropertyType.PATH: + try { + if (value.startsWith("/")) { + return getSession().getNode(value); + } else { + return getParent().getNode(value); + } + } catch (PathNotFoundException e) { + throw new ItemNotFoundException(value); + } + + case PropertyType.NAME: + try { + return getParent().getNode(value); + } catch (PathNotFoundException e) { + throw new ItemNotFoundException(value); + } + + case PropertyType.STRING: + try { + // interpret as identifier + Value refValue = getSession().getValueFactory().createValue(value, PropertyType.REFERENCE); + return getSession().getNodeByIdentifier(refValue.getString()); + } catch (ItemNotFoundException e) { + throw e; + } catch (RepositoryException e) { + // try if STRING value can be interpreted as PATH value + Value pathValue = getSession().getValueFactory().createValue(value, PropertyType.PATH); + boolean absolute = value.startsWith("/"); + try { + return (absolute) ? getSession().getNode(pathValue.getString()) : getParent().getNode(pathValue.getString()); + } catch (PathNotFoundException e1) { + throw new ItemNotFoundException(pathValue.getString()); + } + } + + default: + throw new ValueFormatException("Property value cannot be converted to a PATH, REFERENCE or WEAKREFERENCE: " + value); + } + } + + /** {@inheritDoc} */ + public Property getProperty() throws RepositoryException { + if (getType() != PropertyType.PATH && getType() != PropertyType.NAME) { + throw new ValueFormatException("Not a path property"); + } else { + String value = getString(); + try { + if (value.startsWith("/")) { + return getSession().getProperty(value); + } else { + return getParent().getProperty(value); + } + } catch (PathNotFoundException e) { + throw new ItemNotFoundException(value); + } + } + } + + /** {@inheritDoc} */ + public long getLength() throws RepositoryException { + try { + return remote.getLength(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public long[] getLengths() throws RepositoryException { + try { + return remote.getLengths(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public PropertyDefinition getDefinition() throws RepositoryException { + try { + return getFactory().getPropertyDef(remote.getDefinition()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getType() throws RepositoryException { + try { + return remote.getType(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isMultiple() throws RepositoryException { + // TODO: Direct remote call for this? + return getDefinition().isMultiple(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java new file mode 100644 index 00000000000..161ba536fd1 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Value; +import javax.jcr.nodetype.PropertyDefinition; + +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} + * interface. This class makes a remote property definition locally available + * using the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} interface. + * + * @see javax.jcr.nodetype.PropertyDefinition + * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition + */ +@Deprecated(forRemoval = true) public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { + + /** The adapted remote property. */ + private RemotePropertyDefinition remote; + + /** + * Creates a local adapter for the given remote property definition. + * + * @param remote remote property definition + * @param factory local adapter factory + */ + public ClientPropertyDefinition( + RemotePropertyDefinition remote, LocalAdapterFactory factory) { + super(remote, factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public int getRequiredType() { + try { + return remote.getRequiredType(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getValueConstraints() { + try { + return remote.getValueConstraints(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public Value[] getDefaultValues() { + try { + return remote.getDefaultValues(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isMultiple() { + try { + return remote.isMultiple(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAvailableQueryOperators() { + try { + return remote.getAvailableQueryOperators(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isFullTextSearchable() { + try { + return remote.isFullTextSearchable(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isQueryOrderable() { + try { + return remote.isQueryOrderable(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java new file mode 100644 index 00000000000..aee001a45b0 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java @@ -0,0 +1,145 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Node; +import javax.jcr.Value; +import javax.jcr.query.Query; +import javax.jcr.query.QueryResult; + +import org.apache.jackrabbit.rmi.remote.RemoteQuery; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link RemoteQuery RemoteQuery} + * interface. This class makes a remote query locally available using + * the JCR {@link Query Query} interface. + * + * @see javax.jcr.query.Query Query + * @see org.apache.jackrabbit.rmi.remote.RemoteQuery + */ +@Deprecated(forRemoval = true) public class ClientQuery extends ClientObject implements Query { + + /** The current session */ + private Session session; + + /** The adapted remote query manager. */ + private RemoteQuery remote; + + /** + * Creates a client adapter for the given query. + * + * @param session current session + * @param remote remote query + * @param factory adapter factory + */ + public ClientQuery( + Session session, RemoteQuery remote, LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public QueryResult execute() throws RepositoryException { + try { + return getFactory().getQueryResult(session, remote.execute()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getStatement() { + try { + return remote.getStatement(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getLanguage() { + try { + return remote.getLanguage(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getStoredQueryPath() throws RepositoryException { + try { + return remote.getStoredQueryPath(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node storeAsNode(String absPath) throws RepositoryException { + try { + return getNode(session, remote.storeAsNode(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void bindValue(String varName, Value value) + throws RepositoryException { + try { + remote.bindValue(varName, value); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getBindVariableNames() throws RepositoryException { + try { + return remote.getBindVariableNames(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setLimit(long limit) { + try { + remote.setLimit(limit); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void setOffset(long offset) { + try { + remote.setOffset(offset); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java new file mode 100644 index 00000000000..3590c2be6e6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java @@ -0,0 +1,99 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; +import javax.jcr.query.qom.QueryObjectModelFactory; + +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteQueryManager RemoteQueryManager} + * interface. This class makes a remote query manager locally available using + * the JCR {@link QueryManager QueryManager} interface. + * + * @see javax.jcr.query.QueryManager QueryManager + * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager + */ +@Deprecated(forRemoval = true) public class ClientQueryManager extends ClientObject implements QueryManager { + + /** The current session */ + private Session session; + + /** The adapted remote query manager. */ + private RemoteQueryManager remote; + + /** + * Creates a client adapter for the given remote query manager. + * + * @param session current session + * @param remote remote query manager + * @param factory adapter factory + */ + public ClientQueryManager( + Session session, RemoteQueryManager remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public Query createQuery(String statement, String language) + throws RepositoryException { + try { + RemoteQuery query = remote.createQuery(statement, language); + return getFactory().getQuery(session, query); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Query getQuery(Node node) throws RepositoryException { + try { + // TODO fix this remote node dereferencing hack + RemoteQuery query = remote.getQuery(node.getPath()); + return getFactory().getQuery(session, query); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getSupportedQueryLanguages() throws RepositoryException { + try { + return remote.getSupportedQueryLanguages(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + public QueryObjectModelFactory getQOMFactory() { + throw new RuntimeException("TODO: JCR-3206"); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java new file mode 100644 index 00000000000..a03b458622f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java @@ -0,0 +1,99 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.NodeIterator; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.query.QueryResult; +import javax.jcr.query.RowIterator; + +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link RemoteQueryResult RemoteQueryResult} + * interface. This class makes a remote query result locally available using + * the JCR {@link QueryResult QueryResult} interface. + * + * @see javax.jcr.query.QueryResult QueryResult + * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult + */ +@Deprecated(forRemoval = true) public class ClientQueryResult extends ClientObject implements QueryResult { + + /** The current session */ + private Session session; + + /** The adapted remote query result. */ + private RemoteQueryResult remote; + + /** + * Creates a client adapter for the given remote query result. + * + * @param session current session + * @param remote remote query result + * @param factory adapter factory + */ + public ClientQueryResult( + Session session, RemoteQueryResult remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public String[] getColumnNames() throws RepositoryException { + try { + return remote.getColumnNames(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RowIterator getRows() throws RepositoryException { + try { + return getFactory().getRowIterator(session, remote.getRows()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getNodes() throws RepositoryException { + try { + return getFactory().getNodeIterator(session, remote.getNodes()); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public String[] getSelectorNames() throws RepositoryException { + try { + return remote.getSelectorNames(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java new file mode 100644 index 00000000000..07285c7c9ba --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java @@ -0,0 +1,219 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; +import java.util.HashSet; +import java.util.Set; + +import javax.jcr.Credentials; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} + * interface. This class makes a remote repository locally available using + * the JCR {@link javax.jcr.Repository Repository} interface. + * + * @see javax.jcr.Repository + * @see org.apache.jackrabbit.rmi.remote.RemoteRepository + */ +@Deprecated(forRemoval = true) public class ClientRepository implements Repository { + + /** + * The set of standard descriptor keys defined in the + * {@link Repository} interface. + */ + private static final Set STANDARD_KEYS = new HashSet() {{ + add(Repository.IDENTIFIER_STABILITY); + add(Repository.LEVEL_1_SUPPORTED); + add(Repository.LEVEL_2_SUPPORTED); + add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); + add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); + add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); + add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); + add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); + add(Repository.OPTION_LIFECYCLE_SUPPORTED); + add(Repository.OPTION_LOCKING_SUPPORTED); + add(Repository.OPTION_OBSERVATION_SUPPORTED); + add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); + add(Repository.OPTION_QUERY_SQL_SUPPORTED); + add(Repository.OPTION_RETENTION_SUPPORTED); + add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); + add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); + add(Repository.OPTION_TRANSACTIONS_SUPPORTED); + add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); + add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); + add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); + add(Repository.OPTION_VERSIONING_SUPPORTED); + add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); + add(Repository.OPTION_XML_EXPORT_SUPPORTED); + add(Repository.OPTION_XML_IMPORT_SUPPORTED); + add(Repository.OPTION_ACTIVITIES_SUPPORTED); + add(Repository.OPTION_BASELINES_SUPPORTED); + + add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); + add(Repository.QUERY_JOINS); + add(Repository.QUERY_LANGUAGES); + add(Repository.QUERY_STORED_QUERIES_SUPPORTED); + add(Repository.QUERY_XPATH_DOC_ORDER); + add(Repository.QUERY_XPATH_POS_INDEX); + add(Repository.REP_NAME_DESC); + add(Repository.REP_VENDOR_DESC); + add(Repository.REP_VENDOR_URL_DESC); + add(Repository.SPEC_NAME_DESC); + add(Repository.SPEC_VERSION_DESC); + add(Repository.WRITE_SUPPORTED); + }}; + + /** The adapted remote repository. */ + private final RemoteRepository remote; + + /** Local adapter factory. */ + private final LocalAdapterFactory factory; + + /** + * Creates a client adapter for the given remote repository. + * + * @param remote remote repository + * @param factory local adapter factory + */ + public ClientRepository( + RemoteRepository remote, LocalAdapterFactory factory) { + this.remote = remote; + this.factory = factory; + } + + /** {@inheritDoc} */ + public String getDescriptor(String name) { + try { + return remote.getDescriptor(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public Value getDescriptorValue(String key) { + String descriptor = getDescriptor(key); + if (descriptor != null) { + return SerialValueFactory.getInstance().createValue(descriptor); + } else { + return null; + } + } + + /** {@inheritDoc} */ + public Value[] getDescriptorValues(String key) { + try { + return remote.getDescriptorValues(key); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getDescriptorKeys() { + try { + return remote.getDescriptorKeys(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isSingleValueDescriptor(String key) { + return getDescriptor(key) != null; + } + + /** {@inheritDoc} */ + public Session login(Credentials credentials, String workspace) + throws RepositoryException { + try { + RemoteSession session = remote.login(credentials, workspace); + return factory.getSession(this, session); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Returns true if the given key identifies a standard descriptor. + * + * @param key descriptor key + * @return true if the key identifies a standard descriptor, + * false otherwise + */ + public boolean isStandardDescriptor(String key) { + return STANDARD_KEYS.contains(key); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * null arguments. + * + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login() throws RepositoryException { + return login(null, null); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * the given credentials and a null workspace name. + * + * @param credentials login credentials + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login(Credentials credentials) throws RepositoryException { + return login(credentials, null); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * null credentials and the given workspace name. + * + * @param workspace workspace name + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login(String workspace) throws RepositoryException { + return login(null, workspace); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java new file mode 100644 index 00000000000..dd785636835 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java @@ -0,0 +1,137 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.net.MalformedURLException; +import java.rmi.Naming; +import java.rmi.NotBoundException; +import java.rmi.RemoteException; +import java.util.Hashtable; + +import javax.jcr.Repository; +import javax.naming.Context; +import javax.naming.Name; +import javax.naming.RefAddr; +import javax.naming.Reference; +import javax.naming.spi.ObjectFactory; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Object factory for JCR-RMI clients. This factory can be used either + * directly or as a JNDI object factory. + * + * @see ClientRepository + */ +@Deprecated(forRemoval = true) public class ClientRepositoryFactory implements ObjectFactory { + + /** + * The JNDI parameter name for configuring the RMI URL of + * a remote repository. + */ + public static final String URL_PARAMETER = "url"; + + /** + * Local adapter factory. + */ + private LocalAdapterFactory factory; + + /** + * Creates a JCR-RMI client factory with the default adapter factory. + */ + public ClientRepositoryFactory() { + this(new ClientAdapterFactory()); + } + + /** + * Creates a JCR-RMI client factory with the given adapter factory. + * + * @param factory local adapter factory + */ + public ClientRepositoryFactory(LocalAdapterFactory factory) { + this.factory = factory; + } + + /** + * Returns a client wrapper for a remote content repository. The remote + * repository is looked up from the RMI registry using the given URL by + * the returned {@link SafeClientRepository} instance. + *

    + * The current implementation of this method will not throw any of the + * declared exceptions (because of the {@link SafeClientRepository} being + * used), but the throws clauses are kept for backwards compatibility and + * potential future use. Clients should be prepared to handle exceptions + * from this method. + * + * @param url the RMI URL of the remote repository + * @return repository client + * @throws MalformedURLException if the given URL is malfored + * @throws NotBoundException if the given URL points to nothing + * @throws ClassCastException if the given URL points to something unknown + * @throws RemoteException if the remote repository can not be accessed + */ + public Repository getRepository(final String url) + throws MalformedURLException, NotBoundException, + ClassCastException, RemoteException { + return new SafeClientRepository(factory) { + + protected RemoteRepository getRemoteRepository() + throws RemoteException { + try { + return (RemoteRepository) Naming.lookup(url); + } catch (MalformedURLException e) { + throw new RemoteException("Malformed URL: " + url, e); + } catch (NotBoundException e) { + throw new RemoteException("No target found: " + url, e); + } catch (ClassCastException e) { + throw new RemoteException("Unknown target: " + url, e); + } + } + + }; + } + + /** + * JNDI factory method for creating JCR-RMI clients. Creates a lazy + * client repository instance that uses the reference parameter "url" + * as the RMI URL where the remote repository is looked up when accessed. + * + * @param object reference parameters + * @param name unused + * @param context unused + * @param environment unused + * @return repository client + */ + public Object getObjectInstance( + Object object, Name name, Context context, Hashtable environment) { + if (object instanceof Reference) { + Reference reference = (Reference) object; + RefAddr url = reference.get(URL_PARAMETER); + if (url != null && url.getContent() != null) { + try { + return getRepository(url.getContent().toString()); + } catch (Exception e) { + return null; + } + } + } + return null; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java new file mode 100644 index 00000000000..38701da7629 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; +import javax.jcr.query.Row; + +import org.apache.jackrabbit.rmi.remote.RemoteRow; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteRow RemoteRow} + * interface. This class makes a remote query row locally available using + * the JCR {@link Row Row} interface. + * + * @see javax.jcr.query.Row Row + * @see org.apache.jackrabbit.rmi.remote.RemoteRow + */ +@Deprecated(forRemoval = true) public class ClientRow extends ClientObject implements Row { + + /** Current session. */ + private Session session; + + /** The remote query row. */ + private RemoteRow remote; + + /** + * Creates a client adapter for the given remote query row. + * + * @param remote remote query row + */ + public ClientRow(Session session, RemoteRow remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public Value[] getValues() throws RepositoryException { + try { + return remote.getValues(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Value getValue(String s) throws RepositoryException { + try { + return remote.getValue(s); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getNode() throws RepositoryException { + try { + return getFactory().getNode(session, remote.getNode()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getNode(String selectorName) throws RepositoryException { + try { + return getFactory().getNode(session, remote.getNode(selectorName)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPath() throws RepositoryException { + try { + return remote.getPath(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPath(String selectorName) throws RepositoryException { + try { + return remote.getPath(selectorName); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public double getScore() throws RepositoryException { + try { + return remote.getScore(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public double getScore(String selectorName) throws RepositoryException { + try { + return remote.getScore(selectorName); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java new file mode 100644 index 00000000000..a07769bbd8b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java @@ -0,0 +1,589 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.rmi.RemoteException; +import java.security.AccessControlException; + +import javax.jcr.Credentials; +import javax.jcr.Item; +import javax.jcr.Node; +import javax.jcr.Property; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.ValueFactory; +import javax.jcr.Workspace; +import javax.jcr.retention.RetentionManager; +import javax.jcr.security.AccessControlManager; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.sax.SAXResult; +import javax.xml.transform.stream.StreamSource; + +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.ContentHandler; +import org.xml.sax.SAXException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} + * interface. This class makes a remote session locally available using + * the JCR {@link javax.jcr.Session Session} interface. + * + * @see javax.jcr.Session + * @see org.apache.jackrabbit.rmi.remote.RemoteSession + */ +@Deprecated(forRemoval = true) public class ClientSession extends ClientObject implements Session { + + /** + * Logger instance. + */ + private static final Logger log = + LoggerFactory.getLogger(ClientSession.class); + + /** The current repository. */ + private final Repository repository; + + /** + * Flag indicating whether the session is to be considered live of not. + * This flag is initially set to true and reset to + * false by the {@link #logout()} method. The {@link #isLive()} + * method first checks this flag before asking the remote session. + */ + private boolean live = true; + + /** The adapted remote session. */ + protected final RemoteSession remote; + + /** + * The adapted workspace of this session. This field is set on the first + * call to the {@link #getWorkspace()} method assuming, that a workspace + * instance is not changing during the lifetime of a session, that is, + * each call to the server-side Session.getWorkspace() allways + * returns the same object. + */ + private Workspace workspace; + + /** + * Creates a client adapter for the given remote session. + * + * @param repository current repository + * @param remote remote repository + * @param factory local adapter factory + */ + public ClientSession(Repository repository, RemoteSession remote, + LocalAdapterFactory factory) { + super(factory); + this.repository = repository; + this.remote = remote; + } + + /** + * Returns the current repository without contacting the remote session. + * + * {@inheritDoc} + */ + public Repository getRepository() { + return repository; + } + + /** {@inheritDoc} */ + public String getUserID() { + try { + return remote.getUserID(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public Object getAttribute(String name) { + try { + return remote.getAttribute(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAttributeNames() { + try { + return remote.getAttributeNames(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public Workspace getWorkspace() { + if (workspace == null) { + try { + workspace = + getFactory().getWorkspace(this, remote.getWorkspace()); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + return workspace; + } + + /** {@inheritDoc} */ + public Session impersonate(Credentials credentials) + throws RepositoryException { + try { + RemoteSession session = remote.impersonate(credentials); + return getFactory().getSession(repository, session); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getRootNode() throws RepositoryException { + try { + return getNode(this, remote.getRootNode()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getNodeByIdentifier(String id) throws RepositoryException { + try { + return getNode(this, remote.getNodeByIdentifier(id)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getNodeByUUID(String uuid) throws RepositoryException { + try { + return getNode(this, remote.getNodeByUUID(uuid)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Item getItem(String path) throws RepositoryException { + try { + return getItem(this, remote.getItem(path)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getNode(String path) throws RepositoryException { + try { + return getNode(this, remote.getNode(path)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Property getProperty(String path) throws RepositoryException { + try { + return (Property) getItem(this, remote.getProperty(path)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean itemExists(String path) throws RepositoryException { + try { + return remote.itemExists(path); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean nodeExists(String path) throws RepositoryException { + try { + return remote.nodeExists(path); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public boolean propertyExists(String path) throws RepositoryException { + try { + return remote.propertyExists(path); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void removeItem(String path) throws RepositoryException { + try { + remote.removeItem(path); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void move(String from, String to) throws RepositoryException { + try { + remote.move(from, to); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void save() throws RepositoryException { + try { + remote.save(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void refresh(boolean keepChanges) throws RepositoryException { + try { + remote.refresh(keepChanges); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasPendingChanges() throws RepositoryException { + try { + return remote.hasPendingChanges(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Returns the {@link SerialValueFactory#getInstance()}. + * + * {@inheritDoc} + */ + public ValueFactory getValueFactory() { + return SerialValueFactory.getInstance(); + } + + /** {@inheritDoc} */ + public void checkPermission(String path, String actions) + throws AccessControlException, RepositoryException { + if (!hasPermission(path, actions)) { + throw new AccessControlException( + "No permission for " + actions + " on " + path); + } + } + + /** {@inheritDoc} */ + public boolean hasPermission(String path, String actions) + throws RepositoryException { + try { + return remote.hasPermission(path, actions); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void importXML(String path, InputStream xml, int mode) + throws IOException, RepositoryException { + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + byte[] bytes = new byte[4096]; + for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { + buffer.write(bytes, 0, n); + } + remote.importXML(path, buffer.toByteArray(), mode); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } finally { + // JCR-2903 + try { xml.close(); } catch (IOException ignore) {} + } + } + + /** {@inheritDoc} */ + public ContentHandler getImportContentHandler( + final String path, final int mode) throws RepositoryException { + getItem(path); // Check that the path exists + try { + final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + ContentHandler handler = + SerializingContentHandler.getSerializer(buffer); + return new DefaultContentHandler(handler) { + public void endDocument() throws SAXException { + super.endDocument(); + try { + remote.importXML(path, buffer.toByteArray(), mode); + } catch (Exception e) { + throw new SAXException("XML import failed", e); + } + } + }; + } catch (SAXException e) { + throw new RepositoryException("XML serialization failed", e); + } + } + + /** {@inheritDoc} */ + public void setNamespacePrefix(String prefix, String uri) + throws RepositoryException { + try { + remote.setNamespacePrefix(prefix, uri); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getNamespacePrefixes() throws RepositoryException { + try { + return remote.getNamespacePrefixes(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getNamespaceURI(String prefix) throws RepositoryException { + try { + return remote.getNamespaceURI(prefix); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getNamespacePrefix(String uri) throws RepositoryException { + try { + return remote.getNamespacePrefix(uri); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void logout() { + + // ignore if we are not alive any more. + if (!isLive()) { + return; + } + + try { + remote.logout(); + } catch (RemoteException ex) { + // JCRRMI-3: Just log a warning, the connection is dead anyway + log.warn("Remote logout failed", ex); + } finally { + // mark "dead" + live = false; + } + } + + /** {@inheritDoc} */ + public void addLockToken(String name) { + try { + remote.addLockToken(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getLockTokens() { + try { + return remote.getLockTokens(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void removeLockToken(String name) { + try { + remote.removeLockToken(name); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** + * Exports the XML system view of the specified repository location + * to the given XML content handler. This method first requests the + * raw XML data from the remote session, and then uses an identity + * transformation to feed the data to the given XML content handler. + * Possible IO and transformer exceptions are thrown as SAXExceptions. + * + * {@inheritDoc} + */ + public void exportSystemView( + String path, ContentHandler handler, + boolean binaryAsLink, boolean noRecurse) + throws SAXException, RepositoryException { + try { + byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); + + Source source = new StreamSource(new ByteArrayInputStream(xml)); + Result result = new SAXResult(handler); + + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer transformer = factory.newTransformer(); + transformer.transform(source, result); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } catch (IOException ex) { + throw new SAXException(ex); + } catch (TransformerConfigurationException ex) { + throw new SAXException(ex); + } catch (TransformerException ex) { + throw new SAXException(ex); + } + } + + /** + * Exports the XML system view of the specified repository location + * to the given output stream. This method first requests the + * raw XML data from the remote session, and then writes the data to + * the output stream. + * + * {@inheritDoc} + */ + public void exportSystemView( + String path, OutputStream output, + boolean binaryAsLink, boolean noRecurse) + throws IOException, RepositoryException { + try { + byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); + output.write(xml); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * Exports the XML document view of the specified repository location + * to the given XML content handler. This method first requests the + * raw XML data from the remote session, and then uses an identity + * transformation to feed the data to the given XML content handler. + * Possible IO and transformer exceptions are thrown as SAXExceptions. + * + * {@inheritDoc} + */ + public void exportDocumentView( + String path, ContentHandler handler, + boolean binaryAsLink, boolean noRecurse) + throws SAXException, RepositoryException { + try { + byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); + + Source source = new StreamSource(new ByteArrayInputStream(xml)); + Result result = new SAXResult(handler); + + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer transformer = factory.newTransformer(); + transformer.transform(source, result); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } catch (IOException ex) { + throw new SAXException(ex); + } catch (TransformerConfigurationException ex) { + throw new SAXException(ex); + } catch (TransformerException ex) { + throw new SAXException(ex); + } + } + + /** + * Exports the XML document view of the specified repository location + * to the given output stream. This method first requests the + * raw XML data from the remote session, and then writes the data to + * the output stream. + * + * {@inheritDoc} + */ + public void exportDocumentView( + String path, OutputStream output, + boolean binaryAsLink, boolean noRecurse) + throws IOException, RepositoryException { + try { + byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); + output.write(xml); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * {@inheritDoc} + */ + public boolean isLive() { + try { + return live && remote.isLive(); + } catch (RemoteException e) { + log.warn("Failed to test remote session state", e); + return false; + } + } + + public AccessControlManager getAccessControlManager() + throws UnsupportedRepositoryOperationException, RepositoryException { + try { + return getFactory().getAccessControlManager( + remote.getAccessControlManager()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public RetentionManager getRetentionManager() + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + + public boolean hasCapability( + String methodName, Object target, Object[] arguments) + throws RepositoryException { + throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java new file mode 100644 index 00000000000..c48b605a74c --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java @@ -0,0 +1,154 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; +import java.util.Calendar; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; + +import org.apache.jackrabbit.rmi.remote.RemoteVersion; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} + * interface. This class makes a remote version locally available using + * the JCR {@link javax.jcr.version.Version Version} interface. + * + * @see javax.jcr.version.Version + * @see org.apache.jackrabbit.rmi.remote.RemoteVersion + */ +@Deprecated(forRemoval = true) public class ClientVersion extends ClientNode implements Version { + + /** The adapted remote version. */ + private RemoteVersion remote; + + /** + * Creates a local adapter for the given remote version. + * + * @param session current session + * @param remote remote version + * @param factory local adapter factory + */ + public ClientVersion(Session session, RemoteVersion remote, + LocalAdapterFactory factory) { + super(session, remote, factory); + this.remote = remote; + } + + /** + * Utility method for creating a version array for an array + * of remote versions. The versions in the returned array + * are created using the local adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param remotes remote versions + * @return local version array + */ + private Version[] getVersionArray(RemoteVersion[] remotes) { + if (remotes != null) { + Version[] versions = new Version[remotes.length]; + for (int i = 0; i < remotes.length; i++) { + versions[i] = getFactory().getVersion(getSession(), remotes[i]); + } + return versions; + } else { + return new Version[0]; // for safety + } + } + + + /** {@inheritDoc} */ + public Calendar getCreated() throws RepositoryException { + try { + return remote.getCreated(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version[] getSuccessors() throws RepositoryException { + try { + return getVersionArray(remote.getSuccessors()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version[] getPredecessors() throws RepositoryException { + try { + return getVersionArray(remote.getPredecessors()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public VersionHistory getContainingHistory() throws RepositoryException { + try { + return getFactory().getVersionHistory(getSession(), remote.getContainingHistory()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Node getFrozenNode() throws RepositoryException { + try { + return getFactory().getNode(getSession(), remote.getFrozenNode()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version getLinearPredecessor() throws RepositoryException { + try { + RemoteVersion linearPredecessor = remote.getLinearPredecessor(); + if (linearPredecessor == null) { + return null; + } else { + return getFactory().getVersion(getSession(), linearPredecessor); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version getLinearSuccessor() throws RepositoryException { + try { + RemoteVersion linearSuccessor = remote.getLinearSuccessor(); + if (linearSuccessor == null) { + return null; + } else { + return getFactory().getVersion(getSession(), linearSuccessor); + } + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java new file mode 100644 index 00000000000..6e6887b8d8e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java @@ -0,0 +1,219 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.NodeIterator; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.version.Version; +import javax.jcr.version.VersionException; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; + +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} + * interface. This class makes a remote version history locally available using + * the JCR {@link javax.jcr.version.VersionHistory VersionHistory} interface. + * + * @see javax.jcr.version.VersionHistory + * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory + */ +@Deprecated(forRemoval = true) public class ClientVersionHistory extends ClientNode implements VersionHistory { + + /** The adapted remote version history. */ + private RemoteVersionHistory remote; + + /** + * Creates a local adapter for the given remote version history. + * + * @param session current session + * @param remote remote version history + * @param factory local adapter factory + */ + public ClientVersionHistory(Session session, RemoteVersionHistory remote, + LocalAdapterFactory factory) { + super(session, remote, factory); + this.remote = remote; + } + + /** {@inheritDoc} */ + public Version getRootVersion() throws RepositoryException { + try { + return getFactory().getVersion(getSession(), remote.getRootVersion()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public VersionIterator getAllVersions() throws RepositoryException { + try { + return getFactory().getVersionIterator( + getSession(), remote.getAllVersions()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version getVersion(String versionName) throws VersionException, + RepositoryException { + try { + return getFactory().getVersion(getSession(), remote.getVersion(versionName)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Version getVersionByLabel(String label) throws RepositoryException { + try { + return getFactory().getVersion(getSession(), remote.getVersionByLabel(label)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void addVersionLabel(String versionName, String label, + boolean moveLabel) throws VersionException, RepositoryException { + try { + remote.addVersionLabel(versionName, label, moveLabel); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeVersionLabel(String label) + throws VersionException, RepositoryException { + try { + remote.removeVersionLabel(label); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasVersionLabel(String label) throws RepositoryException { + try { + return remote.hasVersionLabel(label); + } catch (RemoteException ex) { + // grok the exception and assume label is missing + return false; + } + } + + /** {@inheritDoc} */ + public boolean hasVersionLabel(Version version, String label) + throws VersionException, RepositoryException { + try { + String versionIdentifier = version.getIdentifier(); + return remote.hasVersionLabel(versionIdentifier, label); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getVersionLabels() throws RepositoryException { + try { + return remote.getVersionLabels(); + } catch (RemoteException ex) { + // grok the exception and return an empty array + return new String[0]; + } + } + + /** {@inheritDoc} */ + public String[] getVersionLabels(Version version) + throws VersionException, RepositoryException { + try { + String versionIdentifier = version.getIdentifier(); + return remote.getVersionLabels(versionIdentifier); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeVersion(String versionName) + throws UnsupportedRepositoryOperationException, VersionException, + RepositoryException { + try { + remote.removeVersion(versionName); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} + * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be + * used instead. + */ + public String getVersionableUUID() throws RepositoryException { + try { + return remote.getVersionableUUID(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getAllFrozenNodes() throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getAllFrozenNodes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeIterator getAllLinearFrozenNodes() throws RepositoryException { + try { + return getFactory().getNodeIterator(getSession(), remote.getAllLinearFrozenNodes()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public VersionIterator getAllLinearVersions() throws RepositoryException { + try { + return getFactory().getVersionIterator(getSession(), remote.getAllLinearVersions()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getVersionableIdentifier() throws RepositoryException { + try { + return remote.getVersionableIdentifier(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java new file mode 100644 index 00000000000..502146b85da --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java @@ -0,0 +1,279 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; + +@Deprecated(forRemoval = true) public class ClientVersionManager extends ClientObject + implements VersionManager { + + /** The current session. */ + private Session session; + + private RemoteVersionManager remote; + + public ClientVersionManager( + Session session, RemoteVersionManager remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** {@inheritDoc} */ + public void cancelMerge(String absPath, Version version) + throws RepositoryException { + try { + remote.cancelMerge(absPath, version.getIdentifier()); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Version checkin(String absPath) throws RepositoryException { + try { + return getFactory().getVersion(session, remote.checkin(absPath)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void checkout(String absPath) throws RepositoryException { + try { + remote.checkout(absPath); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Version checkpoint(String absPath) throws RepositoryException { + try { + return getFactory().getVersion(session, remote.checkpoint(absPath)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Node createActivity(String title) + throws RepositoryException { + try { + return getFactory().getNode(session, remote.createActivity(title)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Node createConfiguration(String absPath) + throws RepositoryException { + try { + return getFactory().getNode( + session, remote.createConfiguration(absPath)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void doneMerge(String absPath, Version version) + throws RepositoryException { + try { + remote.doneMerge(absPath, version.getIdentifier()); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Node getActivity() throws RepositoryException { + try { + RemoteNode activity = remote.getActivity(); + if (activity == null) { + return null; + } else { + return getFactory().getNode(session, activity); + } + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Version getBaseVersion(String absPath) throws RepositoryException { + try { + return getFactory().getVersion( + session, remote.getBaseVersion(absPath)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public VersionHistory getVersionHistory(String absPath) + throws RepositoryException { + try { + return getFactory().getVersionHistory( + session, remote.getVersionHistory(absPath)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public boolean isCheckedOut(String absPath) throws RepositoryException { + try { + return remote.isCheckedOut(absPath); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public NodeIterator merge(Node activityNode) throws RepositoryException { + try { + RemoteIterator iterator = remote.merge(activityNode.getIdentifier()); + return getFactory().getNodeIterator(session, iterator); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public NodeIterator merge( + String absPath, String srcWorkspace, boolean bestEffort) + throws RepositoryException { + try { + return getFactory().getNodeIterator( + session, remote.merge(absPath, srcWorkspace, bestEffort)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public NodeIterator merge( + String absPath, String srcWorkspace, boolean bestEffort, + boolean isShallow) throws RepositoryException { + try { + return getFactory().getNodeIterator(session, remote.merge( + absPath, srcWorkspace, bestEffort, isShallow)); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void removeActivity(Node activityNode) throws RepositoryException { + try { + remote.removeActivity(activityNode.getIdentifier()); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void restore(Version[] versions, boolean removeExisting) + throws RepositoryException { + try { + String[] versionIdentifiers = new String[versions.length]; + for (int i = 0; i < versions.length; i++) { + versionIdentifiers[i] = versions[i].getIdentifier(); + } + remote.restore(versionIdentifiers, removeExisting); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void restore(Version version, boolean removeExisting) + throws RepositoryException { + try { + remote.restore(version.getIdentifier(), removeExisting); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void restore( + String absPath, String versionName, boolean removeExisting) + throws RepositoryException { + try { + remote.restore(absPath, versionName, removeExisting); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void restore(String absPath, Version version, boolean removeExisting) + throws RepositoryException { + try { + remote.restoreVI(absPath, version.getIdentifier(), removeExisting); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public void restoreByLabel( + String absPath, String versionLabel, boolean removeExisting) + throws RepositoryException { + try { + remote.restoreByLabel(absPath, versionLabel, removeExisting); + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + + /** {@inheritDoc} */ + public Node setActivity(Node activity) throws RepositoryException { + try { + RemoteNode remoteActivity; + if (activity == null) { + remoteActivity = remote.setActivity(null); + } else { + remoteActivity = remote.setActivity(activity.getIdentifier()); + } + if (remoteActivity == null) { + return null; + } else { + return getFactory().getNode(session, remoteActivity); + } + } catch (RemoteException e) { + throw new RemoteRepositoryException(e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java new file mode 100644 index 00000000000..ec8e74e5394 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java @@ -0,0 +1,299 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.rmi.RemoteException; + +import javax.jcr.NamespaceRegistry; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Workspace; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.QueryManager; +import javax.jcr.version.Version; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.xml.sax.ContentHandler; +import org.xml.sax.SAXException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteWorkspace RemoteWorkspace} + * interface. This class makes a remote workspace locally available using + * the JCR {@link Workspace Workspace} interface. + * + * @see javax.jcr.Workspace + * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace + */ +@Deprecated(forRemoval = true) public class ClientWorkspace extends ClientObject implements Workspace { + + /** The current session. */ + private Session session; + + /** The adapted remote workspace. */ + private RemoteWorkspace remote; + + /** + * The adapted observation manager of this workspace. This field is set on + * the first call to the {@link #getObservationManager()()} method assuming, + * that the observation manager instance is not changing during the lifetime + * of a workspace instance, that is, each call to the server-side + * Workspace.getObservationManager() allways returns the same + * object. + */ + private ObservationManager observationManager; + + private LockManager lockManager; + + private VersionManager versionManager; + + /** + * Creates a client adapter for the given remote workspace. + * + * @param session current session + * @param remote remote workspace + * @param factory local adapter factory + */ + public ClientWorkspace( + Session session, RemoteWorkspace remote, + LocalAdapterFactory factory) { + super(factory); + this.session = session; + this.remote = remote; + } + + /** + * Returns the current session without contacting the remote workspace. + * + * {@inheritDoc} + */ + public Session getSession() { + return session; + } + + /** {@inheritDoc} */ + public String getName() { + try { + return remote.getName(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public void copy(String from, String to) throws RepositoryException { + try { + remote.copy(from, to); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void copy(String workspace, String from, String to) + throws RepositoryException { + try { + remote.copy(workspace, from, to); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void move(String from, String to) throws RepositoryException { + try { + remote.move(from, to); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public QueryManager getQueryManager() throws RepositoryException { + try { + RemoteQueryManager manager = remote.getQueryManager(); + return getFactory().getQueryManager(session, manager); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NamespaceRegistry getNamespaceRegistry() throws RepositoryException { + try { + RemoteNamespaceRegistry registry = remote.getNamespaceRegistry(); + return getFactory().getNamespaceRegistry(registry); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public NodeTypeManager getNodeTypeManager() throws RepositoryException { + try { + RemoteNodeTypeManager manager = remote.getNodeTypeManager(); + return getFactory().getNodeTypeManager(manager); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public ObservationManager getObservationManager() + throws RepositoryException { + if (observationManager == null) { + try { + observationManager = + getFactory(). + getObservationManager(this, remote.getObservationManager()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + return observationManager; + } + + /** {@inheritDoc} */ + public void clone( + String workspace, String src, String dst, boolean removeExisting) + throws RepositoryException { + try { + remote.clone(workspace, src, dst, removeExisting); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAccessibleWorkspaceNames() throws RepositoryException { + try { + return remote.getAccessibleWorkspaceNames(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public ContentHandler getImportContentHandler( + final String path, final int mode) throws RepositoryException { + getSession().getItem(path); // Check that the path exists + try { + final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + return new DefaultContentHandler( + SerializingContentHandler.getSerializer(buffer)) { + public void endDocument() throws SAXException { + super.endDocument(); + try { + remote.importXML(path, buffer.toByteArray(), mode); + } catch (Exception e) { + throw new SAXException("XML import failed", e); + } + } + }; + } catch (SAXException e) { + throw new RepositoryException("XML serialization failed", e); + } + } + + /** {@inheritDoc} */ + public void importXML(String path, InputStream xml, int uuidBehaviour) + throws IOException, RepositoryException { + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + byte[] bytes = new byte[4096]; + for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { + buffer.write(bytes, 0, n); + } + remote.importXML(path, buffer.toByteArray(), uuidBehaviour); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } finally { + // JCR-2903 + try { xml.close(); } catch (IOException ignore) {} + } + } + + /** {@inheritDoc} */ + public void restore(Version[] versions, boolean removeExisting) + throws RepositoryException { + getVersionManager().restore(versions, removeExisting); + } + + public void createWorkspace(String name) throws RepositoryException { + try { + remote.createWorkspace(name, null); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public void createWorkspace(String name, String srcWorkspace) + throws RepositoryException { + try { + remote.createWorkspace(name, srcWorkspace); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + public void deleteWorkspace(String name) throws RepositoryException { + try { + remote.deleteWorkspace(name); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public LockManager getLockManager() throws RepositoryException { + if (lockManager == null) { + try { + lockManager = getFactory().getLockManager( + session, remote.getLockManager()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + return lockManager; + } + + public VersionManager getVersionManager() throws RepositoryException { + if (versionManager == null) { + try { + versionManager = getFactory().getVersionManager( + session, remote.getVersionManager()); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + return versionManager; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java new file mode 100644 index 00000000000..d9fcb0f12ff --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java @@ -0,0 +1,146 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import javax.jcr.Repository; + +import org.apache.jackrabbit.rmi.remote.RemoteXASession; +import org.apache.jackrabbit.rmi.remote.SerializableXid; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteXASession RemoteXASession} + * interface. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class ClientXASession extends ClientSession implements XAResource { + + /** + * The adapted remote transaction enabled session. + */ + private RemoteXASession remote; + + /** + * Creates a client adapter for the given remote session which is + * transaction enabled. + */ + public ClientXASession( + Repository repository, RemoteXASession remote, + LocalAdapterFactory factory) { + super(repository, remote, factory); + this.remote = remote; + } + + /** + * Returns true if the given object is a local + * adapter that refers to the same remote XA resource. + * + * @see http://blogs.sun.com/fkieviet/entry/j2ee_jca_resource_adapters_the + */ + public boolean isSameRM(XAResource xares) throws XAException { + return xares instanceof ClientXASession + && remote == ((ClientXASession) xares).remote; + } + + private XAException getXAException(RemoteException e) { + XAException exception = new XAException("Remote operation failed"); + exception.initCause(e); + return exception; + } + + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + remote.commit(new SerializableXid(xid), onePhase); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public void end(Xid xid, int flags) throws XAException { + try { + remote.end(new SerializableXid(xid), flags); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public void forget(Xid xid) throws XAException { + try { + remote.forget(new SerializableXid(xid)); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public int getTransactionTimeout() throws XAException { + try { + return remote.getTransactionTimeout(); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public int prepare(Xid xid) throws XAException { + try { + return remote.prepare(new SerializableXid(xid)); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public Xid[] recover(int flag) throws XAException { + try { + return remote.recover(flag); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public void rollback(Xid xid) throws XAException { + try { + remote.rollback(new SerializableXid(xid)); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public boolean setTransactionTimeout(int seconds) throws XAException { + try { + return remote.setTransactionTimeout(seconds); + } catch (RemoteException e) { + throw getXAException(e); + } + } + + public void start(Xid xid, int flags) throws XAException { + try { + remote.start(new SerializableXid(xid), flags); + } catch (RemoteException e) { + throw getXAException(e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java new file mode 100644 index 00000000000..c2d1765dec3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java @@ -0,0 +1,176 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Adapter class for exposing a {@link ContentHandler} instance as + * {@link DefaultHandler} object. + */ +@Deprecated(forRemoval = true) class DefaultContentHandler extends DefaultHandler { + + /** + * The adapted content handler instance. + */ + private final ContentHandler handler; + + /** + * Creates a {@link DefaultHandler} adapter for the given content + * handler. + * + * @param handler content handler + */ + public DefaultContentHandler(ContentHandler handler) { + this.handler = handler; + } + + //------------------------------------------------------< ContentHandler > + + /** + * Delegated to {@link #handler}. + * + * @param ch passed through + * @param start passed through + * @param length passed through + * @throws SAXException if an error occurs + */ + public void characters(char[] ch, int start, int length) + throws SAXException { + handler.characters(ch, start, length); + } + + /** + * Delegated to {@link #handler}. + * + * @throws SAXException if an error occurs + */ + public void endDocument() throws SAXException { + handler.endDocument(); + } + + /** + * Delegated to {@link #handler}. + * + * @param namespaceURI passed through + * @param localName passed through + * @param qName passed through + * @throws SAXException if an error occurs + */ + public void endElement( + String namespaceURI, String localName, String qName) + throws SAXException { + handler.endElement(namespaceURI, localName, qName); + } + + /** + * Delegated to {@link #handler}. + * + * @param prefix passed through + * @throws SAXException if an error occurs + */ + public void endPrefixMapping(String prefix) throws SAXException { + handler.endPrefixMapping(prefix); + } + + /** + * Delegated to {@link #handler}. + * + * @param ch passed through + * @param start passed through + * @param length passed through + * @throws SAXException if an error occurs + */ + public void ignorableWhitespace(char[] ch, int start, int length) + throws SAXException { + handler.ignorableWhitespace(ch, start, length); + } + + /** + * Delegated to {@link #handler}. + * + * @param target passed through + * @param data passed through + * @throws SAXException if an error occurs + */ + public void processingInstruction(String target, String data) + throws SAXException { + handler.processingInstruction(target, data); + } + + /** + * Delegated to {@link #handler}. + * + * @param locator passed through + */ + public void setDocumentLocator(Locator locator) { + handler.setDocumentLocator(locator); + } + + /** + * Delegated to {@link #handler}. + * + * @param name passed through + * @throws SAXException if an error occurs + */ + public void skippedEntity(String name) throws SAXException { + handler.skippedEntity(name); + } + + /** + * Delegated to {@link #handler}. + * + * @throws SAXException if an error occurs + */ + public void startDocument() throws SAXException { + handler.startDocument(); + } + + /** + * Delegated to {@link #handler}. + * + * @param namespaceURI passed through + * @param localName passed through + * @param qName passed through + * @param atts passed through + * @throws SAXException if an error occurs + */ + public void startElement( + String namespaceURI, String localName, String qName, + Attributes atts) throws SAXException { + handler.startElement(namespaceURI, localName, qName, atts); + } + + /** + * Delegated to {@link #handler}. + * + * @param prefix passed through + * @param uri passed through + * @throws SAXException if an error occurs + */ + public void startPrefixMapping(String prefix, String uri) + throws SAXException { + handler.startPrefixMapping(prefix, uri); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java new file mode 100644 index 00000000000..611860c072c --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java @@ -0,0 +1,447 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.security.Principal; +import java.util.Iterator; + +import javax.jcr.Item; +import javax.jcr.NamespaceRegistry; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.Repository; +import javax.jcr.Session; +import javax.jcr.Workspace; +import javax.jcr.lock.Lock; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.nodetype.PropertyDefinition; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; +import javax.jcr.query.QueryResult; +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; +import javax.jcr.security.Privilege; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteRow; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory interface for creating local adapters for remote references. + * This interface defines how remote JCR-RMI references are adapted + * back to the normal JCR interfaces. The adaption mechanism can be + * modified (for example to add extra features) by changing the + * local adapter factory used by the repository client. + *

    + * Note that the + * {@link org.apache.jackrabbit.rmi.client.ClientObject ClientObject} + * base class provides a number of utility methods designed to work with + * a local adapter factory. Adapter implementations may want to inherit + * that functionality by subclassing from ClientObject. + * + * @see org.apache.jackrabbit.rmi.server.RemoteAdapterFactory + * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory + * @see org.apache.jackrabbit.rmi.client.ClientObject + */ +@Deprecated(forRemoval = true) public interface LocalAdapterFactory { + + /** + * Factory method for creating a local adapter for a remote repository. + * + * @param remote remote repository + * @return local repository adapter + */ + Repository getRepository(RemoteRepository remote); + + /** + * Factory method for creating a local adapter for a remote session. + * + * @param repository current repository + * @param remote remote session + * @return local session adapter + */ + Session getSession(Repository repository, RemoteSession remote); + + /** + * Factory method for creating a local adapter for a remote workspace. + * + * @param session current session + * @param remote remote workspace + * @return local workspace adapter + */ + Workspace getWorkspace(Session session, RemoteWorkspace remote); + + /** + * Factory method for creating a local adapter for a remote observation + * manager. + * + * @param workspace current workspace + * @param remote remote observation manager + * @return local observation manager adapter + */ + ObservationManager getObservationManager(Workspace workspace, + RemoteObservationManager remote); + + /** + * Factory method for creating a local adapter for a remote namespace + * registry. + * + * @param remote remote namespace registry + * @return local namespace registry adapter + */ + NamespaceRegistry getNamespaceRegistry(RemoteNamespaceRegistry remote); + + /** + * Factory method for creating a local adapter for a remote node type + * manager. + * + * @param remote remote node type manager + * @return local node type manager adapter + */ + NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote); + + /** + * Factory method for creating a local adapter for a remote item. + * Note that before calling this method, the client may want to + * introspect the remote item reference to determine whether to use the + * {@link #getNode(Session, RemoteNode) getNode} or + * {@link #getProperty(Session, RemoteProperty) getProperty} method + * instead, as the adapter returned by this method will only cover + * the basic {@link Item Item} interface. + * + * @param session current session + * @param remote remote item + * @return local item adapter + */ + Item getItem(Session session, RemoteItem remote); + + /** + * Factory method for creating a local adapter for a remote property. + * + * @param session current session + * @param remote remote property + * @return local property adapter + */ + Property getProperty(Session session, RemoteProperty remote); + + /** + * Factory method for creating a local adapter for a remote node. + * + * @param session current session + * @param remote remote node + * @return local node adapter + */ + Node getNode(Session session, RemoteNode remote); + + /** + * Factory method for creating a local adapter for a remote version. + * + * @param session current session + * @param remote remote version + * @return local version adapter + */ + Version getVersion(Session session, RemoteVersion remote); + + /** + * Factory method for creating a local adapter for a remote version history. + * + * @param session current session + * @param remote remote version history + * @return local version history adapter + */ + VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote); + + /** + * Factory method for creating a local adapter for a remote node type. + * + * @param remote remote node type + * @return local node type adapter + */ + NodeType getNodeType(RemoteNodeType remote); + + /** + * Factory method for creating a local adapter for a remote item + * definition. Note that before calling this method, the client may want to + * introspect the remote item definition to determine whether to use the + * {@link #getNodeDef(RemoteNodeDefinition) getNodeDef} or + * {@link #getPropertyDef(RemotePropertyDefinition) getPropertyDef} method + * instead, as the adapter returned by this method will only cover + * the {@link ItemDefinition ItemDef} base interface. + * + * @param remote remote item definition + * @return local item definition adapter + */ + ItemDefinition getItemDef(RemoteItemDefinition remote); + + /** + * Factory method for creating a local adapter for a remote node + * definition. + * + * @param remote remote node definition + * @return local node definition adapter + */ + NodeDefinition getNodeDef(RemoteNodeDefinition remote); + + /** + * Factory method for creating a local adapter for a remote property + * definition. + * + * @param remote remote property definition + * @return local property definition adapter + */ + PropertyDefinition getPropertyDef(RemotePropertyDefinition remote); + + /** + * Factory method for creating a local adapter for a remote lock. + * + * @param session current session + * @param remote remote lock + * @return local lock adapter + */ + Lock getLock(Session session, RemoteLock remote); + + /** + * Factory method for creating a local adapter for a remote query manager. + * + * @param session current session + * @param remote remote query manager + * @return local query manager adapter + */ + QueryManager getQueryManager(Session session, RemoteQueryManager remote); + + /** + * Factory method for creating a local adapter for a remote query. + * + * @param session current session + * @param remote remote query + * @return local query adapter + */ + Query getQuery(Session session, RemoteQuery remote); + + /** + * Factory method for creating a local adapter for a remote query result. + * + * @param session current session + * @param remote remote query result + * @return local query result adapter + */ + QueryResult getQueryResult(Session session, RemoteQueryResult remote); + + /** + * Factory method for creating a local adapter for a remote query row. + * + * @param session current session + * @param remote remote query row + * @return local query row adapter + */ + Row getRow(Session session, RemoteRow remote); + + /** + * Factory method for creating a local adapter for a remote node iterator. + * + * @param session current session + * @param remote remote node iterator + * @return local node iterator adapter + */ + NodeIterator getNodeIterator(Session session, RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote property iterator. + * + * @param session current session + * @param remote remote property iterator + * @return local property iterator adapter + */ + PropertyIterator getPropertyIterator(Session session, RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote version iterator. + * + * @param session current session + * @param remote remote version iterator + * @return local version iterator adapter + */ + VersionIterator getVersionIterator(Session session, RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote + * node type iterator. + * + * @param remote remote node type iterator + * @return local node type iterator adapter + */ + NodeTypeIterator getNodeTypeIterator(RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote row iterator. + * + * @param session current session + * @param remote remote row iterator + * @return local row iterator adapter + */ + RowIterator getRowIterator(Session session, RemoteIterator remote); + + LockManager getLockManager(Session session, RemoteLockManager lockManager); + + VersionManager getVersionManager( + Session session, RemoteVersionManager versionManager); + + /** + * Factory method for creating a local adapter for a remote access control + * manager + * + * @param remote remote access control manager + * @return local access control manager + */ + AccessControlManager getAccessControlManager( + RemoteAccessControlManager remote); + + /** + * Factory method for creating a local adapter for a remote access control + * policy + * + * @param remote remote access control policy + * @return local access control policy + */ + AccessControlPolicy getAccessControlPolicy(RemoteAccessControlPolicy remote); + + /** + * Factory method for creating an array of local adapter for an array of + * remote access control policies + * + * @param remote array of remote access control policies + * @return array of local access control policies + */ + AccessControlPolicy[] getAccessControlPolicy( + RemoteAccessControlPolicy[] remote); + + /** + * Factory method for creating a local adapter for a remote access control + * policy iterator + * + * @param remote access control policy iterator + * @return local access control policy iterator + */ + AccessControlPolicyIterator getAccessControlPolicyIterator( + RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote access control + * entry + * + * @param remote remote access control entry + * @return local access control entry + */ + AccessControlEntry getAccessControlEntry(RemoteAccessControlEntry remote); + + /** + * Factory method for creating an array of local adapter for an array of + * remote access control entry + * + * @param remote array of remote access control entry + * @return local array of access control entry + */ + AccessControlEntry[] getAccessControlEntry(RemoteAccessControlEntry[] remote); + + /** + * Factory method for creating a local adapter for a remote principal. + *

    + * If remote is a {@link RemoteGroup} the + * principal returned implements the org.apache.jackrabbit.api.security.principal.GroupPrincipal + * interface. + * + * @param remote principal + * @return local principal + */ + Principal getPrincipal(RemotePrincipal remote); + + /** + * Factory method for creating a local adapter for a remote principal + * iterator. + *

    + * Each entry in the remote iterator which is a + * {@link RemoteGroup} will be + * provided as a principal implementing the + * org.apache.jackrabbit.api.security.principal.GroupPrincipal interface. + * + * @param remote remote principal iterator + * @return local principal iterator + */ + Iterator getPrincipalIterator(RemoteIterator remote); + + /** + * Factory method for creating a local adapter for a remote privilege + * + * @param remote remote privilege + * @return local privilege + */ + Privilege getPrivilege(RemotePrivilege remote); + + /** + * Factory method for creating an array of local adapter for an array of + * remote privilege + * + * @param remote array of remote privilege + * @return array of local privilege + */ + Privilege[] getPrivilege(RemotePrivilege[] remote); + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java new file mode 100644 index 00000000000..ef22fd94cbe --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * JCR-RMI remote exception. Used by the JCR-RMI client to wrap RMI errors + * into RepositoryExceptions to avoid breaking the JCR interfaces. + *

    + * Note that if a RemoteException is received by call with no declared + * exceptions, then the RemoteException is wrapped into a + * RemoteRuntimeException. + */ +@Deprecated(forRemoval = true) public class RemoteRepositoryException extends RepositoryException { + + /** + * Creates a RemoteRepositoryException based on the given RemoteException. + * + * @param ex the remote exception + */ + public RemoteRepositoryException(RemoteException ex) { + super(ex); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java new file mode 100644 index 00000000000..a446e51179d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java @@ -0,0 +1,42 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * JCR-RMI remote runtime exception. Used by the JCR-RMI client to wrap + * RMI errors into RuntimeExceptions to avoid breaking the JCR interfaces. + *

    + * Note that if a RemoteException is received by call that declares to + * throw RepositoryExceptions, then the RemoteException is wrapped into + * a RemoteRepositoryException. + */ +@Deprecated(forRemoval = true) public class RemoteRuntimeException extends RuntimeException { + + /** + * Creates a RemoteRuntimeException based on the given RemoteException. + * + * @param ex the remote exception + */ + public RemoteRuntimeException(RemoteException ex) { + super(ex); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java new file mode 100644 index 00000000000..c9981ba0092 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java @@ -0,0 +1,222 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.rmi.RemoteException; + +import javax.jcr.Credentials; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteSession; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A "safe" local adapter for the JCR-RMI + * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} + * interface. This class uses an abstract factory method for loading + * (and reloading) the remote repository instance that is made locally + * available through the JCR {@link Repository} interface. If the remote + * reference breaks (a RemoteException is thrown by a remote call), then + * this adapter attempts to reload the remote reference once before failing. + * + * @see javax.jcr.Repository + * @see org.apache.jackrabbit.rmi.remote.RemoteRepository + */ +@Deprecated(forRemoval = true) public abstract class SafeClientRepository extends ClientObject + implements Repository { + + /** The adapted remote repository. */ + private RemoteRepository remote; + + /** + * Creates a client adapter for the given remote repository. + * + * @param factory local adapter factory + */ + public SafeClientRepository(LocalAdapterFactory factory) { + super(factory); + try { + remote = getRemoteRepository(true); + } catch (RemoteException e) { + remote = new BrokenRemoteRepository(e); + } + } + + /** + * Abstract factory class for getting the remote repository. + * + * @return remote repository + * @throws RemoteException if the remote repository could not be accessed + */ + protected abstract RemoteRepository getRemoteRepository() + throws RemoteException; + + /** + * Method to obtain the remote remote repository. + * If initialize is true and a RepositoryException will be thrown no {@link BrokenRemoteRepository} + * will be created. + * + * @return remote repository + * @throws RemoteException if the remote repository could not be accessed + */ + protected RemoteRepository getRemoteRepository(boolean initialize) + throws RemoteException { + if (initialize) { + try { + return getRemoteRepository(); + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } + } else { + return getRemoteRepository(); + } + } + + /** {@inheritDoc} */ + public synchronized String getDescriptor(String name) { + try { + return remote.getDescriptor(name); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.getDescriptor(name); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + + /** {@inheritDoc} */ + public synchronized String[] getDescriptorKeys() { + try { + return remote.getDescriptorKeys(); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.getDescriptorKeys(); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + + private synchronized RemoteSession remoteLogin( + Credentials credentials, String workspace) + throws RepositoryException { + try { + return remote.login(credentials, workspace); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.login(credentials, workspace); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRepositoryException(e2); + } + } + } + + /** {@inheritDoc} */ + public Session login(Credentials credentials, String workspace) + throws RepositoryException { + RemoteSession session = remoteLogin(credentials, workspace); + return getFactory().getSession(this, session); + } + + /** {@inheritDoc} */ + public Session login(String workspace) throws RepositoryException { + return login(null, workspace); + } + + /** {@inheritDoc} */ + public Session login(Credentials credentials) throws RepositoryException { + return login(credentials, null); + } + + /** {@inheritDoc} */ + public Session login() throws RepositoryException { + return login(null, null); + } + + /** {@inheritDoc} */ + public synchronized Value getDescriptorValue(String key) { + try { + return remote.getDescriptorValue(key); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.getDescriptorValue(key); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + + /** {@inheritDoc} */ + public synchronized Value[] getDescriptorValues(String key) { + try { + return remote.getDescriptorValues(key); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.getDescriptorValues(key); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + + /** {@inheritDoc} */ + public synchronized boolean isSingleValueDescriptor(String key) { + try { + return remote.isSingleValueDescriptor(key); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.isSingleValueDescriptor(key); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + + /** {@inheritDoc} */ + public synchronized boolean isStandardDescriptor(String key) { + try { + return remote.isStandardDescriptor(key); + } catch (RemoteException e1) { + try { + remote = getRemoteRepository(false); + return remote.isStandardDescriptor(key); + } catch (RemoteException e2) { + remote = new BrokenRemoteRepository(e2); + throw new RemoteRuntimeException(e2); + } + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java new file mode 100644 index 00000000000..a50bcdafe45 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java @@ -0,0 +1,441 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client; + +import java.io.OutputStream; +import java.io.StringWriter; +import java.io.Writer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Result; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.sax.SAXTransformerFactory; +import javax.xml.transform.sax.TransformerHandler; +import javax.xml.transform.stream.StreamResult; + +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; +import org.xml.sax.helpers.DefaultHandler; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A {@link ContentHandler} that serializes SAX events to a given + * {@link Result} instance. The JAXP {@link SAXTransformerFactory} + * facility is used for the serialization. + *

    + * This class explicitly ensures that all namespace prefixes are also + * present as xmlns attributes in the serialized XML document. This avoids + * problems with Xalan's serialization behaviour which was (at least during + * JDK 1.4) to ignore namespaces if they were not present as xmlns attributes. + *

    + * NOTE: The code in this class was originally written for Apache Cocoon and + * is included with some modifications here in Apache Jackrabbit. See the + * org.apache.cocoon.serialization.AbstractTextSerializer class in the + * cocoon-pipeline-impl component for the original code. + */ +@Deprecated(forRemoval = true) class SerializingContentHandler extends DefaultContentHandler { + + /** + * The character encoding used for serialization (UTF-8). + * The encoding is fixed to make the text/xml content type safer to use. + * + * @see https://issues.apache.org/jira/browse/JCR-1621 + */ + public static final String ENCODING = "UTF-8"; + + /** The URI for xml namespaces */ + private static final String XML = "http://www.w3.org/XML/1998/namespace"; + + /** + * The factory used to create serializing SAX transformers. + */ + private static final SAXTransformerFactory FACTORY = + // Note that the cast from below is strictly speaking only valid when + // the factory instance supports the SAXTransformerFactory.FEATURE + // feature. But since this class would be useless without this feature, + // it's no problem to fail with a ClassCastException here and prevent + // this class from even being loaded. AFAIK all common JAXP + // implementations do support this feature. + (SAXTransformerFactory) TransformerFactory.newInstance(); + + /** + * Flag that indicates whether we need to work around the issue of + * the serializer not automatically generating the required xmlns + * attributes for the namespaces used in the document. + */ + private static final boolean NEEDS_XMLNS_ATTRIBUTES = + needsXmlnsAttributes(); + + /** + * Probes the available XML serializer for xmlns support. Used to set + * the value of the {@link #NEEDS_XMLNS_ATTRIBUTES} flag. + * + * @return whether the XML serializer needs explicit xmlns attributes + */ + private static boolean needsXmlnsAttributes() { + try { + StringWriter writer = new StringWriter(); + TransformerHandler probe = FACTORY.newTransformerHandler(); + probe.setResult(new StreamResult(writer)); + probe.startDocument(); + probe.startPrefixMapping("p", "uri"); + probe.startElement("uri", "e", "p:e", new AttributesImpl()); + probe.endElement("uri", "e", "p:e"); + probe.endPrefixMapping("p"); + probe.endDocument(); + return writer.toString().indexOf("xmlns") == -1; + } catch (Exception e) { + throw new UnsupportedOperationException("XML serialization fails"); + } + } + + /** + * Creates a serializing content handler that writes to the given stream. + * + * @param stream serialization target + * @return serializing content handler + * @throws SAXException if the content handler could not be initialized + */ + public static DefaultHandler getSerializer(OutputStream output) + throws SAXException { + return getSerializer(new StreamResult(output)); + } + + /** + * Creates a serializing content handler that writes to the given writer. + * + * @param writer serialization target + * @return serializing content handler + * @throws SAXException if the content handler could not be initialized + */ + public static DefaultHandler getSerializer(Writer writer) + throws SAXException { + return getSerializer(new StreamResult(writer)); + } + + /** + * Creates a serializing content handler that writes to the given result. + * + * @param result serialization target + * @return serializing content handler + * @throws SAXException if the content handler could not be initialized + */ + public static DefaultHandler getSerializer(Result result) + throws SAXException { + try { + TransformerHandler handler = FACTORY.newTransformerHandler(); + handler.setResult(result); + + // Specify the output properties to avoid surprises especially in + // character encoding or the output method (might be html for some + // documents!) + Transformer transformer = handler.getTransformer(); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING); + transformer.setOutputProperty(OutputKeys.INDENT, "no"); + + if (NEEDS_XMLNS_ATTRIBUTES) { + // The serializer does not output xmlns declarations, + // so we need to do it explicitly with this wrapper + return new SerializingContentHandler(handler); + } else { + return new DefaultContentHandler(handler); + } + } catch (TransformerConfigurationException e) { + throw new SAXException("Failed to initialize XML serializer", e); + } + } + + /** + * The prefixes of startPrefixMapping() declarations for the coming element. + */ + private List prefixList = new ArrayList(); + + /** + * The URIs of startPrefixMapping() declarations for the coming element. + */ + private List uriList = new ArrayList(); + + /** + * Maps of URI<->prefix mappings. Used to work around a bug in the Xalan + * serializer. + */ + private Map uriToPrefixMap = new HashMap(); + private Map prefixToUriMap = new HashMap(); + + /** + * True if there has been some startPrefixMapping() for the coming element. + */ + private boolean hasMappings = false; + + /** + * Stack of the prefixes of explicitly generated prefix mapping calls + * per each element level. An entry is appended at the beginning of each + * {@link #startElement(String, String, String, Attributes)} call and + * removed at the end of each {@link #endElement(String, String, String)} + * call. By default the entry for each element is null to + * avoid losing performance, but whenever the code detects a new prefix + * mapping that needs to be registered, the null entry is + * replaced with a list of explicitly registered prefixes for that node. + * When that element is closed, the listed prefixes get unmapped. + * + * @see #checkPrefixMapping(String, String) + * @see JCR-1767 + */ + private final List addedPrefixMappings = new ArrayList(); + + private SerializingContentHandler(ContentHandler handler) { + super(handler); + } + + public void startDocument() throws SAXException { + // Cleanup + this.uriToPrefixMap.clear(); + this.prefixToUriMap.clear(); + clearMappings(); + super.startDocument(); + } + + /** + * Track mappings to be able to add xmlns: attributes + * in startElement(). + */ + public void startPrefixMapping(String prefix, String uri) throws SAXException { + // Store the mappings to reconstitute xmlns:attributes + // except prefixes starting with "xml": these are reserved + // VG: (uri != null) fixes NPE in startElement + if (uri != null && !prefix.startsWith("xml")) { + this.hasMappings = true; + this.prefixList.add(prefix); + this.uriList.add(uri); + + // append the prefix colon now, in order to save concatenations later, but + // only for non-empty prefixes. + if (prefix.length() > 0) { + this.uriToPrefixMap.put(uri, prefix + ":"); + } else { + this.uriToPrefixMap.put(uri, prefix); + } + + this.prefixToUriMap.put(prefix, uri); + } + super.startPrefixMapping(prefix, uri); + } + + /** + * Checks whether a prefix mapping already exists for the given namespace + * and generates the required {@link #startPrefixMapping(String, String)} + * call if the mapping is not found. By default the registered prefix + * is taken from the given qualified name, but a different prefix is + * automatically selected if that prefix is already used. + * + * @see JCR-1767 + * @param uri namespace URI + * @param qname element name with the prefix, or null + * @throws SAXException if the prefix mapping can not be added + */ + private void checkPrefixMapping(String uri, String qname) + throws SAXException { + // Only add the prefix mapping if the URI is not already known + if (uri != null && uri.length() > 0 && !uri.startsWith("xml") + && !uriToPrefixMap.containsKey(uri)) { + // Get the prefix + String prefix = "ns"; + if (qname != null && qname.length() > 0) { + int colon = qname.indexOf(':'); + if (colon != -1) { + prefix = qname.substring(0, colon); + } + } + + // Make sure that the prefix is unique + String base = prefix; + for (int i = 2; prefixToUriMap.containsKey(prefix); i++) { + prefix = base + i; + } + + int last = addedPrefixMappings.size() - 1; + List prefixes = (List) addedPrefixMappings.get(last); + if (prefixes == null) { + prefixes = new ArrayList(); + addedPrefixMappings.set(last, prefixes); + } + prefixes.add(prefix); + + startPrefixMapping(prefix, uri); + } + } + + /** + * Ensure all namespace declarations are present as xmlns: attributes + * and add those needed before calling superclass. This is a workaround for a Xalan bug + * (at least in version 2.0.1) : org.apache.xalan.serialize.SerializerToXML + * ignores start/endPrefixMapping(). + */ + public void startElement( + String eltUri, String eltLocalName, String eltQName, Attributes attrs) + throws SAXException { + // JCR-1767: Generate extra prefix mapping calls where needed + addedPrefixMappings.add(null); + checkPrefixMapping(eltUri, eltQName); + for (int i = 0; i < attrs.getLength(); i++) { + checkPrefixMapping(attrs.getURI(i), attrs.getQName(i)); + } + + // try to restore the qName. The map already contains the colon + if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { + eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; + } + if (this.hasMappings) { + // Add xmlns* attributes where needed + + // New Attributes if we have to add some. + AttributesImpl newAttrs = null; + + int mappingCount = this.prefixList.size(); + int attrCount = attrs.getLength(); + + for (int mapping = 0; mapping < mappingCount; mapping++) { + + // Build infos for this namespace + String uri = (String) this.uriList.get(mapping); + String prefix = (String) this.prefixList.get(mapping); + String qName = prefix.equals("") ? "xmlns" : ("xmlns:" + prefix); + + // Search for the corresponding xmlns* attribute + boolean found = false; + for (int attr = 0; attr < attrCount; attr++) { + if (qName.equals(attrs.getQName(attr))) { + // Check if mapping and attribute URI match + if (!uri.equals(attrs.getValue(attr))) { + throw new SAXException("URI in prefix mapping and attribute do not match"); + } + found = true; + break; + } + } + + if (!found) { + // Need to add this namespace + if (newAttrs == null) { + // Need to test if attrs is empty or we go into an infinite loop... + // Well know SAX bug which I spent 3 hours to remind of :-( + if (attrCount == 0) { + newAttrs = new AttributesImpl(); + } else { + newAttrs = new AttributesImpl(attrs); + } + } + + if (prefix.equals("")) { + newAttrs.addAttribute(XML, qName, qName, "CDATA", uri); + } else { + newAttrs.addAttribute(XML, prefix, qName, "CDATA", uri); + } + } + } // end for mapping + + // Cleanup for the next element + clearMappings(); + + // Start element with new attributes, if any + super.startElement(eltUri, eltLocalName, eltQName, newAttrs == null ? attrs : newAttrs); + } else { + // Normal job + super.startElement(eltUri, eltLocalName, eltQName, attrs); + } + } + + + /** + * Receive notification of the end of an element. + * Try to restore the element qName. + */ + public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException { + // try to restore the qName. The map already contains the colon + if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { + eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; + } + + super.endElement(eltUri, eltLocalName, eltQName); + + // JCR-1767: Generate extra prefix un-mapping calls where needed + int last = addedPrefixMappings.size() - 1; + List prefixes = (List) addedPrefixMappings.remove(last); + if (prefixes != null) { + Iterator iterator = prefixes.iterator(); + while (iterator.hasNext()) { + endPrefixMapping((String) iterator.next()); + } + } + } + + /** + * End the scope of a prefix-URI mapping: + * remove entry from mapping tables. + */ + public void endPrefixMapping(String prefix) throws SAXException { + // remove mappings for xalan-bug-workaround. + // Unfortunately, we're not passed the uri, but the prefix here, + // so we need to maintain maps in both directions. + if (this.prefixToUriMap.containsKey(prefix)) { + this.uriToPrefixMap.remove(this.prefixToUriMap.get(prefix)); + this.prefixToUriMap.remove(prefix); + } + + if (hasMappings) { + // most of the time, start/endPrefixMapping calls have an element event between them, + // which will clear the hasMapping flag and so this code will only be executed in the + // rather rare occasion when there are start/endPrefixMapping calls with no element + // event in between. If we wouldn't remove the items from the prefixList and uriList here, + // the namespace would be incorrectly declared on the next element following the + // endPrefixMapping call. + int pos = prefixList.lastIndexOf(prefix); + if (pos != -1) { + prefixList.remove(pos); + uriList.remove(pos); + } + } + + super.endPrefixMapping(prefix); + } + + public void endDocument() throws SAXException { + // Cleanup + this.uriToPrefixMap.clear(); + this.prefixToUriMap.clear(); + clearMappings(); + super.endDocument(); + } + + private void clearMappings() { + this.hasMappings = false; + this.prefixList.clear(); + this.uriList.clear(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java new file mode 100644 index 00000000000..dfc4123c1c2 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java @@ -0,0 +1,222 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import java.rmi.RemoteException; +import java.util.NoSuchElementException; + +import javax.jcr.RangeIterator; + +import org.apache.jackrabbit.rmi.client.ClientObject; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A buffering local adapter for the JCR-RMI {@link RemoteIterator} + * interface. This class makes the remote iterator locally available + * using the JCR {@link RangeIterator} interface. The element arrays + * returned by the remote iterator are buffered locally. + *

    + * See the subclasses for type-specific versions of this abstract class. + */ +@Deprecated(forRemoval = true) public abstract class ClientIterator extends ClientObject + implements RangeIterator { + + /** The adapted remote iterator. */ + private final RemoteIterator remote; + + /** + * The cached number of elements in the iterator, -1 if the iterator + * size is unknown, or -2 if the size has not been retrieved from the + * remote iterator. + */ + private long size; + + /** The position of the buffer within the iteration. */ + private long positionOfBuffer; + + /** The position within the buffer of the iteration. */ + private int positionInBuffer; + + /** + * The element buffer. Set to null when the end of the + * iteration has been reached. + */ + private Object[] buffer; + + /** + * Creates a local adapter for the given remote iterator. The element + * buffer is initially empty. + * + * @param remote remote iterator + * @param factory local adapter factory + */ + public ClientIterator(RemoteIterator remote, LocalAdapterFactory factory) { + super(factory); + this.remote = remote; + this.size = -2; + this.positionOfBuffer = 0; + this.positionInBuffer = 0; + this.buffer = new Object[0]; + } + + /** + * Returns the current position within the iterator. + * + * @return current position + * @see RangeIterator#getPosition() + */ + public long getPosition() { + return positionOfBuffer + positionInBuffer; + } + + /** + * Returns the size (the total number of elements) of this iteration. + * Returns -1 if the size is unknown. + *

    + * To minimize the number of remote method calls, the size is retrieved + * when this method is first called and cached for subsequent invocations. + * + * @return number of elements in the iteration, or -1 + * @throws RemoteRuntimeException on RMI errors + * @see RangeIterator#getSize() + */ + public long getSize() throws RemoteRuntimeException { + if (size == -2) { + try { + size = remote.getSize(); + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } + } + return size; + } + + /** + * Skips the given number of elements in this iteration. + *

    + * The elements in the local element buffer are skipped first, and + * a remote skip method call is made only if more elements are being + * skipped than remain in the local buffer. + * + * @param skipNum the number of elements to skip + * @throws NoSuchElementException if skipped past the last element + * @throws RemoteRuntimeException on RMI errors + * @see RangeIterator#skip(long) + */ + public void skip(long skipNum) + throws NoSuchElementException, RemoteRuntimeException { + if (skipNum < 0) { + throw new IllegalArgumentException("Negative skip is not allowed"); + } else if (buffer == null && skipNum > 0) { + throw new NoSuchElementException("Skipped past the last element"); + } else if (positionInBuffer + skipNum <= buffer.length) { + positionInBuffer += skipNum; + } else { + try { + skipNum -= buffer.length - positionInBuffer; + remote.skip(skipNum); + positionInBuffer = buffer.length; + positionOfBuffer += skipNum; + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } catch (NoSuchElementException e) { + buffer = null; // End of iterator reached + throw e; + } + } + } + + /** + * Advances the element buffer if there are no more elements in it. The + * element buffer is set to null if the end of the iteration + * has been reached. + * + * @throws RemoteException on RMI errors + */ + private void advance() throws RemoteException { + if (buffer != null && positionInBuffer == buffer.length) { + positionOfBuffer += buffer.length; + positionInBuffer = 0; + buffer = remote.nextObjects(); + if (buffer == null) { + size = positionOfBuffer; + } + } + } + + /** + * Checks if there are more elements in this iteration. + * + * @return true if there are more elements, + * false otherwise + * @throws RemoteRuntimeException on RMI errors + */ + public boolean hasNext() throws RemoteRuntimeException { + try { + advance(); + return buffer != null; + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } + } + + /** + * Returns a local adapter for the given remote object. This abstract + * method is used by {@link #next()} to convert the remote references + * returned by the remote iterator to local adapters. + *

    + * Subclasses should implement this method to use the local adapter + * factory to create local adapters of the specific element type. + * + * @param remote remote object + * @return local adapter + */ + protected abstract Object getObject(Object remote); + + /** + * Returns the next element in this iteration. + * + * @return next element + * @throws NoSuchElementException if there are no more elements + * @throws RemoteRuntimeException on RMI errors + */ + public Object next() throws NoSuchElementException, RemoteRuntimeException { + try { + advance(); + if (buffer == null) { + throw new NoSuchElementException("End of iterator reached"); + } else { + return getObject(buffer[positionInBuffer++]); + } + } catch (RemoteException e) { + throw new RemoteRuntimeException(e); + } + } + + /** + * Not supported. + * + * @throws UnsupportedOperationException always thrown + */ + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException(); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java new file mode 100644 index 00000000000..71c7e121489 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java @@ -0,0 +1,72 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Session; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNode; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote nodes. + */ +@Deprecated(forRemoval = true) public class ClientNodeIterator extends ClientIterator implements NodeIterator { + + /** The current session. */ + private final Session session; + + /** + * Creates a ClientNodeIterator instance. + * + * @param iterator remote iterator + * @param session current session + * @param factory local adapter factory + */ + public ClientNodeIterator( + RemoteIterator iterator, Session session, + LocalAdapterFactory factory) { + super(iterator, factory); + this.session = session; + } + + /** + * Creates and returns a local adapter for the given remote node. + * + * @param remote remote referecne + * @return local adapter + * @see ClientIterator#getObject(Object) + */ + protected Object getObject(Object remote) { + return getNode(session, (RemoteNode) remote); + } + + /** + * Returns the next node in this iteration. + * + * @return next node + * @see NodeIterator#nextNode() + */ + public Node nextNode() { + return (Node) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java new file mode 100644 index 00000000000..8bf80cbf30b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java @@ -0,0 +1,66 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote node types. + */ +@Deprecated(forRemoval = true) public class ClientNodeTypeIterator extends ClientIterator + implements NodeTypeIterator { + + /** + * Creates a ClientNodeTypeIterator instance. + * + * @param iterator remote iterator + * @param factory local adapter factory + */ + public ClientNodeTypeIterator( + RemoteIterator iterator, LocalAdapterFactory factory) { + super(iterator, factory); + } + + /** + * Creates and returns a local adapter for the given remote node. + * + * @param remote remote referecne + * @return local adapter + * @see ClientIterator#getObject(Object) + */ + protected Object getObject(Object remote) { + return getFactory().getNodeType((RemoteNodeType) remote); + } + + /** + * Returns the next node type in this iteration. + * + * @return next node type + * @see NodeTypeIterator#nextNodeType() + */ + public NodeType nextNodeType() { + return (NodeType) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java new file mode 100644 index 00000000000..47e7a35ffae --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.Session; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote properties. + */ +@Deprecated(forRemoval = true) public class ClientPropertyIterator extends ClientIterator + implements PropertyIterator { + + /** The current session. */ + private final Session session; + + /** + * Creates a ClientPropertyIterator instance. + * + * @param iterator remote iterator + * @param session current session + * @param factory local adapter factory + */ + public ClientPropertyIterator( + RemoteIterator iterator, Session session, + LocalAdapterFactory factory) { + super(iterator, factory); + this.session = session; + } + + /** + * Creates and returns a local adapter for the given remote property. + * + * @param remote remote referecne + * @return local adapter + * @see ClientIterator#getObject(Object) + */ + protected Object getObject(Object remote) { + return getFactory().getProperty(session, (RemoteProperty) remote); + } + + /** + * Returns the next property in this iteration. + * + * @return next property + * @see PropertyIterator#nextProperty() + */ + public Property nextProperty() { + return (Property) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java new file mode 100644 index 00000000000..6774b10ce07 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java @@ -0,0 +1,70 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import javax.jcr.Session; +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteRow; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote rows. + */ +@Deprecated(forRemoval = true) public class ClientRowIterator extends ClientIterator implements RowIterator { + + /** Current session. */ + private Session session; + + /** + * Creates a ClientRowIterator instance. + * + * @param iterator remote iterator + * @param factory local adapter factory + */ + public ClientRowIterator(Session session, + RemoteIterator iterator, LocalAdapterFactory factory) { + super(iterator, factory); + this.session = session; + } + + /** + * Creates and returns a local adapter for the given remote row. + * + * @param remote remote reference + * @return local adapter + * @see ClientIterator#getObject(Object) + */ + protected Object getObject(Object remote) { + return getFactory().getRow(session, (RemoteRow) remote); + } + + /** + * Returns the next row in this iteration. + * + * @return next row + * @see RowIterator#nextRow() + */ + public Row nextRow() { + return (Row) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java new file mode 100644 index 00000000000..4d1cd98ccad --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.iterator; + +import javax.jcr.Session; +import javax.jcr.version.Version; +import javax.jcr.version.VersionIterator; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote versions. + */ +@Deprecated(forRemoval = true) public class ClientVersionIterator extends ClientIterator + implements VersionIterator { + + /** The current session. */ + private final Session session; + + /** + * Creates a ClientVersionIterator instance. + * + * @param iterator remote iterator + * @param session current session + * @param factory local adapter factory + */ + public ClientVersionIterator( + RemoteIterator iterator, Session session, + LocalAdapterFactory factory) { + super(iterator, factory); + this.session = session; + } + + /** + * Creates and returns a local adapter for the given remote version. + * + * @param remote remote referecne + * @return local adapter + * @see ClientIterator#getObject(Object) + */ + protected Object getObject(Object remote) { + return getFactory().getVersion(session, (RemoteVersion) remote); + } + + /** + * Returns the next version in this iteration. + * + * @return next version + * @see VersionIterator#nextVersion() + */ + public Version nextVersion() { + return (Version) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java new file mode 100755 index 00000000000..ad196f8e5b6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.client.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java new file mode 100755 index 00000000000..75e643f9218 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.client; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java new file mode 100644 index 00000000000..8953b1acbba --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java @@ -0,0 +1,91 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.principal; + +import java.rmi.RemoteException; +import java.security.Principal; +import java.util.Enumeration; +import java.util.Iterator; + +import org.apache.jackrabbit.api.security.principal.GroupPrincipal; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface. + * + * @see RemoteGroup + */ +@Deprecated(forRemoval = true) public class ClientGroup extends ClientPrincipal implements GroupPrincipal { + + private final LocalAdapterFactory factory; + + public ClientGroup(final RemotePrincipal p, + final LocalAdapterFactory factory) { + super(p); + this.factory = factory; + } + + /** + * @return false - this method is not implemented yet + */ + public boolean addMember(Principal user) { + // no support for adding member here + return false; + } + + public boolean isMember(Principal member) { + try { + return ((RemoteGroup) getRemotePrincipal()).isMember(member.getName()); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + public Enumeration members() { + try { + final RemoteIterator remote = ((RemoteGroup) getRemotePrincipal()).members(); + final Iterator pi = factory.getPrincipalIterator(remote); + return new Enumeration() { + public boolean hasMoreElements() { + return pi.hasNext(); + } + + public Principal nextElement() { + return pi.next(); + } + }; + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** + * @return false - this method is not implemented yet + */ + public boolean removeMember(Principal user) { + // no support for removing member here + return false; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java new file mode 100644 index 00000000000..24420e51817 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java @@ -0,0 +1,66 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.principal; + +import java.rmi.RemoteException; +import java.security.Principal; + +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal} + * interface. This class makes a remote principal locally available using the + * Java {@link Principal} interface. + * + * @see Principal + * @see RemotePrincipal + */ +@Deprecated(forRemoval = true) public class ClientPrincipal implements Principal { + + private final RemotePrincipal p; + + public ClientPrincipal(final RemotePrincipal p) { + this.p = p; + } + + /** {@inheritDoc} */ + public String getName() { + try { + return p.getName(); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** + * Returns the {@link RemotePrincipal} encapsulated in this instance. + *

    + * NOTE: This method is intended to only be used in the JCR RMI + * implementation to be able to "send back" remote principals to the server + * for implementation of the remote JCR API. + * + * @return the {@link RemotePrincipal} encapsulated in this instance. + */ + public final RemotePrincipal getRemotePrincipal() { + return p; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java new file mode 100644 index 00000000000..31f893b9e10 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java @@ -0,0 +1,43 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.principal; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote principals + */ +@Deprecated(forRemoval = true) public class ClientPrincipalIterator extends ClientIterator { + + public ClientPrincipalIterator(final RemoteIterator iterator, + final LocalAdapterFactory factory) { + super(iterator, factory); + } + + /** {@inheritDoc} */ + @Override + protected Object getObject(Object remote) { + return getFactory().getPrincipal((RemotePrincipal) remote); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java new file mode 100755 index 00000000000..8dd28b896ab --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("4.0.0") +package org.apache.jackrabbit.rmi.client.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java new file mode 100644 index 00000000000..1e1b3251c3d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java @@ -0,0 +1,75 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import java.rmi.RemoteException; +import java.security.Principal; + +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.client.ClientObject; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry + * RemoteAccessControlEntry} interface. This class makes a remote + * AccessControlEntry locally available using the JCR {@link AccessControlEntry + * AccessControlEntry} interface. + * + * @see javax.jcr.security.AccessControlEntry + * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry + */ +@Deprecated(forRemoval = true) public class ClientAccessControlEntry extends ClientObject implements + AccessControlEntry { + + private final RemoteAccessControlEntry race; + + public ClientAccessControlEntry(final RemoteAccessControlEntry race, + final LocalAdapterFactory factory) { + super(factory); + this.race = race; + } + + /** {@inheritDoc} */ + public Principal getPrincipal() { + try { + return getFactory().getPrincipal(race.getPrincipal()); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** {@inheritDoc} */ + public Privilege[] getPrivileges() { + try { + return getFactory().getPrivilege(race.getPrivileges()); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + RemoteAccessControlEntry getRemoteAccessControlEntry() { + return race; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java new file mode 100644 index 00000000000..c497d95bac0 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import java.rmi.RemoteException; +import java.security.Principal; + +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlList; +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteAccessControlList + * RemoteAccessControlList} interface. This class makes a remote + * AccessControlList locally available using the JCR {@link AccessControlList + * AccessControlList} interface. + * + * @see javax.jcr.security.AccessControlList + * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList + */ +@Deprecated(forRemoval = true) public class ClientAccessControlList extends ClientAccessControlPolicy + implements AccessControlList { + + public ClientAccessControlList(final RemoteAccessControlList racl, + final LocalAdapterFactory factory) { + super(racl, factory); + } + + /** + * @throws UnsupportedRepositoryOperationException This method is not + * implemented yet + */ + public boolean addAccessControlEntry(Principal principal, + Privilege[] privileges) + throws UnsupportedRepositoryOperationException { + // TODO: implement client side of the story + throw new UnsupportedRepositoryOperationException( + "addAccessControlEntry"); + } + + /** {@inheritDoc} */ + public AccessControlEntry[] getAccessControlEntries() + throws RepositoryException { + try { + return getFactory().getAccessControlEntry( + ((RemoteAccessControlList) getRemoteAccessControlPolicy()).getAccessControlEntries()); + } catch (RemoteException re) { + throw new RemoteRepositoryException(re); + } + } + + /** + * @throws UnsupportedRepositoryOperationException This method is not + * implemented yet + */ + public void removeAccessControlEntry(AccessControlEntry ace) + throws UnsupportedRepositoryOperationException { + // TODO: implement client side of the story + throw new UnsupportedRepositoryOperationException( + "removeAccessControlEntry"); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java new file mode 100644 index 00000000000..d8c4fd96d75 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java @@ -0,0 +1,161 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import java.rmi.RemoteException; + +import javax.jcr.AccessDeniedException; +import javax.jcr.PathNotFoundException; +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.security.AccessControlException; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; +import javax.jcr.security.Privilege; +import org.apache.jackrabbit.rmi.client.ClientObject; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteAccessControlManager + * RemoteAccessControlManager} interface. This class makes a remote + * AccessControlManager locally available using the JCR + * {@link AccessControlManager AccessControlManager} interface. + * + * @see javax.jcr.security.AccessControlManager + * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager + */ +@Deprecated(forRemoval = true) public class ClientAccessControlManager extends ClientObject implements + AccessControlManager { + + private final RemoteAccessControlManager racm; + + public ClientAccessControlManager(final RemoteAccessControlManager racm, + final LocalAdapterFactory factory) { + super(factory); + this.racm = racm; + } + + /** {@inheritDoc} */ + public AccessControlPolicyIterator getApplicablePolicies(String absPath) + throws RepositoryException { + try { + return getFactory().getAccessControlPolicyIterator( + racm.getApplicablePolicies(absPath)); + } catch (RemoteException re) { + throw new RemoteRepositoryException(re); + } + } + + /** {@inheritDoc} */ + public AccessControlPolicy[] getEffectivePolicies(String absPath) + throws PathNotFoundException, AccessDeniedException, + RepositoryException { + try { + return getFactory().getAccessControlPolicy( + racm.getEffectivePolicies(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public AccessControlPolicy[] getPolicies(String absPath) + throws PathNotFoundException, AccessDeniedException, + RepositoryException { + try { + return getFactory().getAccessControlPolicy( + racm.getPolicies(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Privilege[] getPrivileges(String absPath) + throws PathNotFoundException, RepositoryException { + try { + return getFactory().getPrivilege(racm.getPrivileges(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Privilege[] getSupportedPrivileges(String absPath) + throws PathNotFoundException, RepositoryException { + try { + return getFactory().getPrivilege( + racm.getSupportedPrivileges(absPath)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasPrivileges(String absPath, Privilege[] privileges) + throws PathNotFoundException, RepositoryException { + String[] privNames = new String[privileges.length]; + for (int i = 0; i < privNames.length; i++) { + privNames[i] = privileges[i].getName(); + } + + try { + return racm.hasPrivileges(absPath, privNames); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + + } + + /** {@inheritDoc} */ + public Privilege privilegeFromName(String privilegeName) + throws AccessControlException, RepositoryException { + try { + return getFactory().getPrivilege( + racm.privilegeFromName(privilegeName)); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** + * @throws UnsupportedRepositoryOperationException This method is not + * implemented yet + */ + public void removePolicy(String absPath, AccessControlPolicy policy) + throws UnsupportedRepositoryOperationException { + // TODO: implement client side of the story + throw new UnsupportedRepositoryOperationException("removePolicy"); + } + + /** + * @throws UnsupportedRepositoryOperationException This method is not + * implemented yet + */ + public void setPolicy(String absPath, AccessControlPolicy policy) + throws UnsupportedRepositoryOperationException { + // TODO: implement client side of the story + throw new UnsupportedRepositoryOperationException("setPolicy"); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java new file mode 100644 index 00000000000..30c12bd3ec6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import javax.jcr.security.AccessControlPolicy; +import org.apache.jackrabbit.rmi.client.ClientObject; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy + * RemoteAccessControlPolicy} interface. This class makes a remote + * AccessControlPolicy locally available using the JCR + * {@link AccessControlPolicy AccessControlPolicy} interface. + * + * @see javax.jcr.security.AccessControlPolicy + * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy + */ +@Deprecated(forRemoval = true) public class ClientAccessControlPolicy extends ClientObject implements + AccessControlPolicy { + + private final RemoteAccessControlPolicy racp; + + public ClientAccessControlPolicy(final RemoteAccessControlPolicy racp, + final LocalAdapterFactory factory) { + super(factory); + this.racp = racp; + } + + RemoteAccessControlPolicy getRemoteAccessControlPolicy() { + return racp; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java new file mode 100644 index 00000000000..80ac1bb0759 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java @@ -0,0 +1,50 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ClientIterator for iterating remote access control policies. + */ +@Deprecated(forRemoval = true) public class ClientAccessControlPolicyIterator extends ClientIterator implements + AccessControlPolicyIterator { + + public ClientAccessControlPolicyIterator(RemoteIterator iterator, + LocalAdapterFactory factory) { + super(iterator, factory); + } + + /** {@inheritDoc} */ + protected Object getObject(Object remote) { + return getFactory().getAccessControlPolicy( + (RemoteAccessControlList) remote); + } + + /** {@inheritDoc} */ + public AccessControlPolicy nextAccessControlPolicy() { + return (AccessControlPolicy) next(); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java new file mode 100644 index 00000000000..0bcfb22b1c1 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java @@ -0,0 +1,113 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.client.security; + +import java.rmi.RemoteException; + +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.client.ClientObject; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Local adapter for the JCR-RMI {@link RemotePrivilege RemotePrivilege} + * interface. This class makes a remote Privilege locally available using the + * JCR {@link Privilege Privilege} interface. + * + * @see javax.jcr.security.Privilege + * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege + */ +@Deprecated(forRemoval = true) public class ClientPrivilege extends ClientObject implements Privilege { + + private final RemotePrivilege rp; + + public ClientPrivilege(final RemotePrivilege rp, + final LocalAdapterFactory factory) { + super(factory); + this.rp = rp; + } + + /** {@inheritDoc} */ + public Privilege[] getAggregatePrivileges() { + try { + return getFactory().getPrivilege(rp.getAggregatePrivileges()); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** {@inheritDoc} */ + public Privilege[] getDeclaredAggregatePrivileges() { + try { + return getFactory().getPrivilege( + rp.getDeclaredAggregatePrivileges()); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** {@inheritDoc} */ + public String getName() { + try { + return rp.getName(); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** {@inheritDoc} */ + public boolean isAbstract() { + try { + return rp.isAbstract(); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + /** {@inheritDoc} */ + public boolean isAggregate() { + try { + return rp.isAggregate(); + } catch (RemoteException re) { + throw new RemoteRuntimeException(re); + } + } + + public boolean equals(Object obj) { + if (obj == this) { + return true; + } else if (obj == null) { + return false; + } + + if (obj instanceof Privilege) { + return getName().equals(((Privilege) obj).getName()); + } + + return false; + } + + public int hashCode() { + return getName().hashCode(); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java new file mode 100755 index 00000000000..fef0d6cec51 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.client.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java new file mode 100644 index 00000000000..7b84b842279 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.iterator; + +import javax.jcr.observation.Event; +import javax.jcr.observation.EventIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Array implementation of the JCR + * {@link javax.jcr.observation.EventIterator EventIterator} interface. + * This class is used by the JCR-RMI client adapters to convert + * node arrays to iterators. + */ +@Deprecated(forRemoval = true) public class ArrayEventIterator extends ArrayIterator implements EventIterator { + + /** + * Creates an iterator for the given array of events. + * + * @param nodes the nodes to iterate + */ + public ArrayEventIterator(Event[] nodes) { + super(nodes); + } + + /** {@inheritDoc} */ + public Event nextEvent() { + return (Event) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java new file mode 100644 index 00000000000..1abc13e4cc4 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java @@ -0,0 +1,47 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.iterator; + +import javax.jcr.observation.EventListener; +import javax.jcr.observation.EventListenerIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Array implementation of the JCR + * {@link javax.jcr.observation.EventListenerIterator EventListenerIterator} interface. + * This class is used by the JCR-RMI client adapters to convert + * listener arrays to iterators. + */ +@Deprecated(forRemoval = true) public class ArrayEventListenerIterator extends ArrayIterator + implements EventListenerIterator { + + /** + * Creates an iterator for the given array of listeners. + * + * @param listeners the listeners to iterate + */ + public ArrayEventListenerIterator(EventListener[] listeners) { + super(listeners); + } + + /** {@inheritDoc} */ + public EventListener nextEventListener() { + return (EventListener) next(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java new file mode 100644 index 00000000000..bdc89d6f277 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java @@ -0,0 +1,85 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.iterator; + +import java.util.NoSuchElementException; + +import javax.jcr.RangeIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Array implementation of the JCR + * {@link javax.jcr.RangeIterator RangeIterator} interface. This class + * implements the RangeIterator functionality for an underlying array + * of objects. Used as the base class for the type-specific iterator + * classes defined in this package. + */ +@Deprecated(forRemoval = true) public class ArrayIterator implements RangeIterator { + + /** The current iterator position. */ + private int position; + + /** The underlying array of objects. */ + private Object[] array; + + /** + * Creates an iterator for the given array of objects. + * + * @param array the objects to iterate + */ + public ArrayIterator(Object[] array) { + this.position = 0; + this.array = array; + } + + /** {@inheritDoc} */ + public boolean hasNext() { + return (position < array.length); + } + + /** {@inheritDoc} */ + public Object next() { + return array[position++]; + } + + /** {@inheritDoc} */ + public void remove() { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public void skip(long items) { + position += items; + if (position > array.length) { + position = array.length; + throw new NoSuchElementException( + "Skipped past the last element of the iterator"); + } + } + + /** {@inheritDoc} */ + public long getSize() { + return array.length; + } + + /** {@inheritDoc} */ + public long getPosition() { + return position; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java new file mode 100755 index 00000000000..06af128a016 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java new file mode 100644 index 00000000000..5fcfb5ba432 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java @@ -0,0 +1,27 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.jackrabbit; + +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * @deprecated Use the normal {@link ClientAdapterFactory} instead + */ +@Deprecated(forRemoval = true) public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java new file mode 100755 index 00000000000..09727fd1bba --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.jackrabbit; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java new file mode 100644 index 00000000000..a30ebd589a3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java @@ -0,0 +1,344 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.observation; + +import java.rmi.RemoteException; +import java.util.HashMap; +import java.util.Map; + +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.observation.Event; +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.EventListener; + +import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; +import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; +import org.apache.jackrabbit.rmi.iterator.ArrayEventIterator; +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The ClientEventPoll class is the registry for client-side + * event listeners on behalf of the + * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class. In + * addition this class extends the java.lang.Thread class able + * to be run in a separate thread to constantly poll the server-side observation + * manager for new events. + *

    + * Notes: + *

      + *
    1. Only one instance of this class should be instantiated for each instance + * of a {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager} class. + *
    2. EventListeners registered with this class must properly + * implement the Object.hashCode() and Object.equals() + * contracts for them to be handled correctly by this class. + *
    + * + * @see #run() + */ +@Deprecated(forRemoval = true) public class ClientEventPoll extends Thread { + + /** logger */ + private static final Logger log = + LoggerFactory.getLogger(ClientEventPoll.class); + + /** + * The time in milliseconds the {@link #run()} method should be waiting + * for remote events. + * @see #run() + */ + private static final long POLL_TIMEOUT = 5000; + + /** The thread name */ + private static final String THREAD_NAME = "Client Event Poller"; + + /** The primitive unique identifier generator. */ + private static long counter = 0; + + /** The {@link RemoteObservationManager} called for the new events. */ + private final RemoteObservationManager remote; + + /** + * The Session checked by the {@link #run} method whether it + * is still alive or the thread should terminate. + */ + private final Session session; + + /** The map of locally registered listeners indexed by the unique identifier */ + private Map listenerMap = new HashMap(); + + /** The map of unique identifieres indexed by the registered listeners */ + private Map idMap = new HashMap(); + + /** + * Flag indicating whether the {@link #run()} method should terminate. + * @see #run() + */ + private boolean running = true; + + /** + * Creates an instance of this class talking to the given + * {@link RemoteObservationManager}. + * + * @param remote The remote observation manager which is asked for new + * events. This must not be null. + * @param session The Session which is asked whether it is + * alive by the {@link #run()} method. This must not be null. + * + * @throws NullPointerException if remote or session + * is null. + */ + public ClientEventPoll(RemoteObservationManager remote, Session session) + throws NullPointerException { + super(THREAD_NAME); + + // check remote and session + if (remote == null) { + throw new NullPointerException("remote"); + } + if (session == null) { + throw new NullPointerException("session"); + } + + this.remote = remote; + this.session = session; + } + + /** + * Registers the given local listener with this instance and returns the + * unique identifier assigned to it. + * + * @param listener The EventListener to register. + * + * @return The unique identifier assigned to the newly registered event + * listener. + */ + public synchronized long addListener(EventListener listener) { + Long id = new Long(counter++); + listenerMap.put(id, listener); + idMap.put(listener, id); + return id.longValue(); + } + + /** + * Unregisters the given local listener from this instance and returns the + * unique identifier assigned to it. + * + * @param listener The EventListener to unregister. + * + * @return The unique identifier assigned to the unregistered event listener + * or -1 if the listener was not registered. + */ + public synchronized long removeListener(EventListener listener) { + Long key = (Long) idMap.remove(listener); + if (key != null) { + listenerMap.remove(key); + return key.longValue(); + } + + return -1; + } + + /** + * Returns an array of the registered event listeners. + * + * @return registered event listeners + */ + public synchronized EventListener[] getListeners() { + return (EventListener[]) listenerMap.values().toArray( + new EventListener[(listenerMap.size())]); + } + + /** + * Indicates to the {@link #run()} method, that asking for events should + * be terminated. + * + * @see #run() + */ + public void terminate() { + this.running = false; + } + + //---------- Thread overwrite --------------------------------------------- + + /** + * Checks for remote events and dispatches them to the locally registered + * event listeners. This is how this method works: + *
      + *
    1. Continue with next step if {@link #terminate()} has not been called + * yet and the session is still alive. + *
    2. Call the {@link RemoteObservationManager#getNextEvent(long)} method + * waiting for a specified time (5 seconds). + *
    3. If no event was received in the specified time go back to step #1. + *
    4. Extract the unique listener identifier from the remote event and + * find it in the list of locally registered event listeners. Go back to + * step #1 if no such listener exists. + *
    5. Convert the remote event list to an EventIterator and + * call the EventListener.onEvent() method. + *
    6. Go back to step #1. + *
    + */ + public void run() { + while (running && session.isLive()) { + try { + // ask for an event waiting at most POLL_TIMEOUT milliseconds + RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT); + + // poll time out, check running and ask again + if (remoteEvent == null) { + continue; + } + + // extract the listener id from the remote event and find + // the locally registered event listener + Long id = new Long(remoteEvent.getListenerId()); + EventListener listener = (EventListener) listenerMap.get(id); + + // if the listener is not registered (anymore), the event is + // silently ignored, running is checked and the server asked again + if (listener == null) { + continue; + } + + // otherwise convert the remote events into an EventIterator + // and the listener is called + RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents(); + EventIterator events = toEvents(remoteEvents); + try { + listener.onEvent(events); + } catch (Exception e) { + log.error("Unexpected failure of Listener " + listener, e); + } + + } catch (RemoteException re) { + log.error("Problem handling event. Looking for next one.", re); + } + } + } + + //---------- internal ----------------------------------------------------- + + /** + * Converts an array of {@link RemoteEventCollection.RemoteEvent} instances to an + * instance of EventIterator suitable to be sent to the + * event listener. + * + * @param remoteEvents array of remote events + * @return event iterator + * @throws RemoteException on RMI errors + */ + private EventIterator toEvents(RemoteEventCollection.RemoteEvent[] remoteEvents) + throws RemoteException { + Event[] events = new Event[remoteEvents.length]; + for (int i = 0; i < events.length; i++) { + events[i] = new JCREvent(remoteEvents[i]); + } + return new ArrayEventIterator(events); + } + + /** + * The JCREvent class is a simple implementation of the JCR + * Event interface to be sent to the locally registered + * event listeners. + * + * @author Felix Meschberger + */ + private static class JCREvent implements Event { + + /** The adapted remote event. */ + private final RemoteEventCollection.RemoteEvent remote; + + /** + * Creates an instance of this class from the contents of the given + * remoteEvent. + * + * @param remoteEvent The {@link RemoteEventCollection.RemoteEvent} instance + * providing the data for this event. + */ + private JCREvent(RemoteEventCollection.RemoteEvent remoteEvent) { + remote = remoteEvent; + } + + /** {@inheritDoc} */ + public int getType() { + try { + return remote.getType(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public String getPath() throws RepositoryException { + try { + return remote.getPath(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getUserID() { + try { + return remote.getUserID(); + } catch (RemoteException ex) { + throw new RemoteRuntimeException(ex); + } + } + + /** {@inheritDoc} */ + public long getDate() throws RepositoryException { + try { + return remote.getDate(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getIdentifier() throws RepositoryException { + try { + return remote.getIdentifier(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Map getInfo() throws RepositoryException { + try { + return remote.getInfo(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getUserData() throws RepositoryException { + try { + return remote.getUserData(); + } catch (RemoteException ex) { + throw new RemoteRepositoryException(ex); + } + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java new file mode 100644 index 00000000000..5b39287157f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java @@ -0,0 +1,85 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.observation; + +import java.util.LinkedList; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The Queue class is a very simple queue assuming that there is + * at least one consumer and potentially multiple producers. This class poses + * no restrictions on the size of the queue. + */ +@Deprecated(forRemoval = true) public class Queue { + + /** The linked list implementing the queue of data */ + private final LinkedList queue; + + /** + * Creates an instance of this queue. + */ + public Queue() { + queue = new LinkedList(); + } + + /** + * Appends the given object to the end of the queue. + *

    + * After appending the element, the queue is notified such that threads + * waiting to retrieve an element from the queue are woken up. + * + * @param object the object to be added + */ + public void put(Object object) { + synchronized (queue) { + queue.addLast(object); + queue.notifyAll(); + } + } + + /** + * Returns the first element from the queue. If the queue is currently empty + * the method waits at most the given number of milliseconds. + * + * @param timeout The maximum number of milliseconds to wait for an entry in + * the queue if the queue is empty. If zero, the method waits forever + * for an element. + * + * @return The first element of the queue or null if the method + * timed out waiting for an entry. + * + * @throws InterruptedException Is thrown if the current thread is + * interrupted while waiting for the queue to get at least one entry. + */ + public Object get(long timeout) throws InterruptedException { + synchronized (queue) { + // wait for data if the queue is empty + if (queue.isEmpty()) { + queue.wait(timeout); + } + + // return null if queue is (still) empty + if (queue.isEmpty()) { + return null; + } + + // return first if queue has content now + return queue.removeFirst(); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java new file mode 100644 index 00000000000..94f78b6d13a --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java @@ -0,0 +1,146 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.observation; + +import java.rmi.RemoteException; + +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.EventListener; + +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The ServerEventListenerProxy class is the server-side event + * listener proxy registered on behalf of a client-side event listener identified + * with the unique identifier. + *

    + * The term Server in this class indicates, that this is a server-side + * class. In contrast to the classes in the + * {@link org.apache.jackrabbit.rmi.server} package, this class neither extends + * the {@link org.apache.jackrabbit.rmi.server.ServerObject} class nor does it + * implement any of the remote interfaces in the + * {@link org.apache.jackrabbit.rmi.remote} package because it only is + * instantiated to be used on the server side. + *

    + * See the package overview for an explanation of the mechanisms implemented for + * event dispatching. + */ +@Deprecated(forRemoval = true) public class ServerEventListenerProxy implements EventListener { + + /** logger */ + private static final Logger log = + LoggerFactory.getLogger(ServerEventListenerProxy.class); + + /** The factory used to convert event iterators to remote events */ + private final RemoteAdapterFactory factory; + + /** + * The unique indentifier of the client-side event listener on whose + * behalf this listener proxy is registered. + */ + private final long listenerId; + + /** + * The queue to which remote events are queue for them to be picked up + * by calls to the + * {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager#getNextEvent(long)} + * method. + */ + private final Queue queue; + + /** + * Creates a new instance of this listener proxy. + * + * @param factory The {@link RemoteAdapterFactory} used to convert the + * {@link EventIterator} instances to {@link RemoteEventCollection} objects. + * @param listenerId The unique identifier of the client-side event listener + * on whose behalf this proxy works. + * @param queue The sink to which events to be dispatched to the client are + * queued to be picked up. + */ + public ServerEventListenerProxy(RemoteAdapterFactory factory, + long listenerId, Queue queue) { + this.factory = factory; + this.listenerId = listenerId; + this.queue = queue; + } + + /** + * Converts the {@link javax.jcr.observation.Event} instances in the given + * iterator to an instance of {@link RemoteEventCollection} for them to be dispatched + * to the client-side event listener. + * + * @param events The {@link javax.jcr.observation.Event Events} to be + * dispatched. + */ + public void onEvent(EventIterator events) { + try { + RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events); + queue.put(remoteEvent); + } catch (RemoteException re) { + Throwable t = (re.getCause() == null) ? re : re.getCause(); + log.error("Problem creating remote event for " + listenerId, t); + } + } + + //---------- Object overwrite ---------------------------------------------- + + /** + * Returns the client-side listener identifier as its hash code. + * + * @return hash code + */ + public int hashCode() { + return (int) listenerId; + } + + /** + * Returns true if obj is either the same as this + * or a proxy for the same client-side listener, which is identicated by the + * same listener identifier. + * + * @param obj The object to compare to. + * + * @return true if obj is the same or a proxy for + * the same client-side listener. + */ + public boolean equals(Object obj) { + if (this == obj) { + return true; + } else if (obj instanceof ServerEventListenerProxy) { + return listenerId == ((ServerEventListenerProxy) obj).listenerId; + } else { + return false; + } + } + + /** + * Returns the a string representation of this instance, which is an + * indication of this class's name and the unique identifier of the real + * event listener. + * + * @return string representation + */ + public String toString() { + return "EventListenerProxy: listenerId=" + listenerId; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java new file mode 100755 index 00000000000..c78b4f6d8e9 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.observation; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java new file mode 100644 index 00000000000..146f1479a63 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java @@ -0,0 +1,104 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.io.Serializable; +import java.util.NoSuchElementException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A simple array-based remote iterator. Used when the iteration is + * short enough for all the elements to be sent over the network in + * one go. + */ +@Deprecated(forRemoval = true) public class ArrayIterator implements RemoteIterator, Serializable { + + /** + * The elements in this iterator. Set to null when + * all elements have been iterated. + */ + private Object[] elements; + + /** + * The position of this iterator. Set to the size of the iterator + * when all elements have been iterated. + */ + private int position; + + /** + * Creates an array-based remote iterator from the given array + * of remote references or serializable objects. + * + * @param elements elements of the iteration + */ + public ArrayIterator(Object[] elements) { + this.elements = elements; + this.position = 0; + } + + /** + * Returns the size of the iterator. + * + * @return length of the iterator + * @see RemoteIterator#getSize() + */ + public long getSize() { + if (elements == null) { + return position; + } else { + return elements.length; + } + } + + /** + * Skips the first items elements in the array. + * {@inheritDoc} + */ + public void skip(long items) + throws IllegalArgumentException, NoSuchElementException { + if (items < 0) { + throw new IllegalArgumentException("Negative skip is not allowed"); + } else if (elements == null || items > elements.length) { + throw new NoSuchElementException("Skipped past the last element"); + } else if (items == elements.length) { + position = elements.length; + elements = null; + } else { + Object[] tmp = new Object[elements.length - (int) items]; + System.arraycopy(elements, (int) items, tmp, 0, tmp.length); + elements = tmp; + position += items; + } + } + + /** + * Returns the underlying array. + * {@inheritDoc} + */ + public Object[] nextObjects() throws IllegalArgumentException { + if (elements == null) { + return null; + } else { + Object[] tmp = elements; + position += elements.length; + elements = null; + return tmp; + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java new file mode 100644 index 00000000000..43d8e7d0082 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java @@ -0,0 +1,109 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.io.Serializable; +import java.rmi.RemoteException; +import java.util.NoSuchElementException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A buffered remote iterator. Used to transfer a remote iterator reference + * along with a buffer of the first few iterator elements in one network + * transmission. + */ +@Deprecated(forRemoval = true) public class BufferIterator implements RemoteIterator, Serializable { + + /** The element buffer. Set to null when the iterator ends. */ + private Object[] buffer; + + /** Cached size of the iterator. */ + private final long size; + + /** Remote iterator reference. */ + private final RemoteIterator remote; + + /** + * Creates a new buffered remote iterator. + * + * @param buffer first elements in the iterator + * @param size total iterator size + * @param remote reference to the remaining iterator + */ + public BufferIterator(Object[] buffer, long size, RemoteIterator remote) { + this.buffer = buffer; + this.size = size; + this.remote = remote; + } + + /** + * Returns the cached size of the iterator. + * + * @return iterator size, or -1 if unknown + * @see RemoteIterator#getSize() + */ + public long getSize() { + return size; + } + + /** + * Skips the given number of elements. First discards elements from the + * element buffer and only then contacts the remote iterator. + * + * @param items number of items to skip + * @throws IllegalArgumentException if items is negative + * @throws NoSuchElementException if skipped past the last element + * @throws RemoteException on RMI errors + * @see RemoteIterator#skip(long) + */ + public void skip(long items) + throws IllegalArgumentException, NoSuchElementException, + RemoteException { + if (items < 0) { + throw new IllegalArgumentException("Negative skip is not allowed"); + } else if (buffer == null && items > 0) { + throw new NoSuchElementException("Skipped past the last element"); + } else if (items > buffer.length) { + remote.skip(items - buffer.length); + buffer = remote.nextObjects(); + } else { + Object[] tmp = new Object[buffer.length - (int) items]; + System.arraycopy(buffer, (int) items, tmp, 0, tmp.length); + buffer = tmp; + } + } + + /** + * Returns the currently buffered elements and fills in the buffer + * with next elements. + * + * @return buffered elements, or null if the iterator has ended + * @throws RemoteException on RMI errors + * @see RemoteIterator#nextObjects() + */ + public Object[] nextObjects() throws RemoteException { + if (buffer == null) { + return null; + } else { + Object[] tmp = buffer; + buffer = remote.nextObjects(); + return tmp; + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java new file mode 100644 index 00000000000..0013e31881a --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java @@ -0,0 +1,129 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; +import java.util.Map; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The RemoteEventCollection class serves as a container for + * notifications sent to registered event listeners. Instances of this class are + * created by the server-side event listener proxies and sent to the client-side + * event poller. On the client-side the enclosed list of events is then sent to + * the listener identified by the contained listener identifier. + */ +@Deprecated(forRemoval = true) public interface RemoteEventCollection extends Remote { + + /** + * Returns unique identifier of the client-side listener to which the + * enclosed events should be sent. + * + * @return unique listener identifier + * @throws RemoteException on RMI errors + */ + long getListenerId() throws RemoteException; + + /** + * Returns the list of events to be sent to the client-side listener + * identified by {@link #getListenerId()}. + * + * @return list of events + * @throws RemoteException on RMI errors + */ + RemoteEvent[] getEvents() throws RemoteException; + + /** + * The RemoteEvent class provides an encapsulation of single + * events in an event list sent to a registered listener. + */ + public static interface RemoteEvent extends Remote { + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getType() Event.getType()} method. + * + * @return the type of this event. + * @throws RemoteException on RMI errors + */ + int getType() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getPath() Event.getPath()} method. + * + * @return the absolute path associated with this event or + * null. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getPath() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getUserID() Event.getUserID()} method. + * + * @return the user ID. + * @throws RemoteException on RMI errors + */ + String getUserID() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getIdentifier() Event.getIdentifier()} method. + * + * @return the identifier associated with this event or null. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getIdentifier() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getInfo() Event.getInfo()} method. + * + * @return A Map containing parameter information for instances + * of a NODE_MOVED event. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Map getInfo() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getUserData() Event.getUserData()} method. + * + * @return The user data string. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getUserData() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.Event#getDate() Event.getDate()} method. + * + * @return the date when the change was persisted that caused this event. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + long getDate() throws RepositoryException, RemoteException; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java new file mode 100644 index 00000000000..bc459dc06cf --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java @@ -0,0 +1,147 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Item Item} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerItem ServerItem} + * and {@link org.apache.jackrabbit.rmi.client.ClientItem ClientItem} + * adapter base classes to provide transparent RMI access to remote items. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding Item method. The remote object will simply forward + * the method call to the underlying Item instance. Argument and return + * values, as well as possible exceptions, are copied over the network. + * Complex return values (Items and Nodes) are returned as remote references + * to the corresponding remote interfaces. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.Item + * @see org.apache.jackrabbit.rmi.client.ClientItem + * @see org.apache.jackrabbit.rmi.server.ServerItem + */ +@Deprecated(forRemoval = true) public interface RemoteItem extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.Item#getPath() Item.getPath()} method. + * + * @return item path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getPath() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#getName() Item.getName()} method. + * + * @return item name + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getName() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#getAncestor(int) Item.getAncestor(int)} method. + * + * @param level ancestor level + * @return ancestor item + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteItem getAncestor(int level) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#getParent() Item.getParent()} method. + * + * @return parent node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getParent() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#getDepth() Item.getDepth()} method. + * + * @return item depth + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + int getDepth() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#isNew() Item.isNew()} method. + * + * @return true if the item is new, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isNew() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#isModified() Item.isModified()} method. + * + * @return true if the item is modified, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isModified() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#save() Item.save()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void save() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#refresh(boolean) Item.refresh(boolean)} method. + * + * @param keepChanges flag to keep transient changes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void refresh(boolean keepChanges) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Item#remove() Item.remove()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void remove() throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java new file mode 100644 index 00000000000..fdfedb991cb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java @@ -0,0 +1,109 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerItemDefinition ServerItemDefinition} and + * {@link org.apache.jackrabbit.rmi.client.ClientItemDefinition ClientItemDefinition} + * adapter base classes to provide transparent RMI access to remote item + * definitions. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding ItemDef method. The remote object will simply forward + * the method call to the underlying ItemDef instance. Argument and return + * values, as well as possible exceptions, are copied over the network. + * Complex {@link javax.jcr.nodetype.NodeType NodeType} return values + * are returned as remote references to the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} + * interface. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.nodetype.ItemDefinition + * @see org.apache.jackrabbit.rmi.client.ClientItemDefinition + * @see org.apache.jackrabbit.rmi.server.ServerItemDefinition + */ +@Deprecated(forRemoval = true) public interface RemoteItemDefinition extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#getDeclaringNodeType() ItemDef.getDeclaringNodeType()} + * method. + * + * @return declaring node type + * @throws RemoteException on RMI errors + */ + RemoteNodeType getDeclaringNodeType() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#getName() ItemDef.getName()} method. + * + * @return item name + * @throws RemoteException on RMI errors + */ + String getName() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#isAutoCreated() ItemDef.isAutoCreate()} + * method. + * + * @return true if the item is automatically created, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isAutoCreated() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#isMandatory() ItemDef.isMandatory()} + * method. + * + * @return true if the item is mandatory, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isMandatory() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#getOnParentVersion() ItemDef.getOnParentVersion()} + * method. + * + * @return parent version behaviour + * @throws RemoteException on RMI errors + */ + int getOnParentVersion() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.ItemDefinition#isProtected() ItemDef.isProtected()} + * method. + * + * @return true if the item is protected, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isProtected() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java new file mode 100644 index 00000000000..42604b88223 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java @@ -0,0 +1,71 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; +import java.util.NoSuchElementException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.RangeIterator} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.iterator.ServerIterator} and + * {@link org.apache.jackrabbit.rmi.client.iterator.ClientIterator} classes to + * provide transparent RMI access to remote iterators. + *

    + * This interface allows both the client and server side to control the + * amount of buffering used to increase performance. + */ +@Deprecated(forRemoval = true) public interface RemoteIterator extends Remote { + + /** + * Returns the size of the iteration, or -1 if the + * size is unknown. + * + * @return size of the iteration, or -1 if unknown + * @throws RemoteException on RMI errors + * @see javax.jcr.RangeIterator#getSize() + */ + long getSize() throws RemoteException; + + /** + * Skips the given number of elements in this iteration. + * + * @param items number of elements to skip + * @throws NoSuchElementException if skipped past the last element + * @throws RemoteException on RMI errors + * @see javax.jcr.RangeIterator#skip(long) + */ + void skip(long items) throws NoSuchElementException, RemoteException; + + /** + * Returns an array of remote references to the next elements in this + * iterator. Returns null if the end of this iteration has + * been reached. + *

    + * To reduce the amount of remote method calls, this method returns an + * array of one or more elements in this iteration. + * + * @return array of remote references, or null + * @throws IllegalArgumentException if maxItems is not positive + * @throws RemoteException on RMI errors + * @see java.util.Iterator#next() + */ + Object[] nextObjects() throws IllegalArgumentException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java new file mode 100644 index 00000000000..d9ba20e269b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java @@ -0,0 +1,133 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.lock.Lock} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerLock ServerLock} + * and {@link org.apache.jackrabbit.rmi.client.ClientLock ClientLock} + * adapter classes to provide transparent RMI access to remote locks. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding Lock method. The remote object will simply forward + * the method call to the underlying Lock instance. Return values and + * possible exceptions are copied over the network. RMI errors are signaled + * with RemoteExceptions. + * + * @see javax.jcr.lock.Lock + * @see org.apache.jackrabbit.rmi.client.ClientLock + * @see org.apache.jackrabbit.rmi.server.ServerLock + */ +@Deprecated(forRemoval = true) public interface RemoteLock extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#getNode() Lock.getNode()} method. + * + * @return remote node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @since JCR-RMI 2.0 + */ + RemoteNode getNode() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#getLockOwner() Lock.getLockOwner()} method. + * + * @return lock owner + * @throws RemoteException on RMI errors + */ + String getLockOwner() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#isDeep() Lock.isDeep()} method. + * + * @return true if the lock is deep, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isDeep() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#getLockToken() Lock.getLockToken()} method. + * + * @return lock token + * @throws RemoteException on RMI errors + */ + String getLockToken() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#isLive() Lock.isLive()} method. + * + * @return true if the lock is live, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean isLive() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#refresh() Lock.refresh()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void refresh() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#isSessionScoped()} () Lock.isSessionScoped()} method. + * + * @return true if the lock is live, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isSessionScoped() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#getSecondsRemaining()} () Lock.getSecondsRemaining()} method. + * + * @return the number of seconds remaining until this lock times out. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + long getSecondsRemaining() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.lock.Lock#isLockOwningSession()} () Lock.isLockOwningSession()} method. + * + * @return a boolean. + * @throws RemoteException on RMI errors + */ + boolean isLockOwningSession() throws RemoteException; + + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java new file mode 100644 index 00000000000..894fee12f1f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java @@ -0,0 +1,50 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +@Deprecated(forRemoval = true) public interface RemoteLockManager extends Remote { + + String[] getLockTokens() throws RepositoryException, RemoteException; + + void addLockToken(String lockToken) + throws RepositoryException, RemoteException; + + void removeLockToken(String lockToken) + throws RepositoryException, RemoteException; + + RemoteLock getLock(String absPath) + throws RepositoryException, RemoteException; + + boolean holdsLock(String absPath) + throws RepositoryException, RemoteException; + + boolean isLocked(String absPath) + throws RepositoryException, RemoteException; + + RemoteLock lock( + String absPath, boolean isDeep, boolean isSessionScoped, + long timeoutHint, String ownerInfo) + throws RepositoryException, RemoteException; + + void unlock(String absPath) throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java new file mode 100644 index 00000000000..a241f0cc1ac --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java @@ -0,0 +1,118 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR + * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry ServerNamespaceRegistry} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry ClientNamespaceRegistry} + * adapters to provide transparent RMI access to remote namespace registries. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding NamespaceRegistry method. The remote object will + * simply forward the method call to the underlying NamespaceRegistry instance. + * Argument and return values, as well as possible exceptions, are copied + * over the network. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.NamespaceRegistry + * @see org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry + * @see org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry + */ +@Deprecated(forRemoval = true) public interface RemoteNamespaceRegistry extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#registerNamespace(String,String) NamespaceRegistry.registerNamespace(String,String)} + * method. + * + * @param prefix namespace prefix + * @param uri namespace uri + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void registerNamespace(String prefix, String uri) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#unregisterNamespace(String) NamespaceRegistry.unregisterNamespace(String)} + * method. + * + * @param prefix namespace prefix + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void unregisterNamespace(String prefix) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#getPrefixes() NamespaceRegistry.getPrefixes()} + * method. + * + * @return namespace prefixes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getPrefixes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#getURIs() NamespaceRegistry,getURIs()} + * method. + * + * @return namespace uris + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getURIs() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#getURI(String) NamespaceRegistry.getURI(String)} + * method. + * + * @param prefix namespace prefix + * @return namespace uri + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getURI(String prefix) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.NamespaceRegistry#getPrefix(String) NamespaceRegistry.getPrefix(String)} + * method. + * + * @param uri namespace uri + * @return namespace prefix + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getPrefix(String uri) throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java new file mode 100644 index 00000000000..886cfe2bd41 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java @@ -0,0 +1,745 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Node Node} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} + * and {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} + * adapters to provide transparent RMI access to remote nodes. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding Node method. The remote object will simply forward + * the method call to the underlying Node instance. Argument and return + * values, as well as possible exceptions, are copied over the network. + * Complex return values (like Nodes and Properties) are returned as remote + * references to the corresponding remote interfaces. Iterator values + * are transmitted as object arrays. RMI errors are signaled with + * RemoteExceptions. + *

    + * Note that only two generic setProperty methods are included in this + * interface. Clients should implement the type-specific setProperty + * methods by wrapping the argument values into generic Value objects + * and calling the generic setProperty methods. Note also that the + * Value objects must be serializable and implemented using classes + * available on both the client and server side. The + * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} + * class provides two convenience methods to satisfy these requirements. + * + * @see javax.jcr.Node + * @see org.apache.jackrabbit.rmi.client.ClientNode + * @see org.apache.jackrabbit.rmi.server.ServerNode + */ +@Deprecated(forRemoval = true) public interface RemoteNode extends RemoteItem { + + /** + * Remote version of the + * {@link javax.jcr.Node#addNode(String) Node.addNode(Sring)} method. + * + * @param path relative path + * @return new node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode addNode(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#addNode(String,String) Node.addNode(String,String)} + * method. + * + * @param path relative path + * @param type node type name + * @return new node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode addNode(String path, String type) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getProperty(String) Node.getProperty(String)} + * method. + * + * @param path relative path + * @return node property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty getProperty(String path) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getProperties() Node.getProperties()} method. + * + * @return node properties + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getProperties() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getProperties(String) Node.getProperties(String)} + * method. + * + * @param pattern property name pattern + * @return matching node properties + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getProperties(String pattern) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getProperties(String[]) Node.getProperties(String[])} + * method. + * + * @param globs property name globs + * @return matching node properties + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getProperties(String[] globs) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getPrimaryItem() Node.getPrimaryItem()} method. + * + * @return primary item + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteItem getPrimaryItem() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getIdentifier() Node.getIdentifier()} method. + * + * @return node identifier + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getIdentifier() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getUUID() Node.getUUID()} method. + * + * @return node uuid + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getUUID() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getReferences() Node.getReferences()} method. + * + * @return reference properties + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getReferences() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getReferences(String) Node.getReferences(String)} method. + * + * @param name reference property name + * @return reference properties + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getReferences(String name) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getNodes() Node.getNodes()} method. + * + * @return child nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getNodes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getNodes(String) Node.getNodes(String)} method. + * + * @param pattern node name pattern + * @return matching child nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getNodes(String pattern) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getNodes(String[]) Node.getNodes(String[])} method. + * + * @param globs node name globs + * @return matching child nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getNodes(String[] globs) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#hasNode(String) Node.hasNode(String)} method. + * + * @param path relative path + * @return true if the identified node exists, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasNode(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#hasProperty(String) Node.hasProperty()} method. + * + * @param path relative path + * @return true if the identified property exists, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasProperty(String path) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#hasNodes() Node.hasNodes()} method. + * + * @return true if this node has child nodes, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasNodes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#hasProperties() Node.hasProperties()} method. + * + * @return true if this node has properties, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasProperties() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getPrimaryNodeType() Node.getPrimaryNodeType()} + * method. + * + * @return primary node type + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNodeType getPrimaryNodeType() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getMixinNodeTypes() Node.getMixinNodeTypes()} + * method. + * + * @return mixin node types + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNodeType[] getMixinNodeTypes() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#isNodeType(String) Node.isNodeType(String)} method. + * + * @param type node type name + * @return true if this node is an instance of the + * identified type, false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean isNodeType(String type) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getNode(String) Node.getNode(String)} method. + * + * @param path relative path + * @return node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNode(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#orderBefore(String,String) Node.orderBefore(String,String)} + * method. + * + * @param src source path + * @param dst destination path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void orderBefore(String src, String dst) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#setProperty(String,Value) Node.setProperty(String,Value)} + * method. + * + * @param name property name + * @param value property value + * @return property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty setProperty(String name, Value value) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#setProperty(String,Value,int) Node.setProperty(String,Value)} + * method. + * + * @param name property name + * @param value property value + * @param type property type + * @return property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty setProperty(String name, Value value, int type) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#setProperty(String,Value[]) Node.setProperty(String,Value[])} + * method. + * + * @param name property name + * @param values property values + * @return property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty setProperty(String name, Value[] values) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#addMixin(String) Node.addMixin(String)} method. + * + * @param name mixin type name + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void addMixin(String name) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#removeMixin(String) Node.removeMixin(String)} + * method. + * + * @param name mixin type name + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void removeMixin(String name) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#canAddMixin(String) Node.canAddMixin(String)} + * method. + * + * @param name mixin type name + * @return true if the mixin type can be added, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean canAddMixin(String name) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getDefinition() Node.getDefinition()} method. + * + * @return node definition + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNodeDefinition getDefinition() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#checkin() Node.checkin()} method. + * + * @return checked in version + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion checkin() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#checkout() Node.checkout()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void checkout() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#update(String) Node.update(String)} method. + * + * @param workspace source workspace name + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void update(String workspace) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#merge(String,boolean) Node.merge(String,boolean)} + * method. + * + * @param workspace source workspace name + * @param bestEffort best effort flag + * @return nodes that failed to merge + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator merge(String workspace, boolean bestEffort) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#cancelMerge(javax.jcr.version.Version) Node.cancelMerge(Version)} + * method. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void cancelMerge(String versionUUID) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#doneMerge(javax.jcr.version.Version) Node.doneMerge(Version)} + * method. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void doneMerge(String versionUUID) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getCorrespondingNodePath(String) Node.getCorrespondingNodePath(String)} + * method. + * + * @param workspace workspace name + * @return corresponding node path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getCorrespondingNodePath(String workspace) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getIndex() Node.getIndex()} method. + * + * @return node index + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + int getIndex() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#restore(String,boolean) Node.restore(String,boolean)} + * method. + * + * @param version version name + * @param removeExisting flag to remove conflicting nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void restore(String version, boolean removeExisting) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#restore(javax.jcr.version.Version, boolean) Node.restore(Version,boolean)} + * method. + *

    + * This method has been rename to prevent a naming clash with + * {@link #restore(String, boolean)}. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @param removeExisting flag to remove conflicting nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void restoreByUUID(String versionUUID, boolean removeExisting) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#restore(javax.jcr.version.Version, String, boolean) Node.restore(Version,String,boolean)} + * method. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @param path the path to which the version is to be restored + * @param removeExisting flag to remove conflicting nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void restore(String versionUUID, String path, boolean removeExisting) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#restoreByLabel(String,boolean) Node.restoreByLabel(String,boolean)} + * method. + * + * @param label version label + * @param removeExisting flag to remove conflicting nodes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void restoreByLabel(String label, boolean removeExisting) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#unlock() Node.unlock()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void unlock() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#holdsLock() Node.holdsLock()} method. + * + * @return true if this node holds a lock, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean holdsLock() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#isLocked() Node.isLocked()} method. + * + * @return true if this node is locked, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean isLocked() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#isCheckedOut() Node.isCheckedOut()} method. + * + * @return true if this node is checked out, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean isCheckedOut() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getVersionHistory() Node.getVersionHistory()} method. + * + * @return the remote version history. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersionHistory getVersionHistory() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getBaseVersion() Node.getBaseVersion()} method. + * + * @return the remote base version + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion getBaseVersion() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#setProperty(String,Value[],int) Node.setProperty(String,Value[],int)} + * method. + * + * @param name property name + * @param values property values + * @param type property type + * @return property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty setProperty(String name, Value[] values, int type) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#lock(boolean,boolean) Node.lock(boolean,boolean)} + * method. + * + * @param isDeep flag to create a deep lock + * @param isSessionScoped flag to create a session-scoped lock + * @return lock + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteLock lock(boolean isDeep, boolean isSessionScoped) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getLock() Node.getLock()} method. + * + * @return lock + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteLock getLock() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getSharedSet() Node.getSharedSet()} method. + * + * @return a NodeIterator. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getSharedSet() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#followLifecycleTransition(String) Node.followLifecycleTransition(String)} + * method. + * + * @param transition a state transition + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void followLifecycleTransition(String transition) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getAllowedLifecycleTransistions() Node.getAllowedLifecycleTransistions()} + * method. + * + * @return a String array. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getAllowedLifecycleTransistions() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getWeakReferences() Node.getWeakReferences()} + * method. + * + * @return A PropertyIterator. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getWeakReferences() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#getWeakReferences(String) Node.getWeakReferences(String)} + * method. + * + * @param name name of referring WEAKREFERENCE properties to be + * returned; if null then all referring + * WEAKREFERENCEs are returned. + * @return A PropertyIterator. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getWeakReferences(String name) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#removeShare() Node.removeShare()} + * method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void removeShare() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#removeSharedSet() Node.removeSharedSet()} + * method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void removeSharedSet() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Node#setPrimaryType(String) Node.setPrimaryType(String)} + * method. + * + * @param nodeTypeName the node type name + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void setPrimaryType(String nodeTypeName) throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java new file mode 100644 index 00000000000..49c9ce9497a --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java @@ -0,0 +1,96 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} and + * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} + * adapters to provide transparent RMI access to remote node definitions. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding NodeDef method. The remote object will simply forward + * the method call to the underlying NodeDef instance. Return values + * and possible exceptions are copied over the network. Complex + * {@link javax.jcr.nodetype.NodeType NodeType} return values + * are returned as remote references to the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} + * interface. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.nodetype.NodeDefinition + * @see org.apache.jackrabbit.rmi.client.ClientNodeDefinition + * @see org.apache.jackrabbit.rmi.server.ServerNodeDefinition + */ +@Deprecated(forRemoval = true) public interface RemoteNodeDefinition extends RemoteItemDefinition { + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypes() NodeDef.getRequiredPrimaryTypes()} + * method. + * + * @return required primary node types + * @throws RemoteException on RMI errors + */ + RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryType() NodeDef.getDefaultPrimaryType()} + * method. + * + * @return default primary node type + * @throws RemoteException on RMI errors + */ + RemoteNodeType getDefaultPrimaryType() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeDefinition#allowsSameNameSiblings() NodeDef.allowSameNameSibs()} + * method. + * + * @return true if same name siblings are allowed, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean allowsSameNameSiblings() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryTypeName() NodeDef.getDefaultPrimaryTypeName()} + * method. + * + * @return a String + * @throws RemoteException on RMI errors + */ + String getDefaultPrimaryTypeName() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypeNames() NodeDef.getRequiredPrimaryTypeNames()} + * method. + * + * @return a String array + * @throws RemoteException on RMI errors + */ + String[] getRequiredPrimaryTypeNames() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java new file mode 100644 index 00000000000..08240e1e494 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java @@ -0,0 +1,292 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.nodetype.NodeType NodeType} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerNodeType ServerNodeType} and + * {@link org.apache.jackrabbit.rmi.client.ClientNodeType ClientNodeType} + * adapters to provide transparent RMI access to remote node types. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding NodeType method. The remote object will simply forward + * the method call to the underlying NodeType instance. Return values + * and possible exceptions are copied over the network. Complex return + * values (like NodeTypes and PropertyDefs) are returned as remote + * references to the corresponding remote interfaces. RMI errors are + * signaled with RemoteExceptions. + * + * @see javax.jcr.nodetype.NodeType + * @see org.apache.jackrabbit.rmi.client.ClientNodeType + * @see org.apache.jackrabbit.rmi.server.ServerNodeType + */ +@Deprecated(forRemoval = true) public interface RemoteNodeType extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getName() NodeType.getName()} method. + * + * @return node type name + * @throws RemoteException on RMI errors + */ + String getName() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#isMixin() NodeType.isMixin()} method. + * + * @return true if this is a mixin type, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isMixin() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#isAbstract() NodeType.isAbstract()} method. + * + * @return true if this is an abstract type, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isAbstract() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#hasOrderableChildNodes() NodeType.hasOrderableChildNodes()} + * method. + * + * @return true if nodes of this type has orderable + * child nodes, false otherwise + * @throws RemoteException on RMI errors + */ + boolean hasOrderableChildNodes() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getSupertypes() NodeType.getSupertypes()} + * method. + * + * @return supertypes + * @throws RemoteException on RMI errors + */ + RemoteNodeType[] getSupertypes() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypes() NodeType.getDeclaredSupertypes()} + * method. + * + * @return declared supertypes + * @throws RemoteException on RMI errors + */ + RemoteNodeType[] getDeclaredSupertypes() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#isNodeType(String) NodeType.isNodeType(String)} + * method. + * + * @param type node type name + * @return true if this node type is or extends the + * given node type, false otherwise + * @throws RemoteException on RMI errors + */ + boolean isNodeType(String type) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getPropertyDefinitions() NodeType.getPropertyDefinitions()} + * method. + * + * @return property definitions + * @throws RemoteException on RMI errors + */ + RemotePropertyDefinition[] getPropertyDefs() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getDeclaredPropertyDefinitions() NodeType.getDeclaredPropertyDefinitions()} + * method. + * + * @return declared property definitions + * @throws RemoteException on RMI errors + */ + RemotePropertyDefinition[] getDeclaredPropertyDefs() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getChildNodeDefinitions() NodeType.getChildNodeDefinitions()} + * method. + * + * @return child node definitions + * @throws RemoteException on RMI errors + */ + RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getDeclaredChildNodeDefinitions() NodeType.getDeclaredChildNodeDefinitions()} + * method. + * + * @return declared child node definitions + * @throws RemoteException on RMI errors + */ + RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value) NodeType.canSetProperty(String,Value)} + * method. + * + * @param name property name + * @param value property value + * @return true if the property can be set, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean canSetProperty(String name, Value value) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value[]) NodeType.canSetProperty(String,Value[])} + * method. + * + * @param name property name + * @param values property values + * @return true if the property can be set, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean canSetProperty(String name, Value[] values) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String) NodeType.canAddChildNode(String)} + * method. + * + * @param name child node name + * @return true if the child node can be added, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean canAddChildNode(String name) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String,String) NodeType.canAddChildNode(String,String)} + * method. + * + * @param name child node name + * @param type child node type + * @return true if the child node can be added, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean canAddChildNode(String name, String type) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canRemoveItem(String) NodeType.canRemoveItem(String)} + * method. + * + * @param name item name + * @return true if the item can be removed, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean canRemoveItem(String name) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getPrimaryItemName() NodeType.getPrimaryItemName()} + * method. + * + * @return primary item name + * @throws RemoteException on RMI errors + */ + String getPrimaryItemName() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canRemoveNode(String) NodeType.canRemoveNode()} + * method. + * + * @return boolean + * @throws RemoteException on RMI errors + */ + boolean canRemoveNode(String nodeName) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#canRemoveProperty(String) NodeType.canRemoveProperty()} + * method. + * + * @return boolean + * @throws RemoteException on RMI errors + */ + boolean canRemoveProperty(String propertyName) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypeNames() NodeType.getDeclaredSupertypeNames()} + * method. + * + * @return a String[] + * @throws RemoteException on RMI errors + */ + String[] getDeclaredSupertypeNames() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#isQueryable() NodeType.isQueryable()} + * method. + * + * @return boolean + * @throws RemoteException on RMI errors + */ + boolean isQueryable() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getDeclaredSubtypes() NodeType.getDeclaredSubtypes()} + * method. + * + * @return RemoteIterator + * @throws RemoteException on RMI errors + */ + RemoteIterator getDeclaredSubtypes() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeType#getSubtypes() NodeType.getSubtypes()} + * method. + * + * @return RemoteIterator + * @throws RemoteException on RMI errors + */ + RemoteIterator getSubtypes() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java new file mode 100644 index 00000000000..ba74f0981e3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java @@ -0,0 +1,106 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR + * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerNodeTypeManager ServerNodeTypeManager} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientNodeTypeManager ClientNodeTypeManager} + * adapters to provide transparent RMI access to remote node type managers. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding NodeTypeManager method. The remote object will + * simply forward the method call to the underlying NodeTypeManager instance. + * Arguments and possible exceptions are copied over the network. Complex + * {@link javax.jcr.nodetype.NodeType NodeType} values are returned as + * remote references to the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} + * interface. Iterator values are transmitted as object arrays. RMI errors + * are signaled with RemoteExceptions. + * + * @see javax.jcr.nodetype.NodeTypeManager + * @see org.apache.jackrabbit.rmi.client.ClientNodeTypeManager + * @see org.apache.jackrabbit.rmi.server.ServerNodeTypeManager + */ +@Deprecated(forRemoval = true) public interface RemoteNodeTypeManager extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeTypeManager#getNodeType(String) NodeTypeManager.getNodeType(String)} + * method. + * + * @param name node type name + * @return node type + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNodeType getNodeType(String name) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes() NodeTypeManager.getAllNodeTypes()} + * method. + * + * @return all node types + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getAllNodeTypes() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes() NodeTypeManager.getPrimaryNodeTypes()} + * method. + * + * @return primary node types + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getPrimaryNodeTypes() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes() NodeTypeManager.getMixinNodeTypes()} + * method. + * + * @return mixin node types + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getMixinNodeTypes() + throws RepositoryException, RemoteException; + + boolean hasNodeType(String name) + throws RepositoryException, RemoteException; + + void unregisterNodeTypes(String[] names) + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java new file mode 100644 index 00000000000..3bab8ecdb67 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java @@ -0,0 +1,106 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.observation.ObservationManager ObservationManager} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerObservationManager ServerObservationManager} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager ClientObservationManager} + * adapter base classes to provide transparent RMI access to remote observation + * managers. + *

    + * See the observation + * package comment for a description on how event listener registration and + * notification is implemented. + * + * @see javax.jcr.observation.ObservationManager + * @see org.apache.jackrabbit.rmi.client.ClientObservationManager + * @see org.apache.jackrabbit.rmi.server.ServerObservationManager + */ +@Deprecated(forRemoval = true) public interface RemoteObservationManager extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.observation.ObservationManager#addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean) ObservationManager.addEventListener()} + * method. See class comment for an explanation on how the + * listenerId is used. + * + * @param listenerId The identification of the listener on the client + * side to which events will be directed. + * @param eventTypes The mask of event types to be sent to this listener. + * @param absPath The root item defining a subtree for which events are to + * be delivered. + * @param isDeep true if the events from the complete subtree + * rooted at absPath are to be sent or only for the item + * at the given path. + * @param uuid An optional list of node UUIDs for which events are to be + * sent. If null this parameter is ignored. + * @param nodeTypeName An optional list of node type names for which events + * are to be sent. If null this parameter is ignored. + * @param noLocal true if only events are to be sent which do + * not originate from the session to which this instance belongs. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void addEventListener(long listenerId, int eventTypes, + String absPath, boolean isDeep, String[] uuid, + String[] nodeTypeName, boolean noLocal) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.observation.ObservationManager#removeEventListener(javax.jcr.observation.EventListener) ObservationManager.removeEventListener()} + * method. See class comment for an explanation on how the + * listenerId is used. + * + * @param listenerId The identification of the listener on the client + * side to which events will be directed. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void removeEventListener(long listenerId) + throws RepositoryException, RemoteException; + + /** + * Returns the next event to be dispatched to registered event listeners. If + * no event is available, this method blocks until one is available or until + * the given timeout expires. + * + * @param timeout The time in milliseconds to wait for the next event + * available to be dispatched. If negative or zero, this method waits + * for ever. + * + * @return The {@link RemoteEventCollection} to be dispatched. null is + * returned if the method timed out waiting for an event to be + * dispatched. + * + * @throws RemoteException on RMI errors + */ + RemoteEventCollection getNextEvent(long timeout) + throws RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java new file mode 100644 index 00000000000..6b61f89a517 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java @@ -0,0 +1,142 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Property Property} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} + * and {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} + * adapters to provide transparent RMI access to remote properties. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding Property method. The remote object will simply forward + * the method call to the underlying Property instance. Argument and return + * values, as well as possible exceptions, are copied over the network. + * Complex {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} return values + * are returned as remote references to the corresponding + * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} + * interface. RMI errors are signaled with RemoteExceptions. + *

    + * Note that only the generic getValue and setValue methods are included + * in this interface. Clients should implement the type-specific value + * getters and setters wrapping using the generic methods. Note also that the + * Value objects must be serializable and implemented using classes + * available on both the client and server side. The + * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} + * class provides two convenience methods to satisfy these requirements. + * + * @see javax.jcr.Property + * @see org.apache.jackrabbit.rmi.client.ClientProperty + * @see org.apache.jackrabbit.rmi.server.ServerProperty + */ +@Deprecated(forRemoval = true) public interface RemoteProperty extends RemoteItem { + + /** + * Remote version of the + * {@link javax.jcr.Property#getValue() Property.getValue()} method. + * + * @return property value + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Value getValue() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#getValues() Property.getValues()} method. + * + * @return property values + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Value[] getValues() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#setValue(Value) Property.setValue(Value)} + * method. + * + * @param value property value + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void setValue(Value value) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#setValue(Value[]) Property.setValue(Value[])} + * method. + * + * @param values property values + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void setValue(Value[] values) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#getLength() Property.getLength()} + * method. + * + * @return value length + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + long getLength() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#getLengths() Property.getLengths()} + * method. + * + * @return value lengths + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + long[] getLengths() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#getDefinition() Property.getDefinition()} + * method. + * + * @return property definition + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemotePropertyDefinition getDefinition() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Property#getType() Property.getType()} method. + * + * @return property type + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + int getType() throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java new file mode 100644 index 00000000000..7c0ffc78fd6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java @@ -0,0 +1,121 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; + +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} + * adapters to provide transparent RMI access to remote property definitions. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding PropertyDef method. The remote object will simply + * forward the method call to the underlying PropertyDef instance. Return + * values and possible exceptions are copied over the network. RMI errors + * are signaled with RemoteExceptions. + *

    + * Note that the returned Value objects must be serializable and implemented + * using classes available on both the client and server side. The + * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} + * class provides two convenience methods to satisfy this requirement. + * + * @see javax.jcr.nodetype.PropertyDefinition + * @see org.apache.jackrabbit.rmi.client.ClientPropertyDefinition + * @see org.apache.jackrabbit.rmi.server.ServerPropertyDefinition + */ +@Deprecated(forRemoval = true) public interface RemotePropertyDefinition extends RemoteItemDefinition { + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#getRequiredType() PropertyDefinition.getRequiredType()} + * method. + * + * @return required type + * @throws RemoteException on RMI errors + */ + int getRequiredType() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#getValueConstraints() PropertyDefinition.getValueConstraints()} + * method. + * + * @return value constraints + * @throws RemoteException on RMI errors + */ + String[] getValueConstraints() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#getDefaultValues() PropertyDefinition.getDefaultValues()} + * method. + * + * @return default values + * @throws RemoteException on RMI errors + */ + Value[] getDefaultValues() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#isMultiple() PropertyDefinition.isMultiple()} + * method. + * + * @return true if the property is multi-valued, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isMultiple() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#getAvailableQueryOperators() PropertyDefinition.getAvailableQueryOperators()} + * method. + * + * @return a String[] + * @throws RemoteException on RMI errors + */ + String[] getAvailableQueryOperators() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#isFullTextSearchable() PropertyDefinition.isFullTextSearchable()} + * method. + * + * @return a boolean + * @throws RemoteException on RMI errors + */ + boolean isFullTextSearchable() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.nodetype.PropertyDefinition#isQueryOrderable() PropertyDefinition.isQueryOrderable()} + * method. + * + * @return a boolean + * @throws RemoteException on RMI errors + */ + boolean isQueryOrderable() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java new file mode 100644 index 00000000000..638700400d3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java @@ -0,0 +1,119 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.query.Query Query} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQuery ServerQuery} + * and {@link org.apache.jackrabbit.rmi.client.ClientQuery ClientQuery} + * adapter base classes to provide transparent RMI access to remote items. + *

    + * RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.query.Query + * @see org.apache.jackrabbit.rmi.client.ClientQuery + * @see org.apache.jackrabbit.rmi.server.ServerQuery + */ +@Deprecated(forRemoval = true) public interface RemoteQuery extends Remote { + + /** + * @see javax.jcr.query.Query#execute() + * + * @return a QueryResult + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteQueryResult execute() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Query#setLimit(long) + * + * @param limit a long + * @throws RemoteException on RMI errors + */ + void setLimit(long limit) throws RemoteException; + + /** + * @see javax.jcr.query.Query#setOffset(long) + * + * @param offset a long + * @throws RemoteException on RMI errors + */ + void setOffset(long offset) throws RemoteException; + + /** + * @see javax.jcr.query.Query#getStatement() + * + * @return the query statement. + * @throws RemoteException on RMI errors + */ + String getStatement() throws RemoteException; + + /** + * @see javax.jcr.query.Query#getLanguage() + * + * @return the query language. + * @throws RemoteException on RMI errors + */ + String getLanguage() throws RemoteException; + + /** + * @see javax.jcr.query.Query#getStoredQueryPath() + * + * @return path of the node representing this query. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getStoredQueryPath() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Query#storeAsNode(String) + * + * @param absPath path at which to persist this query. + * @return stored node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode storeAsNode(String absPath) throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Query#bindValue(String, Value) + * + * @param varName name of variable in query + * @param value value to bind + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void bindValue(String varName, Value value) throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Query#getBindVariableNames() + * + * @return the names of the bind variables in this query. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + public String[] getBindVariableNames() throws RepositoryException, RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java new file mode 100644 index 00000000000..fd4e25fdaff --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java @@ -0,0 +1,75 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.query.Query; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.query.QueryManager QueryManager} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryManager ServerQueryManager} + * and {@link org.apache.jackrabbit.rmi.client.ClientQueryManager ClientQueryManager} + * adapter base classes to provide transparent RMI access to remote items. + *

    + * RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.query.QueryManager + * @see org.apache.jackrabbit.rmi.client.ClientQueryManager + * @see org.apache.jackrabbit.rmi.server.ServerQueryManager + */ +@Deprecated(forRemoval = true) public interface RemoteQueryManager extends Remote { + + /** + * @see javax.jcr.query.QueryManager#createQuery + * + * @param statement query statement + * @param language query language + * @return query + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteQuery createQuery(String statement, String language) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.QueryManager#getQuery + * + * @param absPath node path of a persisted query (that is, a node of type nt:query). + * @return a Query object. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteQuery getQuery(String absPath) + throws RepositoryException, RemoteException; + + /** + * See {@link Query}. + * + * @see javax.jcr.query.QueryManager#getSupportedQueryLanguages + * @return An string array. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getSupportedQueryLanguages() + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java new file mode 100644 index 00000000000..84bff566655 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java @@ -0,0 +1,74 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryResult ServerQueryResult} + * and {@link org.apache.jackrabbit.rmi.client.ClientQueryResult ClientQueryResult} + * adapter base classes to provide transparent RMI access to remote items. + *

    + * RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.query.QueryResult + * @see org.apache.jackrabbit.rmi.client.ClientQueryResult + * @see org.apache.jackrabbit.rmi.server.ServerQueryResult + */ +@Deprecated(forRemoval = true) public interface RemoteQueryResult extends Remote { + /** + * @see javax.jcr.query.QueryResult#getColumnNames() + * + * @return a PropertyIterator + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getColumnNames() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.QueryResult#getRows() + * + * @return a RowIterator + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getRows() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.QueryResult#getNodes() + * + * @return a remote node iterator + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteIterator getNodes() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.QueryResult#getSelectorNames() + * + * @return a String array holding the selector names. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + public String[] getSelectorNames() throws RepositoryException, RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java new file mode 100644 index 00000000000..f1189b628ea --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java @@ -0,0 +1,161 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.Credentials; +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Repository Repository} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerRepository ServerRepository} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientRepository ClientRepository} + * adapters to provide transparent RMI access to remote repositories. +*

    + * The methods in this interface are documented only with a reference + * to a corresponding Repository method. The remote object will simply + * forward the method call to the underlying Repository instance. + * {@link javax.jcr.Session Session} objects are returned as remote references + * to the {@link RemoteSession RemoteSession} interface. Simple return + * values and possible exceptions are copied over the network to the client. + * RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.Repository + * @see org.apache.jackrabbit.rmi.client.ClientRepository + * @see org.apache.jackrabbit.rmi.server.ServerRepository + */ +@Deprecated(forRemoval = true) public interface RemoteRepository extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.Repository#getDescriptor(String) Repository.getDescriptor(String)} + * method. + * + * @param key descriptor key + * @return descriptor value + * @throws RemoteException on RMI errors + */ + String getDescriptor(String key) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#getDescriptorKeys() Repository.getDescriptorKeys()} + * method. + * + * @return descriptor keys + * @throws RemoteException on RMI errors + */ + String[] getDescriptorKeys() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#login() Repository.login(}} method. + * + * @return remote session + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteSession login() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#login(String) Repository.login(String}} + * method. + * + * @param workspace workspace name + * @return remote session + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteSession login(String workspace) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#login(Credentials) Repository.login(Credentials}} + * method. + * + * @param credentials client credentials + * @return remote session + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteSession login(Credentials credentials) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#login(Credentials,String) Repository.login(Credentials,String}} + * method. + * + * @param credentials client credentials + * @param workspace workspace name + * @return remote session + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteSession login(Credentials credentials, String workspace) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#getDescriptorValue(String) Repository.getDescriptorValue(String)} + * method. + * + * @return descriptor value + * @throws RemoteException on RMI errors + */ + Value getDescriptorValue(String key) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#getDescriptorValues(String) Repository.getDescriptorValues(String)} + * method. + * + * @return descriptor value array + * @throws RemoteException on RMI errors + */ + Value[] getDescriptorValues(String key) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#isSingleValueDescriptor(String) Repository.isSingleValueDescriptor(String)} + * method. + * + * @return boolean + * @throws RemoteException on RMI errors + */ + boolean isSingleValueDescriptor(String key) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Repository#isStandardDescriptor(String) Repository.isStandardDescriptor(String)} + * method. + * + * @return boolean + * @throws RemoteException on RMI errors + */ + boolean isStandardDescriptor(String key) throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java new file mode 100644 index 00000000000..ae9419b54a3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.query.Row Row} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerRow ServerRow} + * and {@link org.apache.jackrabbit.rmi.client.ClientRow ClientRow} + * adapter base classes to provide transparent RMI access to remote items. + *

    + * RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.query.Row + * @see org.apache.jackrabbit.rmi.client.ClientRow + * @see org.apache.jackrabbit.rmi.server.ServerRow + */ +@Deprecated(forRemoval = true) public interface RemoteRow extends Remote { + + /** + * @see javax.jcr.query.Row#getValues() + * + * @return row values + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Value[] getValues() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getValue(String) + * + * @param propertyName property name + * @return identified value + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Value getValue(String propertyName) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getNode() + * + * @return a node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNode() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getNode(String) + * + * @param selectorName + * @return a node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNode(String selectorName) throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getPath() + * + * @return the path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getPath() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getPath(String) + * + * @param selectorName + * @return the path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getPath(String selectorName) throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getScore() + * + * @return the score + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + double getScore() throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.query.Row#getScore(String) + * + * @param selectorName + * @return the score + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + double getScore(String selectorName) throws RepositoryException, RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java new file mode 100644 index 00000000000..6ac8f47908d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java @@ -0,0 +1,464 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.io.IOException; +import java.rmi.Remote; +import java.rmi.RemoteException; +import javax.jcr.Credentials; +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; + +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Session Session} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerSession ServerSession} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientSession ClientSession} + * adapters to provide transparent RMI access to remote sessions. + *

    + * Most of the methods in this interface are documented only with a reference + * to a corresponding Session method. In these cases the remote object + * will simply forward the method call to the underlying Session instance. + * Complex return values like workspaces and other objects are returned + * as remote references to the corresponding remote interface. Simple + * return values and possible exceptions are simply copied over the network + * to the client. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.Session + * @see org.apache.jackrabbit.rmi.client.ClientSession + * @see org.apache.jackrabbit.rmi.server.ServerSession + */ +@Deprecated(forRemoval = true) public interface RemoteSession extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.Session#getUserID() Session.getUserID()} method. + * + * @return user id + * @throws RemoteException on RMI errors + * @see javax.jcr.Session#getUserID() + */ + String getUserID() throws RemoteException; + + /** + * Returns the named attribute. Note that only serializable + * attribute values can be transmitted over the network and that + * the client should have (or be able to fetch) the object class + * to access the returned value. Failures to meet these conditions + * are signalled with RemoteExceptions. + * + * @param name attribute name + * @return attribute value + * @throws RemoteException on RMI errors + * @see javax.jcr.Session#getAttribute(java.lang.String) + */ + Object getAttribute(String name) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getAttributeNames() Session.getAttributeNames()} + * method. + * + * @return attribute names + * @throws RemoteException on RMI errors + */ + String[] getAttributeNames() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getWorkspace() Session.getWorkspace()} method. + * + * @return workspace + * @see javax.jcr.Session#getWorkspace() + * @throws RemoteException on RMI errors + */ + RemoteWorkspace getWorkspace() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#impersonate(Credentials) Session.impersonate(Credentials)} + * method. + * + * @param credentials credentials for the new session + * @return new session + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteSession impersonate(Credentials credentials) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNodeByIdentifier(String) Session.getNodeByIdentifier(String)} + * method. + * + * @param id node identifier + * @return node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNodeByIdentifier(String id) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNodeByUUID(String) Session.getNodeByUUID(String)} + * method. + * + * @param uuid node uuid + * @return node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNodeByUUID(String uuid) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getItem(String) Session.getItem(String)} + * method. + * + * @param path item path + * @return item + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteItem getItem(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNode(String) Session.getNode(String)} + * method. + * + * @param path node path + * @return node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getNode(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getProperty(String) Session.getProperty(String)} + * method. + * + * @param path property path + * @return property + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteProperty getProperty(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#itemExists(String) Session.itemExists(String)} + * method. + * + * @param path item path + * @return true if the item exists, + * false otherwise + * @throws RepositoryException on repository exception + * @throws RemoteException on RMI errors + */ + boolean itemExists(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#nodeExists(String) Session.nodeExists(String)} + * method. + * + * @param path node path + * @return true if the node exists, + * false otherwise + * @throws RepositoryException on repository exception + * @throws RemoteException on RMI errors + */ + boolean nodeExists(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#propertyExists(String) Session.propertyExists(String)} + * method. + * + * @param path property path + * @return true if the property exists, + * false otherwise + * @throws RepositoryException on repository exception + * @throws RemoteException on RMI errors + */ + boolean propertyExists(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#removeItem(String) Session.removeItem(String)} + * method. + * + * @param path item path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void removeItem(String path) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#move(String,String) Session.move(String,String)} + * method. + * + * @param from source path + * @param to destination path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void move(String from, String to) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#save() Session.save()} method. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void save() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#refresh(boolean) Session.refresh(boolean)} + * method. + * + * @param keepChanges flag to keep transient changes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void refresh(boolean keepChanges) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#logout() Session.logout()} + * method. + * + * @throws RemoteException on RMI errors + */ + void logout() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#isLive() Session.isLive()} + * method. + * + * @return true if the session is live, + * false otherwise + * @throws RemoteException on RMI errors + */ + boolean isLive() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getRootNode() Session.getRootNode()} method. + * + * @return root node + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getRootNode() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#hasPendingChanges() Session.hasPendingChanges()} + * method. + * + * @return true if the session has pending changes, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasPendingChanges() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#hasPermission(String,String) Session.hasPermission(String,String)} + * method. + * + * @param path item path + * @param actions actions + * @return true if permission is granted, + * false otherwise + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasPermission(String path, String actions) + throws RepositoryException, RemoteException; + + /** + * Imports the system or document view XML data into a subtree of + * the identified node. Note that the entire XML stream is transferred + * as a single byte array over the network. This may cause problems with + * large XML streams. The remote server will wrap the XML data into + * a {@link java.io.ByteArrayInputStream ByteArrayInputStream} and feed + * it to the normal importXML method. + * + * @param path node path + * @param xml imported XML document + * @param uuidBehaviour UUID handling mode + * @throws IOException on IO errors + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @see javax.jcr.Session#importXML(java.lang.String, java.io.InputStream, int) + */ + void importXML(String path, byte[] xml, int uuidBehaviour) + throws IOException, RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#setNamespacePrefix(String,String) Session.setNamespacePrefix(String,String)} + * method. + * + * @param prefix namespace prefix + * @param uri namespace uri + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void setNamespacePrefix(String prefix, String uri) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNamespacePrefixes() Session.getNamespacePrefixes()} + * method. + * + * @return namespace prefixes + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getNamespacePrefixes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNamespaceURI(String) Session.getNamespaceURI(String)} + * method. + * + * @param prefix namespace prefix + * @return namespace uri + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getNamespaceURI(String prefix) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getNamespacePrefix(String) Session.getNamespacePrefix(String)} + * method. + * + * @param uri namespace uri + * @return namespace prefix + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String getNamespacePrefix(String uri) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#addLockToken(String) Session.addLockToken(String)} + * method. + * + * @param name lock token + * @throws RemoteException on RMI errors + */ + void addLockToken(String name) throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#getLockTokens() Session.getLockTokens()} + * method. + * + * @return lock tokens + * @throws RemoteException on RMI errors + */ + String[] getLockTokens() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Session#removeLockToken(String) Session.removeLockToken(String)} + * method. + * + * @param name lock token + * @throws RemoteException on RMI errors + */ + void removeLockToken(String name) throws RemoteException; + + /** + * Exports the identified repository subtree as a system view XML + * stream. Note that the entire XML stream is transferred as a + * single byte array over the network. This may cause problems with + * large exports. The remote server uses a + * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture + * the XML data written by the normal exportSysView method. + * + * @param path node path + * @param skipBinary binary skip flag + * @param noRecurse no recursion flag + * @return exported XML document + * @throws IOException on IO errors + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @see javax.jcr.Session#exportSystemView + */ + byte[] exportSystemView(String path, boolean skipBinary, boolean noRecurse) + throws IOException, RepositoryException, RemoteException; + + /** + * Exports the identified repository subtree as a document view XML + * stream. Note that the entire XML stream is transferred as a + * single byte array over the network. This may cause problems with + * large exports. The remote server uses a + * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture + * the XML data written by the normal exportDocView method. + * + * @param path node path + * @param skipBinary skip binary flag + * @param noRecurse no recursion flag + * @return exported XML document + * @throws IOException on IO errors + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @see javax.jcr.Session#exportDocumentView + */ + byte[] exportDocumentView(String path, boolean skipBinary, boolean noRecurse) + throws IOException, RepositoryException, RemoteException; + + /** + * Remote version of the {@link javax.jcr.Session#getAccessControlManager() + * Session.getAccessControlManager()} method. + * + * @throws UnsupportedRepositoryOperationException if the remote session + * does not support this method + * @throws RepositoryException if an error occurred getting the access + * control manager + * @throws RemoteException on RMI errors + */ + RemoteAccessControlManager getAccessControlManager() + throws UnsupportedRepositoryOperationException, + RepositoryException, RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java new file mode 100644 index 00000000000..b0ccc6eb11b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java @@ -0,0 +1,121 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; +import java.util.Calendar; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.version.Version Version} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.ServerVersion ServerVersion} + * and {@link org.apache.jackrabbit.rmi.client.ClientVersion ClientVersion} + * adapters to provide transparent RMI access to remote versions. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding Version method. The remote object will simply forward + * the method call to the underlying Version instance. Argument and return + * values, as well as possible exceptions, are copied over the network. + * Complex return values (like Versions) are returned as remote + * references to the corresponding remote interfaces. Iterator values + * are transmitted as object arrays. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.version.Version + * @see org.apache.jackrabbit.rmi.client.ClientVersion + * @see org.apache.jackrabbit.rmi.server.ServerVersion + */ +@Deprecated(forRemoval = true) public interface RemoteVersion extends RemoteNode { + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getContainingHistory() Version.getContainingHistory()} method. + * + * @return a RemoteVersionHistory object. + * + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getCreated() Version.getCreated()} method. + * + * @return a Calendar object. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + Calendar getCreated() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getLinearSuccessor() Version.getLinearSuccessor()} method. + * + * @return a RemoteVersion or null if no linear + * successor exists. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @see RemoteVersionHistory#getAllLinearVersions + */ + RemoteVersion getLinearSuccessor() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getSuccessors() Version.getSuccessors()} method. + * + * @return a RemoteVersion array. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getLinearPredecessor() Version.getLinearPredecessor()} method. + * + * @return a RemoteVersion or null if no linear + * predecessor exists. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + * @see RemoteVersionHistory#getAllLinearVersions + */ + RemoteVersion getLinearPredecessor() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getPredecessors() Version.getPredecessors()} method. + * + * @return a RemoteVersion array. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.Version#getFrozenNode() Version.getFrozenNode()} method. + * + * @return a RemoteNode object. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNode getFrozenNode() throws RepositoryException, RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java new file mode 100644 index 00000000000..21ee15fd0db --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java @@ -0,0 +1,246 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JC + * {@link javax.jcr.version.VersionHistory VersionHistory} interface. Used by + * the + * {@link org.apache.jackrabbit.rmi.server.ServerVersionHistory ServerVersionHistory} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientVersionHistory ClientVersionHistory} + * adapters to provide transparent RMI access to remote version histories. + *

    + * The methods in this interface are documented only with a reference + * to a corresponding VersionHistory method. The remote object will simply + * forward the method call to the underlying VersionHistory instance. Argument + * and return values, as well as possible exceptions, are copied over the + * network. Complex return values (like Versions) are returned as remote + * references to the corresponding remote interfaces. Iterator values + * are transmitted as object arrays. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.version.Version + * @see org.apache.jackrabbit.rmi.client.ClientVersionHistory + * @see org.apache.jackrabbit.rmi.server.ServerVersionHistory + */ +@Deprecated(forRemoval = true) public interface RemoteVersionHistory extends RemoteNode { + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersionableUUID()} VersionHistory.getVersionableUUID()} + * method. + * + * @return the uuid of the versionable node + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be + * used instead. + */ + String getVersionableUUID() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersionableIdentifier()} VersionHistory.getVersionableIdentifier()} + * method. + * + * @return the identifier of the versionable node + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + String getVersionableIdentifier() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getRootVersion() VersionHistory.getRootVersion()} + * method. + * + * @return a Version object. + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteVersion getRootVersion() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getAllLinearVersions() VersionHistory.getAllLinearVersions()} + * method. + * + * @return linear remote versions + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteIterator getAllLinearVersions() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getAllVersions() VersionHistory.getAllVersions()} + * method. + * + * @return remote versions + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteIterator getAllVersions() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getAllLinearFrozenNodes() VersionHistory.getAllLinearFrozenNodes()} + * method. + * + * @return linear remote frozen nodes + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getAllFrozenNodes() VersionHistory.getAllFrozenNodes()} + * method. + * + * @return remote frozen nodes + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteIterator getAllFrozenNodes() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersion(String) VersionHistory.getVersion(String)} + * method. + * + * @param versionName a version name + * @return a Version object. + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteVersion getVersion(String versionName) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersionByLabel(String) VersionHistory.getVersionByLabel(String)} + * method. + * + * @param label a version label + * @return a Version object. + * @throws RepositoryException if an error occurs. + * @throws RemoteException on RMI errors + */ + RemoteVersion getVersionByLabel(String label) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#addVersionLabel(String, String, boolean) + * VersionHistory.addVersionLabel(String, String, boolean)} + * method. + * + * @param versionName the name of the version to which the label is to be added. + * @param label the label to be added. + * @param moveLabel if true, then if label is already assigned to a version in + * this version history, it is moved to the new version specified; if false, then attempting + * to assign an already used label will throw a VersionException. + * + * @throws RepositoryException if another error occurs. + * @throws RemoteException on RMI errors + */ + void addVersionLabel(String versionName, String label, boolean moveLabel) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#removeVersionLabel(String) VersionHistory.removeVersionLabel(String)} + * method. + * + * @param label a version label + * @throws RepositoryException if another error occurs. + * @throws RemoteException on RMI errors + */ + void removeVersionLabel(String label) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#hasVersionLabel(String) VersionHistory.hasVersionLabel(String)} + * method. + * + * @param label a version label + * @return a boolean + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean hasVersionLabel(String label) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#hasVersionLabel(javax.jcr.version.Version, String) hasVersionLabel(Version, String)} + * method. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @param label a version label + * @return a boolean. + * @throws RepositoryException if another error occurs. + * @throws RemoteException on RMI errors + */ + boolean hasVersionLabel(String versionUUID, String label) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersionLabels() VersionHistory.getVersionLabels()} + * method. + * + * @return a String array containing all the labels of the version history + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getVersionLabels() throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#getVersionLabels(javax.jcr.version.Version) VersionHistory.getVersionLabels(Version)} + * method. + * + * @param versionUUID The UUID of the version whose labels are to be returned. + * @return a String array containing all the labels of the given version + * @throws RepositoryException if another error occurs. + * @throws RemoteException on RMI errors + */ + String[] getVersionLabels(String versionUUID) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionHistory#removeVersion(String) VersionHistory.removeVersion(String)} + * method. + * + * @param versionName the name of a version in this version history. + * @throws RepositoryException if another error occurs. + * @throws RemoteException on RMI errors + */ + void removeVersion(String versionName) + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java new file mode 100644 index 00000000000..232476319a6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java @@ -0,0 +1,109 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +@Deprecated(forRemoval = true) public interface RemoteVersionManager extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.version.VersionManager#checkin(String) VersionManager.checkin(String)} + * method. + * + * @param absPath an absolute path. + * @return the created version. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion checkin(String absPath) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionManager#checkout(String) VersionManager.checkout(String)} + * method. + * + * @param absPath an absolute path. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void checkout(String absPath) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionManager#checkpoint(String) VersionManager.checkpoint(String)} + * method. + * + * @param absPath an absolute path. + * @return the created version. + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteVersion checkpoint(String absPath) throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.version.VersionManager#isCheckedOut(String) VersionManager.isCheckedOut(String)} + * method. + * + * @param absPath an absolute path. + * @return a boolean + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + boolean isCheckedOut(String absPath) throws RepositoryException, RemoteException; + + RemoteVersionHistory getVersionHistory(String absPath) throws RepositoryException, RemoteException; + + RemoteVersion getBaseVersion(String absPath) throws RepositoryException, RemoteException; + + void restore(String[] versionIdentifiers, boolean removeExisting) throws RepositoryException, RemoteException; + + void restore(String absPath, String versionName, boolean removeExisting) throws RepositoryException, RemoteException; + + void restore(String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; + + void restoreVI(String absPath, String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; + + void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws RepositoryException, RemoteException; + + RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort) + throws RepositoryException, RemoteException; + + RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort, boolean isShallow) + throws RepositoryException, RemoteException; + + void doneMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; + + void cancelMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; + + RemoteNode createConfiguration(String absPath) throws RepositoryException, RemoteException; + + RemoteNode setActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; + + RemoteNode getActivity() throws RepositoryException, RemoteException; + + RemoteNode createActivity(String title) throws RepositoryException, RemoteException; + + void removeActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; + + RemoteIterator merge(String activityNodeIdentifier) throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java new file mode 100644 index 00000000000..82b8a66bb4b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java @@ -0,0 +1,200 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.io.IOException; +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.Workspace Workspace} interface. + * Used by the + * {@link org.apache.jackrabbit.rmi.server.ServerWorkspace ServerWorkspace} + * and + * {@link org.apache.jackrabbit.rmi.client.ClientWorkspace ClientWorkspace} + * adapters to provide transparent RMI access to remote workspaces. + *

    + * Most of the methods in this interface are documented only with a reference + * to a corresponding Workspace method. In these cases the remote object + * will simply forward the method call to the underlying Workspace instance. + * Complex return values like namespace registries and other objects are + * returned as remote references to the corresponding remote interface. Simple + * return values and possible exceptions are copied over the network + * to the client. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.Workspace + * @see org.apache.jackrabbit.rmi.client.ClientWorkspace + * @see org.apache.jackrabbit.rmi.server.ServerWorkspace + */ +@Deprecated(forRemoval = true) public interface RemoteWorkspace extends Remote { + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getName() Workspace.getName()} method. + * + * @return workspace name + * @throws RemoteException on RMI errors + */ + String getName() throws RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#copy(String,String) Workspace.copy(String,String)} + * method. + * + * @param from source path + * @param to destination path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void copy(String from, String to) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#copy(String,String,String) Workspace.copy(String,String,String)} + * method. + * + * @param workspace source workspace + * @param from source path + * @param to destination path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void copy(String workspace, String from, String to) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#clone(String,String,String,boolean) Workspace.clone(String,String,String,boolean)} + * method. + * + * @param workspace source workspace + * @param from source path + * @param to destination path + * @param removeExisting flag to remove existing items + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void clone(String workspace, String from, String to, boolean removeExisting) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#move(String,String) Workspace.move(String,String)} + * method. + * + * @param from source path + * @param to destination path + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void move(String from, String to) + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getNodeTypeManager() Workspace.getNodeTypeManager()} + * method. + * + * @return node type manager + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNodeTypeManager getNodeTypeManager() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getNamespaceRegistry() Workspace.getNamespaceRegistry()} + * method. + * + * @return namespace registry + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteNamespaceRegistry getNamespaceRegistry() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getQueryManager() Workspace.getQueryManager()} + * method. + * + * @return query manager + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteQueryManager getQueryManager() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getObservationManager() Workspace.getObservationManager()} + * method. + * + * @return observation manager + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + RemoteObservationManager getObservationManager() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#getAccessibleWorkspaceNames() Workspace.getAccessibleWorkspaceNames()} + * method. + * + * @return accessible workspace names + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + String[] getAccessibleWorkspaceNames() + throws RepositoryException, RemoteException; + + /** + * Remote version of the + * {@link javax.jcr.Workspace#importXML(String,java.io.InputStream,int) Workspace.importXML(String,InputStream,int)} + * method. + * + * @param path node path + * @param xml imported XML document + * @param uuidBehaviour uuid behaviour flag + * @throws IOException on IO errors + * @throws RepositoryException on repository errors + * @throws RemoteException on RMI errors + */ + void importXML(String path, byte[] xml, int uuidBehaviour) + throws IOException, RepositoryException, RemoteException; + + void createWorkspace(String name, String source) + throws RepositoryException, RemoteException; + + void deleteWorkspace(String name) + throws RepositoryException, RemoteException; + + RemoteLockManager getLockManager() + throws RepositoryException, RemoteException; + + RemoteVersionManager getVersionManager() + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java new file mode 100644 index 00000000000..356c1cfb9e1 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java @@ -0,0 +1,88 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.Xid; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the {@link org.apache.jackrabbit.api.XASession} + * interface. + */ +@Deprecated(forRemoval = true) public interface RemoteXASession extends RemoteSession, Remote { + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#commit(Xid, boolean)} method. + */ + void commit(Xid xid, boolean onePhase) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#end(Xid, int)} method. + */ + void end(Xid xid, int flags) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#forget(Xid)} method. + */ + void forget(Xid xid) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#getTransactionTimeout()} method. + */ + int getTransactionTimeout() throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#prepare(Xid)} method. + */ + int prepare(Xid xid) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#recover(int)} method. + */ + Xid[] recover(int flag) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#rollback(Xid)} method. + */ + void rollback(Xid xid) throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#setTransactionTimeout(int)} method. + */ + boolean setTransactionTimeout(int seconds) + throws XAException, RemoteException; + + /** + * Remote version of the + * {@link javax.transaction.xa.XAResource#start(Xid, int)} method. + */ + void start(Xid xid, int flags) throws XAException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java new file mode 100644 index 00000000000..e7bf5e19e5e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote; + +import java.io.Serializable; +import java.util.Arrays; + +import javax.transaction.xa.Xid; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Serializable {@link Xid}. + * + * @since Jackrabbit JCR-RMI 1.5 + */ +@Deprecated(forRemoval = true) public class SerializableXid implements Serializable, Xid { + + private final int formatId; + + private final byte[] globalTransactionId; + + private final byte[] branchQualifier; + + private final int hashCode; + + public SerializableXid(Xid xid) { + formatId = xid.getFormatId(); + globalTransactionId = xid.getGlobalTransactionId(); + branchQualifier = xid.getBranchQualifier(); + hashCode = xid.hashCode(); + } + + public int getFormatId() { + return formatId; + } + + public byte[] getGlobalTransactionId() { + return globalTransactionId; + } + + public byte[] getBranchQualifier() { + return branchQualifier; + } + + public int hashCode() { + return hashCode; + } + + public boolean equals(Object xid) { + return (xid instanceof Xid) + && formatId == ((Xid) xid).getFormatId() + && Arrays.equals( + globalTransactionId, ((Xid) xid).getGlobalTransactionId()) + && Arrays.equals( + branchQualifier, ((Xid) xid).getBranchQualifier()); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java new file mode 100755 index 00000000000..1292557dc2a --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java new file mode 100644 index 00000000000..36fc05d892f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java @@ -0,0 +1,57 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.principal; + +import java.rmi.RemoteException; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal GroupPrincipal} interface. + * Used by the {@link org.apache.jackrabbit.rmi.server.principal.ServerGroup + * ServerGroup} and + * {@link org.apache.jackrabbit.rmi.client.principal.ClientGroup ClientGroup} + * adapter base classes to provide transparent RMI access to remote item + * definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding Group method. The remote object will simply forward the method + * call to the underlying Group instance. Argument and return values, as well as + * possible exceptions, are copied over the network. Complex return values are + * returned as remote references to the corresponding remote interface. RMI + * errors are signaled with RemoteExceptions. + * + * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal + * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup + * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup + */ +@Deprecated(forRemoval = true) public interface RemoteGroup extends RemotePrincipal { + + /** + * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#isMember(java.security.Principal) + */ + boolean isMember(String member) throws RemoteException; + + /** + * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#members() + */ + RemoteIterator members() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java new file mode 100644 index 00000000000..10bb5dd024d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java @@ -0,0 +1,53 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.principal; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link java.security.Principal Principal} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.principal.ServerPrincipal + * ServerPrincipal} and + * {@link org.apache.jackrabbit.rmi.client.principal.ClientPrincipal + * ClientPrincipal} adapter base classes to provide transparent RMI access to + * remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding Principal method. The remote object will simply forward the + * method call to the underlying Principal instance. Argument and return values, + * as well as possible exceptions, are copied over the network. Complex return + * values are returned as remote references to the corresponding remote + * interface. RMI errors are signaled with RemoteExceptions. + * + * @see java.security.Principal + * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal + * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal + */ +@Deprecated(forRemoval = true) public interface RemotePrincipal extends Remote { + + /** + * @see java.security.Principal#getName() + */ + public String getName() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java new file mode 100755 index 00000000000..f7a35d50ae4 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.remote.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java new file mode 100644 index 00000000000..eb5dea06e67 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.security; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.security.AccessControlEntry + * AccessControlEntry} interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry + * ServerAccessControlEntry} and + * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry + * ClientAccessControlEntry} adapter base classes to provide transparent RMI + * access to remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding AccessControlEntry method. The remote object will simply + * forward the method call to the underlying AccessControlEntry instance. + * Argument and return values, as well as possible exceptions, are copied over + * the network. Complex return values are returned as remote references to the + * corresponding remote interface. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.security.AccessControlEntry + * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry + * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry + */ +@Deprecated(forRemoval = true) public interface RemoteAccessControlEntry extends Remote { + + /** + * @see javax.jcr.security.AccessControlEntry#getPrincipal() + */ + public RemotePrincipal getPrincipal() throws RemoteException; + + /** + * @see javax.jcr.security.AccessControlEntry#getPrivileges() + */ + public RemotePrivilege[] getPrivileges() throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java new file mode 100644 index 00000000000..832eaf95798 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java @@ -0,0 +1,53 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.security; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.security.AccessControlList + * AccessControlList} interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlList + * ServerAccessControlList} and + * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlList + * ClientAccessControlList} adapter base classes to provide transparent RMI + * access to remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding AccessControlList method. The remote object will simply forward + * the method call to the underlying AccessControlList instance. Argument and + * return values, as well as possible exceptions, are copied over the network. + * Complex return values are returned as remote references to the corresponding + * remote interface. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.security.AccessControlList + * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList + * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList + */ +@Deprecated(forRemoval = true) public interface RemoteAccessControlList extends RemoteAccessControlPolicy { + + /** + * @see javax.jcr.security.AccessControlList#getAccessControlEntries() + */ + public RemoteAccessControlEntry[] getAccessControlEntries() + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java new file mode 100644 index 00000000000..baf3d49917d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java @@ -0,0 +1,93 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.security; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.security.AccessControlManager + * AccessControlManager} interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager + * ServerAccessControlManager} and + * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager + * ClientAccessControlManager} adapter base classes to provide transparent RMI + * access to remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding AccessControlManager method. The remote object will simply + * forward the method call to the underlying AccessControlManager instance. + * Argument and return values, as well as possible exceptions, are copied over + * the network. Complex return values are returned as remote references to the + * corresponding remote interface. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.security.AccessControlManager + * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager + * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager + */ +@Deprecated(forRemoval = true) public interface RemoteAccessControlManager extends Remote { + + /** + * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String) + */ + public RemoteIterator getApplicablePolicies(String absPath) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#getEffectivePolicies(String) + */ + public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#getPolicies(String) + */ + public RemoteAccessControlPolicy[] getPolicies(String absPath) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#getPrivileges(String) + */ + public RemotePrivilege[] getPrivileges(String absPath) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#getSupportedPrivileges(String) + */ + public RemotePrivilege[] getSupportedPrivileges(String absPath) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#privilegeFromName(String) + */ + public RemotePrivilege privilegeFromName(String privilegeName) + throws RepositoryException, RemoteException; + + /** + * @see javax.jcr.security.AccessControlManager#hasPrivileges(String, + * javax.jcr.security.Privilege[]) + */ + public boolean hasPrivileges(String absPath, String[] privileges) + throws RepositoryException, RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java new file mode 100644 index 00000000000..353393139ae --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.security; + +import java.rmi.Remote; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.security.AccessControlPolicy + * AccessControlPolicy} interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy + * ServerAccessControlPolicy} and + * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy + * ClientAccessControlPolicy} adapter base classes to provide transparent RMI + * access to remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding AccessControlPolicy method. The remote object will simply + * forward the method call to the underlying AccessControlPolicy instance. + * Argument and return values, as well as possible exceptions, are copied over + * the network. Complex return values are returned as remote references to the + * corresponding remote interface. RMI errors are signaled with + * RemoteExceptions. + * + * @see javax.jcr.security.AccessControlPolicy + * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy + * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy + */ +@Deprecated(forRemoval = true) public interface RemoteAccessControlPolicy extends Remote { + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java new file mode 100644 index 00000000000..f09982f30dd --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java @@ -0,0 +1,71 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.remote.security; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote version of the JCR {@link javax.jcr.security.Privilege Privilege} + * interface. Used by the + * {@link org.apache.jackrabbit.rmi.server.security.ServerPrivilege + * ServerPrivilege} and + * {@link org.apache.jackrabbit.rmi.client.security.ClientPrivilege + * ClientPrivilege} adapter base classes to provide transparent RMI access to + * remote item definitions. + *

    + * The methods in this interface are documented only with a reference to a + * corresponding Privilege method. The remote object will simply forward the + * method call to the underlying Privilege instance. Argument and return values, + * as well as possible exceptions, are copied over the network. Complex return + * values are returned as remote references to the corresponding remote + * interface. RMI errors are signaled with RemoteExceptions. + * + * @see javax.jcr.security.Privilege + * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege + * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege + */ +@Deprecated(forRemoval = true) public interface RemotePrivilege extends Remote { + + /** + * @see javax.jcr.security.Privilege#getAggregatePrivileges() + */ + public RemotePrivilege[] getAggregatePrivileges() throws RemoteException; + + /** + * @see javax.jcr.security.Privilege#getDeclaredAggregatePrivileges() + */ + public RemotePrivilege[] getDeclaredAggregatePrivileges() + throws RemoteException; + + /** + * @see javax.jcr.security.Privilege#getName() + */ + public String getName() throws RemoteException; + + /** + * @see javax.jcr.security.Privilege#isAbstract() + */ + public boolean isAbstract() throws RemoteException; + + /** + * @see javax.jcr.security.Privilege#isAggregate() + */ + public boolean isAggregate() throws RemoteException; +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java new file mode 100755 index 00000000000..ba87be38ddb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.remote.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java new file mode 100644 index 00000000000..1b29ac184ee --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java @@ -0,0 +1,71 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Abstract base class for repository factories that make a remote repository + * available locally. Subclasses need to implement the + * {@link #getRemoteRepository()} method to actually retrieve the remote + * repository reference. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public abstract class AbstractRemoteRepositoryFactory + implements RepositoryFactory { + + /** + * Local adapter factory. + */ + private final LocalAdapterFactory factory; + + /** + * Creates a factory for looking up a repository from the given RMI URL. + * + * @param factory local adapter factory + */ + protected AbstractRemoteRepositoryFactory(LocalAdapterFactory factory) { + this.factory = factory; + } + + /** + * Returns a local adapter for the remote repository. + * + * @return local adapter for the remote repository + * @throws RepositoryException if the remote repository is not available + */ + public Repository getRepository() throws RepositoryException { + return factory.getRepository(getRemoteRepository()); + } + + /** + * Returns the remote repository reference. + * + * @return remote repository reference + * @throws RepositoryException if the remote repository is not available + */ + protected abstract RemoteRepository getRemoteRepository() + throws RepositoryException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java new file mode 100644 index 00000000000..df577ce1022 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java @@ -0,0 +1,75 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Proxy for a remote repository bound in JNDI. The configured repository is + * looked up from JNDI lazily during each method call. Thus the JNDI entry + * does not need to exist when this class is instantiated. The JNDI entry + * can also be replaced with another repository during the lifetime of an + * instance of this class. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class JNDIRemoteRepository extends ProxyRepository { + + /** + * Creates a proxy for a remote repository in JNDI. + * + * @param factory local adapter factory + * @param context JNDI context + * @param location JNDI location + */ + public JNDIRemoteRepository( + LocalAdapterFactory factory, Context context, String location) { + super(new JNDIRemoteRepositoryFactory(factory, context, location)); + } + + /** + * Creates a proxy for the remote repository in JNDI. + * Uses {@link ClientAdapterFactory} as the default + * local adapter factory. + * + * @param context JNDI context + * @param location JNDI location + */ + public JNDIRemoteRepository(Context context, String location) { + this(new ClientAdapterFactory(), context, location); + } + + /** + * Creates a proxy for the remote repository in JNDI. + * Uses {@link ClientAdapterFactory} as the default + * local adapter factory. + * + * @param location JNDI location in default context + * @throws NamingException if the default JNDI context is not available + */ + public JNDIRemoteRepository(String location) throws NamingException { + this(new InitialContext(), location); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java new file mode 100644 index 00000000000..943b904aab6 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java @@ -0,0 +1,89 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import javax.jcr.RepositoryException; +import javax.naming.Context; +import javax.naming.NamingException; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory that looks up a remote repository from JNDI. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class JNDIRemoteRepositoryFactory + extends AbstractRemoteRepositoryFactory { + + /** + * JNDI context of the remote repository. + */ + private final Context context; + + /** + * JNDI location of the remote repository. + */ + private final String location; + + /** + * Creates a factory for looking up a remote repository from JNDI. + * + * @param factory local adapter factory + * @param context JNDI context + * @param location JNDI location + */ + public JNDIRemoteRepositoryFactory( + LocalAdapterFactory factory, Context context, String location) { + super(factory); + this.context = context; + this.location = location; + } + + /** + * Looks up a remote repository from JNDI. + * + * @return remote repository reference + * @throws RepositoryException if the remote repository is not available + */ + protected RemoteRepository getRemoteRepository() + throws RepositoryException { + try { + Object remote = context.lookup(location); + if (remote instanceof RemoteRepository) { + return (RemoteRepository) remote; + } else if (remote == null) { + throw new RepositoryException( + "Remote repository not found: The JNDI entry " + + location + " is null"); + } else { + throw new RepositoryException( + "Invalid remote repository: The JNDI entry " + + location + " is an instance of " + + remote.getClass().getName()); + } + } catch (NamingException e) { + throw new RepositoryException( + "Remote repository not found: The JNDI entry " + location + + " could not be looked up", e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java new file mode 100644 index 00000000000..e5dd0afe10f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java @@ -0,0 +1,250 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import java.util.HashSet; +import java.util.Set; + +import javax.jcr.Credentials; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Repository that proxies all method calls to another repository. + * The other repository is accessed lazily using a + * {@link RepositoryFactory repository factory}. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class ProxyRepository implements Repository { + + /** + * The set of standard descriptor keys defined in the + * {@link Repository} interface. + */ + private static final Set STANDARD_KEYS = new HashSet() {{ + add(Repository.IDENTIFIER_STABILITY); + add(Repository.LEVEL_1_SUPPORTED); + add(Repository.LEVEL_2_SUPPORTED); + add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); + add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); + add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); + add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); + add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); + add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); + add(Repository.OPTION_LIFECYCLE_SUPPORTED); + add(Repository.OPTION_LOCKING_SUPPORTED); + add(Repository.OPTION_OBSERVATION_SUPPORTED); + add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); + add(Repository.OPTION_QUERY_SQL_SUPPORTED); + add(Repository.OPTION_RETENTION_SUPPORTED); + add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); + add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); + add(Repository.OPTION_TRANSACTIONS_SUPPORTED); + add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); + add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); + add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); + add(Repository.OPTION_VERSIONING_SUPPORTED); + add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); + add(Repository.OPTION_XML_EXPORT_SUPPORTED); + add(Repository.OPTION_XML_IMPORT_SUPPORTED); + add(Repository.OPTION_ACTIVITIES_SUPPORTED); + add(Repository.OPTION_BASELINES_SUPPORTED); + + add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); + add(Repository.QUERY_JOINS); + add(Repository.QUERY_LANGUAGES); + add(Repository.QUERY_STORED_QUERIES_SUPPORTED); + add(Repository.QUERY_XPATH_DOC_ORDER); + add(Repository.QUERY_XPATH_POS_INDEX); + add(Repository.REP_NAME_DESC); + add(Repository.REP_VENDOR_DESC); + add(Repository.REP_VENDOR_URL_DESC); + add(Repository.SPEC_NAME_DESC); + add(Repository.SPEC_VERSION_DESC); + add(Repository.WRITE_SUPPORTED); + }}; + + /** + * Factory for accessing the proxied repository. + */ + private final RepositoryFactory factory; + + /** + * Creates a proxy for the repository (or repositories) accessible + * through the given factory. + * + * @param factory repository factory + */ + public ProxyRepository(RepositoryFactory factory) { + this.factory = factory; + } + + /** + * Returns the descriptor keys of the proxied repository, or an empty + * array if the proxied repository can not be accessed. + * + * @return descriptor keys (possibly empty) + */ + public String[] getDescriptorKeys() { + try { + return factory.getRepository().getDescriptorKeys(); + } catch (RepositoryException e) { + return new String[0]; + } + } + + /** + * Checks whether the given key identifies a valid single-valued + * descriptor key in the proxied repository. Returns false + * if the proxied repository can not be accessed. + * + * @return true if the key identifies a valid single-valued + * descriptor in the proxied repository, + * false otherwise + */ + public boolean isSingleValueDescriptor(String key) { + try { + return factory.getRepository().isSingleValueDescriptor(key); + } catch (RepositoryException e) { + return false; + } + } + + /** + * Returns the descriptor with the given key from the proxied repository. + * Returns null if the descriptor does not exist or if the + * proxied repository can not be accessed. + * + * @param key descriptor key + * @return descriptor value, or null + */ + public String getDescriptor(String key) { + try { + return factory.getRepository().getDescriptor(key); + } catch (RepositoryException e) { + return null; + } + } + + /** + * Returns the value of the descriptor with the given key from the proxied + * repository. Returns null if the descriptor does not exist + * or if the proxied repository can not be accessed. + * + * @param key descriptor key + * @return descriptor value, or null + */ + public Value getDescriptorValue(String key) { + try { + return factory.getRepository().getDescriptorValue(key); + } catch (RepositoryException e) { + return null; + } + } + + /** + * Returns the values of the descriptor with the given key from the proxied + * repository. Returns null if the descriptor does not exist + * or if the proxied repository can not be accessed. + * + * @param key descriptor key + * @return descriptor values, or null + */ + public Value[] getDescriptorValues(String key) { + try { + return factory.getRepository().getDescriptorValues(key); + } catch (RepositoryException e) { + return null; + } + } + + /** + * Logs in to the proxied repository and returns the resulting session. + *

    + * Note that the {@link Session#getRepository()} method of the resulting + * session will return the proxied repository, not this repository proxy! + * + * @throws RepositoryException if the proxied repository can not be + * accessed, or if the login in the proxied + * repository fails + */ + public Session login(Credentials credentials, String workspace) + throws RepositoryException { + return factory.getRepository().login(credentials, workspace); + } + + /** + * Returns true if the given key identifies a standard descriptor. + * + * @param key descriptor key + * @return true if the key identifies a standard descriptor, + * false otherwise + */ + public boolean isStandardDescriptor(String key) { + return STANDARD_KEYS.contains(key); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * null arguments. + * + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login() throws RepositoryException { + return login(null, null); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * the given credentials and a null workspace name. + * + * @param credentials login credentials + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login(Credentials credentials) throws RepositoryException { + return login(credentials, null); + } + + /** + * Calls {@link Repository#login(Credentials, String)} with + * null credentials and the given workspace name. + * + * @param workspace workspace name + * @return logged in session + * @throws RepositoryException if an error occurs + */ + public Session login(String workspace) throws RepositoryException { + return login(null, workspace); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java new file mode 100644 index 00000000000..979dc7e0ccd --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Proxy for a remote repository bound in RMI. The configured repository is + * looked up from RMI lazily during each method call. Thus the RMI entry + * does not need to exist when this class is instantiated. The RMI entry + * can also be replaced with another repository during the lifetime of an + * instance of this class. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class RMIRemoteRepository extends ProxyRepository { + + /** + * Creates a proxy for the remote repository in the given RMI URL. + * + * @param factory local adapter factory + * @param url RMI URL of the remote repository + */ + public RMIRemoteRepository(LocalAdapterFactory factory, String url) { + super(new RMIRemoteRepositoryFactory(factory, url)); + } + + /** + * Creates a proxy for the remote repository in the given RMI URL. + * Uses {@link ClientAdapterFactory} as the default + * local adapter factory. + * + * @param url URL of the remote repository + */ + public RMIRemoteRepository(String url) { + this(new ClientAdapterFactory(), url); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java new file mode 100644 index 00000000000..370ec3aea36 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java @@ -0,0 +1,77 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import java.net.MalformedURLException; +import java.rmi.Naming; +import java.rmi.NotBoundException; +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory that looks up a remote repository from an RMI registry. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class RMIRemoteRepositoryFactory + extends AbstractRemoteRepositoryFactory { + + /** + * RMI URL of the remote repository. + */ + private final String url; + + /** + * Creates a factory for looking up a remote repository from + * an RMI registry. + * + * @param factory local adapter factory + * @param url RMI URL of the repository + */ + public RMIRemoteRepositoryFactory(LocalAdapterFactory factory, String url) { + super(factory); + this.url = url; + } + + /** + * Looks up a remote repository from the RMI registry. + * + * @return remote repository reference + * @throws RepositoryException if the remote repository is not available + */ + protected RemoteRepository getRemoteRepository() + throws RepositoryException { + try { + return (RemoteRepository) Naming.lookup(url); + } catch (MalformedURLException e) { + throw new RepositoryException("Invalid repository URL: " + url, e); + } catch (NotBoundException e) { + throw new RepositoryException("Repository not found: " + url, e); + } catch (ClassCastException e) { + throw new RepositoryException("Invalid repository: " + url, e); + } catch (RemoteException e) { + throw new RepositoryException("Repository access error: " + url, e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java new file mode 100644 index 00000000000..b16f85c1d83 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java @@ -0,0 +1,37 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory interface for JCR content repositories. + */ +@Deprecated(forRemoval = true) interface RepositoryFactory { + + /** + * Returns a content repository. + * + * @return content repository + * @throws RepositoryException if a repository is not available + */ + Repository getRepository() throws RepositoryException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java new file mode 100644 index 00000000000..8a7b3aa99dc --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java @@ -0,0 +1,175 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.rmi.Naming; +import java.rmi.NotBoundException; +import java.rmi.RemoteException; +import java.util.Hashtable; +import java.util.Map; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.RepositoryFactory; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.client.SafeClientRepository; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +@Deprecated(forRemoval = true) public class RmiRepositoryFactory implements RepositoryFactory { + + private static final String REPOSITORY_URI = + "org.apache.jackrabbit.repository.uri"; + + @SuppressWarnings({"unchecked", "rawtypes"}) + public Repository getRepository(Map parameters) throws RepositoryException { + if (parameters != null && parameters.containsKey(REPOSITORY_URI)) { + URI uri; + try { + uri = new URI(parameters.get(REPOSITORY_URI).toString().trim()); + } catch (URISyntaxException e) { + return null; + } + + String scheme = uri.getScheme(); + if ("rmi".equalsIgnoreCase(scheme)) { + return getRmiRepository(uri.getSchemeSpecificPart()); + } else if ("jndi".equalsIgnoreCase(scheme)) { + Hashtable environment = new Hashtable(parameters); + environment.remove(REPOSITORY_URI); + return getJndiRepository( + uri.getSchemeSpecificPart(), environment); + } else { + try { + return getUrlRepository(uri.toURL()); + } catch (MalformedURLException e) { + return null; + } + } + } else { + return null; + } + } + + private Repository getUrlRepository(final URL url) + throws RepositoryException { + return new RmiSafeClientRepository(new ClientAdapterFactory()) { + + @Override + protected RemoteRepository getRemoteRepository() throws RemoteException { + try { + InputStream stream = url.openStream(); + try { + Object remote = new ObjectInputStream(stream).readObject(); + if (remote instanceof RemoteRepository) { + return (RemoteRepository) remote; + } else { + throw new RemoteException("The resource at URL " + url + + " is not a remote repository stub: " + remote); + } + } finally { + if (stream != null) { + stream.close(); + } + } + } catch (ClassNotFoundException e) { + throw new RemoteException("The resource at URL " + url + + " requires a class that is not available", e); + } catch (IOException e) { + throw new RemoteException("Failed to read the resource at URL " + + url, e); + } + } + }; + } + + @SuppressWarnings("rawtypes") + private Repository getJndiRepository(final String name, + final Hashtable environment) throws RepositoryException { + return new RmiSafeClientRepository(new ClientAdapterFactory()) { + + @Override + protected RemoteRepository getRemoteRepository() throws RemoteException { + try { + Object value = new InitialContext(environment).lookup(name); + if (value instanceof RemoteRepository) { + return (RemoteRepository) value; + } else { + throw new RemoteException("The JNDI resource " + name + + " is not a remote repository stub: " + value); + } + } catch (NamingException e) { + throw new RemoteException( + "Failed to look up the JNDI resource " + name, e); + } + } + }; + } + + private Repository getRmiRepository(final String name) + throws RepositoryException { + return new RmiSafeClientRepository(new ClientAdapterFactory()) { + + @Override + protected RemoteRepository getRemoteRepository() throws RemoteException { + try { + Object value = Naming.lookup(name); + if (value instanceof RemoteRepository) { + return (RemoteRepository) value; + } else { + throw new RemoteException("The RMI resource " + name + + " is not a remote repository stub: " + value); + } + } catch (NotBoundException e) { + throw new RemoteException( + "RMI resource " + name + " not found", e); + } catch (MalformedURLException e) { + throw new RemoteException("Invalid RMI name: " + name, e); + } catch (RemoteException e) { + throw new RemoteException("Failed to look up the RMI resource " + + name, e); + } + } + }; + } + + /** + * Basic SafeClientRepository for the different lookup types of a rmi repository + */ + private static class RmiSafeClientRepository extends SafeClientRepository { + + public RmiSafeClientRepository(LocalAdapterFactory factory) { + super(factory); + } + + @Override + protected RemoteRepository getRemoteRepository() throws RemoteException { + return null; + } + + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java new file mode 100644 index 00000000000..4d8095e7d19 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java @@ -0,0 +1,71 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import java.net.MalformedURLException; +import java.net.URL; + +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Proxy for a remote repository accessed via a URL. The configured URL is + * dereferenced lazily during each method call. Thus the resource pointed to + * by the URL does not need to exist when this class is instantiated. The + * resource can also be replaced with another remote repository instance + * during the lifetime of an instance of this class. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class URLRemoteRepository extends ProxyRepository { + + /** + * Creates a proxy for the remote repository at the given URL. + * + * @param factory local adapter factory + * @param url URL of the remote repository + */ + public URLRemoteRepository(LocalAdapterFactory factory, URL url) { + super(new URLRemoteRepositoryFactory(factory, url)); + } + + /** + * Creates a proxy for the remote repository at the given URL. + * Uses {@link ClientAdapterFactory} as the default + * local adapter factory. + * + * @param url URL of the remote repository + */ + public URLRemoteRepository(URL url) { + this(new ClientAdapterFactory(), url); + } + + /** + * Creates a proxy for the remote repository at the given URL. + * Uses {@link ClientAdapterFactory} as the default + * local adapter factory. + * + * @param url URL of the remote repository + * @throws MalformedURLException if the given URL is malformed + */ + public URLRemoteRepository(String url) throws MalformedURLException { + this(new URL(url)); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java new file mode 100644 index 00000000000..cc950fa3e02 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.repository; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.net.URL; + +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory that looks up a remote repository from a given URL. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class URLRemoteRepositoryFactory + extends AbstractRemoteRepositoryFactory { + + /** + * URL of the remote repository. + */ + private final URL url; + + /** + * Creates a factory for looking up a remote repository from a URL. + * + * @param factory local adapter factory + * @param url URL or the remote repository + */ + public URLRemoteRepositoryFactory(LocalAdapterFactory factory, URL url) { + super(factory); + this.url = url; + } + + /** + * Looks up and returns a remote repository from the configured URL. + * + * @return remote repository reference + * @throws RepositoryException if the remote repository is not available + */ + protected RemoteRepository getRemoteRepository() + throws RepositoryException { + try { + ObjectInputStream input = new ObjectInputStream(url.openStream()); + try { + Object remote = input.readObject(); + if (remote instanceof RemoteRepository) { + return (RemoteRepository) remote; + } else if (remote == null) { + throw new RepositoryException( + "Remote repository not found: The resource at " + + url + " is null"); + } else { + throw new RepositoryException( + "Invalid remote repository: The resource at " + + url + " is an instance of " + + remote.getClass().getName()); + } + } finally { + input.close(); + } + } catch (ClassNotFoundException e) { + throw new RepositoryException( + "Invalid remote repository: The resource at " + url + + " is an instance of an unknown class", e); + } catch (IOException e) { + throw new RepositoryException( + "Remote repository not found: The resource at " + url + + " could not be retrieved", e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java new file mode 100755 index 00000000000..33e6942b6d8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.repository; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java new file mode 100644 index 00000000000..d30e5d1b03f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java @@ -0,0 +1,479 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; +import java.security.Principal; +import java.util.Iterator; + +import javax.jcr.Item; +import javax.jcr.NamespaceRegistry; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.Repository; +import javax.jcr.Session; +import javax.jcr.Workspace; +import javax.jcr.lock.Lock; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.nodetype.PropertyDefinition; +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; +import javax.jcr.query.QueryResult; +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; +import javax.jcr.security.Privilege; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteRow; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Factory interface for creating remote adapters for local resources. + * This interface defines how the local JCR interfaces are adapted to + * remote JCR-RMI references. The adaption mechanism can be + * modified (for example to add extra features) by changing the + * remote adapter factory used by the repository server. + *

    + * Note that the {@link ServerObject ServerObject} base class provides + * a number of utility methods designed to work with a remote adapter + * factory. Adapter implementations may want to inherit that functionality + * by subclassing from ServerObject. + * + * @see org.apache.jackrabbit.rmi.client.LocalAdapterFactory + * @see org.apache.jackrabbit.rmi.server.ServerAdapterFactory + * @see org.apache.jackrabbit.rmi.server.ServerObject + */ +@Deprecated(forRemoval = true) public interface RemoteAdapterFactory { + + /** + * Returns the port number to which the server objects created by + * this factory are bound. This method is mostly used internally by + * the {@link ServerObject} constructor to determine which port number + * to use. + * + * @return port number, or 0 for a random port + */ + int getPortNumber(); + + /** + * Returns a remote adapter for the given local repository. + * + * @param repository local repository + * @return remote repository adapter + * @throws RemoteException on RMI errors + */ + RemoteRepository getRemoteRepository(Repository repository) + throws RemoteException; + + /** + * Returns a remote adapter for the given local session. + * + * @param session local session + * @return remote session adapter + * @throws RemoteException on RMI errors + */ + RemoteSession getRemoteSession(Session session) throws RemoteException; + + /** + * Returns a remote adapter for the given local workspace. + * + * @param workspace local workspace + * @return remote workspace adapter + * @throws RemoteException on RMI errors + */ + RemoteWorkspace getRemoteWorkspace(Workspace workspace) + throws RemoteException; + + /** + * Returns a remote adapter for the given local observation manager. + * + * @param observationManager local observation manager + * @return remote observation manager adapter + * @throws RemoteException on RMI errors + */ + RemoteObservationManager getRemoteObservationManager( + ObservationManager observationManager) + throws RemoteException; + + /** + * Returns a remote adapter for the given local namespace registry. + * + * @param registry local namespace registry + * @return remote namespace registry adapter + * @throws RemoteException on RMI errors + */ + RemoteNamespaceRegistry getRemoteNamespaceRegistry( + NamespaceRegistry registry) throws RemoteException; + + /** + * Returns a remote adapter for the given local node type manager. + * + * @param manager local node type manager + * @return remote node type manager adapter + * @throws RemoteException on RMI errors + */ + RemoteNodeTypeManager getRemoteNodeTypeManager(NodeTypeManager manager) + throws RemoteException; + + /** + * Returns a remote adapter for the given local item. This method + * will return an adapter that implements only the + * {@link Item Item} interface. The caller may want to introspect + * the local item to determine whether to use either the + * {@link #getRemoteNode(Node) getRemoteNode} or the + * {@link #getRemoteProperty(Property) getRemoteProperty} method instead. + * + * @param item local item + * @return remote item adapter + * @throws RemoteException on RMI errors + */ + RemoteItem getRemoteItem(Item item) throws RemoteException; + + /** + * Returns a remote adapter for the given local property. + * + * @param property local property + * @return remote property adapter + * @throws RemoteException on RMI errors + */ + RemoteProperty getRemoteProperty(Property property) throws RemoteException; + + /** + * Returns a remote adapter for the given local node. + * + * @param node local node + * @return remote node adapter + * @throws RemoteException on RMI errors + */ + RemoteNode getRemoteNode(Node node) throws RemoteException; + + /** + * Returns a remote adapter for the given local version. + * + * @param version local version + * @return remote version adapter + * @throws RemoteException on RMI errors + */ + RemoteVersion getRemoteVersion(Version version) throws RemoteException; + + /** + * Returns a remote adapter for the given local version history. + * + * @param versionHistory local version history + * @return remote version history adapter + * @throws RemoteException on RMI errors + */ + RemoteVersionHistory getRemoteVersionHistory(VersionHistory versionHistory) + throws RemoteException; + + /** + * Returns a remote adapter for the given local node type. + * + * @param type local node type + * @return remote node type adapter + * @throws RemoteException on RMI errors + */ + RemoteNodeType getRemoteNodeType(NodeType type) throws RemoteException; + + /** + * Returns a remote adapter for the given local item definition. + * This method will return an adapter that implements only the + * {@link ItemDefinition ItemDefinition} interface. The caller may want to introspect + * the local item definition to determine whether to use either the + * {@link #getRemoteNodeDefinition(NodeDefinition) getRemoteNodeDef} or the + * {@link #getRemotePropertyDefinition(PropertyDefinition) getRemotePropertyDef} + * method instead. + * + * @param def local item definition + * @return remote item definition adapter + * @throws RemoteException on RMI errors + */ + RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) throws RemoteException; + + /** + * Returns a remote adapter for the given local node definition. + * + * @param def local node definition + * @return remote node definition adapter + * @throws RemoteException on RMI errors + */ + RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) throws RemoteException; + + /** + * Returns a remote adapter for the given local property definition. + * + * @param def local property definition + * @return remote property definition adapter + * @throws RemoteException on RMI errors + */ + RemotePropertyDefinition getRemotePropertyDefinition(PropertyDefinition def) + throws RemoteException; + + /** + * Returns a remote adapter for the given local lock. + * + * @param lock local lock + * @return remote lock adapter + * @throws RemoteException on RMI errors + */ + RemoteLock getRemoteLock(Lock lock) throws RemoteException; + + /** + * Returns a remote adapter for the given local query manager. + * + * @param session current session + * @param manager local query manager + * @return remote query manager adapter + * @throws RemoteException on RMI errors + */ + RemoteQueryManager getRemoteQueryManager( + Session session, QueryManager manager) throws RemoteException; + + /** + * Returns a remote adapter for the given local query. + * + * @param query local query + * @return remote query adapter + * @throws RemoteException on RMI errors + */ + RemoteQuery getRemoteQuery(Query query) throws RemoteException; + + /** + * Returns a remote adapter for the given local query result. + * + * @param result local query result + * @return remote query result adapter + * @throws RemoteException on RMI errors + */ + RemoteQueryResult getRemoteQueryResult(QueryResult result) + throws RemoteException; + + /** + * Returns a remote adapter for the given local query row. + * + * @param row local query row + * @return remote query row adapter + * @throws RemoteException on RMI errors + */ + RemoteRow getRemoteRow(Row row) throws RemoteException; + + /** + * Returns a remote adapter for the given local events. + * + * @param listenerId The listener identifier to which the events are to be + * dispatched. + * @param events the local events + * @return remote event iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteEventCollection getRemoteEvent(long listenerId, EventIterator events) + throws RemoteException; + + + /** + * Returns a remote adapter for the given local node iterator. + * + * @param iterator local node iterator + * @return remote iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteIterator getRemoteNodeIterator(NodeIterator iterator) + throws RemoteException; + + /** + * Returns a remote adapter for the given local property iterator. + * + * @param iterator local property iterator + * @return remote iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) + throws RemoteException; + + /** + * Returns a remote adapter for the given local version iterator. + * + * @param iterator local version iterator + * @return remote iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteIterator getRemoteVersionIterator(VersionIterator iterator) + throws RemoteException; + + /** + * Returns a remote adapter for the given local node type iterator. + * + * @param iterator local node type iterator + * @return remote iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) + throws RemoteException; + + /** + * Returns a remote adapter for the given local row iterator. + * + * @param iterator local row iterator + * @return remote iterator adapter + * @throws RemoteException on RMI errors + */ + RemoteIterator getRemoteRowIterator(RowIterator iterator) + throws RemoteException; + + RemoteLockManager getRemoteLockManager(LockManager lockManager) + throws RemoteException; + + RemoteVersionManager getRemoteVersionManager(Session session, VersionManager versionManager) + throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @param acm local access control manager + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + RemoteAccessControlManager getRemoteAccessControlManager( + AccessControlManager acm) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemotePrivilege getRemotePrivilege(final Privilege local) + throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) + throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteAccessControlPolicy getRemoteAccessControlPolicy( + final AccessControlPolicy local) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( + final AccessControlPolicy[] local) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteIterator getRemoteAccessControlPolicyIterator( + AccessControlPolicyIterator iterator) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteAccessControlEntry getRemoteAccessControlEntry( + final AccessControlEntry local) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteAccessControlEntry[] getRemoteAccessControlEntry( + final AccessControlEntry[] local) throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemotePrincipal getRemotePrincipal(final Principal principal) + throws RemoteException; + + /** + * Returns a remote adapter for the given local access control manager. + * + * @return remote access control manager + * @throws RemoteException on RMI errors + */ + public RemoteIterator getRemotePrincipalIterator( + final Iterator principals) throws RemoteException; + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java new file mode 100644 index 00000000000..2b5e1220537 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java @@ -0,0 +1,531 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; +import java.security.Principal; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.jcr.Item; +import javax.jcr.NamespaceRegistry; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.PropertyIterator; +import javax.jcr.Repository; +import javax.jcr.Session; +import javax.jcr.Workspace; +import javax.jcr.lock.Lock; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.nodetype.PropertyDefinition; +import javax.jcr.observation.Event; +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; +import javax.jcr.query.QueryResult; +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlList; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; +import javax.jcr.security.Privilege; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; +import javax.jcr.version.VersionManager; +import javax.transaction.xa.XAResource; + +import org.apache.jackrabbit.rmi.remote.ArrayIterator; +import org.apache.jackrabbit.rmi.remote.BufferIterator; +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteRow; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; +import org.apache.jackrabbit.rmi.server.iterator.ServerNodeIterator; +import org.apache.jackrabbit.rmi.server.iterator.ServerNodeTypeIterator; +import org.apache.jackrabbit.rmi.server.iterator.ServerPropertyIterator; +import org.apache.jackrabbit.rmi.server.iterator.ServerRowIterator; +import org.apache.jackrabbit.rmi.server.iterator.ServerVersionIterator; +import org.apache.jackrabbit.rmi.server.principal.ServerGroup; +import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; +import org.apache.jackrabbit.rmi.server.principal.ServerPrincipalIterator; +import org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry; +import org.apache.jackrabbit.rmi.server.security.ServerAccessControlList; +import org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager; +import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy; +import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicyIterator; +import org.apache.jackrabbit.rmi.server.security.ServerPrivilege; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Default implementation of the {@link RemoteAdapterFactory + * RemoteAdapterFactory} interface. This factory uses the server adapters + * defined in this package as the default adapter implementations. Subclasses + * can override or extend the default adapters by implementing the corresponding + * factory methods. + *

    + * The bufferSize property can be used to configure the size of the + * buffer used by iterators to speed up iterator traversal over the network. + */ +@Deprecated(forRemoval = true) public class ServerAdapterFactory implements RemoteAdapterFactory { + + /** The default iterator buffer size. */ + private static final int DEFAULT_BUFFER_SIZE = 100; + + /** The buffer size of iterators created by this factory. */ + private int bufferSize = DEFAULT_BUFFER_SIZE; + + /** + * The port number for server objects. Initializes to the value of the + * org.apache.jackrabbit.rmi.port system property, or to 0 if + * the property is not set. Value 0 means that the server objects should use + * a random anonymous port. + */ + private int portNumber = Integer.getInteger( + "org.apache.jackrabbit.rmi.port", 0).intValue(); + + /** + * Returns the iterator buffer size. + * + * @return iterator buffer size + */ + public int getBufferSize() { + return bufferSize; + } + + /** + * Sets the iterator buffer size. + * + * @param bufferSize iterator buffer size + */ + public void setBufferSize(int bufferSize) { + this.bufferSize = bufferSize; + } + + /** + * Returns the port number for server objects. + * + * @return port number, or 0 for the default + */ + public int getPortNumber() { + return portNumber; + } + + /** + * Sets the port number for server objects. + * + * @param portNumber port number, or 0 for the default + */ + public void setPortNumber(int portNumber) { + this.portNumber = portNumber; + } + + /** + * Creates a {@link ServerRepository ServerRepository} instance. + * {@inheritDoc} + */ + public RemoteRepository getRemoteRepository(Repository repository) + throws RemoteException { + return new ServerRepository(repository, this); + } + + /** + * Creates a {@link ServerSession ServerSession} instance. In case the + * underlying session is transaction enabled, the remote interface is will + * be transaction enabled too through the {@link ServerXASession}. + * {@inheritDoc} + */ + public RemoteSession getRemoteSession(Session session) + throws RemoteException { + if (session instanceof XAResource) { + return new ServerXASession(session, (XAResource) session, this); + } else { + return new ServerSession(session, this); + } + } + + /** + * Creates a {@link ServerWorkspace ServerWorkspace} instance. {@inheritDoc} + */ + public RemoteWorkspace getRemoteWorkspace(Workspace workspace) + throws RemoteException { + return new ServerWorkspace(workspace, this); + } + + /** + * Creates a {@link ServerObservationManager ServerObservationManager} + * instance. {@inheritDoc} + */ + public RemoteObservationManager getRemoteObservationManager( + ObservationManager observationManager) throws RemoteException { + return new ServerObservationManager(observationManager, this); + } + + /** + * Creates a {@link ServerNamespaceRegistry ServerNamespaceRegistry} + * instance. {@inheritDoc} + */ + public RemoteNamespaceRegistry getRemoteNamespaceRegistry( + NamespaceRegistry registry) throws RemoteException { + return new ServerNamespaceRegistry(registry, this); + } + + /** + * Creates a {@link ServerNodeTypeManager ServerNodeTypeManager} instance. + * {@inheritDoc} + */ + public RemoteNodeTypeManager getRemoteNodeTypeManager( + NodeTypeManager manager) throws RemoteException { + return new ServerNodeTypeManager(manager, this); + } + + /** + * Creates a {@link ServerItem ServerItem} instance. {@inheritDoc} + */ + public RemoteItem getRemoteItem(Item item) throws RemoteException { + return new ServerItem(item, this); + } + + /** + * Creates a {@link ServerProperty ServerProperty} instance. {@inheritDoc} + */ + public RemoteProperty getRemoteProperty(Property property) + throws RemoteException { + return new ServerProperty(property, this); + } + + /** + * Creates a {@link ServerNode ServerNode} instance. {@inheritDoc} + */ + public RemoteNode getRemoteNode(Node node) throws RemoteException { + return new ServerNode(node, this); + } + + /** + * Creates a {@link ServerVersion ServerVersion} instance. {@inheritDoc} + */ + public RemoteVersion getRemoteVersion(Version version) + throws RemoteException { + return new ServerVersion(version, this); + } + + /** + * Creates a {@link ServerVersionHistory ServerVersionHistory} instance. + * {@inheritDoc} + */ + public RemoteVersionHistory getRemoteVersionHistory( + VersionHistory versionHistory) throws RemoteException { + return new ServerVersionHistory(versionHistory, this); + } + + /** + * Creates a {@link ServerNodeType ServerNodeType} instance. {@inheritDoc} + */ + public RemoteNodeType getRemoteNodeType(NodeType type) + throws RemoteException { + return new ServerNodeType(type, this); + } + + /** + * Creates a {@link ServerItemDefinition ServerItemDefinition} instance. + * {@inheritDoc} + */ + public RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) + throws RemoteException { + return new ServerItemDefinition(def, this); + } + + /** + * Creates a {@link ServerNodeDefinition ServerNodeDefinition} instance. + * {@inheritDoc} + */ + public RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) + throws RemoteException { + return new ServerNodeDefinition(def, this); + } + + /** + * Creates a {@link ServerPropertyDefinition ServerPropertyDefinition} + * instance. {@inheritDoc} + */ + public RemotePropertyDefinition getRemotePropertyDefinition( + PropertyDefinition def) throws RemoteException { + return new ServerPropertyDefinition(def, this); + } + + /** + * Creates a {@link ServerLock ServerLock} instance. {@inheritDoc} + */ + public RemoteLock getRemoteLock(Lock lock) throws RemoteException { + return new ServerLock(lock, this); + } + + /** + * Creates a {@link ServerQueryManager ServerQueryManager} instance. + * {@inheritDoc} + */ + public RemoteQueryManager getRemoteQueryManager(Session session, + QueryManager manager) throws RemoteException { + return new ServerQueryManager(session, manager, this); + } + + /** + * Creates a {@link ServerQuery ServerQuery} instance. {@inheritDoc} + */ + public RemoteQuery getRemoteQuery(Query query) throws RemoteException { + return new ServerQuery(query, this); + } + + /** + * Creates a {@link ServerQueryResult ServerQueryResult} instance. + * {@inheritDoc} + */ + public RemoteQueryResult getRemoteQueryResult(QueryResult result) + throws RemoteException { + return new ServerQueryResult(result, this); + } + + /** + * Creates a {@link ServerQueryResult ServerQueryResult} instance. + * {@inheritDoc} + */ + public RemoteRow getRemoteRow(Row row) throws RemoteException { + return new ServerRow(row, this); + } + + /** + * Creates a {@link ServerEventCollection ServerEventCollection} instances. + * {@inheritDoc} + */ + public RemoteEventCollection getRemoteEvent(long listenerId, + EventIterator events) throws RemoteException { + RemoteEventCollection.RemoteEvent[] remoteEvents; + if (events != null) { + List eventList = new ArrayList(); + while (events.hasNext()) { + Event event = events.nextEvent(); + eventList + .add(new ServerEventCollection.ServerEvent(event, this)); + } + remoteEvents = eventList.toArray(new RemoteEventCollection.RemoteEvent[eventList.size()]); + } else { + remoteEvents = new RemoteEventCollection.RemoteEvent[0]; // for + // safety + } + + return new ServerEventCollection(listenerId, remoteEvents, this); + } + + /** + * Optimizes the given remote iterator for transmission across the network. + * This method retrieves the first set of elements from the iterator by + * calling {@link RemoteIterator#nextObjects()} and then asks for the total + * size of the iterator. If the size is unkown or greater than the length of + * the retrieved array, then the elements, the size, and the remote iterator + * reference are wrapped into a {@link BufferIterator} instance that gets + * passed over the network. If the retrieved array of elements contains all + * the elements in the iterator, then the iterator instance is discarded and + * just the elements are wrapped into a {@link ArrayIterator} instance to be + * passed to the client. + *

    + * Subclasses can override this method to provide alternative optimizations. + * + * @param remote remote iterator + * @return optimized remote iterator + * @throws RemoteException on RMI errors + */ + protected RemoteIterator optimizeIterator(RemoteIterator remote) + throws RemoteException { + Object[] elements = remote.nextObjects(); + long size = remote.getSize(); + if (size == -1 || (elements != null && size > elements.length)) { + return new BufferIterator(elements, size, remote); + } else { + return new ArrayIterator(elements); + } + } + + /** + * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemoteNodeIterator(NodeIterator iterator) + throws RemoteException { + return optimizeIterator(new ServerNodeIterator(iterator, this, + bufferSize)); + } + + /** + * Creates a {@link ServerPropertyIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) + throws RemoteException { + return optimizeIterator(new ServerPropertyIterator(iterator, this, + bufferSize)); + } + + /** + * Creates a {@link ServerVersionIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemoteVersionIterator(VersionIterator iterator) + throws RemoteException { + return optimizeIterator(new ServerVersionIterator(iterator, this, + bufferSize)); + } + + /** + * Creates a {@link ServerNodeTypeIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) + throws RemoteException { + return optimizeIterator(new ServerNodeTypeIterator(iterator, this, + bufferSize)); + } + + /** + * Creates a {@link ServerRowIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemoteRowIterator(RowIterator iterator) + throws RemoteException { + return optimizeIterator(new ServerRowIterator(iterator, this, + bufferSize)); + } + + public RemoteLockManager getRemoteLockManager(LockManager lockManager) + throws RemoteException { + return new ServerLockManager(lockManager, this); + } + + public RemoteVersionManager getRemoteVersionManager(Session session, + VersionManager versionManager) throws RemoteException { + return new ServerVersionManager(session, versionManager, this); + } + + /** + * Creates a + * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager} + * instance. {@inheritDoc} + */ + public RemoteAccessControlManager getRemoteAccessControlManager( + AccessControlManager acm) throws RemoteException { + return new ServerAccessControlManager(acm, this); + } + + public RemotePrivilege getRemotePrivilege(final Privilege local) + throws RemoteException { + return new ServerPrivilege(local, this); + } + + public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) + throws RemoteException { + RemotePrivilege[] remote = new RemotePrivilege[local.length]; + for (int i = 0; i < remote.length; i++) { + remote[i] = getRemotePrivilege(local[i]); + } + return remote; + } + + public RemoteAccessControlPolicy getRemoteAccessControlPolicy( + final AccessControlPolicy local) throws RemoteException { + if (local instanceof AccessControlList) { + return new ServerAccessControlList((AccessControlList) local, this); + } + return new ServerAccessControlPolicy(local, this); + } + + public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( + final AccessControlPolicy[] local) throws RemoteException { + RemoteAccessControlPolicy[] remote = new RemoteAccessControlPolicy[local.length]; + for (int i = 0; i < remote.length; i++) { + remote[i] = getRemoteAccessControlPolicy(local[i]); + } + return remote; + } + + /** + * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} + */ + public RemoteIterator getRemoteAccessControlPolicyIterator( + AccessControlPolicyIterator iterator) throws RemoteException { + return optimizeIterator(new ServerAccessControlPolicyIterator(iterator, + this, bufferSize)); + } + + public RemoteAccessControlEntry getRemoteAccessControlEntry( + final AccessControlEntry local) throws RemoteException { + return new ServerAccessControlEntry(local, this); + } + + public RemoteAccessControlEntry[] getRemoteAccessControlEntry( + final AccessControlEntry[] local) throws RemoteException { + RemoteAccessControlEntry[] remote = new RemoteAccessControlEntry[local.length]; + for (int i = 0; i < remote.length; i++) { + remote[i] = getRemoteAccessControlEntry(local[i]); + } + return remote; + } + + public RemotePrincipal getRemotePrincipal(final Principal principal) throws RemoteException { + if (ServerGroup.isGroup(principal)) { + return new ServerGroup(principal, this); + } + + return new ServerPrincipal(principal, this); + } + + public RemoteIterator getRemotePrincipalIterator( + Iterator principals) throws RemoteException { + return optimizeIterator(new ServerPrincipalIterator(principals, this, + bufferSize)); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java new file mode 100644 index 00000000000..b88192ca798 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java @@ -0,0 +1,139 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; +import java.util.Map; + +import javax.jcr.RepositoryException; +import javax.jcr.observation.Event; + +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The ServerEventCollection class implements the + * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection}event to + * actually sent the server-side event to the client. + *

    + * This class does not directly relate to any JCR class because beside the list + * of events the unique identifier of the client-side listener has to be + * provided such that the receiving listener may be identified on the + * client-side. + */ +@Deprecated(forRemoval = true) public class ServerEventCollection extends ServerObject implements + RemoteEventCollection { + + /** The unique identifier of the receiving listener */ + private final long listenerId; + + /** + * The list of + * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection.RemoteEvent}. + */ + private final RemoteEvent[] events; + + /** + * Creates an instance of this class. + * + * @param listenerId The unique identifier of the client-side listener to + * which the events should be sent. + * @param events The list of {@link RemoteEvent remote events}. + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + ServerEventCollection( + long listenerId, RemoteEvent[] events, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + + this.listenerId = listenerId; + this.events = events; + } + + /** {@inheritDoc} */ + public long getListenerId() { + return listenerId; + } + + /** {@inheritDoc} */ + public RemoteEvent[] getEvents() { + return events; + } + + /** + * Server side implementation of the {@link RemoteEvent} interface. + * + * {@inheritDoc} + */ + public static class ServerEvent extends ServerObject implements RemoteEvent { + + /** The adapted local event. */ + private Event event; + + /** + * Creates an instance of this class. + * @param type The event type. + * @param path The absolute path to the underlying item. + * @param userId The userID of the originating session. + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + ServerEvent(Event event, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.event = event; + } + + /** {@inheritDoc} */ + public String getPath() throws RepositoryException { + return event.getPath(); + } + + /** {@inheritDoc} */ + public int getType() { + return event.getType(); + } + + /** {@inheritDoc} */ + public String getUserID() { + return event.getUserID(); + } + + /** {@inheritDoc} */ + public String getIdentifier() throws RepositoryException, + RemoteException { + return event.getIdentifier(); + } + + /** {@inheritDoc} */ + public Map getInfo() throws RepositoryException, RemoteException { + return event.getInfo(); + } + + /** {@inheritDoc} */ + public String getUserData() throws RepositoryException, RemoteException { + return event.getUserData(); + } + + /** {@inheritDoc} */ + public long getDate() throws RepositoryException, RemoteException { + return event.getDate(); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java new file mode 100644 index 00000000000..d6bf0b24bc3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java @@ -0,0 +1,143 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Item; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteNode; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.Item Item} interface. + * This class makes a local item available as an RMI service using + * the {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} + * interface. Used mainly as the base class for the + * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} + * and {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} + * adapters. + * + * @see javax.jcr.Item + * @see org.apache.jackrabbit.rmi.remote.RemoteItem + */ +@Deprecated(forRemoval = true) public class ServerItem extends ServerObject implements RemoteItem { + + /** The adapted local item. */ + private Item item; + + /** + * Creates a remote adapter for the given local item. + * + * @param item local item to be adapted + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerItem(Item item, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.item = item; + } + + /** {@inheritDoc} */ + public String getPath() throws RepositoryException, RemoteException { + try { + return item.getPath(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getName() throws RepositoryException, RemoteException { + try { + return item.getName(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void save() throws RepositoryException, RemoteException { + try { + item.save(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteItem getAncestor(int level) + throws RepositoryException, RemoteException { + try { + return getRemoteItem(item.getAncestor(level)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getDepth() throws RepositoryException, RemoteException { + try { + return item.getDepth(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getParent() throws RepositoryException, RemoteException { + try { + return getRemoteNode(item.getParent()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isModified() throws RemoteException { + return item.isModified(); + } + + /** {@inheritDoc} */ + public boolean isNew() throws RemoteException { + return item.isNew(); + } + + /** {@inheritDoc} */ + public void refresh(boolean keepChanges) + throws RepositoryException, RemoteException { + try { + item.refresh(keepChanges); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void remove() throws RepositoryException, RemoteException { + try { + item.remove(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java new file mode 100644 index 00000000000..f9ad98d8c7b --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java @@ -0,0 +1,96 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.nodetype.ItemDefinition; +import javax.jcr.nodetype.NodeType; + +import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDefinition} + * interface. This class makes a local item definition available as an + * RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} + * interface. Used mainly as the base class for the + * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} + * and + * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} + * adapters. + * + * @see javax.jcr.nodetype.ItemDefinition + * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition + */ +@Deprecated(forRemoval = true) public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { + + /** The adapted local item definition. */ + private ItemDefinition def; + + /** + * Creates a remote adapter for the given local item definition. + * + * @param def local item definition + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerItemDefinition(ItemDefinition def, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.def = def; + } + + /** {@inheritDoc} */ + public RemoteNodeType getDeclaringNodeType() throws RemoteException { + NodeType nt = def.getDeclaringNodeType(); + if (nt == null) { + return null; + } else { + return getFactory().getRemoteNodeType(nt); + } + } + + /** {@inheritDoc} */ + public String getName() throws RemoteException { + return def.getName(); + } + + /** {@inheritDoc} */ + public boolean isAutoCreated() throws RemoteException { + return def.isAutoCreated(); + } + + /** {@inheritDoc} */ + public boolean isMandatory() throws RemoteException { + return def.isMandatory(); + } + + /** {@inheritDoc} */ + public int getOnParentVersion() throws RemoteException { + return def.getOnParentVersion(); + } + + /** {@inheritDoc} */ + public boolean isProtected() throws RemoteException { + return def.isProtected(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java new file mode 100644 index 00000000000..59db0f39fcb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java @@ -0,0 +1,100 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.lock.Lock; + +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteNode; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.lock.Lock Lock} interface. + * This class makes a local lock available as an RMI service using + * the {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} + * interface. + * + * @see javax.jcr.lock.Lock + * @see org.apache.jackrabbit.rmi.remote.RemoteLock + */ +@Deprecated(forRemoval = true) public class ServerLock extends ServerObject implements RemoteLock { + + /** The adapted local lock. */ + private Lock lock; + + /** + * Creates a remote adapter for the given local lock. + * + * @param lock local lock + * @throws RemoteException on RMI errors + */ + public ServerLock(Lock lock, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.lock = lock; + } + + /** {@inheritDoc} */ + public RemoteNode getNode() throws RemoteException { + return getRemoteNode(lock.getNode()); + } + + /** {@inheritDoc} */ + public String getLockOwner() throws RemoteException { + return lock.getLockOwner(); + } + + /** {@inheritDoc} */ + public boolean isDeep() throws RemoteException { + return lock.isDeep(); + } + + /** {@inheritDoc} */ + public String getLockToken() throws RemoteException { + return lock.getLockToken(); + } + + /** {@inheritDoc} */ + public boolean isLive() throws RepositoryException, RemoteException { + return lock.isLive(); + } + + /** {@inheritDoc} */ + public void refresh() throws RepositoryException, RemoteException { + lock.refresh(); + } + + /** {@inheritDoc} */ + public boolean isSessionScoped() throws RemoteException { + return lock.isSessionScoped(); + } + + /** {@inheritDoc} */ + public long getSecondsRemaining() throws RepositoryException, RemoteException { + return lock.getSecondsRemaining(); + } + + /** {@inheritDoc} */ + public boolean isLockOwningSession() throws RemoteException { + return lock.isLockOwningSession(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java new file mode 100644 index 00000000000..9221f8c6b01 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.lock.LockManager; + +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; + +@Deprecated(forRemoval = true) public class ServerLockManager extends ServerObject + implements RemoteLockManager { + + /** The adapted local lock manager. */ + private LockManager manager; + + public ServerLockManager(LockManager manager, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.manager = manager; + } + + public String[] getLockTokens() throws RepositoryException { + try { + return manager.getLockTokens(); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void addLockToken(String lockToken) throws RepositoryException { + try { + manager.addLockToken(lockToken); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void removeLockToken(String lockToken) throws RepositoryException { + try { + manager.removeLockToken(lockToken); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public boolean isLocked(String absPath) throws RepositoryException { + try { + return manager.isLocked(absPath); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public boolean holdsLock(String absPath) throws RepositoryException { + try { + return manager.holdsLock(absPath); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteLock getLock(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteLock(manager.getLock(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteLock lock( + String absPath, boolean isDeep, boolean isSessionScoped, + long timeoutHint, String ownerInfo) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteLock(manager.lock( + absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void unlock(String absPath) throws RepositoryException { + try { + manager.unlock(absPath); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java new file mode 100644 index 00000000000..445ea42d2e8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.NamespaceRegistry; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR + * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. + * This class makes a local namespace registry available as an RMI service + * using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} + * interface. + * + * @see javax.jcr.NamespaceRegistry + * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry + */ +@Deprecated(forRemoval = true) public class ServerNamespaceRegistry extends ServerObject implements + RemoteNamespaceRegistry { + + /** The adapted local namespace registry. */ + private NamespaceRegistry registry; + + /** + * Creates a remote adapter for the given local namespace registry. + * + * @param registry local namespace registry + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerNamespaceRegistry( + NamespaceRegistry registry, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.registry = registry; + } + + /** {@inheritDoc} */ + public void registerNamespace(String prefix, String uri) + throws RepositoryException, RemoteException { + try { + registry.registerNamespace(prefix, uri); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void unregisterNamespace(String prefix) + throws RepositoryException, RemoteException { + try { + registry.unregisterNamespace(prefix); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getPrefixes() throws RepositoryException, RemoteException { + try { + return registry.getPrefixes(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getURIs() throws RepositoryException, RemoteException { + try { + return registry.getURIs(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getURI(String prefix) + throws RepositoryException, RemoteException { + try { + return registry.getURI(prefix); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPrefix(String uri) + throws RepositoryException, RemoteException { + try { + return registry.getPrefix(uri); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java new file mode 100644 index 00000000000..cb2aa90c5aa --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java @@ -0,0 +1,688 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; +import javax.jcr.lock.Lock; +import javax.jcr.version.Version; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteLock; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.Node Node} interface. + * This class makes a local node available as an RMI service using + * the {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} + * interface. + * + * @see javax.jcr.Node + * @see org.apache.jackrabbit.rmi.remote.RemoteNode + */ +@Deprecated(forRemoval = true) public class ServerNode extends ServerItem implements RemoteNode { + + /** The adapted local node. */ + private Node node; + + /** + * Creates a remote adapter for the given local node. + * + * @param node local node + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerNode(Node node, RemoteAdapterFactory factory) + throws RemoteException { + super(node, factory); + this.node = node; + } + + /** {@inheritDoc} */ + public RemoteNode addNode(String path) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(node.addNode(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode addNode(String path, String type) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(node.addNode(path, type)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty getProperty(String path) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteProperty(node.getProperty(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getProperties() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getProperties()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteItem getPrimaryItem() + throws RepositoryException, RemoteException { + try { + return getRemoteItem(node.getPrimaryItem()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getProperties(String pattern) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getProperties(pattern)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getProperties(String[] globs) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getProperties(globs)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getReferences() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getReferences()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getReferences(String name) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getReferences(name)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getIdentifier() throws RepositoryException, RemoteException { + try { + return node.getIdentifier(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + @SuppressWarnings("deprecation") + public String getUUID() throws RepositoryException, RemoteException { + try { + return node.getUUID(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasNodes() throws RepositoryException, RemoteException { + try { + return node.hasNodes(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasProperties() throws RepositoryException, RemoteException { + try { + return node.hasProperties(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasProperty(String path) + throws RepositoryException, RemoteException { + try { + return node.hasProperty(path); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNodeType[] getMixinNodeTypes() + throws RepositoryException, RemoteException { + try { + return getRemoteNodeTypeArray(node.getMixinNodeTypes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNodeType getPrimaryNodeType() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeType(node.getPrimaryNodeType()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isNodeType(String type) + throws RepositoryException, RemoteException { + try { + return node.isNodeType(type); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getNodes() throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator(node.getNodes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getNodes(String pattern) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator(node.getNodes(pattern)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getNodes(String[] globs) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator(node.getNodes(globs)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getNode(String path) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(node.getNode(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasNode(String path) + throws RepositoryException, RemoteException { + try { + return node.hasNode(path); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty setProperty(String name, Value value) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteProperty(node.setProperty(name, value)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty setProperty(String name, Value value, int type) + throws RepositoryException, RemoteException { + try { + Property property = node.setProperty(name, value, type); + if (property == null) { + return null; + } else { + return getFactory().getRemoteProperty(property); + } + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void addMixin(String name) + throws RepositoryException, RemoteException { + try { + node.addMixin(name); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean canAddMixin(String name) + throws RepositoryException, RemoteException { + try { + return node.canAddMixin(name); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeMixin(String name) + throws RepositoryException, RemoteException { + try { + node.removeMixin(name); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void orderBefore(String src, String dst) + throws RepositoryException, RemoteException { + try { + node.orderBefore(src, dst); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty setProperty(String name, Value[] values) + throws RepositoryException, RemoteException { + try { + Property property = node.setProperty(name, values); + if (property == null) { + return null; + } else { + return getFactory().getRemoteProperty(property); + } + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNodeDefinition getDefinition() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeDefinition(node.getDefinition()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion checkin() throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion(node.checkin()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void checkout() throws RepositoryException, RemoteException { + try { + node.checkout(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getCorrespondingNodePath(String workspace) + throws RepositoryException, RemoteException { + try { + return node.getCorrespondingNodePath(workspace); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getIndex() throws RepositoryException, RemoteException { + try { + return node.getIndex(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator merge(String workspace, boolean bestEffort) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator(node.merge(workspace, bestEffort)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void cancelMerge(String versionUUID) + throws RepositoryException, RemoteException { + try { + node.cancelMerge(getVersionByUUID(versionUUID)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void doneMerge(String versionUUID) + throws RepositoryException, RemoteException { + try { + node.doneMerge(getVersionByUUID(versionUUID)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restore(String version, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + node.restore(version, removeExisting); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restoreByUUID(String versionUUID, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + node.restore(getVersionByUUID(versionUUID), removeExisting); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restore(String versionUUID, String path, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + node.restore(getVersionByUUID(versionUUID), path, removeExisting); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void restoreByLabel(String label, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + node.restoreByLabel(label, removeExisting); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void update(String workspace) + throws RepositoryException, RemoteException { + try { + node.update(workspace); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean holdsLock() throws RepositoryException, RemoteException { + try { + return node.holdsLock(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isCheckedOut() throws RepositoryException, RemoteException { + try { + return node.isCheckedOut(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersionHistory getVersionHistory() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersionHistory(node.getVersionHistory()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getBaseVersion() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion(node.getBaseVersion()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean isLocked() throws RepositoryException, RemoteException { + try { + return node.isLocked(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty setProperty(String name, Value[] values, int type) + throws RepositoryException, RemoteException { + try { + Property property = node.setProperty(name, values, type); + return getFactory().getRemoteProperty(property); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void unlock() throws RepositoryException, RemoteException { + try { + node.unlock(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteLock getLock() throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteLock(node.getLock()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteLock lock(boolean isDeep, boolean isSessionScoped) + throws RepositoryException, RemoteException { + try { + Lock lock = node.lock(isDeep, isSessionScoped); + return getFactory().getRemoteLock(lock); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getSharedSet() + throws RepositoryException, RemoteException { + try { + NodeIterator sharedSet = node.getSharedSet(); + return getFactory().getRemoteNodeIterator(sharedSet); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void followLifecycleTransition(String transition) + throws RepositoryException, RemoteException { + try { + node.followLifecycleTransition(transition); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAllowedLifecycleTransistions() + throws RepositoryException, RemoteException { + try { + return node.getAllowedLifecycleTransistions(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getWeakReferences() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getWeakReferences()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getWeakReferences(String name) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyIterator(node.getWeakReferences(name)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeShare() throws RepositoryException, RemoteException { + try { + node.removeShare(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeSharedSet() throws RepositoryException, RemoteException { + try { + node.removeSharedSet(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setPrimaryType(String nodeTypeName) + throws RepositoryException, RemoteException { + try { + node.setPrimaryType(nodeTypeName); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + //---------- Implementation helper ----------------------------------------- + + /** + * Returns the {@link Version} instance for the given UUID. + * + * @param versionUUID The UUID of the version. + * + * @return The version node. + * + * @throws RepositoryException if an error occurrs accessing the version + * node or if the UUID does not denote a version. + */ + protected Version getVersionByUUID(String versionUUID) + throws RepositoryException { + + // get the version node by its UUID from the version history's session + Session session = node.getSession(); + Node versionNode = session.getNodeByUUID(versionUUID); + + // check whether the node is a session, which it should be according + // to the spec (methods returning nodes should automatically return + // the correct type). + if (versionNode instanceof Version) { + return (Version) versionNode; + } + + // otherwise fail + throw new RepositoryException("Cannot find version " + versionUUID); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java new file mode 100644 index 00000000000..9239a3e6542 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; + +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} + * interface. This class makes a local node definition available as an + * RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} + * interface. + * + * @see javax.jcr.nodetype.NodeDefinition + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition + */ +@Deprecated(forRemoval = true) public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { + + /** The adapted node definition. */ + private NodeDefinition def; + + /** + * Creates a remote adapter for the given local node definition. + * + * @param def local node definition + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerNodeDefinition(NodeDefinition def, RemoteAdapterFactory factory) + throws RemoteException { + super(def, factory); + this.def = def; + } + + /** {@inheritDoc} */ + public RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException { + return getRemoteNodeTypeArray(def.getRequiredPrimaryTypes()); + } + + /** {@inheritDoc} */ + public RemoteNodeType getDefaultPrimaryType() throws RemoteException { + NodeType nt = def.getDefaultPrimaryType(); + if (nt == null) { + return null; + } else { + return getFactory().getRemoteNodeType(def.getDefaultPrimaryType()); + } + } + + /** {@inheritDoc} */ + public boolean allowsSameNameSiblings() throws RemoteException { + return def.allowsSameNameSiblings(); + } + + /** {@inheritDoc} */ + public String getDefaultPrimaryTypeName() throws RemoteException { + return def.getDefaultPrimaryTypeName(); + } + + /** {@inheritDoc} */ + public String[] getRequiredPrimaryTypeNames() throws RemoteException { + return def.getRequiredPrimaryTypeNames(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java new file mode 100644 index 00000000000..c8881db8a53 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java @@ -0,0 +1,233 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Value; +import javax.jcr.nodetype.NodeDefinition; +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.PropertyDefinition; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeType NodeType} + * interface. This class makes a local node type available as an RMI service + * using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} + * interface. + * + * @see javax.jcr.nodetype.NodeType + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType + */ +@Deprecated(forRemoval = true) public class ServerNodeType extends ServerObject implements RemoteNodeType { + + /** The adapted local node type. */ + private NodeType type; + + /** + * Creates a remote adapter for the given local node type. + * + * @param type local node type + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerNodeType(NodeType type, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.type = type; + } + + /** + * Utility method for creating an array of remote references for + * local node definitions. The remote references are created using the + * remote adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param defs local node definition array + * @return remote node definition array + * @throws RemoteException on RMI errors + */ + private RemoteNodeDefinition[] getRemoteNodeDefArray(NodeDefinition[] defs) + throws RemoteException { + if (defs != null) { + RemoteNodeDefinition[] remotes = + new RemoteNodeDefinition[defs.length]; + for (int i = 0; i < defs.length; i++) { + remotes[i] = getFactory().getRemoteNodeDefinition(defs[i]); + } + return remotes; + } else { + return new RemoteNodeDefinition[0]; // for safety + } + } + + /** + * Utility method for creating an array of remote references for + * local property definitions. The remote references are created using the + * remote adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param defs local property definition array + * @return remote property definition array + * @throws RemoteException on RMI errors + */ + private RemotePropertyDefinition[] getRemotePropertyDefArray( + PropertyDefinition[] defs) throws RemoteException { + if (defs != null) { + RemotePropertyDefinition[] remotes = + new RemotePropertyDefinition[defs.length]; + for (int i = 0; i < defs.length; i++) { + remotes[i] = getFactory().getRemotePropertyDefinition(defs[i]); + } + return remotes; + } else { + return new RemotePropertyDefinition[0]; // for safety + } + } + + + /** {@inheritDoc} */ + public String getName() throws RemoteException { + return type.getName(); + } + + /** {@inheritDoc} */ + public boolean isMixin() throws RemoteException { + return type.isMixin(); + } + + /** {@inheritDoc} */ + public boolean isAbstract() throws RemoteException { + return type.isAbstract(); + } + + /** {@inheritDoc} */ + public boolean hasOrderableChildNodes() throws RemoteException { + return type.hasOrderableChildNodes(); + } + + /** {@inheritDoc} */ + public RemoteNodeType[] getSupertypes() throws RemoteException { + return getRemoteNodeTypeArray(type.getSupertypes()); + } + + /** {@inheritDoc} */ + public RemoteNodeType[] getDeclaredSupertypes() throws RemoteException { + return getRemoteNodeTypeArray(type.getDeclaredSupertypes()); + } + + /** {@inheritDoc} */ + public boolean isNodeType(String type) throws RemoteException { + return this.type.isNodeType(type); + } + + /** {@inheritDoc} */ + public RemotePropertyDefinition[] getPropertyDefs() throws RemoteException { + PropertyDefinition[] defs = type.getPropertyDefinitions(); + return getRemotePropertyDefArray(defs); + } + + /** {@inheritDoc} */ + public RemotePropertyDefinition[] getDeclaredPropertyDefs() + throws RemoteException { + PropertyDefinition[] defs = type.getDeclaredPropertyDefinitions(); + return getRemotePropertyDefArray(defs); + } + + /** {@inheritDoc} */ + public RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException { + return getRemoteNodeDefArray(type.getChildNodeDefinitions()); + } + + /** {@inheritDoc} */ + public RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException { + return getRemoteNodeDefArray(type.getDeclaredChildNodeDefinitions()); + } + + /** {@inheritDoc} */ + public boolean canSetProperty(String name, Value value) + throws RemoteException { + return type.canSetProperty(name, value); + } + + /** {@inheritDoc} */ + public boolean canSetProperty(String name, Value[] values) + throws RemoteException { + return type.canSetProperty(name, values); + } + + /** {@inheritDoc} */ + public boolean canAddChildNode(String name) throws RemoteException { + return type.canAddChildNode(name); + } + + /** {@inheritDoc} */ + public boolean canAddChildNode(String name, String type) + throws RemoteException { + return this.type.canAddChildNode(name, type); + } + + /** {@inheritDoc} */ + public boolean canRemoveItem(String name) throws RemoteException { + return type.canRemoveItem(name); + } + + /** {@inheritDoc} */ + public String getPrimaryItemName() throws RemoteException { + return type.getPrimaryItemName(); + } + + /** {@inheritDoc} */ + public boolean canRemoveNode(String nodeName) { + return type.canRemoveNode(nodeName); + } + + /** {@inheritDoc} */ + public boolean canRemoveProperty(String propertyName) { + return type.canRemoveProperty(propertyName); + } + + /** {@inheritDoc} */ + public String[] getDeclaredSupertypeNames() { + return type.getDeclaredSupertypeNames(); + } + + /** {@inheritDoc} */ + public boolean isQueryable() { + return type.isQueryable(); + } + + /** {@inheritDoc} */ + public RemoteIterator getDeclaredSubtypes() throws RemoteException { + return getFactory().getRemoteNodeTypeIterator(type.getDeclaredSubtypes()); + } + + /** {@inheritDoc} */ + public RemoteIterator getSubtypes() throws RemoteException { + return getFactory().getRemoteNodeTypeIterator(type.getSubtypes()); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java new file mode 100644 index 00000000000..0da63de8771 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java @@ -0,0 +1,122 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.nodetype.NodeTypeManager; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR + * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} + * interface. This class makes a local node type manager available as an + * RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} + * interface. + * + * @see javax.jcr.nodetype.NodeTypeManager + * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager + */ +@Deprecated(forRemoval = true) public class ServerNodeTypeManager extends ServerObject + implements RemoteNodeTypeManager { + + /** The adapted local node type manager. */ + private NodeTypeManager manager; + + /** + * Creates a remote adapter for the given local node type manager. + * + * @param manager local node type manager + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerNodeTypeManager( + NodeTypeManager manager, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.manager = manager; + } + + /** {@inheritDoc} */ + public RemoteNodeType getNodeType(String name) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeType(manager.getNodeType(name)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getAllNodeTypes() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeTypeIterator( + manager.getAllNodeTypes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getPrimaryNodeTypes() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeTypeIterator( + manager.getPrimaryNodeTypes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getMixinNodeTypes() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeTypeIterator( + manager.getMixinNodeTypes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + public boolean hasNodeType(String name) + throws RepositoryException, RemoteException { + try { + return manager.hasNodeType(name); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + public void unregisterNodeTypes(String[] names) + throws RepositoryException, RemoteException { + try { + manager.unregisterNodeTypes(names); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java new file mode 100644 index 00000000000..5a604f0f034 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java @@ -0,0 +1,263 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.io.Serializable; +import java.rmi.RemoteException; +import java.rmi.server.UnicastRemoteObject; +import java.util.ArrayList; +import java.util.List; + +import javax.jcr.AccessDeniedException; +import javax.jcr.InvalidItemStateException; +import javax.jcr.InvalidSerializedDataException; +import javax.jcr.Item; +import javax.jcr.ItemExistsException; +import javax.jcr.ItemNotFoundException; +import javax.jcr.LoginException; +import javax.jcr.MergeException; +import javax.jcr.NamespaceException; +import javax.jcr.NoSuchWorkspaceException; +import javax.jcr.Node; +import javax.jcr.PathNotFoundException; +import javax.jcr.Property; +import javax.jcr.ReferentialIntegrityException; +import javax.jcr.RepositoryException; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.Value; +import javax.jcr.ValueFormatException; +import javax.jcr.lock.LockException; +import javax.jcr.nodetype.ConstraintViolationException; +import javax.jcr.nodetype.NoSuchNodeTypeException; +import javax.jcr.nodetype.NodeType; +import javax.jcr.query.InvalidQueryException; +import javax.jcr.security.AccessControlException; +import javax.jcr.version.Version; +import javax.jcr.version.VersionException; +import javax.jcr.version.VersionHistory; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteNodeType; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Base class for remote adapters. The purpose of this class is to + * centralize the handling of the RemoteAdapterFactory instance used + * to instantiate new server adapters. + */ +@Deprecated(forRemoval = true) public class ServerObject extends UnicastRemoteObject { + + /** Factory for creating server adapters. */ + private RemoteAdapterFactory factory; + + /** + * Creates a basic server adapter that uses the given factory + * to create new adapters. + * + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + protected ServerObject(RemoteAdapterFactory factory) + throws RemoteException { + super(factory.getPortNumber()); + this.factory = factory; + } + + /** + * Returns the remote adapter factory used to create new adapters. + * + * @return remote adapter factory + */ + protected RemoteAdapterFactory getFactory() { + return factory; + } + + /** + * Returns a cleaned version of the given exception. In some cases + * the underlying repository implementation may throw exceptions + * that are either unserializable, use exception subclasses that are + * only locally available, contain references to unserializable or + * only locally available classes. This method returns a cleaned + * version of such an exception. The returned exception contains only + * the message string from the original exception, and uses the public + * JCR exception class that most specifically matches the original + * exception. + * + * @param ex the original exception + * @return clean exception + */ + protected RepositoryException getRepositoryException( + RepositoryException ex) { + if (ex instanceof AccessDeniedException) { + return new AccessDeniedException(ex.getMessage()); + } else if (ex instanceof ConstraintViolationException) { + return new ConstraintViolationException(ex.getMessage()); + } else if (ex instanceof InvalidItemStateException) { + return new InvalidItemStateException(ex.getMessage()); + } else if (ex instanceof InvalidQueryException) { + return new InvalidQueryException(ex.getMessage()); + } else if (ex instanceof InvalidSerializedDataException) { + return new InvalidSerializedDataException(ex.getMessage()); + } else if (ex instanceof ItemExistsException) { + return new ItemExistsException(ex.getMessage()); + } else if (ex instanceof ItemNotFoundException) { + return new ItemNotFoundException(ex.getMessage()); + } else if (ex instanceof LockException) { + return new LockException(ex.getMessage()); + } else if (ex instanceof LoginException) { + return new LoginException(ex.getMessage()); + } else if (ex instanceof MergeException) { + return new MergeException(ex.getMessage()); + } else if (ex instanceof NamespaceException) { + return new NamespaceException(ex.getMessage()); + } else if (ex instanceof NoSuchNodeTypeException) { + return new NoSuchNodeTypeException(ex.getMessage()); + } else if (ex instanceof NoSuchWorkspaceException) { + return new NoSuchWorkspaceException(ex.getMessage()); + } else if (ex instanceof PathNotFoundException) { + return new PathNotFoundException(ex.getMessage()); + } else if (ex instanceof ReferentialIntegrityException) { + return new ReferentialIntegrityException(ex.getMessage()); + } else if (ex instanceof UnsupportedRepositoryOperationException) { + return new UnsupportedRepositoryOperationException(ex.getMessage()); + } else if (ex instanceof ValueFormatException) { + return new ValueFormatException(ex.getMessage()); + } else if (ex instanceof VersionException) { + return new VersionException(ex.getMessage()); + } else if (ex instanceof AccessControlException) { + return new AccessControlException(ex.getMessage()); + } else { + return new RepositoryException(ex.getMessage()); + } + } + + /** + * Utility method for creating a remote reference for a local item. + * Unlike the factory method for creating remote item references, this + * method introspects the type of the local item and returns the + * corresponding node, property, or item remote reference using the + * remote adapter factory. + *

    + * If the item, this method calls the + * {@link #getRemoteNode(Node)} to return the correct remote type. + * + * @param item local node, property, or item + * @return remote node, property, or item reference + * @throws RemoteException on RMI errors + */ + protected RemoteItem getRemoteItem(Item item) throws RemoteException { + if (item instanceof Property) { + return factory.getRemoteProperty((Property) item); + } else if (item instanceof Node) { + return getRemoteNode((Node) item); + } else { + return factory.getRemoteItem(item); + } + } + + /** + * Utility method for creating a remote reference for a local node. + * Unlike the factory method for creating remote node references, this + * method introspects the type of the local node and returns the + * corresponding node, version, or version history remote reference using + * the remote adapter factory. + * + * @param node local version, versionhistory, or normal node + * @return remote node, property, or item reference + * @throws RemoteException on RMI errors + */ + protected RemoteNode getRemoteNode(Node node) throws RemoteException { + if (node instanceof Version) { + return factory.getRemoteVersion((Version) node); + } else if (node instanceof VersionHistory) { + return factory.getRemoteVersionHistory((VersionHistory) node); + } else { + return factory.getRemoteNode(node); + } + } + + /** + * Utility method for creating an array of remote references for + * local node types. The remote references are created using the + * remote adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param types local node type array + * @return remote node type array + * @throws RemoteException on RMI errors + */ + protected RemoteNodeType[] getRemoteNodeTypeArray(NodeType[] types) + throws RemoteException { + if (types != null) { + RemoteNodeType[] remotes = new RemoteNodeType[types.length]; + for (int i = 0; i < types.length; i++) { + remotes[i] = factory.getRemoteNodeType(types[i]); + } + return remotes; + } else { + return new RemoteNodeType[0]; // for safety + } + } + + /** + * Utility method for preparing an array of values for serialization. + * The returned array will contain serializable versions of all the + * given values. + *

    + * If the given array is null, then an empty array is + * returned. + * + * @param values the values to be decorated + * @return array of decorated values + * @throws RepositoryException if the values can not be serialized + */ + protected Value[] getSerialValues(Value[] values) + throws RepositoryException { + List serials = new ArrayList(); + if (values != null) { + for (Value value : values) { + if (value != null) { + serials.add(getSerialValue(value)); + } + } + } + return serials.toArray(new Value[serials.size()]); + } + + /** + * Utility method for decorating a value. Note that the contents of the + * original values will only be copied when the decorators are serialized. + * Null referenced and already serializable values are passed as-is. + * + * @param value the value to be decorated, or null + * @return the decorated value, or null + * @throws RepositoryException if the value can not be serialized + */ + protected Value getSerialValue(Value value) throws RepositoryException { + // if the value is null or already serializable, just return it + if (value == null || value instanceof Serializable) { + return value; + } else { + return SerialValueFactory.makeSerialValue(value); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java new file mode 100644 index 00000000000..e1589876867 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java @@ -0,0 +1,166 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; +import java.util.HashMap; +import java.util.Map; + +import javax.jcr.RepositoryException; +import javax.jcr.observation.ObservationManager; + +import org.apache.jackrabbit.rmi.observation.Queue; +import org.apache.jackrabbit.rmi.observation.ServerEventListenerProxy; +import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR + * {@link javax.jcr.observation.ObservationManager ObservationManager} interface. + * This class makes a local item available as an RMI service using + * the {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager RemoteObservationManager} + * interface. + *

    + * This class works in conjunction with the + * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class to + * implement the distributed the event listener registration described in + * observation package + * comment. + * + * @see javax.jcr.observation.ObservationManager + * @see org.apache.jackrabbit.rmi.remote.RemoteObservationManager + */ +@Deprecated(forRemoval = true) public class ServerObservationManager extends ServerObject implements + RemoteObservationManager { + + /** The adapted local observation manager. */ + private ObservationManager observationManager; + + /** + * The map of event listener proxies indexed by the unique identifier. + */ + private Map proxyMap; + + /** + * The queue to which event listener proxies post events to be reported + * by the {@link #getNextEvent(long)} method. + */ + private Queue queue; + + /** + * Creates a remote adapter for the given local workspace. + * + * @param observationManager local observation manager + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerObservationManager(ObservationManager observationManager, + RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.observationManager = observationManager; + } + + /** {@inheritDoc} */ + public void addEventListener(long listenerId, int eventTypes, + String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, + boolean noLocal) throws RepositoryException, RemoteException { + + // find the proxy or create one + ServerEventListenerProxy proxy; + synchronized (this) { + if (proxyMap == null) { + proxyMap = new HashMap(); + } + + Long id = Long.valueOf(listenerId); + proxy = proxyMap.get(id); + if (proxy == null) { + proxy = new ServerEventListenerProxy(getFactory(), listenerId, + getQueue()); + proxyMap.put(id, proxy); + } + } + + // register the proxy with the observation manager + observationManager.addEventListener(proxy, eventTypes, absPath, + isDeep, uuid, nodeTypeName, noLocal); + } + + /** {@inheritDoc} */ + public void removeEventListener(long listenerId) + throws RepositoryException, RemoteException { + + // try to find the proxy in the map + ServerEventListenerProxy proxy; + synchronized (this) { + if (proxyMap == null) { + return; + } + + Long id = new Long(listenerId); + proxy = (ServerEventListenerProxy) proxyMap.remove(id); + if (proxy == null) { + return; + } + } + + // register the proxy with the observation manager + observationManager.removeEventListener(proxy); + } + + /** {@inheritDoc} */ + public RemoteEventCollection getNextEvent(long timeout) throws RemoteException { + // need the queue + checkQueue(); + + try { + if (timeout < 0) { + timeout = 0; + } + return (RemoteEventCollection) queue.get(timeout); + } catch (InterruptedException ie) { + // don't retry, but log + } + + // did not get anything, fall back to nothing + return null; + } + + //---------- internal ------------------------------------------------------ + + /** + * Makes sure, the {@link #queue} field is assigned a value. + */ + private synchronized void checkQueue() { + if (queue == null) { + queue = new Queue(); + } + } + + /** + * Returns the Channel allocating it if required. + * + * @return queue + */ + private Queue getQueue() { + checkQueue(); + return queue; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java new file mode 100644 index 00000000000..1b1ab01d14f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java @@ -0,0 +1,134 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Property; +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.Property Property} + * interface. This class makes a local property available as an RMI service + * using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} + * interface. + * + * @see javax.jcr.Property + * @see org.apache.jackrabbit.rmi.remote.RemoteProperty + */ +@Deprecated(forRemoval = true) public class ServerProperty extends ServerItem implements RemoteProperty { + + /** The adapted local property. */ + private Property property; + + /** + * Creates a remote adapter for the given local property. + * + * @param property local property + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerProperty(Property property, RemoteAdapterFactory factory) + throws RemoteException { + super(property, factory); + this.property = property; + } + + /** {@inheritDoc} */ + public Value getValue() throws RepositoryException, RemoteException { + try { + return SerialValueFactory.makeSerialValue(property.getValue()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Value[] getValues() throws RepositoryException, RemoteException { + try { + return getSerialValues(property.getValues()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setValue(Value value) + throws RepositoryException, RemoteException { + try { + property.setValue(value); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setValue(Value[] values) + throws RepositoryException, RemoteException { + try { + property.setValue(values); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public long getLength() throws RepositoryException, RemoteException { + try { + return property.getLength(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public long[] getLengths() throws RepositoryException, RemoteException { + try { + return property.getLengths(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemotePropertyDefinition getDefinition() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemotePropertyDefinition(property.getDefinition()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public int getType() throws RepositoryException, RemoteException { + try { + return property.getType(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java new file mode 100644 index 00000000000..647831ed2ab --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java @@ -0,0 +1,98 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.nodetype.PropertyDefinition; + +import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR + * {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} interface. This + * class makes a local property definition available as an RMI service + * using the + * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} + * interface. + * + * @see javax.jcr.nodetype.PropertyDefinition + * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition + */ +@Deprecated(forRemoval = true) public class ServerPropertyDefinition extends ServerItemDefinition + implements RemotePropertyDefinition { + + /** The adapted local property definition. */ + private PropertyDefinition def; + + /** + * Creates a remote adapter for the given local property definition. + * + * @param def local property definition + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerPropertyDefinition(PropertyDefinition def, RemoteAdapterFactory factory) + throws RemoteException { + super(def, factory); + this.def = def; + } + + /** {@inheritDoc} */ + public int getRequiredType() throws RemoteException { + return def.getRequiredType(); + } + + /** {@inheritDoc} */ + public String[] getValueConstraints() throws RemoteException { + return def.getValueConstraints(); + } + + /** {@inheritDoc} */ + public Value[] getDefaultValues() throws RemoteException { + try { + return getSerialValues(def.getDefaultValues()); + } catch (RepositoryException e) { + throw new RemoteException("Unable to serialize default values"); + } + } + + /** {@inheritDoc} */ + public boolean isMultiple() throws RemoteException { + return def.isMultiple(); + } + + /** {@inheritDoc} */ + public String[] getAvailableQueryOperators() throws RemoteException { + return def.getAvailableQueryOperators(); + } + + /** {@inheritDoc} */ + public boolean isFullTextSearchable() throws RemoteException { + return def.isFullTextSearchable(); + } + + /** {@inheritDoc} */ + public boolean isQueryOrderable() throws RemoteException { + return def.isQueryOrderable(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java new file mode 100644 index 00000000000..5cc63f8d4a3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java @@ -0,0 +1,112 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.query.Query; + +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; +import org.apache.jackrabbit.rmi.remote.RemoteNode; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.query.Query Query} interface. + * This class makes a local session available as an RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteQuery RemoteQuery} + * interface. + * + * @see javax.jcr.query.Query + * @see org.apache.jackrabbit.rmi.remote.RemoteQuery + */ +@Deprecated(forRemoval = true) public class ServerQuery extends ServerObject implements RemoteQuery { + + /** The adapted local query manager. */ + private Query query; + + /** + * Creates a remote adapter for the given local Query. + * + * @param query local Query + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerQuery(Query query, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.query = query; + } + + /** {@inheritDoc} */ + public RemoteQueryResult execute() + throws RepositoryException, RemoteException { + return getFactory().getRemoteQueryResult(query.execute()); + } + + /** {@inheritDoc} */ + public String getStatement() throws RemoteException { + return query.getStatement(); + } + + /** {@inheritDoc} */ + public String getLanguage() throws RemoteException { + return query.getLanguage(); + } + + /** {@inheritDoc} */ + public String getStoredQueryPath() + throws RepositoryException, RemoteException { + return query.getStoredQueryPath(); + } + + /** {@inheritDoc} */ + public RemoteNode storeAsNode(String absPath) + throws RepositoryException, RemoteException { + return getRemoteNode(query.storeAsNode(absPath)); + } + + /** {@inheritDoc} */ + public void bindValue(String varName, Value value) + throws RepositoryException, RemoteException { + query.bindValue(varName, value); + } + + /** {@inheritDoc} */ + public String[] getBindVariableNames() + throws RepositoryException, RemoteException { + try { + return query.getBindVariableNames(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setLimit(long limit) throws RemoteException { + query.setLimit(limit); + } + + /** {@inheritDoc} */ + public void setOffset(long offset) throws RemoteException { + query.setOffset(offset); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java new file mode 100644 index 00000000000..4310bfc51eb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java @@ -0,0 +1,104 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Item; +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.query.InvalidQueryException; +import javax.jcr.query.Query; +import javax.jcr.query.QueryManager; + +import org.apache.jackrabbit.rmi.remote.RemoteQuery; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.query.QueryManager QueryManager} + * interface. This class makes a local query manager available as an RMI + * service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryManager RemoteQueryManager} + * interface. + * + * @see javax.jcr.query.QueryManager + * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager + */ +@Deprecated(forRemoval = true) public class ServerQueryManager extends ServerObject + implements RemoteQueryManager { + + /** The current session. */ + private Session session; + + /** The adapted local query manager. */ + private QueryManager manager; + + /** + * Creates a remote adapter for the given local query manager. + * + * @param session current session + * @param manager local query manager + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerQueryManager( + Session session, QueryManager manager, ServerAdapterFactory factory) + throws RemoteException { + super(factory); + this.session = session; + this.manager = manager; + } + + /** {@inheritDoc} */ + public RemoteQuery createQuery(String statement, String language) + throws RepositoryException, RemoteException { + try { + Query query = manager.createQuery(statement, language); + return getFactory().getRemoteQuery(query); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteQuery getQuery(String absPath) + throws RepositoryException, RemoteException { + try { + Item item = session.getItem(absPath); + if (!item.isNode()) { + throw new InvalidQueryException("Not a query node: " + absPath); + } + return getFactory().getRemoteQuery(manager.getQuery((Node) item)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getSupportedQueryLanguages() + throws RepositoryException, RemoteException { + try { + return manager.getSupportedQueryLanguages(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java new file mode 100644 index 00000000000..2a4cc66b298 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java @@ -0,0 +1,78 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.query.QueryResult; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. + * This class makes a local session available as an RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryResult RemoteQueryResult} + * interface. + * + * @see javax.jcr.query.QueryResult + * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult + */ +@Deprecated(forRemoval = true) public class ServerQueryResult extends ServerObject + implements RemoteQueryResult { + + /** The adapted local query result. */ + private QueryResult result; + + /** + * Creates a remote adapter for the given local QueryResult. + * + * @param result local QueryResult + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerQueryResult(QueryResult result, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.result = result; + } + + /** {@inheritDoc} */ + public String[] getColumnNames() + throws RepositoryException, RemoteException { + return result.getColumnNames(); + } + + /** {@inheritDoc} */ + public RemoteIterator getRows() throws RepositoryException, RemoteException { + return getFactory().getRemoteRowIterator(result.getRows()); + } + + /** {@inheritDoc} */ + public RemoteIterator getNodes() throws RepositoryException, RemoteException { + return getFactory().getRemoteNodeIterator(result.getNodes()); + } + + /** {@inheritDoc} */ + public String[] getSelectorNames() throws RepositoryException, RemoteException { + return result.getSelectorNames(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java new file mode 100644 index 00000000000..0cac82f6e25 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java @@ -0,0 +1,143 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Credentials; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.Value; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.Repository Repository} + * interface. This class makes a local repository available as an RMI service + * using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} + * interface. + * + * @see javax.jcr.Repository + * @see org.apache.jackrabbit.rmi.remote.RemoteRepository + */ +@Deprecated(forRemoval = true) public class ServerRepository extends ServerObject implements RemoteRepository { + + /** The adapted local repository. */ + private Repository repository; + + /** + * Creates a remote adapter for the given local repository. + * + * @param repository local repository + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerRepository( + Repository repository, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.repository = repository; + } + + /** {@inheritDoc} */ + public String getDescriptor(String name) throws RemoteException { + return repository.getDescriptor(name); + } + + /** {@inheritDoc} */ + public String[] getDescriptorKeys() throws RemoteException { + return repository.getDescriptorKeys(); + } + + /** {@inheritDoc} */ + public RemoteSession login() throws RepositoryException, RemoteException { + try { + Session session = repository.login(); + return getFactory().getRemoteSession(session); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteSession login(String workspace) + throws RepositoryException, RemoteException { + try { + Session session = repository.login(workspace); + return getFactory().getRemoteSession(session); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteSession login(Credentials credentials) + throws RepositoryException, RemoteException { + try { + Session session = repository.login(credentials); + return getFactory().getRemoteSession(session); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteSession login(Credentials credentials, String workspace) + throws RepositoryException, RemoteException { + try { + Session session = repository.login(credentials, workspace); + return getFactory().getRemoteSession(session); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Value getDescriptorValue(String key) throws RemoteException { + try { + return SerialValueFactory.makeSerialValue(repository.getDescriptorValue(key)); + } catch (RepositoryException ex) { + throw new RemoteException(ex.getMessage(), ex); + } + } + + /** {@inheritDoc} */ + public Value[] getDescriptorValues(String key) throws RemoteException { + try { + return SerialValueFactory.makeSerialValueArray(repository.getDescriptorValues(key)); + } catch (RepositoryException ex) { + throw new RemoteException(ex.getMessage(), ex); + } + } + + /** {@inheritDoc} */ + public boolean isSingleValueDescriptor(String key) throws RemoteException { + return repository.isSingleValueDescriptor(key); + } + + /** {@inheritDoc} */ + public boolean isStandardDescriptor(String key) throws RemoteException { + return repository.isStandardDescriptor(key); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java new file mode 100644 index 00000000000..f41571bdf5e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java @@ -0,0 +1,136 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.query.Row; + +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteRow; +import org.apache.jackrabbit.rmi.value.SerialValueFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.query.Row Row} interface. + * This class makes a local session available as an RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteRow RemoteRow} + * interface. + * + * @see javax.jcr.query.Row + * @see org.apache.jackrabbit.rmi.remote.RemoteRow + */ +@Deprecated(forRemoval = true) public class ServerRow extends ServerObject implements RemoteRow { + + /** The adapted local row. */ + private Row row; + + /** + * Creates a remote adapter for the given local query row. + * + * @param row local query row + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerRow(Row row, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.row = row; + } + + /** {@inheritDoc} */ + public Value[] getValues() throws RepositoryException, RemoteException { + try { + return getSerialValues(row.getValues()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Value getValue(String propertyName) + throws RepositoryException, RemoteException { + try { + return SerialValueFactory.makeSerialValue(row.getValue(propertyName)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getNode() + throws RepositoryException, RemoteException { + try { + return getRemoteNode(row.getNode()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getNode(String selectorName) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(row.getNode(selectorName)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPath() + throws RepositoryException, RemoteException { + try { + return row.getPath(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getPath(String selectorName) + throws RepositoryException, RemoteException { + try { + return row.getPath(selectorName); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public double getScore() + throws RepositoryException, RemoteException { + try { + return row.getScore(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public double getScore(String selectorName) + throws RepositoryException, RemoteException { + try { + return row.getScore(selectorName); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java new file mode 100644 index 00000000000..f5ce9c04c12 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java @@ -0,0 +1,353 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.rmi.RemoteException; + +import javax.jcr.Credentials; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.UnsupportedRepositoryOperationException; + +import org.apache.jackrabbit.rmi.remote.RemoteItem; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteProperty; +import org.apache.jackrabbit.rmi.remote.RemoteSession; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.Session Session} interface. + * This class makes a local session available as an RMI service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} + * interface. + * + * @see javax.jcr.Session + * @see org.apache.jackrabbit.rmi.remote.RemoteSession + */ +@Deprecated(forRemoval = true) public class ServerSession extends ServerObject implements RemoteSession { + + /** The adapted local session. */ + private Session session; + + /** + * The server workspace for this session. This field is assigned on demand + * by the first call to {@link #getWorkspace()}. The assumption is that + * there is only one workspace instance per session and that each call to + * the Session.getWorkspace() method of a single session will + * allways return the same object. + */ + private RemoteWorkspace remoteWorkspace; + + /** + * Creates a remote adapter for the given local session. + * + * @param session local session + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerSession(Session session, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.session = session; + } + + /** {@inheritDoc} */ + public String getUserID() throws RemoteException { + return session.getUserID(); + } + + /** {@inheritDoc} */ + public Object getAttribute(String name) throws RemoteException { + return session.getAttribute(name); + } + + /** {@inheritDoc} */ + public String[] getAttributeNames() throws RemoteException { + return session.getAttributeNames(); + } + + /** {@inheritDoc} */ + public RemoteSession impersonate(Credentials credentials) + throws RepositoryException, RemoteException { + try { + Session newSession = session.impersonate(credentials); + return getFactory().getRemoteSession(newSession); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteWorkspace getWorkspace() throws RemoteException { + if (remoteWorkspace == null) { + remoteWorkspace = + getFactory().getRemoteWorkspace(session.getWorkspace()); + } + + return remoteWorkspace; + } + + /** {@inheritDoc} */ + public boolean hasPermission(String path, String actions) + throws RepositoryException, RemoteException { + return session.hasPermission(path, actions); + } + + /** {@inheritDoc} */ + public String getNamespacePrefix(String uri) + throws RepositoryException, RemoteException { + try { + return session.getNamespacePrefix(uri); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getNamespacePrefixes() + throws RepositoryException, RemoteException { + try { + return session.getNamespacePrefixes(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getNamespaceURI(String prefix) + throws RepositoryException, RemoteException { + try { + return session.getNamespaceURI(prefix); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void setNamespacePrefix(String prefix, String uri) + throws RepositoryException, RemoteException { + try { + session.setNamespacePrefix(prefix, uri); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean itemExists(String path) throws RepositoryException, RemoteException { + return session.itemExists(path); + } + + /** {@inheritDoc} */ + public boolean nodeExists(String path) throws RepositoryException, RemoteException { + return session.nodeExists(path); + } + + /** {@inheritDoc} */ + public boolean propertyExists(String path) throws RepositoryException, RemoteException { + return session.propertyExists(path); + } + + /** {@inheritDoc} */ + public RemoteNode getNodeByIdentifier(String id) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(session.getNodeByIdentifier(id)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + @SuppressWarnings("deprecation") + public RemoteNode getNodeByUUID(String uuid) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(session.getNodeByUUID(uuid)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getRootNode() + throws RepositoryException, RemoteException { + try { + return getRemoteNode(session.getRootNode()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteItem getItem(String path) + throws RepositoryException, RemoteException { + try { + return getRemoteItem(session.getItem(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getNode(String path) + throws RepositoryException, RemoteException { + try { + return getRemoteNode(session.getNode(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteProperty getProperty(String path) + throws RepositoryException, RemoteException { + try { + return (RemoteProperty) getRemoteItem(session.getProperty(path)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasPendingChanges() + throws RepositoryException, RemoteException { + try { + return session.hasPendingChanges(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeItem(String path) + throws RepositoryException, RemoteException { + try { + session.removeItem(path); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void move(String from, String to) + throws RepositoryException, RemoteException { + try { + session.move(from, to); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void save() throws RepositoryException, RemoteException { + try { + session.save(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void refresh(boolean keepChanges) + throws RepositoryException, RemoteException { + try { + session.refresh(keepChanges); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void logout() throws RemoteException { + session.logout(); + } + + /** {@inheritDoc} */ + public boolean isLive() throws RemoteException { + return session.isLive(); + } + + /** {@inheritDoc} */ + public void importXML(String path, byte[] xml, int mode) + throws IOException, RepositoryException, RemoteException { + try { + session.importXML(path, new ByteArrayInputStream(xml), mode); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void addLockToken(String token) throws RemoteException { + session.addLockToken(token); + } + + /** {@inheritDoc} */ + public String[] getLockTokens() throws RemoteException { + return session.getLockTokens(); + } + + /** {@inheritDoc} */ + public void removeLockToken(String token) throws RemoteException { + session.removeLockToken(token); + } + + /** {@inheritDoc} */ + public byte[] exportDocumentView( + String path, boolean binaryAsLink, boolean noRecurse) + throws IOException, RepositoryException, RemoteException { + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + session.exportDocumentView(path, buffer, binaryAsLink, noRecurse); + return buffer.toByteArray(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public byte[] exportSystemView( + String path, boolean binaryAsLink, boolean noRecurse) + throws IOException, RepositoryException, RemoteException { + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + session.exportSystemView(path, buffer, binaryAsLink, noRecurse); + return buffer.toByteArray(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteAccessControlManager getAccessControlManager() + throws UnsupportedRepositoryOperationException, + RepositoryException, RemoteException { + try { + return getFactory().getRemoteAccessControlManager( + session.getAccessControlManager()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java new file mode 100644 index 00000000000..2dda97f12aa --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java @@ -0,0 +1,157 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; +import java.util.Calendar; + +import javax.jcr.RepositoryException; +import javax.jcr.version.Version; + +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.version.Version Version} interface. + * This class makes a local version available as an RMI service using + * the {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} + * interface. + * + * @see javax.jcr.version.Version + * @see org.apache.jackrabbit.rmi.remote.RemoteVersion + */ +@Deprecated(forRemoval = true) public class ServerVersion extends ServerNode implements RemoteVersion { + + /** The adapted local version. */ + private Version version; + + /** + * Creates a remote adapter for the given local version. + * + * @param version local version + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerVersion(Version version, RemoteAdapterFactory factory) + throws RemoteException { + super(version, factory); + this.version = version; + } + + /** + * Utility method for creating an array of remote references for + * local versions. The remote references are created using the + * remote adapter factory. + *

    + * A null input is treated as an empty array. + * + * @param versions local version array + * @return remote version array + * @throws RemoteException on RMI errors + */ + private RemoteVersion[] getRemoteVersionArray(Version[] versions) + throws RemoteException { + if (versions != null) { + RemoteVersion[] remotes = new RemoteVersion[versions.length]; + for (int i = 0; i < remotes.length; i++) { + remotes[i] = getFactory().getRemoteVersion(versions[i]); + } + return remotes; + } else { + return new RemoteVersion[0]; // for safety + } + } + + /** {@inheritDoc} */ + public RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersionHistory(version.getContainingHistory()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public Calendar getCreated() throws RepositoryException { + try { + return version.getCreated(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getLinearSuccessor() throws RepositoryException, + RemoteException { + try { + Version linearSuccessor = version.getLinearSuccessor(); + if (linearSuccessor == null) { + return null; + } else { + return getFactory().getRemoteVersion(linearSuccessor); + } + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException { + try { + return getRemoteVersionArray(version.getSuccessors()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getLinearPredecessor() throws RepositoryException, + RemoteException { + try { + Version linearPredecessor = version.getLinearPredecessor(); + if (linearPredecessor == null) { + return null; + } else { + return getFactory().getRemoteVersion(linearPredecessor); + } + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException { + try { + return getRemoteVersionArray(version.getPredecessors()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNode getFrozenNode() throws RepositoryException, + RemoteException { + try { + return getFactory().getRemoteNode(version.getFrozenNode()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java new file mode 100644 index 00000000000..ac31de6c573 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java @@ -0,0 +1,215 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link javax.jcr.version.VersionHistory VersionHistory} + * interface. This class makes a local version history available as an RMI + * service using the + * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} + * interface. + * + * @see javax.jcr.version.VersionHistory + * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory + */ +@Deprecated(forRemoval = true) public class ServerVersionHistory extends ServerNode + implements RemoteVersionHistory { + + /** The adapted local version history. */ + private VersionHistory versionHistory; + + /** + * Creates a remote adapter for the given local version history. + * + * @param versionHistory local version history + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerVersionHistory(VersionHistory versionHistory, + RemoteAdapterFactory factory) throws RemoteException { + super(versionHistory, factory); + this.versionHistory = versionHistory; + } + + /** {@inheritDoc} */ + public String getVersionableIdentifier() throws RepositoryException, + RemoteException { + try { + return versionHistory.getVersionableIdentifier(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getRootVersion() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion(versionHistory.getRootVersion()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getAllLinearVersions() throws RepositoryException, + RemoteException { + try { + return getFactory().getRemoteVersionIterator( + versionHistory.getAllLinearVersions()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getAllVersions() + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersionIterator( + versionHistory.getAllVersions()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, + RemoteException { + try { + return getFactory().getRemoteNodeIterator( + versionHistory.getAllLinearFrozenNodes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteIterator getAllFrozenNodes() throws RepositoryException, + RemoteException { + try { + return getFactory().getRemoteNodeIterator( + versionHistory.getAllFrozenNodes()); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getVersion(String versionName) + throws RepositoryException, RemoteException { + try { + Version version = versionHistory.getVersion(versionName); + return getFactory().getRemoteVersion(version); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteVersion getVersionByLabel(String label) + throws RepositoryException, RemoteException { + try { + Version version = versionHistory.getVersionByLabel(label); + return getFactory().getRemoteVersion(version); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void addVersionLabel(String versionName, String label, + boolean moveLabel) throws RepositoryException, RemoteException { + try { + versionHistory.addVersionLabel(versionName, label, moveLabel); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeVersionLabel(String label) throws RepositoryException, + RemoteException { + try { + versionHistory.removeVersionLabel(label); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public boolean hasVersionLabel(String label) throws RepositoryException, RemoteException { + return versionHistory.hasVersionLabel(label); + } + + /** {@inheritDoc} */ + public boolean hasVersionLabel(String versionUUID, String label) + throws RepositoryException, RemoteException { + try { + Version version = getVersionByUUID(versionUUID); + return versionHistory.hasVersionLabel(version, label); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getVersionLabels() throws RepositoryException, RemoteException { + return versionHistory.getVersionLabels(); + } + + /** {@inheritDoc} */ + public String[] getVersionLabels(String versionUUID) + throws RepositoryException, RemoteException { + try { + Version version = getVersionByUUID(versionUUID); + return versionHistory.getVersionLabels(version); + } catch (ClassCastException cce) { + // we do not expect this here as nodes should be returned correctly + throw getRepositoryException(new RepositoryException(cce)); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void removeVersion(String versionName) + throws RepositoryException, RemoteException { + try { + versionHistory.removeVersion(versionName); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String getVersionableUUID() throws RepositoryException, RemoteException { + return versionHistory.getVersionableUUID(); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java new file mode 100644 index 00000000000..61d2fd6f94d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java @@ -0,0 +1,278 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.version.Version; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.RemoteNode; +import org.apache.jackrabbit.rmi.remote.RemoteVersion; +import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; + +@Deprecated(forRemoval = true) public class ServerVersionManager extends ServerObject + implements RemoteVersionManager { + + private final Session session; + + private final VersionManager manager; + + public ServerVersionManager(Session session, + VersionManager manager, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.session = session; + this.manager = manager; + } + + public RemoteVersion checkin(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion(manager.checkin(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void checkout(String absPath) throws RepositoryException { + try { + manager.checkout(absPath); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteVersion checkpoint(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion(manager.checkpoint(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteNode createActivity(String title) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNode(manager.createActivity(title)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteNode createConfiguration(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNode( + manager.createConfiguration(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteNode getActivity() + throws RepositoryException, RemoteException { + try { + Node activity = manager.getActivity(); + if (activity == null) { + return null; + } else { + return getFactory().getRemoteNode(activity); + } + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteVersion getBaseVersion(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersion( + manager.getBaseVersion(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteVersionHistory getVersionHistory(String absPath) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteVersionHistory( + manager.getVersionHistory(absPath)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public boolean isCheckedOut(String absPath) + throws RepositoryException { + try { + return manager.isCheckedOut(absPath); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteIterator merge( + String absPath, String srcWorkspace, boolean bestEffort) + throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator( + manager.merge(absPath, srcWorkspace, bestEffort)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public RemoteIterator merge( + String absPath, String srcWorkspace, boolean bestEffort, + boolean isShallow) throws RepositoryException, RemoteException { + try { + return getFactory().getRemoteNodeIterator( + manager.merge(absPath, srcWorkspace, bestEffort, isShallow)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void restore( + String absPath, String versionName, boolean removeExisting) + throws RepositoryException { + try { + manager.restore(absPath, versionName, removeExisting); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void restoreByLabel( + String absPath, String versionLabel, boolean removeExisting) + throws RepositoryException { + try { + manager.restoreByLabel(absPath, versionLabel, removeExisting); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void cancelMerge(String absPath, String versionIdentifier) + throws RepositoryException, RemoteException { + try { + Version version = (Version) session.getNodeByIdentifier(versionIdentifier); + manager.cancelMerge(absPath, version); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + public void doneMerge(String absPath, String versionIdentifier) + throws RepositoryException, RemoteException { + try { + Version version = (Version) session.getNodeByIdentifier(versionIdentifier); + manager.doneMerge(absPath, version); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public void restore(String[] versionIdentifiers, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + Version[] versions = new Version[versionIdentifiers.length]; + for (int i = 0; i < versions.length; i++) { + Version version = (Version) session.getNodeByIdentifier(versionIdentifiers[i]); + versions[i] = version; + } + manager.restore(versions, removeExisting); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public void restore(String versionIdentifier, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + Version version = (Version) session.getNodeByIdentifier(versionIdentifier); + manager.restore(version, removeExisting); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public RemoteNode setActivity(String activityNodeIdentifier) + throws RepositoryException, RemoteException { + try { + Node newActivityNode; + if (activityNodeIdentifier == null) { + newActivityNode = null; + } else { + newActivityNode = session.getNodeByIdentifier(activityNodeIdentifier); + } + Node oldActivityNode = manager.setActivity(newActivityNode); + if (oldActivityNode == null) { + return null; + } else { + return getFactory().getRemoteNode(oldActivityNode); + } + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public void removeActivity(String activityNodeIdentifier) + throws RepositoryException, RemoteException { + try { + Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); + manager.removeActivity(activityNode); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public RemoteIterator merge(String activityNodeIdentifier) + throws RepositoryException, RemoteException { + try { + Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); + return getFactory().getRemoteNodeIterator(manager.merge(activityNode)); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + + @Override + public void restoreVI(String absPath, String versionIdentifier, + boolean removeExisting) throws RepositoryException, RemoteException { + try { + Version version = (Version) session.getNodeByIdentifier(versionIdentifier); + manager.restore(absPath, version, removeExisting); + } catch (RepositoryException e) { + throw getRepositoryException(e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java new file mode 100644 index 00000000000..f3c18efbf40 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java @@ -0,0 +1,242 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.rmi.RemoteException; + +import javax.jcr.NamespaceRegistry; +import javax.jcr.RepositoryException; +import javax.jcr.Workspace; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.QueryManager; +import javax.jcr.version.VersionManager; + +import org.apache.jackrabbit.rmi.remote.RemoteLockManager; +import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; +import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; +import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; +import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; +import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; +import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link Workspace Workspace} interface. + * This class makes a local workspace available as an RMI service using the + * {@link RemoteWorkspace RemoteWorkspace} interface. + * + * @see Workspace + * @see RemoteWorkspace + */ +@Deprecated(forRemoval = true) public class ServerWorkspace extends ServerObject implements RemoteWorkspace { + + /** The adapted local workspace. */ + private Workspace workspace; + + /** + * The remote observation manager for this workspace. This field is assigned + * on demand by the first call to {@link #getObservationManager()}. The + * assumption is that there is only one observation manager instance per + * workspace and that each call to the + * Workspace.getObservationManager() method of a single + * workspace will allways return the same object. + */ + private RemoteObservationManager remoteObservationManager; + + private RemoteLockManager remoteLockManager; + + private RemoteVersionManager remoteVersionManager; + + /** + * Creates a remote adapter for the given local workspace. + * + * @param workspace local workspace + * @param factory remote adapter factory + * @throws RemoteException on RMI errors + */ + public ServerWorkspace(Workspace workspace, RemoteAdapterFactory factory) + throws RemoteException { + super(factory); + this.workspace = workspace; + } + + /** {@inheritDoc} */ + public String getName() throws RemoteException { + return workspace.getName(); + } + + /** {@inheritDoc} */ + public void copy(String from, String to) + throws RepositoryException, RemoteException { + try { + workspace.copy(from, to); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void copy(String workspace, String from, String to) + throws RepositoryException, RemoteException { + try { + this.workspace.copy(workspace, from, to); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void clone( + String workspace, String from, String to, boolean removeExisting) + throws RepositoryException, RemoteException { + try { + this.workspace.clone(workspace, from, to, removeExisting); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void move(String from, String to) + throws RepositoryException, RemoteException { + try { + workspace.move(from, to); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNodeTypeManager getNodeTypeManager() + throws RepositoryException, RemoteException { + try { + NodeTypeManager manager = workspace.getNodeTypeManager(); + return getFactory().getRemoteNodeTypeManager(manager); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteNamespaceRegistry getNamespaceRegistry() + throws RepositoryException, RemoteException { + try { + NamespaceRegistry registry = workspace.getNamespaceRegistry(); + return getFactory().getRemoteNamespaceRegistry(registry); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteQueryManager getQueryManager() + throws RepositoryException, RemoteException { + try { + QueryManager queryManager = workspace.getQueryManager(); + return getFactory().getRemoteQueryManager( + workspace.getSession(), queryManager); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public RemoteObservationManager getObservationManager() + throws RepositoryException, RemoteException { + try { + if (remoteObservationManager == null) { + ObservationManager observationManager = + workspace.getObservationManager(); + remoteObservationManager = + getFactory().getRemoteObservationManager(observationManager); + } + return remoteObservationManager; + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public String[] getAccessibleWorkspaceNames() + throws RepositoryException, RemoteException { + try { + return workspace.getAccessibleWorkspaceNames(); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + /** {@inheritDoc} */ + public void importXML(String path, byte[] xml, int uuidBehaviour) + throws IOException, RepositoryException, RemoteException { + try { + workspace.importXML( + path, new ByteArrayInputStream(xml), uuidBehaviour); + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + public void createWorkspace(String name, String source) + throws RepositoryException, RemoteException { + if (source != null) { + workspace.createWorkspace(name, source); + } else { + workspace.createWorkspace(name); + } + } + + public void deleteWorkspace(String name) + throws RepositoryException, RemoteException { + workspace.deleteWorkspace(name); + } + + /** {@inheritDoc} */ + public RemoteLockManager getLockManager() + throws RepositoryException, RemoteException { + try { + if (remoteLockManager == null) { + LockManager lockManager = workspace.getLockManager(); + remoteLockManager = + getFactory().getRemoteLockManager(lockManager); + } + return remoteLockManager; + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + + public RemoteVersionManager getVersionManager() + throws RepositoryException, RemoteException { + try { + if (remoteVersionManager == null) { + VersionManager versionManager = workspace.getVersionManager(); + remoteVersionManager = + getFactory().getRemoteVersionManager(workspace.getSession(), versionManager); + } + return remoteVersionManager; + } catch (RepositoryException ex) { + throw getRepositoryException(ex); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java new file mode 100644 index 00000000000..661c027f8ce --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java @@ -0,0 +1,134 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server; + +import java.rmi.RemoteException; + +import javax.jcr.Session; +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import org.apache.jackrabbit.rmi.remote.RemoteXASession; +import org.apache.jackrabbit.rmi.remote.SerializableXid; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for XA-enabled sessions. + * + * @since 1.4 + */ +@Deprecated(forRemoval = true) public class ServerXASession extends ServerSession implements RemoteXASession { + + /** + * The adapted local XA resource + */ + private final XAResource resource; + + /** + * Creates a remote adapter for the given local, transaction enabled, + * session. + */ + public ServerXASession( + Session session, XAResource resource, RemoteAdapterFactory factory) + throws RemoteException { + super(session, factory); + this.resource = resource; + } + + private static XAException getXAException(XAException e) { + return new XAException(e.getMessage()); + } + + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + resource.commit(xid, onePhase); + } catch (XAException e) { + throw getXAException(e); + } + } + + public void end(Xid xid, int flags) throws XAException { + try { + resource.end(xid, flags); + } catch (XAException e) { + throw getXAException(e); + } + } + + public void forget(Xid xid) throws XAException { + try { + resource.forget(xid); + } catch (XAException e) { + throw getXAException(e); + } + } + + public int getTransactionTimeout() throws XAException { + try { + return resource.getTransactionTimeout(); + } catch (XAException e) { + throw getXAException(e); + } + } + + public int prepare(Xid xid) throws XAException { + try { + return resource.prepare(xid); + } catch (XAException e) { + throw getXAException(e); + } + } + + public Xid[] recover(int flag) throws XAException { + try { + Xid[] xids = resource.recover(flag); + for (int i = 0; i < xids.length; i++) { + xids[i] = new SerializableXid(xids[i]); + } + return xids; + } catch (XAException e) { + throw getXAException(e); + } + } + + public void rollback(Xid xid) throws XAException { + try { + resource.rollback(xid); + } catch (XAException e) { + throw getXAException(e); + } + } + + public boolean setTransactionTimeout(int seconds) throws XAException { + try { + return resource.setTransactionTimeout(seconds); + } catch (XAException e) { + throw getXAException(e); + } + } + + public void start(Xid xid, int flags) throws XAException { + try { + resource.start(xid, flags); + } catch (XAException e) { + throw getXAException(e); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java new file mode 100644 index 00000000000..f675dd453a8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java @@ -0,0 +1,142 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; +import java.util.ArrayList; +import java.util.NoSuchElementException; + +import javax.jcr.RangeIterator; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Remote adapter for the JCR {@link RangeIterator} interface. This + * class makes a local iterator available as an RMI service using the + * {@link RemoteIterator} interface. + */ +@Deprecated(forRemoval = true) public abstract class ServerIterator extends ServerObject + implements RemoteIterator { + + /** The adapted local iterator. */ + private final RangeIterator iterator; + + /** The maximum number of elements to send per request. */ + private final int maxBufferSize; + + /** + * The cached number of elements in the iterator, -1 if the iterator + * size is unknown, or -2 if the size has not been retrieved from the + * adapted local iterator. This variable is useful in cases when the + * underlying iterator does not know its sizes (getSize() returns -1) + * but we reach the end of the iterator in a nextObjects() call and + * can thus determine the size of the iterator. + */ + private long size; + + /** + * Creates a remote adapter for the given local item. + * + * @param iterator local iterator to be adapted + * @param factory remote adapter factory + * @param maxBufferSize maximum buffer size + * @throws RemoteException on RMI errors + */ + public ServerIterator( + RangeIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(factory); + this.iterator = iterator; + this.maxBufferSize = maxBufferSize; + this.size = -2; + } + + /** + * Returns the size of the iterator. The size is cached by invoking the + * adapted local iterator when this method is first called or by + * determining the size from an end-of-iterator condition in nextObjects(). + * + * @return size of the iterator + * @throws RemoteException on RMI errors + */ + @Override + public long getSize() throws RemoteException { + if (size == -2) { + size = iterator.getSize(); + } + return size; + } + + /** + * Skips the given number of elements. + * + * @param items number of elements to skip + * @throws NoSuchElementException if skipped past the last element + * @throws RemoteException on RMI errors + */ + @Override + public void skip(long items) + throws NoSuchElementException, RemoteException { + try { + iterator.skip(items); + } catch (NoSuchElementException e) { + throw new NoSuchElementException(e.getMessage()); + } + } + + /** + * Returns a remote adapter for the given local object. This abstract + * method is used by {@link #nextObjects()} to convert the local + * objects to remote references to be sent to the client. + *

    + * Subclasses should implement this method to use the remote adapter + * factory to create remote adapters of the specific element type. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + */ + protected abstract Object getRemoteObject(Object object) + throws RemoteException; + + /** + * Returns an array of remote references to the next elements in this + * iteration. + * + * @return array of remote references, or null + * @throws RemoteException on RMI errors + */ + @Override + public Object[] nextObjects() throws RemoteException { + ArrayList items = new ArrayList(); + while (items.size() < maxBufferSize && iterator.hasNext()) { + items.add(getRemoteObject(iterator.next())); + } + if (items.size() > 0) { + return items.toArray(new Object[items.size()]); + } else { + size = iterator.getPosition(); + return null; + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java new file mode 100644 index 00000000000..471e6859be2 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; + +import javax.jcr.Node; +import javax.jcr.NodeIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating nodes. + */ +@Deprecated(forRemoval = true) public class ServerNodeIterator extends ServerIterator { + + /** + * Creates a ServerNodeIterator instance. + * + * @param iterator local node iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerNodeIterator( + NodeIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given node. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getRemoteNode((Node) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java new file mode 100644 index 00000000000..5e817880f84 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; + +import javax.jcr.nodetype.NodeType; +import javax.jcr.nodetype.NodeTypeIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating node types. + */ +@Deprecated(forRemoval = true) public class ServerNodeTypeIterator extends ServerIterator { + + /** + * Creates a ServerNodeTypeIterator instance. + * + * @param iterator local node type iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerNodeTypeIterator( + NodeTypeIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given node type. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemoteNodeType((NodeType) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java new file mode 100644 index 00000000000..47862666941 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; + +import javax.jcr.Property; +import javax.jcr.PropertyIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating properties. + */ +@Deprecated(forRemoval = true) public class ServerPropertyIterator extends ServerIterator { + + /** + * Creates a ServerPropertyIterator instance. + * + * @param iterator local property iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerPropertyIterator( + PropertyIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given property. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemoteProperty((Property) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java new file mode 100644 index 00000000000..07ea0a3a8e8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; + +import javax.jcr.query.Row; +import javax.jcr.query.RowIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating rows. + */ +@Deprecated(forRemoval = true) public class ServerRowIterator extends ServerIterator { + + /** + * Creates a ServerRowIterator instance. + * + * @param iterator local row iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerRowIterator( + RowIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given row. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemoteRow((Row) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java new file mode 100644 index 00000000000..b235f259344 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.iterator; + +import java.rmi.RemoteException; + +import javax.jcr.version.Version; +import javax.jcr.version.VersionIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating versions. + */ +@Deprecated(forRemoval = true) public class ServerVersionIterator extends ServerIterator { + + /** + * Creates a ServerVersionIterator instance. + * + * @param iterator local version iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerVersionIterator( + VersionIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given version.. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemoteVersion((Version) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java new file mode 100755 index 00000000000..a6b11fd475a --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.server.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java new file mode 100644 index 00000000000..62b10c3e543 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java @@ -0,0 +1,170 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.jmx; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Properties; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.SimpleCredentials; +import javax.naming.InitialContext; + +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * MBean that registers a JCR RMI server through JNDI. + */ +@Deprecated(forRemoval = true) public class JCRServer implements JCRServerMBean { + + /** + * local repository address + */ + private String localAddress; + + /** + * remote repository address + */ + private String remoteAddress; + + /** + * Optional local JNDI environment properties + */ + private String localEnvironment; + + /** + * Optional remote JNDI environment properties + */ + private String remoteEnvironment; + + /** + * Remote repository instance + */ + RemoteRepository remote; + + /** + * Local repository instance + */ + private Repository localRepository; + + public void start() throws Exception { + + if (this.localAddress == null) { + throw new IllegalStateException("local repository address is null"); + } + + if (this.remoteAddress == null) { + throw new IllegalStateException("remote repository address is null"); + } + + // local repository + InitialContext localContext = createInitialContext(localEnvironment); + localRepository = (Repository) localContext.lookup(this.localAddress); + if (localRepository == null) { + throw new IllegalArgumentException("local repository not found at " + + this.localAddress); + } + + // remote repository + InitialContext remoteContext = createInitialContext(remoteEnvironment); + RemoteAdapterFactory factory = new ServerAdapterFactory(); + remote = factory.getRemoteRepository(localRepository); + + // bind remote server + remoteContext.bind(this.remoteAddress, remote); + } + + /** + * + * @param jndiProps + * jndi environment properties + * @return an InitialContext for the given environment properties + * @throws Exception + * if any error occurs + */ + private InitialContext createInitialContext(String jndiProps) + throws Exception { + InitialContext initialContext = null; + if (jndiProps != null) { + InputStream is = new ByteArrayInputStream(jndiProps.getBytes()); + Properties props = new Properties(); + props.load(is); + initialContext = new InitialContext(props); + } else { + initialContext = new InitialContext(); + } + return initialContext; + } + + public void stop() throws Exception { + // unbind remote server + InitialContext ctx = new InitialContext(); + ctx.unbind(this.remoteAddress); + remote = null; + } + + public void createWorkspace( + String username, String password, String name) + throws RepositoryException { + Session session = localRepository.login( + new SimpleCredentials(username, password.toCharArray())); + try { + session.getWorkspace().createWorkspace(name); + } finally { + session.logout(); + } + } + + public String getLocalAddress() { + return localAddress; + } + + public void setLocalAddress(String localAddress) { + this.localAddress = localAddress; + } + + public String getRemoteAddress() { + return remoteAddress; + } + + public void setRemoteAddress(String remoteAddress) { + this.remoteAddress = remoteAddress; + } + + public String getLocalEnvironment() { + return localEnvironment; + } + + public void setLocalEnvironment(String localEnvironment) { + this.localEnvironment = localEnvironment; + } + + public String getRemoteEnvironment() { + return remoteEnvironment; + } + + public void setRemoteEnvironment(String remoteEnvironment) { + this.remoteEnvironment = remoteEnvironment; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java new file mode 100644 index 00000000000..cb8a76a48bb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java @@ -0,0 +1,54 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.jmx; + +import javax.jcr.RepositoryException; + +@Deprecated(forRemoval = true) public interface JCRServerMBean { + + void start() throws Exception; + + void stop() throws Exception; + + /** + * Creates a workspace in the managed repository. + * + * @param username administrator username + * @param password administrator password + * @param workspace name of the workspace to create + * @throws RepositoryException if the workspace could not be created + */ + void createWorkspace(String username, String password, String workspace) + throws RepositoryException; + + String getLocalAddress(); + + void setLocalAddress(String address); + + String getRemoteAddress(); + + void setRemoteAddress(String address); + + String getRemoteEnvironment(); + + void setRemoteEnvironment(String remoteEnvironment); + + String getLocalEnvironment(); + + void setLocalEnvironment(String localEnvironment); + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java new file mode 100755 index 00000000000..26c77efd422 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.server.jmx; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java new file mode 100755 index 00000000000..99ee18d2327 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.server; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java new file mode 100644 index 00000000000..256929b7ea9 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.principal; + +import java.rmi.RemoteException; +import java.security.Principal; +import java.util.Collections; +import java.util.Enumeration; +import java.util.Iterator; + +import org.apache.jackrabbit.api.security.principal.GroupPrincipal; +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; + +@Deprecated(forRemoval = true) public class ServerGroup extends ServerPrincipal implements RemoteGroup { + + public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory) + throws RemoteException { + super(principal, factory); + } + + public ServerGroup(final Principal principal, final RemoteAdapterFactory factory) + throws RemoteException { + super(principal, factory); + } + + public boolean isMember(String member) { + return isMember(member, getPrincipal()); + } + + public RemoteIterator members() throws RemoteException { + Iterator members = new Iterator() { + final Enumeration base = members(getPrincipal()); + + public boolean hasNext() { + return base.hasMoreElements(); + } + + public Principal next() { + return base.nextElement(); + } + + public void remove() { + throw new UnsupportedOperationException("remove"); + } + }; + return getFactory().getRemotePrincipalIterator(members); + } + + private static boolean isMember(final String memberName, final Principal group) { + Enumeration pe = members(group); + while (pe.hasMoreElements()) { + Principal p = pe.nextElement(); + if (memberName.equals(p.getName())) { + return true; + } + + if (isGroup(p) && isMember(memberName, p)) { + return true; + } + } + return false; + } + + public static boolean isGroup(Principal principal) { + return principal instanceof GroupPrincipal; + } + + private static Enumeration members(Principal principal) { + if (principal instanceof GroupPrincipal) { + return ((GroupPrincipal) principal).members(); + } + return Collections.emptyEnumeration(); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java new file mode 100644 index 00000000000..c7d3dc414b3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java @@ -0,0 +1,54 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.principal; + +import java.rmi.RemoteException; +import java.security.Principal; + +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + +@Deprecated(forRemoval = true) public class ServerPrincipal extends ServerObject implements RemotePrincipal { + + private final Principal principal; + + public ServerPrincipal(final Principal principal, + final RemoteAdapterFactory factory) throws RemoteException { + super(factory); + this.principal = principal; + } + + public String getName() { + return principal.getName(); + } + + /** + * Returns the {@link Principal} encapsulated in this instance. + *

    + * NOTE: This method is intended to only be used in the JCR RMI + * implementation to be able to "send back" remote principals to the server + * for implementation of the remote JCR API. + * + * @return the {@link Principal} encapsulated in this instance. + */ + public Principal getPrincipal() { + return principal; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java new file mode 100644 index 00000000000..1d5cb1c1bc7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java @@ -0,0 +1,42 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.principal; + +import java.rmi.RemoteException; +import java.security.Principal; +import java.util.Iterator; +import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; + +@Deprecated(forRemoval = true) public class ServerPrincipalIterator extends ServerIterator { + + public ServerPrincipalIterator(Iterator iterator, + RemoteAdapterFactory factory, int maxBufferSize) + throws RemoteException { + super(new RangeIteratorAdapter(iterator), factory, maxBufferSize); + } + + /** + * {@inheritDoc} + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemotePrincipal((Principal) object); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java new file mode 100755 index 00000000000..a51fb001028 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("4.0.0") +package org.apache.jackrabbit.rmi.server.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java new file mode 100644 index 00000000000..ae6ed38cfe7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java @@ -0,0 +1,51 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; + +import javax.jcr.security.AccessControlEntry; + +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + +@Deprecated(forRemoval = true) public class ServerAccessControlEntry extends ServerObject implements + RemoteAccessControlEntry { + + private final AccessControlEntry ace; + + public ServerAccessControlEntry(final AccessControlEntry ace, + final RemoteAdapterFactory factory) throws RemoteException { + super(factory); + this.ace = ace; + } + + public RemotePrincipal getPrincipal() throws RemoteException { + return getFactory().getRemotePrincipal(ace.getPrincipal()); + } + + public RemotePrivilege[] getPrivileges() throws RemoteException { + return getFactory().getRemotePrivilege(ace.getPrivileges()); + } + + AccessControlEntry getAccessControlEntry() { + return ace; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java new file mode 100644 index 00000000000..d4e3bf475a7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java @@ -0,0 +1,83 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; +import java.security.Principal; + +import javax.jcr.RepositoryException; +import javax.jcr.security.AccessControlEntry; +import javax.jcr.security.AccessControlList; +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; + +@Deprecated(forRemoval = true) public class ServerAccessControlList extends ServerAccessControlPolicy + implements RemoteAccessControlList { + + public ServerAccessControlList(final AccessControlList acl, + final RemoteAdapterFactory factory) throws RemoteException { + super(acl, factory); + } + + public RemoteAccessControlEntry[] getAccessControlEntries() + throws RepositoryException, RemoteException { + return getFactory().getRemoteAccessControlEntry( + ((AccessControlList) getAccessControlPolicy()).getAccessControlEntries()); + } + + public boolean addAccessControlEntry(RemotePrincipal principal, + RemotePrivilege[] privileges) throws RepositoryException { + + Principal p = null; + if (principal instanceof ServerPrincipal) { + p = ((ServerPrincipal) principal).getPrincipal(); + } + Privilege[] privs = new Privilege[privileges.length]; + for (int i = 0; privs != null && i < privs.length; i++) { + if (privileges[i] instanceof ServerPrivilege) { + privs[i] = ((ServerPrivilege) privileges[i]).getPrivilege(); + } else { + // not a compatible remote privilege, abort + privs = null; + } + } + + if (p != null && privs != null) { + return ((AccessControlList) getAccessControlPolicy()).addAccessControlEntry( + p, privs); + } + + throw new RepositoryException("Unsupported Remote types"); + } + + public void removeAccessControlEntry(RemoteAccessControlEntry ace) + throws RepositoryException { + if (ace instanceof ServerAccessControlEntry) { + AccessControlEntry lace = ((ServerAccessControlEntry) ace).getAccessControlEntry(); + ((AccessControlList) getAccessControlPolicy()).removeAccessControlEntry(lace); + } else { + throw new RepositoryException( + "Unsupported RemoteAccessControlEntry type " + ace.getClass()); + } + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java new file mode 100644 index 00000000000..84b451156ee --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java @@ -0,0 +1,89 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; + +import javax.jcr.RepositoryException; +import javax.jcr.security.AccessControlManager; +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.remote.RemoteIterator; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + +@Deprecated(forRemoval = true) public class ServerAccessControlManager extends ServerObject implements + RemoteAccessControlManager { + + private final AccessControlManager acm; + + public ServerAccessControlManager(AccessControlManager acm, + RemoteAdapterFactory factory) throws RemoteException { + super(factory); + this.acm = acm; + } + + public RemoteIterator getApplicablePolicies(String absPath) + throws RepositoryException, RemoteException { + return getFactory().getRemoteAccessControlPolicyIterator( + acm.getApplicablePolicies(absPath)); + } + + public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) + throws RepositoryException, RemoteException { + return getFactory().getRemoteAccessControlPolicy( + acm.getEffectivePolicies(absPath)); + } + + public RemoteAccessControlPolicy[] getPolicies(String absPath) + throws RepositoryException, RemoteException { + return getFactory().getRemoteAccessControlPolicy( + acm.getPolicies(absPath)); + } + + public RemotePrivilege[] getPrivileges(String absPath) + throws RepositoryException, RemoteException { + return getFactory().getRemotePrivilege(acm.getPrivileges(absPath)); + } + + public RemotePrivilege[] getSupportedPrivileges(String absPath) + throws RepositoryException, RemoteException { + return getFactory().getRemotePrivilege( + acm.getSupportedPrivileges(absPath)); + } + + public boolean hasPrivileges(String absPath, String[] privileges) + throws RepositoryException { + Privilege[] privs = new Privilege[privileges.length]; + for (int i = 0; i < privs.length; i++) { + privs[i] = acm.privilegeFromName(privileges[i]); + } + + return acm.hasPrivileges(absPath, privs); + } + + public RemotePrivilege privilegeFromName(String privilegeName) + throws RepositoryException, RemoteException { + return getFactory().getRemotePrivilege( + acm.privilegeFromName(privilegeName)); + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java new file mode 100644 index 00000000000..0e6c75cb2d3 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; + +import javax.jcr.security.AccessControlPolicy; + +import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + +@Deprecated(forRemoval = true) public class ServerAccessControlPolicy extends ServerObject implements + RemoteAccessControlPolicy { + + private final AccessControlPolicy acp; + + public ServerAccessControlPolicy(final AccessControlPolicy acp, + final RemoteAdapterFactory factory) + + throws RemoteException { + super(factory); + this.acp = acp; + } + + AccessControlPolicy getAccessControlPolicy() { + return acp; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java new file mode 100644 index 00000000000..5f17ca941d9 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java @@ -0,0 +1,61 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; + +import javax.jcr.security.AccessControlPolicy; +import javax.jcr.security.AccessControlPolicyIterator; + +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * A ServerIterator for iterating rows. + */ +@Deprecated(forRemoval = true) public class ServerAccessControlPolicyIterator extends ServerIterator { + + /** + * Creates a ServerRowIterator instance. + * + * @param iterator local row iterator + * @param factory remote adapter factory + * @param maxBufferSize maximum size of the element buffer + * @throws RemoteException on RMI errors + */ + public ServerAccessControlPolicyIterator( + AccessControlPolicyIterator iterator, RemoteAdapterFactory factory, + int maxBufferSize) throws RemoteException { + super(iterator, factory, maxBufferSize); + } + + /** + * Creates and returns a remote adapter for the given row. + * + * @param object local object + * @return remote adapter + * @throws RemoteException on RMI errors + * @see ServerIterator#getRemoteObject(Object) + */ + protected Object getRemoteObject(Object object) throws RemoteException { + return getFactory().getRemoteAccessControlPolicy( + (AccessControlPolicy) object); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java new file mode 100644 index 00000000000..8fd174319e1 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java @@ -0,0 +1,64 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.server.security; + +import java.rmi.RemoteException; +import java.rmi.server.RemoteStub; + +import javax.jcr.security.Privilege; + +import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerObject; + +@Deprecated(forRemoval = true) public class ServerPrivilege extends ServerObject implements RemotePrivilege { + + private final Privilege privilege; + + public ServerPrivilege(final Privilege privilege, + final RemoteAdapterFactory factory) throws RemoteException { + super(factory); + this.privilege = privilege; + } + + public RemotePrivilege[] getAggregatePrivileges() throws RemoteException { + return getFactory().getRemotePrivilege( + privilege.getAggregatePrivileges()); + } + + public RemotePrivilege[] getDeclaredAggregatePrivileges() + throws RemoteException { + return getFactory().getRemotePrivilege( + privilege.getDeclaredAggregatePrivileges()); + } + + public String getName() { + return privilege.getName(); + } + + public boolean isAbstract() { + return privilege.isAbstract(); + } + + public boolean isAggregate() { + return privilege.isAggregate(); + } + + Privilege getPrivilege() { + return privilege; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java new file mode 100755 index 00000000000..ebf25621192 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.server.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java new file mode 100644 index 00000000000..d4a5bf109f0 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java @@ -0,0 +1,247 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.FilterInputStream; +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import java.util.Calendar; + +import javax.jcr.Binary; +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Abstract base class for {@link Value} implementations. This class + * implements all {@link Value} methods except getString and + * getType. + *

    + * Most of the default value getters always throw {@link ValueFormatException}s + * and expect type-specific subclasses to override that behaviour with the + * appropriate value conversions. + *

    + * The {@link #getBinary()} method is implemented based on the abstract + * {@link #getString()} method, but subclasses can override that default + * implementation. + *

    + * The {@link #getStream()} method uses {@link #getBinary()} to implement + * the deprecated JCR 1.0 behaviour. This method must not be overridden. + */ +@Deprecated(forRemoval = true) abstract class AbstractValue implements Value, Serializable { + + /** + * Serial version UID + */ + private static final long serialVersionUID = -1989277354799918598L; + + /** + * The stream instance returned by {@link #getStream()}. Note that + * the stream is not included when serializing the value. + */ + private transient InputStream stream = null; + + /** + * Returns the stream representation of this value. This method implements + * the deprecated JCR 1.0 behaviour of always returning the same stream + * instance. The stream is retrieved from a {@link Binary} instance + * returned by {@link #getBinary()}. + * + * @return stream representation of this value + * @throws RepositoryException if the stream can not be created + */ + public synchronized final InputStream getStream() + throws RepositoryException { + if (stream == null) { + final Binary binary = getBinary(); + try { + stream = new FilterInputStream(binary.getStream()) { + @Override + public void close() throws IOException { + super.close(); + binary.dispose(); + } + }; + } finally { + // Proper cleanup also when binary.getStream() fails + if (stream == null) { + binary.dispose(); + } + } + } + return stream; + } + + /** + * Returns the binary representation of this value. The default + * implementation uses the UTF-8 serialization of the string returned + * by {@link #getString()}. Subclasses + */ + public Binary getBinary() throws RepositoryException { + final byte[] value = getString().getBytes(StandardCharsets.UTF_8); + return new Binary() { + public int read(byte[] b, long position) { + if (position >= value.length) { + return -1; + } else { + int p = (int) position; + int n = Math.min(b.length, value.length - p); + System.arraycopy(value, p, b, 0, n); + return n; + } + } + public InputStream getStream() { + return new ByteArrayInputStream(value); + } + public long getSize() { + return value.length; + } + public void dispose() { + } + }; + } + + /** + * Always throws a ValueFormatException. Implementations should + * overwrite if conversion to boolean is supported. + * + * @return nothing + * @throws ValueFormatException If the value cannot be converted to a + * boolean. + */ + public boolean getBoolean() throws ValueFormatException { + throw getValueFormatException(PropertyType.TYPENAME_BOOLEAN); + } + + /** + * Always throws a ValueFormatException. Implementations should + * overwrite if conversion to Calender is supported. + * + * @return nothing + * @throws ValueFormatException If the value cannot be converted to a + * Calendar instance. + */ + public Calendar getDate() throws ValueFormatException { + throw getValueFormatException(PropertyType.TYPENAME_DATE); + } + + /** + * Always throws a ValueFormatException. Implementations should + * overwrite if conversion to a {@link BigDecimal} is supported. + * + * @return nothing + * @throws ValueFormatException If the value cannot be converted to a + * {@link BigDecimal}. + */ + public BigDecimal getDecimal() throws RepositoryException { + throw getValueFormatException(PropertyType.TYPENAME_DECIMAL); + } + + /** + * Always throws a ValueFormatException. Implementations should + * overwrite if conversion to double is supported. + * + * @return nothing + * @throws ValueFormatException If the value cannot be converted to a + * double. + */ + public double getDouble() throws ValueFormatException { + throw getValueFormatException(PropertyType.TYPENAME_DOUBLE); + } + + /** + * Always throws a ValueFormatException. Implementations should + * overwrite if conversion to long is supported. + * + * @return nothing + * @throws ValueFormatException If the value cannot be converted to a + * long. + */ + public long getLong() throws ValueFormatException { + throw getValueFormatException(PropertyType.TYPENAME_LONG); + } + + /** + * Returns a ValueFormatException with a message indicating + * what kind of type conversion is not supported. + * + * @return nothing + * @param destType The name of the value type to which this value cannot + * be converted. + */ + protected ValueFormatException getValueFormatException(String destType) { + return new ValueFormatException( + "Cannot convert value \"" + this + "\" of type " + + PropertyType.nameFromValue(getType()) + " to " + destType); + } + + //--------------------------------------------------------------< Object > + + /** + * Compares values as defined in the JCR specification. + * + * @param object value for comparison + * @return true if the values are equal, + * false otherwise + * @see JCRRMI-16 + */ + public boolean equals(Object object) { + try { + return (object instanceof Value) + && getType() == ((Value) object).getType() + && getString().equals(((Value) object).getString()); + } catch (RepositoryException e) { + return false; + } + } + + /** + * Returns a hash code that's in line with how the {@link #equals(Object)} + * method is implemented. + * + * @return hash code of this value + */ + public int hashCode() { + try { + return getType() + getString().hashCode(); + } catch (RepositoryException e) { + return getType(); + } + } + + /** + * Returns a string representation of this value. + * + * @return value string + */ + public String toString() { + try { + return getString(); + } catch (RepositoryException e) { + return PropertyType.nameFromValue(getType()); + } + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java new file mode 100644 index 00000000000..3ab01d1b2bd --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java @@ -0,0 +1,122 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.Serializable; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import java.util.Calendar; + +import javax.jcr.Binary; +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.Value; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Binary value. + */ +@Deprecated(forRemoval = true) class BinaryValue implements Value, Serializable { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 1719020811685971215L; + + /** + * The binary value + */ + private final Binary value; + + /** + * The stream instance returned by {@link #getStream()}. Note that + * the stream is not included when serializing the value. + */ + private transient InputStream stream = null; + + /** + * Creates a binary value. + */ + public BinaryValue(Binary value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#BINARY}. + */ + public int getType() { + return PropertyType.BINARY; + } + + public Binary getBinary() { + return value; + } + + public String getString() throws RepositoryException { + try { + InputStream stream = value.getStream(); + try { + Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8); + StringBuilder builder = new StringBuilder(); + char[] buffer = new char[1024]; + int n = reader.read(buffer); + while (n != -1) { + builder.append(buffer, 0, n); + n = reader.read(buffer); + } + return builder.toString(); + } finally { + stream.close(); + } + } catch (IOException e) { + throw new RepositoryException("Unable to read the binary value", e); + } + } + + public synchronized InputStream getStream() throws RepositoryException { + if (stream == null) { + stream = value.getStream(); + } + return stream; + } + + public boolean getBoolean() throws RepositoryException { + return new StringValue(getString()).getBoolean(); + } + + public Calendar getDate() throws RepositoryException { + return new StringValue(getString()).getDate(); + } + + public BigDecimal getDecimal() throws RepositoryException { + return new StringValue(getString()).getDecimal(); + } + + public double getDouble() throws RepositoryException { + return new StringValue(getString()).getDouble(); + } + + public long getLong() throws RepositoryException { + return new StringValue(getString()).getLong(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java new file mode 100644 index 00000000000..030dc5622b0 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java @@ -0,0 +1,67 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import javax.jcr.PropertyType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Boolean value. + */ +@Deprecated(forRemoval = true) class BooleanValue extends AbstractValue { + + /** + * Serial version UID + */ + private static final long serialVersionUID = 5266937874230536517L; + + /** + * The boolean value + */ + private final boolean value; + + /** + * Creates an instance for the given boolean value. + */ + public BooleanValue(boolean value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#BOOLEAN}. + */ + public int getType() { + return PropertyType.BOOLEAN; + } + + /** + * Returns the boolean value. + */ + @Override + public boolean getBoolean() { + return value; + } + + /** + * The boolean is converted using {@link Boolean#toString()}. + */ + public String getString() { + return Boolean.toString(value); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java new file mode 100644 index 00000000000..51e0931bd82 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java @@ -0,0 +1,209 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import javax.jcr.PropertyType; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Date value. + */ +@Deprecated(forRemoval = true) class DateValue extends AbstractValue { + + /** + * Serial version UID + */ + private static final long serialVersionUID = -2382837055824423966L; + + // misc. numeric formats used in formatting + private static final DecimalFormat XX_FORMAT = new DecimalFormat("00"); + private static final DecimalFormat XXX_FORMAT = new DecimalFormat("000"); + private static final DecimalFormat XXXX_FORMAT = new DecimalFormat("0000"); + + /** + * The date value + */ + private final Calendar value; + + /** + * Creates an instance for the given date value. + * + * @param value the date value + */ + public DateValue(Calendar value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#DATE}. + */ + public int getType() { + return PropertyType.DATE; + } + + /** + * Returns a copy of this Calendar value. Modifying the + * returned Calendar does not change the value of this + * instance. + */ + @Override + public Calendar getDate() { + return (Calendar) value.clone(); + } + + /** + * The date is converted to the number of milliseconds since + * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). + */ + @Override + public BigDecimal getDecimal() { + return new BigDecimal(value.getTimeInMillis()); + } + + /** + * The date is converted to the number of milliseconds since + * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number + * is out-of-range for a double, a ValueFormatException is thrown. + */ + @Override + public double getDouble() { + return value.getTimeInMillis(); + } + + /** + * The date is converted to the number of milliseconds since + * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number + * is out-of-range for a long, a ValueFormatException is thrown. + */ + @Override + public long getLong() { + return value.getTimeInMillis(); + } + + /** + * The date is converted to the following format: + * sYYYY-MM-DDThh:mm:ss.sssTZD + * where: + *

    + *
    sYYYY
    + *
    + * Four-digit year with optional leading positive (โ€˜+โ€™) or + * negative (โ€˜-โ€™) sign. 0000 , -0000 and +0000 all indicate + * the year 1 BCE. โ€“YYYY where YYYY is the number y indicates + * the year (y+1) BCE. The absence of a sign or the presence + * of a positive sign indicates a year CE. For example, -0054 + * would indicate the year 55 BCE, while +1969 and 1969 + * indicate the year 1969 CE. + *
    + *
    MM
    + *
    + * Two-digit month (01 = January, etc.) + *
    + *
    DD
    + *
    + * Two-digit day of month (01 through 31) + *
    + *
    hh
    + *
    + * Two digits of hour (00 through 23, or 24 if mm is 00 and + * ss.sss is 00.000) + *
    + *
    mm
    + *
    + * Two digits of minute (00 through 59) + *
    + *
    ss.sss
    + *
    + * Seconds, to three decimal places (00.000 through 59.999 or + * 60.999 in the case of leap seconds) + *
    + *
    TZD
    + *
    + * Time zone designator (either Z for Zulu, i.e. UTC, or +hh:mm or + * -hh:mm, i.e. an offset from UTC) + *
    + *
    + *

    + * Note that the โ€œTโ€ separating the date from the time and the + * separators โ€œ-โ€and โ€œ:โ€ appear literally in the string. + *

    + * This format is a subset of the format defined by ISO 8601:2004. + * If the DATE value cannot be represented in this format a + * {@link ValueFormatException} is thrown. + */ + public String getString() { + // determine era and adjust year if necessary + int year = value.get(Calendar.YEAR); + if (value.isSet(Calendar.ERA) + && value.get(Calendar.ERA) == GregorianCalendar.BC) { + // calculate year using astronomical system: + // year n BCE => astronomical year - n + 1 + year = 0 - year + 1; + } + + // note that we cannot use java.text.SimpleDateFormat for + // formatting because it can't handle years <= 0 and TZD's + StringBuilder buf = new StringBuilder(32); + + // year ([-]YYYY) + buf.append(XXXX_FORMAT.format(year)); + buf.append('-'); + // month (MM) + buf.append(XX_FORMAT.format(value.get(Calendar.MONTH) + 1)); + buf.append('-'); + // day (DD) + buf.append(XX_FORMAT.format(value.get(Calendar.DAY_OF_MONTH))); + buf.append('T'); + // hour (hh) + buf.append(XX_FORMAT.format(value.get(Calendar.HOUR_OF_DAY))); + buf.append(':'); + // minute (mm) + buf.append(XX_FORMAT.format(value.get(Calendar.MINUTE))); + buf.append(':'); + // second (ss) + buf.append(XX_FORMAT.format(value.get(Calendar.SECOND))); + buf.append('.'); + // millisecond (SSS) + buf.append(XXX_FORMAT.format(value.get(Calendar.MILLISECOND))); + + // time zone designator (Z or +00:00 or -00:00) + TimeZone tz = value.getTimeZone(); + // time zone offset (in minutes) from UTC (including daylight saving) + int offset = tz.getOffset(value.getTimeInMillis()) / 1000 / 60; + if (offset != 0) { + int hours = Math.abs(offset / 60); + int minutes = Math.abs(offset % 60); + buf.append(offset < 0 ? '-' : '+'); + buf.append(XX_FORMAT.format(hours)); + buf.append(':'); + buf.append(XX_FORMAT.format(minutes)); + } else { + buf.append('Z'); + } + + return buf.toString(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java new file mode 100644 index 00000000000..718907220c7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java @@ -0,0 +1,117 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.math.BigDecimal; +import java.util.Calendar; + +import javax.jcr.PropertyType; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Decimal value. + */ +@Deprecated(forRemoval = true) class DecimalValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 2077767642124007133L; + + /** + * The minimum value for date conversion. + */ + private static final BigDecimal MIN_DATE = + BigDecimal.valueOf(Long.MIN_VALUE); + + /** + * The maximum value for date conversion. + */ + private static final BigDecimal MAX_DATE = + BigDecimal.valueOf(Long.MAX_VALUE); + + /** + * The decimal value. + */ + private final BigDecimal value; + + /** + * Creates an instance for the given decimal value. + */ + public DecimalValue(BigDecimal value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#DECIMAL}. + */ + public int getType() { + return PropertyType.DECIMAL; + } + + /** + * The decimal is converted to a long and interpreted as the number of + * milliseconds since 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). + * If the resulting value is out of range for a date, + * a {@link ValueFormatException} is thrown. + */ + @Override + public Calendar getDate() throws ValueFormatException { + if (value.compareTo(MIN_DATE) >= 0 && value.compareTo(MAX_DATE) <= 0) { + Calendar date = Calendar.getInstance(); + date.setTimeInMillis(getLong()); + return date; + } else { + throw new ValueFormatException( + "Decimal value is outside the date range: " + value); + } + } + + /** + * Returns the decimal value. + */ + @Override + public BigDecimal getDecimal() { + return value; + } + + /** + * The decimal is converted using {@link BigDecimal#doubleValue()}. + */ + @Override + public double getDouble() { + return value.doubleValue(); + } + + /** + * The decimal is converted using {@link BigDecimal#longValue()}. + */ + @Override + public long getLong() { + return value.longValue(); + } + + /** + * The decimal is converted using {@link BigDecimal#toString()}. + */ + public String getString() { + return value.toString(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java new file mode 100644 index 00000000000..e11828313da --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java @@ -0,0 +1,106 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.math.BigDecimal; +import java.util.Calendar; + +import javax.jcr.PropertyType; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Double value. + */ +@Deprecated(forRemoval = true) class DoubleValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = -2767063038068929611L; + + /** + * The double value. + */ + private final double value; + + /** + * Creates an instance for the given double value. + */ + public DoubleValue(double value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#DOUBLE}. + */ + public int getType() { + return PropertyType.DOUBLE; + } + + /** + * Returns a Calendar instance interpreting the double as the + * time in milliseconds since the epoch (1.1.1970, 0:00, UTC). If the + * resulting value is out of range for a date, + * a {@link ValueFormatException} is thrown. + */ + @Override + public Calendar getDate() throws ValueFormatException { + if (Long.MIN_VALUE <= value && value <= Long.MAX_VALUE) { + Calendar date = Calendar.getInstance(); + date.setTimeInMillis((long) value); + return date; + } else { + throw new ValueFormatException( + "Double value is outside the date range: " + value); + } + } + + /** + * The double is converted using the constructor + * {@link BigDecimal#BigDecimal(double)}. + */ + @Override + public BigDecimal getDecimal() { + return new BigDecimal(value); + } + + /** + * Returns the double value. + */ + @Override + public double getDouble() { + return value; + } + + /** + * Standard Java type coercion is used. + */ + @Override + public long getLong() { + return (long) value; + } + + /** + * The double is converted using {@link Double#toString(double)}. + */ + public String getString() { + return Double.toString(value); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java new file mode 100644 index 00000000000..4e813f1d94d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java @@ -0,0 +1,95 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.math.BigDecimal; +import java.util.Calendar; + +import javax.jcr.PropertyType; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Long value. + */ +@Deprecated(forRemoval = true) class LongValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = -5983072186237752887L; + + /** The long value */ + private final long value; + + /** + * Creates an instance for the given long value. + */ + public LongValue(long value) { + this.value = value; + } + + /** + * Returns PropertyType.LONG. + */ + public int getType() { + return PropertyType.LONG; + } + + /** + * The long is interpreted as the number of milliseconds since + * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). + */ + @Override + public Calendar getDate() { + Calendar date = Calendar.getInstance(); + date.setTimeInMillis(value); + return date; + } + + /** + * The long is converted using the method {@link BigDecimal#valueOf(long)}. + */ + @Override + public BigDecimal getDecimal() { + return BigDecimal.valueOf(value); + } + + /** + * Standard Java type coercion is used. + */ + @Override + public double getDouble() { + return value; + } + + /** + * Returns the long value. + */ + @Override + public long getLong() { + return value; + } + + /** + * The long is converted using {@link Long#toString(long)}. + */ + public String getString() { + return Long.toString(value); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java new file mode 100644 index 00000000000..5c26a5cec58 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java @@ -0,0 +1,62 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The NameValue class implements the committed value state for + * Name values as a part of the State design pattern (Gof) used by this package. + * + * @since 0.16.4.1 + */ +@Deprecated(forRemoval = true) public class NameValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 4598175360244278453L; + + /** The name value. */ + private final String value; + + /** + * Creates an instance for the given name value. + */ + protected NameValue(String value) throws ValueFormatException { + // TODO: Check name format + this.value = value; + } + + /** + * Returns PropertyType.NAME. + */ + public int getType() { + return PropertyType.NAME; + } + + /** + * Returns the string representation of the Name value. + */ + public String getString() throws RepositoryException { + return value; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java new file mode 100644 index 00000000000..1efe3f5ef3e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java @@ -0,0 +1,62 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The PathValue class implements the committed value state for + * Path values as a part of the State design pattern (Gof) used by this package. + * + * @since 0.16.4.1 + */ +@Deprecated(forRemoval = true) public class PathValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 6233090249008329224L; + + /** The path value. */ + private final String value; + + /** + * Creates an instance for the given path value. + */ + protected PathValue(String value) throws ValueFormatException { + // TODO: Check path format + this.value = value; + } + + /** + * Returns PropertyType.PATH. + */ + public int getType() { + return PropertyType.PATH; + } + + /** + * Returns the string representation of the path value. + */ + public String getString() throws ValueFormatException, RepositoryException { + return value; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java new file mode 100644 index 00000000000..6e55a573c60 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java @@ -0,0 +1,63 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The ReferenceValue class implements the committed value state + * for Reference values as a part of the State design pattern (Gof) used by + * this package. + * + * @since 0.16.4.1 + */ +@Deprecated(forRemoval = true) public class ReferenceValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 5245358709465803351L; + + /** The reference value */ + private final String value; + + /** + * Creates an instance for the given reference value. + */ + protected ReferenceValue(String value) throws ValueFormatException { + // TODO: check syntax + this.value = value; + } + + /** + * Returns PropertyType.REFERENCE. + */ + public int getType() { + return PropertyType.REFERENCE; + } + + /** + * Returns the string representation of the reference value. + */ + public String getString() throws ValueFormatException, RepositoryException { + return value; + } +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java new file mode 100644 index 00000000000..9d1173fb1f8 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java @@ -0,0 +1,254 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.io.IOException; +import java.io.InputStream; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +import javax.jcr.Binary; +import javax.jcr.Node; +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.jcr.Value; +import javax.jcr.ValueFactory; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * The SerialValueFactory class is used in the RMI infrastructure + * to create serializable Value instances on the client side. + *

    + * This class works in conjunction with the implementations of the + * javax.jcr.Value interface found in this package. + *

    + * This class may be extended to overwrite any of the + * createXXXValue methods to create instances of the respective + * type of {@link Value} implementation. The + * methods of the ValueFactory interface are declared final to + * guard against breaking the rules. + */ +@Deprecated(forRemoval = true) public class SerialValueFactory implements ValueFactory { + + /** The singleton value factory instance */ + private static final SerialValueFactory INSTANCE = new SerialValueFactory(); + + /** + * Returns the ValueFactory instance, which currently is a + * singleton instance of this class. + *

    + * Future revisions will support some kind of configuration to specify + * which concrete class should be used. + */ + public static final SerialValueFactory getInstance() { + return INSTANCE; + } + + /** + * Utility method for decorating an array of values. The returned array will + * contain serializable value decorators for all the given values. Note that + * the contents of the original values will only be copied when the + * decorators are serialized. + *

    + * If the given array is null, then an empty array is + * returned. + * + * @param values the values to be decorated + * @return array of decorated values + * @throws RepositoryException if the values can not be serialized + */ + public static Value[] makeSerialValueArray(Value[] values) + throws RepositoryException { + List serials = new ArrayList(); + if (values != null) { + for (Value value : values) { + if (value != null) { + serials.add(makeSerialValue(value)); + } + } + } + return serials.toArray(new Value[serials.size()]); + } + + /** + * Utility method for decorating a value. Note that the contents of the + * original values will only be copied when the decorators are serialized. + * Null referenced and already serializable values are passed as-is. + * + * @param value the value to be decorated, or null + * @return the decorated value, or null + * @throws RepositoryException if the value can not be serialized + */ + public static Value makeSerialValue(Value value) throws RepositoryException { + // if the value is null or already serializable, just return it + if (value == null || value instanceof Serializable) { + return value; + } else { + return INSTANCE.createValue(value); + } + } + + /** + * Utility method for converting an array of strings to serializable + * string values. + *

    + * If the given array is null, then an empty array is + * returned. + * + * @param values the string array + * @return array of string values + */ + public static Value[] makeSerialValueArray(String[] values) { + List serials = new ArrayList(); + if (values != null) { + for (String value : values) { + if (value != null) { + serials.add(INSTANCE.createValue(value)); + } + } + } + return serials.toArray(new Value[serials.size()]); + } + + /** + * Default constructor only visible to extensions of this class. See + * class comments for details. + */ + protected SerialValueFactory() { + } + + /** {@inheritDoc} */ + public Value createValue(String value) { + return new StringValue(value); + } + + /** {@inheritDoc} */ + public final Value createValue(String value, int type) + throws ValueFormatException { + try { + return createValue(new StringValue(value), type); + } catch (ValueFormatException e) { + throw e; + } catch (RepositoryException e) { + throw new ValueFormatException( + "Unexpected error when creating value: " + value, e); + } + } + + private Value createValue(Value value) throws RepositoryException { + return createValue(value, value.getType()); + } + + private Value createValue(Value value, int type) + throws RepositoryException { + switch (type) { + case PropertyType.BINARY: + Binary binary = value.getBinary(); + try { + return createValue(binary.getStream()); + } finally { + binary.dispose(); + } + case PropertyType.BOOLEAN: + return createValue(value.getBoolean()); + case PropertyType.DATE: + return createValue(value.getDate()); + case PropertyType.DECIMAL: + return createValue(value.getDecimal()); + case PropertyType.DOUBLE: + return createValue(value.getDouble()); + case PropertyType.LONG: + return createValue(value.getLong()); + case PropertyType.NAME: + return new NameValue(value.getString()); + case PropertyType.PATH: + return new PathValue(value.getString()); + case PropertyType.REFERENCE: + return new ReferenceValue(value.getString()); + case PropertyType.STRING: + return createValue(value.getString()); + default: + throw new ValueFormatException("Unknown value type " + type); + } + } + + /** {@inheritDoc} */ + public final Value createValue(long value) { + return new LongValue(value); + } + + /** {@inheritDoc} */ + public final Value createValue(double value) { + return new DoubleValue(value); + } + + /** {@inheritDoc} */ + public final Value createValue(boolean value) { + return new BooleanValue(value); + } + + /** {@inheritDoc} */ + public Value createValue(BigDecimal value) { + return new DecimalValue(value); + } + + /** {@inheritDoc} */ + public final Value createValue(Calendar value) { + return new DateValue(value); + } + + /** {@inheritDoc} */ + public final Value createValue(InputStream value) { + try { + return createValue(createBinary(value)); + } catch (RepositoryException e) { + throw new RuntimeException("Unable to create a binary value", e); + } + } + + /** {@inheritDoc} */ + public final Value createValue(Node value) throws RepositoryException { + return createValue(value.getUUID(), PropertyType.REFERENCE); + } + + public Binary createBinary(InputStream stream) throws RepositoryException { + try { + try { + return new SerializableBinary(stream); + } finally { + stream.close(); + } + } catch (IOException e) { + throw new RepositoryException("Unable to read binary stream", e); + } + } + + public Value createValue(Binary value) { + return new BinaryValue(value); + } + + public Value createValue(Node value, boolean weak) + throws RepositoryException { + return new ReferenceValue(value.getUUID()); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java new file mode 100644 index 00000000000..8da0a56a920 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java @@ -0,0 +1,202 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.io.RandomAccessFile; +import java.io.Serializable; + +import javax.jcr.Binary; +import javax.jcr.RepositoryException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * Serializable binary. + */ +@Deprecated(forRemoval = true) class SerializableBinary implements Binary, Serializable { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = -7742179594834275853L; + + private static final int BUFFER_SIZE = 64 * 1024; + + private transient long length; + + private transient byte[] data; + + private transient File file; + + /** + * Creates a binary from the given stream. The stream is not closed. + * + * @param stream binary stream + */ + public SerializableBinary(InputStream stream) throws IOException { + length = 0; + data = null; + file = null; + + OutputStream output = null; + try { + byte[] buffer = new byte[BUFFER_SIZE]; + int n = stream.read(buffer); + while (n != -1) { + length += n; + if (length < buffer.length) { + n = stream.read( + buffer, (int) length, buffer.length - (int) length); + } else { + if (file == null) { + file = File.createTempFile("jackrabbit-jcr-rmi-", null); + output = new FileOutputStream(file); + output.write(buffer); + } else { + output.write(buffer, 0, n); + } + n = stream.read(buffer); + } + } + if (file == null) { + data = new byte[(int) length]; + System.arraycopy(buffer, 0, data, 0, (int) length); + } + } finally { + if (output != null) { + output.close(); + } + } + } + + public synchronized int read(byte[] b, long position) + throws RepositoryException { + if (position < 0 || position >= length) { + return -1; + } else if (data != null) { + int n = Math.min(b.length, data.length - (int) position); + System.arraycopy(data, (int) position, b, 0, n); + return n; + } else if (file != null) { + try { + RandomAccessFile random = new RandomAccessFile(file, "r"); + try { + random.seek(position); + return random.read(b); + } finally { + random.close(); + } + } catch (FileNotFoundException e) { + throw new RepositoryException("Binary file is missing", e); + } catch (IOException e) { + throw new RepositoryException("Unable to read the binary", e); + } + } else { + throw new IllegalStateException("This binary has been disposed"); + } + } + + public synchronized InputStream getStream() throws RepositoryException { + if (data != null) { + return new ByteArrayInputStream(data); + } else if (file != null) { + try { + return new FileInputStream(file); + } catch (FileNotFoundException e) { + throw new RepositoryException("Binary file is missing", e); + } + } else { + throw new IllegalStateException("This binary has been disposed"); + } + } + + public long getSize() { + return length; + } + + public synchronized void dispose() { + data = null; + if (file != null) { + file.delete(); + file = null; + } + } + + private synchronized void writeObject(ObjectOutputStream stream) + throws IOException { + stream.writeLong(length); + if (data != null) { + stream.write(data); + } else if (file != null) { + InputStream input = new FileInputStream(file); + try { + byte[] buffer = new byte[BUFFER_SIZE]; + int n = input.read(buffer); + while (n != -1) { + stream.write(buffer, 0, n); + n = input.read(buffer); + } + } finally { + input.close(); + } + } else { + throw new IllegalStateException("This binary has been disposed"); + } + } + + private void readObject(ObjectInputStream stream) + throws IOException { + length = stream.readLong(); + if (length <= BUFFER_SIZE) { + data = new byte[(int) length]; + stream.readFully(data); + file = null; + } else { + data = null; + file = File.createTempFile("jackrabbit-jcr-rmi-", null); + OutputStream output = new FileOutputStream(file); + try { + byte[] buffer = new byte[BUFFER_SIZE]; + long count = 0; + int n = stream.read(buffer); + while (n != -1 && count < length) { + output.write(buffer, 0, n); + count += n; + n = stream.read(buffer, 0, Math.min( + buffer.length, (int) (length - count))); + } + } finally { + output.close(); + } + } + } + + public void finalize() { + dispose(); + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java new file mode 100644 index 00000000000..8d9ffb85ccd --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java @@ -0,0 +1,242 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi.value; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import javax.jcr.PropertyType; +import javax.jcr.ValueFormatException; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * String value. + */ +@Deprecated(forRemoval = true) class StringValue extends AbstractValue { + + /** + * Serial version UID. + */ + private static final long serialVersionUID = 220963478492833703L; + + /** The string value */ + private final String value; + + /** + * Creates an instance for the given string value. + */ + public StringValue(String value) { + this.value = value; + } + + /** + * Returns {@link PropertyType#STRING}. + */ + public int getType() { + return PropertyType.STRING; + } + + /** + * The string is converted using {@link Boolean#valueOf(String)}. + */ + @Override + public boolean getBoolean() { + return Boolean.valueOf(value); + } + + /** + * If the string is in the format described in + * {@link DateValue#getString()}, it is converted directly, otherwise + * a {@link ValueFormatException} is thrown. + */ + @Override + public Calendar getDate() throws ValueFormatException { + // check optional leading sign + char sign = '+'; + int start = 0; + if (value.startsWith("-")) { + sign = '-'; + start = 1; + } else if (value.startsWith("+")) { + sign = '+'; + start = 1; + } + + // note that we cannot use java.text.SimpleDateFormat for + // parsing because it can't handle years <= 0 and TZD's + int year, month, day, hour, min, sec, ms; + String tzID; + try { + // year (YYYY) + year = Integer.parseInt(value.substring(start, start + 4)); + start += 4; + // delimiter '-' + if (value.charAt(start) != '-') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // month (MM) + month = Integer.parseInt(value.substring(start, start + 2)); + start += 2; + // delimiter '-' + if (value.charAt(start) != '-') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // day (DD) + day = Integer.parseInt(value.substring(start, start + 2)); + start += 2; + // delimiter 'T' + if (value.charAt(start) != 'T') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // hour (hh) + hour = Integer.parseInt(value.substring(start, start + 2)); + start += 2; + // delimiter ':' + if (value.charAt(start) != ':') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // minute (mm) + min = Integer.parseInt(value.substring(start, start + 2)); + start += 2; + // delimiter ':' + if (value.charAt(start) != ':') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // second (ss) + sec = Integer.parseInt(value.substring(start, start + 2)); + start += 2; + // delimiter '.' + if (value.charAt(start) != '.') { + throw new ValueFormatException("Not a date: " + value); + } + start++; + // millisecond (SSS) + ms = Integer.parseInt(value.substring(start, start + 3)); + start += 3; + // time zone designator (Z or +00:00 or -00:00) + if (value.charAt(start) == '+' || value.charAt(start) == '-') { + // offset to UTC specified in the format +00:00/-00:00 + tzID = "GMT" + value.substring(start); + } else if (value.substring(start).equals("Z")) { + tzID = "GMT"; + } else { + throw new ValueFormatException( + "Invalid time zone in a date: " + value); + } + } catch (IndexOutOfBoundsException e) { + throw new ValueFormatException("Not a date: " + value, e); + } catch (NumberFormatException e) { + throw new ValueFormatException("Not a date: " + value, e); + } + + TimeZone tz = TimeZone.getTimeZone(tzID); + // verify id of returned time zone (getTimeZone defaults to "GMT") + if (!tz.getID().equals(tzID)) { + throw new ValueFormatException( + "Invalid time zone in a date: " + value); + } + + // initialize Calendar object + Calendar cal = Calendar.getInstance(tz); + cal.setLenient(false); + // year and era + if (sign == '-' || year == 0) { + // not CE, need to set era (BCE) and adjust year + cal.set(Calendar.YEAR, year + 1); + cal.set(Calendar.ERA, GregorianCalendar.BC); + } else { + cal.set(Calendar.YEAR, year); + cal.set(Calendar.ERA, GregorianCalendar.AD); + } + // month (0-based!) + cal.set(Calendar.MONTH, month - 1); + // day of month + cal.set(Calendar.DAY_OF_MONTH, day); + // hour + cal.set(Calendar.HOUR_OF_DAY, hour); + // minute + cal.set(Calendar.MINUTE, min); + // second + cal.set(Calendar.SECOND, sec); + // millisecond + cal.set(Calendar.MILLISECOND, ms); + + try { + // the following call will trigger an IllegalArgumentException + // if any of the set values are illegal or out of range + cal.getTime(); + } catch (IllegalArgumentException e) { + throw new ValueFormatException("Not a date: " + value, e); + } + + return cal; + } + + /** + * The string is converted using the constructor + * {@link BigDecimal#BigDecimal(String)}. + */ + @Override + public BigDecimal getDecimal() throws ValueFormatException { + try { + return new BigDecimal(value); + } catch (NumberFormatException e) { + throw new ValueFormatException("Not a decimal value: " + value, e); + } + } + + + /** + * The string is converted using {@link Double#valueOf(String)}. + */ + @Override + public double getDouble() throws ValueFormatException { + try { + return Double.valueOf(value); + } catch (NumberFormatException e) { + throw new ValueFormatException("Not a double value: " + value, e); + } + } + + /** + * The string is converted using {@link Long#valueOf(String)}. + */ + @Override + public long getLong() throws ValueFormatException { + try { + return Long.valueOf(value); + } catch (NumberFormatException e) { + throw new ValueFormatException("Not a long value: " + value, e); + } + } + + /** + * Returns the string value. + */ + public String getString() { + return value; + } + +} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java new file mode 100755 index 00000000000..05fc56e6e4c --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java @@ -0,0 +1,18 @@ +/* + * 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. + */ +@org.osgi.annotation.versioning.Version("3.1.0") +package org.apache.jackrabbit.rmi.value; diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html new file mode 100644 index 00000000000..2bcd960b8e1 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html @@ -0,0 +1,19 @@ + + +Local adapters for remote iterators. + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html new file mode 100644 index 00000000000..bc61b5b85f7 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html @@ -0,0 +1,76 @@ + + +Client implementation of the transparent JCR-RMI layer. +

    +This package contains the default client implementation of the +transparent JCR-RMI layer. The classes in this package can be used +to make a remote JCR-RMI service seem like a local JCR repository. +

    +The contents of this package is designed using two design patterns, +Factory and Adapter. All the ClientObject subclasses implement the +Adapter pattern to adapt a remote JCR-RMI reference to the corresponding +local JCR interface. The Factory pattern is used to centralize the +creation and configuration of all adapter instances. + +

    Looking up a JCR-RMI client

    +

    +The ClientRepositoryFactory class provides a convenient mechanism for +looking up a remote JCR-RMI repository. The factory can be used either +directly or as a JNDI object factory. +

    +The following example shows how to use the ClientRepositoryFactory +directly: + +

    +    String name = ...; // The RMI URL of the repository
    +    
    +    ClientRepositoryFactory factory = new ClientRepositoryFactory();
    +    Repository repository = factory.getRepository(name);
    +
    + +

    +The ClientRepositoryFactory can also be used via JNDI. The following +example settings and code demonstrate how to configure and use the +transparent JCR-RMI layer in a Tomcat 5.5 web application: + +

    +context.xml:
    +    <Resource name="jcr/Repository" auth="Container"
    +              type="javax.jcr.Repository"
    +              factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
    +              url="..."/>
    +              
    +web.xml:
    +    <resource-env-ref>
    +      <description>The external content repository</description>
    +      <resource-env-ref-name>jcr/Repository</resource-env-ref-name>
    +      <resource-env-ref-type>javac.jcr.Repository</resource-env-ref-type>
    +    </resource-env-ref>
    +
    +...SomeServlet.java:
    +    Context initial = new InitialContext();
    +    Context context = (Context) initial.lookup("java:comp/env");
    +    Repository repository = (Repository) context.lookup("jcr/Repository");
    +
    + +

    +Note that in the example above only the context.xml configuration file +contains a direct references to the JCR-RMI layer. All other parts of the +web application can be implemented using the standard JCR interfaces. + + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html new file mode 100644 index 00000000000..00327bdc80e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html @@ -0,0 +1,26 @@ + + +Utility classes for implementing JCR iterators based on static arrays. +

    +This package contains array-based implementations of the JCR +{@link javax.jcr.RangeIterator RangeIterator} interfaces. +

    +These utility classes were designed for the transparent JCR-RMI layer, +but can easily be used as a part of any JCR repository implementation. +This package depends only on the standard JCR and J2SE APIs. + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html new file mode 100644 index 00000000000..79e5eac5cac --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html @@ -0,0 +1,71 @@ + + +

    +Helper class used by the observation manager classes. +The JCR observation framework defines a notification mechanism where an +EventListener is registered with the observation manager +to receive certain events during the lifetime of the registration. For +the remote case, where the repository and the application run in different +Java VMs on possibly different hosts, there are issues related to the +observation framework. +

    +The listener mechanism is a call-back mechanism where the server calls +code in the client application. The client application code most probably +hooks into other parts of that application. Therefore it is not practically +feasible to just require the client listener to be serializable to be sent +to the server for several reasons: +

      +
    • The RMI server cannot call any method on the RMI client. To support such +call-back situations, the client side application would have to register +another server, which the server side would have to call. +
    • When trying to "transfer" the listener to the server side, the listener +class would have to be available to the server side - either locally in the +class path or through RMI class loading mechanisms. +
    +

    +To circumvent these issues and still be able to register event listeners, +support for observation events is implemented in a manner similar to the Java +Management Extensions Remote API 1.0 (JSR 160) as laid out in Chapter 2.4, +Adding Remote Listeners: +

    +The ObservationManager interface is not implemented in the RMI layer like +other interfaces, which just forward calls to the API to the corresponding +remote object by means of the RMI framework. Instead the client-side +ObservationManager manages its own list of registered event listeners. Each +listener registered with an ObservationManager is assigned a unique +identifier. +

    +The unique identifier along with the filter configuration (event type, +path, depth flag, uuid list, node type list, local flag) is sent to the +server-side remote observation manager. This latter instantiates a proxy +event listener representing the client side event listener contains the +unique identifier as a ilnk to the client side event listener. The proxy +event listener is the registered to the repository's ObservationManager +with the configuration received from the client side. +

    +When an event arrives at the event listener proxy, the proxy creates a +new RemoteEvent instance, which contains the client-side event listener +identifier along with the Event objects from the EventIterator. This +RemoteEvent instance is added to a server-side queue, which may be +retrieved from the client-side. +

    +The client-side ObservationManager has a helper class ClientEventPoll, +which works in the background asking the server for the RemoteEvents from +the event queue. Each such event is then dispatched to the client-side +event listener by calling the EventListener.onEvent() method. + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html new file mode 100644 index 00000000000..4d971e6eefd --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html @@ -0,0 +1,35 @@ + + +Remote interfaces of the transparent JCR-RMI layer. +

    +This package contains all the interfaces and classes used by both +the client and server sides of the transparent JCR-RMI layer. +The compiled contents of this package should thus be included +in both client and server installations. Note also that RMI stubs and +skeletons need to be generated for all the remote interfaces when using +old JDK versions (stubs for JDK < 1.5, skeletons for JDK < 1.2). +

    +The interfaces in this package are remote versions of the +corresponding interfaces in the javax.jcr packages. They are used by +the adapter classes in the .rmi.client and .rmi.server packages. The server +classes adapt local JCR objects to the remote interfaces, and the client +classes adapt the resulting remote references back to the JCR interfaces. +

    +The SerialValue class is a decorator utility used by both the client and +server classes to safely pass Value objects over the network. + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html new file mode 100644 index 00000000000..1fd4bb78e1d --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html @@ -0,0 +1,19 @@ + + +Remote adapters for local iterators. + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html new file mode 100644 index 00000000000..7ee6b820ccb --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html @@ -0,0 +1,80 @@ + + +Server implementation of the transparent JCR-RMI layer. +

    +This package contains the default server implementation of the +transparent JCR-RMI layer. The classes in this package can be used +to make a local JCR repository available as an RMI service. In addition, +this package offers a straightforward mechanism for extending or modifying +the behaviour of the server layer. +

    +The contents of this package is designed using two design patterns, +Factory and Adapter. All the remotely accessible ServerObject subclasses +implement the Adapter pattern to adapt a local JCR interface to the +corresponding remote JCR-RMI interface. The Factory pattern is used +to centralize the creation and configuration of all adapter instances. + +

    Setting up a JCR-RMI server

    +

    +Setting up the server part of the JCR-RMI layer is quite straightforward. +After instantiating a local JCR repository you need to wrap it into a +remote adapter and create an RMI binding for the repository. A variation +of the following code is usually all that is needed in addition to the +standard RMI setup (starting rmiregistry, etc.): + +

    +    Repository repository = ...; // The local repository
    +    String name = ...; // The RMI URL for the repository
    +    
    +    RemoteAdapterFactory factory = new ServerAdapterFactory();
    +    RemoteRepository remote = factory.getRemoteRepository(repository);
    +    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    +
    + +

    Extending the JCR-RMI server

    +

    +The Factory pattern used by this package makes it easy to extend +the behaviour of the JCR-RMI server. Such changes in behaviour or policy +can be implemented by modifying or replacing the default +ServerAdapterFactory used in the example above. +

    +The following example code adds transparent logging of all session logins +and logouts: + +

    +    Repository repository = ...; // The local repository
    +    String name = ...; // The RMI URL for the repository
    +    
    +    RemoteAdapterFactory factory = new ServerAdapterFactory() {
    +        public RemoteSession getRemoteSession(Session session)
    +                throws RemoteException {
    +            System.out.println("LOGIN: " + session.getUserId());
    +            return new ServerSession(session, this) {
    +                public void logout() {
    +                    System.out.println("LOGOUT: " + session.getUserId());
    +                    super.logout();
    +                }
    +            };
    +        }
    +    };
    +
    +    RemoteRepository remote = factory.getRemoteRepository(repository);
    +    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    +
    + + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html new file mode 100644 index 00000000000..8dc61302031 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html @@ -0,0 +1,30 @@ + + + +Serializable implementation of the JCR Value interfaces. +

    +This package contains a simple in-memory implementation of the JCR +{@link javax.jcr.Value Value} and {@link javax.jcr.ValueFactory ValueFactory} +interfaces. The implementation has no external dependencies and supports +serialization of Value instances. +

    +

    +Note that the Value instances created by this package are thread safe. +

    + + diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html new file mode 100644 index 00000000000..9040e137b0e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html @@ -0,0 +1,31 @@ + + +Utility classes for importing SAX event streams. +

    +The classes in this package can be used for to implement the JCR +{@link javax.jcr.Session#getImportContentHandler(java.lang.String) Session.getImportContentHandler(String)} +and +{@link javax.jcr.Workspace#getImportContentHandler(java.lang.String, int) Workspace.getImportContentHandler(String, int)} +methods in terms of the corresponding importXML() methods. +

    +These utility classes were designed for the transparent JCR-RMI layer, +but can easily be used as a part of any JCR repository implementation. +The public interface of this package depends only on the standard JCR and +J2SE APIs. The implementation uses Xerces as an extra dependency to +serialize the SAX event streams. + diff --git a/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory b/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory new file mode 100644 index 00000000000..26b601efd87 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory @@ -0,0 +1,16 @@ +# 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. + +org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory diff --git a/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml b/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml new file mode 100644 index 00000000000..3ef2674f748 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml @@ -0,0 +1,41 @@ + + + + + + + java:jcr/local + jnp://localhost:1099/jcrServer + + + jboss.jca:service=ManagedConnectionFactory,name=jcr/local + + diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java new file mode 100644 index 00000000000..3272ab6c915 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java @@ -0,0 +1,39 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi; + +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.apache.jackrabbit.test.JCRTestSuite; + +/** + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + *

    + * JCR API conformance test suite. + */ +@Deprecated(forRemoval = true) public class ConformanceTest extends TestCase { + + public static TestSuite suite() { + TestSuite suite = new TestSuite(); + if (Boolean.getBoolean("jackrabbit.test.integration")) { + suite.addTest(new JCRTestSuite()); + } + return suite; + } + +} diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java new file mode 100644 index 00000000000..34e7e535633 --- /dev/null +++ b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +package org.apache.jackrabbit.rmi; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.rmi.server.RemoteObject; +import java.security.Principal; +import java.util.Properties; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.SimpleCredentials; + +import org.apache.jackrabbit.core.JackrabbitRepositoryStub; +import org.apache.jackrabbit.core.SessionImpl; +import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; +import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; +import org.apache.jackrabbit.rmi.remote.RemoteRepository; +import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; +import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; +import org.apache.jackrabbit.rmi.server.principal.ServerGroup; +import org.apache.jackrabbit.test.RepositoryStubException; + +@Deprecated(forRemoval = true) public class RepositoryStubImpl extends JackrabbitRepositoryStub { + + /** + * A known principal used for access control tests. + */ + private Principal principal; + + private RemoteRepository remote; + + private Repository repository; + + public RepositoryStubImpl(Properties env) { + super(env); + } + + @Override + public synchronized Repository getRepository() + throws RepositoryStubException { + if (repository == null) { + try { + Repository repo = super.getRepository(); + principal = findKnownPrincipal(repo); + + RemoteAdapterFactory raf = new ServerAdapterFactory(); + remote = raf.getRemoteRepository(repo); + + // Make sure that the remote reference survives serialization + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(buffer); + oos.writeObject(RemoteObject.toStub(remote)); + oos.close(); + + ObjectInputStream ois = new ObjectInputStream( + new ByteArrayInputStream(buffer.toByteArray())); + LocalAdapterFactory laf = new ClientAdapterFactory(); + repository = + laf.getRepository((RemoteRepository) ois.readObject()); + } catch (Exception e) { + throw new RepositoryStubException(e); + } + } + return repository; + } + + private static Principal findKnownPrincipal(Repository repo) + throws RepositoryException { + SessionImpl session = (SessionImpl) repo.login( + new SimpleCredentials("admin", "admin".toCharArray())); + try { + for (Principal principal : session.getSubject().getPrincipals()) { + if (!ServerGroup.isGroup(principal)) { + return principal; + } + } + throw new RepositoryException("Known principal not found"); + } finally { + session.logout(); + } + } + + @Override + public Principal getKnownPrincipal(Session ignored) + throws RepositoryException { + return principal; + } + +} diff --git a/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml b/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..15d98f9b73f --- /dev/null +++ b/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml @@ -0,0 +1,31 @@ + + + + + + target/jcr.log + + %date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n + + + + + + + + diff --git a/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties b/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties new file mode 100644 index 00000000000..bc101aaba6e --- /dev/null +++ b/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties @@ -0,0 +1,17 @@ +# 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. + +# Stub implementation class +javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.rmi.RepositoryStubImpl diff --git a/pom.xml b/pom.xml index cab242596e5..ab95758ceb6 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,7 @@ jackrabbit-core jackrabbit-webdav jackrabbit-jcr-server + jackrabbit-jcr-rmi jackrabbit-jcr-servlet jackrabbit-webapp jackrabbit-jca From c604a5fc7a25f3c46d624e04623e2a495ae38e20 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 29 Feb 2024 14:11:30 +0100 Subject: [PATCH 157/271] JCR-5032: jackrabbit-jcr-servlet: deprecate RMI support (#166) --- .../remote/JNDIRemoteBindingServlet.java | 2 ++ .../remote/JNDIRemoteRepositoryServlet.java | 2 ++ .../remote/RMIRemoteBindingServlet.java | 2 ++ .../remote/RMIRemoteRepositoryServlet.java | 2 ++ .../servlet/remote/RemoteBindingServlet.java | 2 ++ .../remote/RemoteRepositoryServlet.java | 2 ++ .../remote/URLRemoteBindingServlet.java | 2 ++ .../remote/URLRemoteRepositoryServlet.java | 2 ++ .../servlet/remote/package-info.java | 21 +++++++++++++++++++ 9 files changed, 37 insertions(+) create mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java index 5d21f1d6f89..5ba4d24781b 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java @@ -59,7 +59,9 @@ * * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class JNDIRemoteBindingServlet extends RemoteBindingServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java index 0b62965bcfd..9a014764499 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java @@ -65,7 +65,9 @@ * {@link AbstractRepositoryServlet} for the details. * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class JNDIRemoteRepositoryServlet extends RemoteRepositoryServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java index fe591a36a23..223ef69a3e2 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java @@ -47,7 +47,9 @@ * * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class RMIRemoteBindingServlet extends RemoteBindingServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java index 292a0c1d58e..c3dadf54fdd 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java @@ -51,7 +51,9 @@ * {@link AbstractRepositoryServlet} for the details. * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class RMIRemoteRepositoryServlet extends RemoteRepositoryServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java index 77bca0b5d52..2ab2018f85e 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java @@ -54,7 +54,9 @@ * * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class RemoteBindingServlet extends HttpServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java index d219cae55cb..4d708893386 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java @@ -45,7 +45,9 @@ * {@link AbstractRepositoryServlet} for the details. * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public abstract class RemoteRepositoryServlet extends AbstractRepositoryServlet { diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java index 8a3f395d184..b9791067452 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java @@ -47,7 +47,9 @@ * * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class URLRemoteBindingServlet extends RemoteBindingServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java index d4a6dba535d..9cd13d3f91a 100644 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java @@ -52,7 +52,9 @@ * {@link AbstractRepositoryServlet} for the details. * * @since 1.4 + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. */ +@Deprecated(forRemoval=true) public class URLRemoteRepositoryServlet extends RemoteRepositoryServlet { /** diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java new file mode 100644 index 00000000000..25b26248a9b --- /dev/null +++ b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java @@ -0,0 +1,21 @@ +/* + * 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. + */ +/** + * Remote servlet support (deprecated) + * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. + */ +package org.apache.jackrabbit.servlet.remote; From 7473191d4a41425d6f411579720719ed4e22b52c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 7 Mar 2024 10:17:23 +0100 Subject: [PATCH 158/271] JCR-5034: set baseline comparisonVersion to latest stable (2.20.15) (#167) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d5ed822957f..920361da8d1 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -383,7 +383,7 @@ - 2.20.14 + 2.20.15 From 06ddf6aa84de99edc4a75c63f749deea71b0202b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 8 Mar 2024 09:22:38 +0100 Subject: [PATCH 159/271] JCR-5027: jackrabbit-webapp: remove RMI support (remove unused code) --- .../jackrabbit/j2ee/RepositoryAccessServlet.java | 11 ----------- .../jackrabbit/j2ee/RepositoryStartupServlet.java | 15 --------------- 2 files changed, 26 deletions(-) diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java index f4df97e9ca6..30054c25744 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java @@ -235,17 +235,6 @@ protected Repository getRepositoryByContextAttribute() { return result; } - /** - * Return the fully qualified name of the class providing the client - * repository. The class whose name is returned must implement the - * {@link ClientFactoryDelegater} interface. - * - * @return the qfn of the factory class. - */ - protected String getServerFactoryDelegaterClass() { - return getClass().getName() + "$RMIClientFactoryDelegater"; - } - /** * Returns the JCR repository * diff --git a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java index 8f44a720994..3764d1380fa 100644 --- a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java +++ b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java @@ -392,21 +392,6 @@ public BootstrapConfig getBootstrapConfig() { return config; } - /** - * Return the fully qualified name of the class providing the remote - * repository. The class whose name is returned must implement the - * {@link RemoteFactoryDelegater} interface. - *

    - * Subclasses may override this method for providing a name of a own - * implementation. - * - * @return getClass().getName() + "$RMIRemoteFactoryDelegater" - */ - protected String getRemoteFactoryDelegaterClass() { - return getClass().getName() + "$RMIRemoteFactoryDelegater"; - } - - //-------------------------------------------------< Installer Routines >--- /** From d8abae9cc224cd28f7a5ebdc26c7c7b37706625e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Mar 2024 15:12:09 +0100 Subject: [PATCH 160/271] JCR-5035: Update tomcat dependency to 9.0.86 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index deea601b625..3eebaab2161 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.85 + 9.0.86 From 4195e33e311544faf5fda337beb65397caa4f0c7 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Mar 2024 17:01:01 +0100 Subject: [PATCH 161/271] JCR-4902: Update mockito dependency to 5.11.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 920361da8d1..10ca28d8317 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -626,7 +626,7 @@ org.mockito mockito-core - 4.11.0 + 5.11.0 From 0c3a2cf902a4d54613f3f45e464c86d15963582a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Mar 2024 17:40:20 +0100 Subject: [PATCH 162/271] JCR-5037: update aws java sdk version to 1.12.678 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index b3983b088dc..4a1e5661087 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.659 + 1.12.678 org.apache.jackrabbit From c087aa1ce4e45fa002267be83d5fa3d99faa65d1 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 13 Mar 2024 18:11:33 +0100 Subject: [PATCH 163/271] JCR-5038: Update spotbugs-maven-plugin to 4.8.3.1 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 10ca28d8317..aae6d809162 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -428,7 +428,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.2.0 + 4.8.3.1 From 81fee93cee5ec0bd0a3571c469ed4a9e90f09aff Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 14 Mar 2024 10:14:50 +0100 Subject: [PATCH 164/271] JCR-5039: Update oak-jackrabbit-api.version.used in trunk to Oak 1.22.19 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index aae6d809162..d2424896a08 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -57,7 +57,7 @@ 1.60.0 - 1.22.18 + 1.22.19 9.4.53.v20231009 2.4.1 ${project.build.sourceEncoding} From 2568633339cae1564dab65dc35a663e34407b8fe Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 14 Mar 2024 13:11:20 +0100 Subject: [PATCH 165/271] JCR-5040: Update javacc-maven-plugin to version 3.1.0 --- jackrabbit-spi-commons/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 69383a3acc1..8bab094dd01 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -115,7 +115,7 @@ org.codehaus.mojo javacc-maven-plugin - 3.0.1 + 3.1.0 sql From 62017687a8efab6d37e53c72d95daae7851e0e8f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 15 Mar 2024 13:31:01 +0100 Subject: [PATCH 166/271] JCR-5041: Javadoc build is broken due to JCR 2.0 API docs being unavailable --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d2424896a08..73005660ac5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -221,7 +221,7 @@ ${java.version} true - https://docs.adobe.com/docs/en/spec/javax.jcr/javadocs/jcr-2.0/ + https://s.apache.org/jcr-2.0-javadoc/ https://jackrabbit.apache.org/oak/docs/apidocs https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/ https://hc.apache.org/httpcomponents-client-4.5.x/current/httpmime/apidocs/ From 6a843dd4f158915791f84d8e95bafb400fde475d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sat, 16 Mar 2024 08:04:59 +0100 Subject: [PATCH 167/271] JCR-4977: use 'beta' identifier for releases in unstable branch (#168) --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 4a1e5661087..f7684397679 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index a504cb250a4..7feb93d1e2e 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 4e5191d1374..f7024d9b99b 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 0300f2319d3..1bd5dabc619 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 523fcf0651e..72acbea59b3 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 641d4f0f62b..643173b9045 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 0828cea4895..f5c20fc815e 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 22a06e4950f..f73dc8f55ca 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 9639a3bb773..176581e0d62 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index f9fb32c3b95..101732e5e5d 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 7b3a5c9b2dd..8b85fe6647f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 7d16318e4cc..3845dd654d5 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 2023d08b0b0..0d72723a918 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 73005660ac5..a60f4e90bbb 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT pom @@ -76,7 +76,7 @@ 0.0 - 1708604721 + 1710339350 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 8bab094dd01..cfb43bcf6fa 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 4242f56da4d..8bbebed96fb 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index ecad80998f0..c2f42713419 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index f90b15772be..e7fa20e2b99 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 401c9903c18..35f4def3141 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index c7fcd81680b..46d12326f1c 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index f94eceff04a..2a01e7aa4a6 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 3eebaab2161..292551552c5 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 7151762d328..482a4835d43 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index ab95758ceb6..984cbdcbe49 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-SNAPSHOT + 2.21.26-beta-SNAPSHOT jackrabbit-parent/pom.xml From d9785df0d71f828a7de65744a2666567c559a207 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 22 Mar 2024 13:40:26 +0100 Subject: [PATCH 168/271] JCR-5036: Release Jackrabbit 2.21.26 - Candidate Release Notes --- RELEASE-NOTES.txt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 21b6acdbbb4..b77618984d4 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,29 +1,37 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.25 +Release Notes -- Apache Jackrabbit -- Version 2.21.26 Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.25, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.26, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.25 is an unstable release cut directly from +Apache Jackrabbit 2.21.26 is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.25 +Changes in Jackrabbit 2.21.26 ----------------------------- Bug - [JCR-5024] - webapp: un-deprecate BootstrapConfig.getJndiConfig and RepositoryAccessServlet.getRepositoryByJNDI + [JCR-5041] - Javadoc build is broken due to JCR 2.0 API docs being unavailable Task - [JCR-5025] - standalone: deprecate remote repository support (RMI and JNDI) - [JCR-5029] - update aws java sdk version to 1.12.659 - + [JCR-4902] - Update mockito dependency to 5.11.0 + [JCR-4977] - use 'beta' identifier for releases in unstable branch + [JCR-5026] - standalone: remove remote repository support (RMI and JNDI) + [JCR-5027] - jackrabbit-webapp: remove RMI support + [JCR-5032] - jackrabbit-jcr-servlet: deprecate RMI support + [JCR-5034] - set baseline comparisonVersion to latest stable (2.20.15) + [JCR-5035] - Update tomcat dependency to 9.0.86 + [JCR-5037] - update aws java sdk version to 1.12.678 + [JCR-5038] - Update spotbugs-maven-plugin to 4.8.3.1 + [JCR-5039] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.19 + [JCR-5040] - Update javacc-maven-plugin to version 3.1.0 For more detailed information about all the changes in this and other Jackrabbit releases, please see the Jackrabbit issue tracker at From 2c1f147a2b37c53ab5f4d3d986f6736db013f8f4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 25 Mar 2024 10:19:58 +0100 Subject: [PATCH 169/271] [maven-release-plugin] prepare release jackrabbit-2.21.26-beta --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index f7684397679..878ba90f59d 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 7feb93d1e2e..9cb83c28d11 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index f7024d9b99b..9a49b686c51 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 1bd5dabc619..eae226aeb44 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 72acbea59b3..cf724241c2c 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 643173b9045..77f3b591b04 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index f5c20fc815e..f313d71134b 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index f73dc8f55ca..0addb426952 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 176581e0d62..98880f4961d 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 101732e5e5d..99ecef12398 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 8b85fe6647f..4c63ee64066 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 3845dd654d5..aaa6b48a1b2 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 0d72723a918..0aeacb48733 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index a60f4e90bbb..69c392e7ecd 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.26-beta-SNAPSHOT + 2.21.26-beta pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.23 + jackrabbit-2.21.26-beta @@ -76,7 +76,7 @@ 0.0 - 1710339350 + 1711356934 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index cfb43bcf6fa..470a5faedda 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 8bbebed96fb..121927376f1 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index c2f42713419..b35bd3b7ae2 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index e7fa20e2b99..0e22d7cd0df 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 35f4def3141..ca204c337fc 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 46d12326f1c..0e39b60e95d 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 2a01e7aa4a6..297e1c95e8d 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 292551552c5..f99e3f84448 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 482a4835d43..884ba05971e 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 984cbdcbe49..7d37df6cf8b 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta-SNAPSHOT + 2.21.26-beta jackrabbit-parent/pom.xml From c337a203a23e90c74f7eaff18e1b32387975aea3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 25 Mar 2024 10:20:07 +0100 Subject: [PATCH 170/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-rmi/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 878ba90f59d..c61515698b5 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 9cb83c28d11..25a0ea5f51b 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 9a49b686c51..ae8b33e1da5 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index eae226aeb44..a93cfe6e7f8 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index cf724241c2c..1033dbcb090 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 77f3b591b04..34b8f9e1ad3 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index f313d71134b..3b58c0d9e52 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml index 0addb426952..6fee4dae8f3 100644 --- a/jackrabbit-jcr-rmi/pom.xml +++ b/jackrabbit-jcr-rmi/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 98880f4961d..4b5fbff44fc 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 99ecef12398..779b421637e 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 4c63ee64066..3d060e8305b 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index aaa6b48a1b2..a6ca023bcad 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 0aeacb48733..b597215cf8b 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 69c392e7ecd..19e081b8819 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.26-beta + 2.21.27-beta-SNAPSHOT pom @@ -76,7 +76,7 @@ 0.0 - 1711356934 + 1711358406 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 470a5faedda..eabf8fa1a30 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 121927376f1..0a6e31e5f79 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index b35bd3b7ae2..4a71d7faff3 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 0e22d7cd0df..bedb8a83016 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index ca204c337fc..42bb28f26e3 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 0e39b60e95d..d4af22abb57 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 297e1c95e8d..a0fddf96f53 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index f99e3f84448..760a7e7b32a 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 884ba05971e..cc0020218d3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 7d37df6cf8b..6d3d7d55f45 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.26-beta + 2.21.27-beta-SNAPSHOT jackrabbit-parent/pom.xml From 2d4ffebfbcda542b7745844ef7556c9581b86c07 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 28 Mar 2024 13:36:42 +0100 Subject: [PATCH 171/271] JCR-5042: jackrabbit-jcr-servlet: remove RMI support (#169) --- jackrabbit-jcr-servlet/pom.xml | 6 - .../remote/JNDIRemoteBindingServlet.java | 120 --------------- .../remote/JNDIRemoteRepositoryServlet.java | 109 -------------- .../remote/RMIRemoteBindingServlet.java | 99 ------------ .../remote/RMIRemoteRepositoryServlet.java | 78 ---------- .../servlet/remote/RemoteBindingServlet.java | 141 ------------------ .../remote/RemoteRepositoryServlet.java | 83 ----------- .../remote/URLRemoteBindingServlet.java | 86 ----------- .../remote/URLRemoteRepositoryServlet.java | 86 ----------- .../servlet/remote/package-info.java | 21 --- 10 files changed, 829 deletions(-) delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java delete mode 100644 jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 779b421637e..8a43fb83789 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -49,12 +49,6 @@ jackrabbit-jcr-commons ${project.version} - - org.apache.jackrabbit - jackrabbit-jcr-rmi - ${project.version} - true - org.apache.jackrabbit jackrabbit-core diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java deleted file mode 100644 index 5ba4d24781b..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteBindingServlet.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.util.Enumeration; -import java.util.Hashtable; - -import javax.jcr.Repository; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletException; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * Servlet that binds a repository from a servlet context attribute to JNDI - * as a remote repository reference. - *

    - * The initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute that contains the repository. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
    - *
    - * Name of the remote adapter factory class used to create the remote - * repository reference. The configured class should have public - * constructor that takes no arguments. - *
    - *
    location
    - *
    - * Location where to bind the repository in the JNDI directory. - * The default value is - * "org/apache/jackrabbit/rmi/remote/RemoteRepository". - *
    - *
    *
    - *
    - * All other init parameters are used as the JNDI environment when - * instantiating {@link InitialContext} for binding up the repository. - *
    - *
    - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class JNDIRemoteBindingServlet extends RemoteBindingServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -7984144838866544543L; - - /** - * JNDI context to which to bind the repository. - */ - private Context context; - - /** - * Location of the repository within the JNDI context. - */ - private String location = - RemoteRepository.class.getName().replace('.', '/'); - - /** - * Binds a repository from the servlet context in the configured RMI URL. - * - * @throws ServletException if the repository could not be bound in RMI - */ - public void init() throws ServletException { - try { - Hashtable environment = new Hashtable(); - Enumeration names = getInitParameterNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - if (name.equals("location")) { - location = getInitParameter(name); - } else if (!name.equals(Repository.class.getName()) - && !name.equals(RemoteAdapterFactory.class.getName())) { - environment.put(name, getInitParameter(name)); - } - } - context = new InitialContext(environment); - context.bind(location, getRemoteRepository()); - } catch (NamingException e) { - throw new ServletException( - "Failed to bind remote repository to JNDI: " + location, e); - } - } - - /** - * Unbinds the remote repository from JNDI. - */ - public void destroy() { - try { - context.unbind(location); - } catch (NamingException e) { - log("Failed to unbind remote repository from JNDI: " + location, e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java deleted file mode 100644 index 9a014764499..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/JNDIRemoteRepositoryServlet.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.util.Enumeration; -import java.util.Hashtable; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletException; - -import org.apache.jackrabbit.commons.repository.RepositoryFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.repository.JNDIRemoteRepositoryFactory; -import org.apache.jackrabbit.servlet.AbstractRepositoryServlet; - -/** - * Servlet that makes a remote repository from JNDI available as an attribute - * in the servlet context. - *

    - * The supported initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute to put the repository in. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.client.LocalAdapterFactory
    - *
    - * Name of the local adapter factory class used to create the local - * adapter for the remote repository. The configured class should have - * public constructor that takes no arguments. - *
    - *
    location
    - *
    - * Location of the remote repository in the JNDI directory. - * The default value is - * "org/apache/jackrabbit/rmi/remote/RemoteRepository". - *
    - *
    *
    - *
    - * All other init parameters are used as the JNDI environment when - * instantiating {@link InitialContext} for looking up the repository. - *
    - *
    - *

    - * This servlet can also be mapped to the URL space. See - * {@link AbstractRepositoryServlet} for the details. - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class JNDIRemoteRepositoryServlet extends RemoteRepositoryServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 9029928193416404478L; - - /** - * Returns the remote repository in the configured JNDI location. - * - * @return repository - * @throws RepositoryException if the repository could not be accessed - */ - @Override - protected Repository getRepository() throws RepositoryException { - String location = - "//localhost/" + RemoteRepository.class.getName().replace('.', '/'); - try { - Hashtable environment = new Hashtable(); - Enumeration names = getInitParameterNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - if (name.equals("location")) { - location = getInitParameter(name); - } else if (!name.equals(Repository.class.getName()) - && !name.equals(LocalAdapterFactory.class.getName())) { - environment.put(name, getInitParameter(name)); - } - } - return new JNDIRemoteRepositoryFactory( - getLocalAdapterFactory(), - new InitialContext(environment), location).getRepository(); - } catch (NamingException e) { - throw new RepositoryException( - "Repository not found: Invalid JNDI context", e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java deleted file mode 100644 index 223ef69a3e2..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteBindingServlet.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.net.MalformedURLException; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; - -import javax.servlet.ServletException; - -/** - * Servlet that binds a repository from a servlet context attribute in RMI. - *

    - * The initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute that contains the repository. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
    - *
    - * Name of the remote adapter factory class used to create the remote - * repository reference. The configured class should have public - * constructor that takes no arguments. - *
    - *
    url
    - *
    - * RMI URL where to bind the repository in. The default value is - * "//localhost/javax/jcr/Repository". - *
    - *
    - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class RMIRemoteBindingServlet extends RemoteBindingServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 1627580747678104906L; - - /** - * Location of the repository within the JNDI context. - */ - private String url; - - /** - * Binds a repository from the servlet context in the configured RMI URL. - * - * @throws ServletException if the repository could not be bound in RMI - */ - public void init() throws ServletException { - url = getInitParameter("url"); - if (url == null) { - url = "//localhost/javax/jcr/Repository"; - } - try { - Naming.rebind(url, getRemoteRepository()); - } catch (MalformedURLException e) { - log("Invalid RMI URL: " + url, e); - } catch (RemoteException e) { - log("Failed to bind repository to RMI: " + url, e); - } - } - - /** - * Unbinds the repository from RMI. - */ - public void destroy() { - try { - Naming.unbind(url); - } catch (NotBoundException e) { - // Ignore, perhaps the reference was already manually removed - } catch (MalformedURLException e) { - // Ignore, we already logged a warning about this during init() - } catch (RemoteException e) { - log("Failed to unbind repository from RMI: " + url, e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java deleted file mode 100644 index c3dadf54fdd..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RMIRemoteRepositoryServlet.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.servlet.ServletException; - -import org.apache.jackrabbit.rmi.repository.RMIRemoteRepositoryFactory; -import org.apache.jackrabbit.servlet.AbstractRepositoryServlet; - -/** - * Servlet that makes a repository from RMI available as an attribute - * in the servlet context. - *

    - * The supported initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute to put the repository in. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.client.LocalAdapterFactory
    - *
    - * Name of the local adapter factory class used to create the local - * adapter for the remote repository. The configured class should have - * public constructor that takes no arguments. - *
    - *
    url
    - *
    - * RMI URL of the remote repository. The default value is - * "//localhost/javax/jcr/Repository". - *
    - *
    - *

    - * This servlet can also be mapped to the URL space. See - * {@link AbstractRepositoryServlet} for the details. - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class RMIRemoteRepositoryServlet extends RemoteRepositoryServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 2410543206806054854L; - - /** - * Creates and returns an RMI repository factory for the configured RMI URL. - * - * @return RMI repository factory - * @throws RepositoryException if the factory could not be created - */ - @Override - protected Repository getRepository() throws RepositoryException { - return new RMIRemoteRepositoryFactory( - getLocalAdapterFactory(), - getInitParameter("url", "//localhost/javax/jcr/Repository") - ).getRepository(); - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java deleted file mode 100644 index 2ab2018f85e..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteBindingServlet.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.rmi.RemoteException; -import java.rmi.server.RemoteObject; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; -import org.apache.jackrabbit.servlet.ServletRepository; - -/** - * Servlet that makes a repository in servlet context available as a remote - * repository reference. By default this servlet makes the serialized - * reference available through HTTP GET, but subclasses can extend this - * behavior to bind the remote reference to various locations like JNDI - * or the RMI registry. - *

    - * The initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute that contains the repository. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
    - *
    - * Name of the remote adapter factory class used to create the remote - * repository reference. The configured class should have public - * constructor that takes no arguments. - *
    - *
    - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class RemoteBindingServlet extends HttpServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -162482284843619248L; - - /** - * Remote repository. - */ - private RemoteRepository remote; - - /** - * Returns the configured remote repository reference. The remote - * repository is instantiated and memorized during the first call to - * this method. - * - * @return remote repository - * @throws ServletException if the repository could not be instantiated - */ - protected RemoteRepository getRemoteRepository() throws ServletException { - if (remote == null) { - try { - RemoteAdapterFactory factory = getRemoteAdapterFactory(); - remote = factory.getRemoteRepository(new ServletRepository(this)); - } catch (RemoteException e) { - throw new ServletException( - "Failed to create the remote repository reference", e); - } - } - return remote; - } - - /** - * Instantiates and returns the configured remote adapter factory. - * - * @return remote adapter factory - * @throws ServletException if the factory could not be instantiated - */ - private RemoteAdapterFactory getRemoteAdapterFactory() - throws ServletException { - String name = getInitParameter(RemoteAdapterFactory.class.getName()); - if (name == null) { - return new ServerAdapterFactory(); - } - try { - Class factoryClass = Class.forName(name); - return (RemoteAdapterFactory) factoryClass.newInstance(); - } catch (ClassNotFoundException e) { - throw new ServletException( - "Remote adapter factory class not found: " + name, e); - } catch (InstantiationException e) { - throw new ServletException( - "Failed to instantiate the adapter factory: " + name, e); - } catch (IllegalAccessException e) { - throw new ServletException( - "Adapter factory constructor is not public: " + name, e); - } catch (ClassCastException e) { - throw new ServletException( - "Invalid remote adapter factory class: " + name, e); - } - } - - /** - * Outputs the remote repository reference as a serialized stream. - * - * @param request HTTP request - * @param response HTTP response - * @throws ServletException if the remote reference is not available - * @throws IOException on IO errors - */ - protected void doGet( - HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("application/octet-stream"); - ObjectOutputStream output = - new ObjectOutputStream(response.getOutputStream()); - output.writeObject(RemoteObject.toStub(getRemoteRepository())); - output.flush(); - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java deleted file mode 100644 index 4d708893386..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/RemoteRepositoryServlet.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.servlet.AbstractRepositoryServlet; - -/** - * Abstract base class for servlets that make a remote repository available - * locally in the servlet context. - *

    - * The supported initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute to put the repository in. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.client.LocalAdapterFactory
    - *
    - * Name of the local adapter factory class used to create the local - * adapter for the remote repository. The configured class should have - * public constructor that takes no arguments. - *
    - *
    - *

    - * This servlet can also be mapped to the URL space. See - * {@link AbstractRepositoryServlet} for the details. - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public abstract class RemoteRepositoryServlet - extends AbstractRepositoryServlet { - - /** - * Instantiates and returns the configured local adapter factory. - * - * @return local adapter factory - * @throws RepositoryException if the factory could not be instantiated - */ - protected LocalAdapterFactory getLocalAdapterFactory() - throws RepositoryException { - String name = getInitParameter( - LocalAdapterFactory.class.getName(), - ClientAdapterFactory.class.getName()); - try { - Class factoryClass = Class.forName(name); - return (LocalAdapterFactory) factoryClass.newInstance(); - } catch (ClassNotFoundException e) { - throw new RepositoryException( - "Local adapter factory class not found: " + name, e); - } catch (InstantiationException e) { - throw new RepositoryException( - "Failed to instantiate the adapter factory: " + name, e); - } catch (IllegalAccessException e) { - throw new RepositoryException( - "Adapter factory constructor is not public: " + name, e); - } catch (ClassCastException e) { - throw new RepositoryException( - "Invalid local adapter factory class: " + name, e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java deleted file mode 100644 index b9791067452..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteBindingServlet.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.net.MalformedURLException; -import java.net.URL; - -import javax.servlet.ServletException; - -/** - * Servlet that writes the remote reference of a repository in the servlet - * context to the configured URL. - *

    - * The initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute that contains the repository. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
    - *
    - * Name of the remote adapter factory class used to create the remote - * repository reference. The configured class should have public - * constructor that takes no arguments. - *
    - *
    url
    - *
    - * URL where to store the remote repository reference. - *
    - *
    - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class URLRemoteBindingServlet extends RemoteBindingServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 3187755583290121129L; - - /** - * Writes the remote reference of a repository in the servlet context - * to the configured URL. - * - * @throws ServletException if the URL could not be written to - */ - public void init() throws ServletException { - String url = getInitParameter("url"); - if (url == null) { - throw new ServletException("Missing init parameter: url"); - } - try { - ObjectOutputStream output = new ObjectOutputStream( - new URL(url).openConnection().getOutputStream()); - try { - output.writeObject(getRemoteRepository()); - } finally { - output.close(); - } - } catch (MalformedURLException e) { - throw new ServletException("Malformed URL: " + url, e); - } catch (IOException e) { - throw new ServletException("Failed to write to URL: " + url, e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java deleted file mode 100644 index 9cd13d3f91a..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/URLRemoteRepositoryServlet.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.servlet.remote; - -import java.net.MalformedURLException; -import java.net.URL; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.repository.URLRemoteRepositoryFactory; -import org.apache.jackrabbit.servlet.AbstractRepositoryServlet; - -/** - * Servlet that makes a remote repository from a ULR available as an attribute - * in the servlet context. - *

    - * The supported initialization parameters of this servlet are: - *

    - *
    javax.jcr.Repository
    - *
    - * Name of the servlet context attribute to put the repository in. - * The default value is "javax.jcr.Repository". - *
    - *
    org.apache.jackrabbit.rmi.client.LocalAdapterFactory
    - *
    - * Name of the local adapter factory class used to create the local - * adapter for the remote repository. The configured class should have - * public constructor that takes no arguments. - *
    - *
    url
    - *
    - * URL of the remote repository. - *
    - *
    - *

    - * This servlet can also be mapped to the URL space. See - * {@link AbstractRepositoryServlet} for the details. - * - * @since 1.4 - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -@Deprecated(forRemoval=true) -public class URLRemoteRepositoryServlet extends RemoteRepositoryServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 6144781813459102448L; - - /** - * Returns the remote repository at the given URL. - * - * @return repository - * @throws RepositoryException if the repository could not be accessed - */ - @Override - protected Repository getRepository() throws RepositoryException { - String url = getInitParameter("url"); - if (url == null) { - throw new RepositoryException("Missing init parameter: url"); - } - - try { - return new URLRemoteRepositoryFactory( - getLocalAdapterFactory(), new URL(url)).getRepository(); - } catch (MalformedURLException e) { - throw new RepositoryException("Invalid repository URL: " + url, e); - } - } - -} diff --git a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java b/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java deleted file mode 100644 index 25b26248a9b..00000000000 --- a/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/remote/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -/** - * Remote servlet support (deprecated) - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - */ -package org.apache.jackrabbit.servlet.remote; From 5534bc441c9b5183e6f660a461481e1710cdd058 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 28 Mar 2024 14:42:09 +0100 Subject: [PATCH 172/271] JCR-5028: jackrabbit-jcr-rmi: remove (#170) --- jackrabbit-jcr-rmi/HEADER.txt | 16 - jackrabbit-jcr-rmi/README.txt | 6 - jackrabbit-jcr-rmi/checkstyle.xml | 164 ---- jackrabbit-jcr-rmi/pom.xml | 583 ------------- .../rmi/client/BrokenRemoteRepository.java | 180 ---- .../rmi/client/ClientAdapterFactory.java | 459 ---------- .../jackrabbit/rmi/client/ClientItem.java | 212 ----- .../rmi/client/ClientItemDefinition.java | 117 --- .../jackrabbit/rmi/client/ClientLock.java | 142 ---- .../rmi/client/ClientLockManager.java | 110 --- .../rmi/client/ClientNamespaceRegistry.java | 111 --- .../jackrabbit/rmi/client/ClientNode.java | 800 ------------------ .../rmi/client/ClientNodeDefinition.java | 104 --- .../jackrabbit/rmi/client/ClientNodeType.java | 317 ------- .../rmi/client/ClientNodeTypeManager.java | 151 ---- .../jackrabbit/rmi/client/ClientObject.java | 131 --- .../rmi/client/ClientObservationManager.java | 144 ---- .../jackrabbit/rmi/client/ClientProperty.java | 447 ---------- .../rmi/client/ClientPropertyDefinition.java | 117 --- .../jackrabbit/rmi/client/ClientQuery.java | 145 ---- .../rmi/client/ClientQueryManager.java | 99 --- .../rmi/client/ClientQueryResult.java | 99 --- .../rmi/client/ClientRepository.java | 219 ----- .../rmi/client/ClientRepositoryFactory.java | 137 --- .../jackrabbit/rmi/client/ClientRow.java | 131 --- .../jackrabbit/rmi/client/ClientSession.java | 589 ------------- .../jackrabbit/rmi/client/ClientVersion.java | 154 ---- .../rmi/client/ClientVersionHistory.java | 219 ----- .../rmi/client/ClientVersionManager.java | 279 ------ .../rmi/client/ClientWorkspace.java | 299 ------- .../rmi/client/ClientXASession.java | 146 ---- .../rmi/client/DefaultContentHandler.java | 176 ---- .../rmi/client/LocalAdapterFactory.java | 447 ---------- .../rmi/client/RemoteRepositoryException.java | 44 - .../rmi/client/RemoteRuntimeException.java | 42 - .../rmi/client/SafeClientRepository.java | 222 ----- .../rmi/client/SerializingContentHandler.java | 441 ---------- .../rmi/client/iterator/ClientIterator.java | 222 ----- .../client/iterator/ClientNodeIterator.java | 72 -- .../iterator/ClientNodeTypeIterator.java | 66 -- .../iterator/ClientPropertyIterator.java | 73 -- .../client/iterator/ClientRowIterator.java | 70 -- .../iterator/ClientVersionIterator.java | 73 -- .../rmi/client/iterator/package-info.java | 18 - .../jackrabbit/rmi/client/package-info.java | 18 - .../rmi/client/principal/ClientGroup.java | 91 -- .../rmi/client/principal/ClientPrincipal.java | 66 -- .../principal/ClientPrincipalIterator.java | 43 - .../rmi/client/principal/package-info.java | 18 - .../security/ClientAccessControlEntry.java | 75 -- .../security/ClientAccessControlList.java | 87 -- .../security/ClientAccessControlManager.java | 161 ---- .../security/ClientAccessControlPolicy.java | 52 -- .../ClientAccessControlPolicyIterator.java | 50 -- .../rmi/client/security/ClientPrivilege.java | 113 --- .../rmi/client/security/package-info.java | 18 - .../rmi/iterator/ArrayEventIterator.java | 46 - .../iterator/ArrayEventListenerIterator.java | 47 - .../rmi/iterator/ArrayIterator.java | 85 -- .../jackrabbit/rmi/iterator/package-info.java | 18 - .../JackrabbitClientAdapterFactory.java | 27 - .../rmi/jackrabbit/package-info.java | 18 - .../rmi/observation/ClientEventPoll.java | 344 -------- .../jackrabbit/rmi/observation/Queue.java | 85 -- .../observation/ServerEventListenerProxy.java | 146 ---- .../rmi/observation/package-info.java | 18 - .../jackrabbit/rmi/remote/ArrayIterator.java | 104 --- .../jackrabbit/rmi/remote/BufferIterator.java | 109 --- .../rmi/remote/RemoteEventCollection.java | 129 --- .../jackrabbit/rmi/remote/RemoteItem.java | 147 ---- .../rmi/remote/RemoteItemDefinition.java | 109 --- .../jackrabbit/rmi/remote/RemoteIterator.java | 71 -- .../jackrabbit/rmi/remote/RemoteLock.java | 133 --- .../rmi/remote/RemoteLockManager.java | 50 -- .../rmi/remote/RemoteNamespaceRegistry.java | 118 --- .../jackrabbit/rmi/remote/RemoteNode.java | 745 ---------------- .../rmi/remote/RemoteNodeDefinition.java | 96 --- .../jackrabbit/rmi/remote/RemoteNodeType.java | 292 ------- .../rmi/remote/RemoteNodeTypeManager.java | 106 --- .../rmi/remote/RemoteObservationManager.java | 106 --- .../jackrabbit/rmi/remote/RemoteProperty.java | 142 ---- .../rmi/remote/RemotePropertyDefinition.java | 121 --- .../jackrabbit/rmi/remote/RemoteQuery.java | 119 --- .../rmi/remote/RemoteQueryManager.java | 75 -- .../rmi/remote/RemoteQueryResult.java | 74 -- .../rmi/remote/RemoteRepository.java | 161 ---- .../jackrabbit/rmi/remote/RemoteRow.java | 117 --- .../jackrabbit/rmi/remote/RemoteSession.java | 464 ---------- .../jackrabbit/rmi/remote/RemoteVersion.java | 121 --- .../rmi/remote/RemoteVersionHistory.java | 246 ------ .../rmi/remote/RemoteVersionManager.java | 109 --- .../rmi/remote/RemoteWorkspace.java | 200 ----- .../rmi/remote/RemoteXASession.java | 88 -- .../rmi/remote/SerializableXid.java | 73 -- .../jackrabbit/rmi/remote/package-info.java | 18 - .../rmi/remote/principal/RemoteGroup.java | 57 -- .../rmi/remote/principal/RemotePrincipal.java | 53 -- .../rmi/remote/principal/package-info.java | 18 - .../security/RemoteAccessControlEntry.java | 59 -- .../security/RemoteAccessControlList.java | 53 -- .../security/RemoteAccessControlManager.java | 93 -- .../security/RemoteAccessControlPolicy.java | 48 -- .../rmi/remote/security/RemotePrivilege.java | 71 -- .../rmi/remote/security/package-info.java | 18 - .../AbstractRemoteRepositoryFactory.java | 71 -- .../rmi/repository/JNDIRemoteRepository.java | 75 -- .../JNDIRemoteRepositoryFactory.java | 89 -- .../rmi/repository/ProxyRepository.java | 250 ------ .../rmi/repository/RMIRemoteRepository.java | 56 -- .../RMIRemoteRepositoryFactory.java | 77 -- .../rmi/repository/RepositoryFactory.java | 37 - .../rmi/repository/RmiRepositoryFactory.java | 175 ---- .../rmi/repository/URLRemoteRepository.java | 71 -- .../URLRemoteRepositoryFactory.java | 92 -- .../rmi/repository/package-info.java | 18 - .../rmi/server/RemoteAdapterFactory.java | 479 ----------- .../rmi/server/ServerAdapterFactory.java | 531 ------------ .../rmi/server/ServerEventCollection.java | 139 --- .../jackrabbit/rmi/server/ServerItem.java | 143 ---- .../rmi/server/ServerItemDefinition.java | 96 --- .../jackrabbit/rmi/server/ServerLock.java | 100 --- .../rmi/server/ServerLockManager.java | 108 --- .../rmi/server/ServerNamespaceRegistry.java | 117 --- .../jackrabbit/rmi/server/ServerNode.java | 688 --------------- .../rmi/server/ServerNodeDefinition.java | 87 -- .../jackrabbit/rmi/server/ServerNodeType.java | 233 ----- .../rmi/server/ServerNodeTypeManager.java | 122 --- .../jackrabbit/rmi/server/ServerObject.java | 263 ------ .../rmi/server/ServerObservationManager.java | 166 ---- .../jackrabbit/rmi/server/ServerProperty.java | 134 --- .../rmi/server/ServerPropertyDefinition.java | 98 --- .../jackrabbit/rmi/server/ServerQuery.java | 112 --- .../rmi/server/ServerQueryManager.java | 104 --- .../rmi/server/ServerQueryResult.java | 78 -- .../rmi/server/ServerRepository.java | 143 ---- .../jackrabbit/rmi/server/ServerRow.java | 136 --- .../jackrabbit/rmi/server/ServerSession.java | 353 -------- .../jackrabbit/rmi/server/ServerVersion.java | 157 ---- .../rmi/server/ServerVersionHistory.java | 215 ----- .../rmi/server/ServerVersionManager.java | 278 ------ .../rmi/server/ServerWorkspace.java | 242 ------ .../rmi/server/ServerXASession.java | 134 --- .../rmi/server/iterator/ServerIterator.java | 142 ---- .../server/iterator/ServerNodeIterator.java | 59 -- .../iterator/ServerNodeTypeIterator.java | 59 -- .../iterator/ServerPropertyIterator.java | 59 -- .../server/iterator/ServerRowIterator.java | 59 -- .../iterator/ServerVersionIterator.java | 59 -- .../rmi/server/iterator/package-info.java | 18 - .../jackrabbit/rmi/server/jmx/JCRServer.java | 170 ---- .../rmi/server/jmx/JCRServerMBean.java | 54 -- .../rmi/server/jmx/package-info.java | 18 - .../jackrabbit/rmi/server/package-info.java | 18 - .../rmi/server/principal/ServerGroup.java | 92 -- .../rmi/server/principal/ServerPrincipal.java | 54 -- .../principal/ServerPrincipalIterator.java | 42 - .../rmi/server/principal/package-info.java | 18 - .../security/ServerAccessControlEntry.java | 51 -- .../security/ServerAccessControlList.java | 83 -- .../security/ServerAccessControlManager.java | 89 -- .../security/ServerAccessControlPolicy.java | 44 - .../ServerAccessControlPolicyIterator.java | 61 -- .../rmi/server/security/ServerPrivilege.java | 64 -- .../rmi/server/security/package-info.java | 18 - .../jackrabbit/rmi/value/AbstractValue.java | 247 ------ .../jackrabbit/rmi/value/BinaryValue.java | 122 --- .../jackrabbit/rmi/value/BooleanValue.java | 67 -- .../jackrabbit/rmi/value/DateValue.java | 209 ----- .../jackrabbit/rmi/value/DecimalValue.java | 117 --- .../jackrabbit/rmi/value/DoubleValue.java | 106 --- .../jackrabbit/rmi/value/LongValue.java | 95 --- .../jackrabbit/rmi/value/NameValue.java | 62 -- .../jackrabbit/rmi/value/PathValue.java | 62 -- .../jackrabbit/rmi/value/ReferenceValue.java | 63 -- .../rmi/value/SerialValueFactory.java | 254 ------ .../rmi/value/SerializableBinary.java | 202 ----- .../jackrabbit/rmi/value/StringValue.java | 242 ------ .../jackrabbit/rmi/value/package-info.java | 18 - .../rmi/client/iterator/package.html | 19 - .../apache/jackrabbit/rmi/client/package.html | 76 -- .../jackrabbit/rmi/iterator/package.html | 26 - .../jackrabbit/rmi/observation/package.html | 71 -- .../apache/jackrabbit/rmi/remote/package.html | 35 - .../rmi/server/iterator/package.html | 19 - .../apache/jackrabbit/rmi/server/package.html | 80 -- .../apache/jackrabbit/rmi/value/package.html | 30 - .../apache/jackrabbit/rmi/xml/package.html | 31 - .../services/javax.jcr.RepositoryFactory | 16 - .../main/resources/jackrabbit-rmi-service.xml | 41 - .../jackrabbit/rmi/ConformanceTest.java | 39 - .../jackrabbit/rmi/RepositoryStubImpl.java | 108 --- .../src/test/resources/logback-test.xml | 31 - .../resources/repositoryStubImpl.properties | 17 - pom.xml | 1 - 194 files changed, 25636 deletions(-) delete mode 100644 jackrabbit-jcr-rmi/HEADER.txt delete mode 100644 jackrabbit-jcr-rmi/README.txt delete mode 100644 jackrabbit-jcr-rmi/checkstyle.xml delete mode 100644 jackrabbit-jcr-rmi/pom.xml delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java delete mode 100644 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java delete mode 100755 jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html delete mode 100644 jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory delete mode 100644 jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml delete mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java delete mode 100644 jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java delete mode 100644 jackrabbit-jcr-rmi/src/test/resources/logback-test.xml delete mode 100644 jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties diff --git a/jackrabbit-jcr-rmi/HEADER.txt b/jackrabbit-jcr-rmi/HEADER.txt deleted file mode 100644 index ae6f28c4a1c..00000000000 --- a/jackrabbit-jcr-rmi/HEADER.txt +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ diff --git a/jackrabbit-jcr-rmi/README.txt b/jackrabbit-jcr-rmi/README.txt deleted file mode 100644 index 5cd4cf2f73e..00000000000 --- a/jackrabbit-jcr-rmi/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -=================================================== -Apache Jackrabbit JCR-RMI -=================================================== - -RMI support is deprecated and will be removed in a future version of Jackrabbit; see https://issues.apache.org/jira/browse/JCR-4972 for more information. - diff --git a/jackrabbit-jcr-rmi/checkstyle.xml b/jackrabbit-jcr-rmi/checkstyle.xml deleted file mode 100644 index 33678aa8981..00000000000 --- a/jackrabbit-jcr-rmi/checkstyle.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml deleted file mode 100644 index 6fee4dae8f3..00000000000 --- a/jackrabbit-jcr-rmi/pom.xml +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - 4.0.0 - - org.apache.jackrabbit - jackrabbit-parent - 2.21.27-beta-SNAPSHOT - ../jackrabbit-parent/pom.xml - - - - - - jackrabbit-jcr-rmi - bundle - - Jackrabbit JCR-RMI - - JCR-RMI is a transparent Remote Method Invocation (RMI) layer for the - Content Repository for Java Technology API (JCR). The layer makes it - possible to remotely access JCR content repositories. - - - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - jcr,jackrabbit - http://jackrabbit.apache.org/ - - - javax.transaction.xa;resolution:=optional,* - - - - jackrabbit-jcr-commons;inline=org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter* - - - - - - org.apache.rat - apache-rat-plugin - - - src/main/javadoc/**/*.uxf - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-antrun-plugin - - [3,) - - run - - - - - - - - - - - - - - - - - integrationTesting - - - - maven-surefire-plugin - - ${test.opts} - - - jackrabbit.test.integration - true - - - known.issues - -org.apache.jackrabbit.test.api.ShareableNodeTest -org.apache.jackrabbit.test.api.SetValueValueFormatExceptionTest#testNodeNotReferenceable - -org.apache.jackrabbit.test.api.NameTest#testExpandedNameValue -org.apache.jackrabbit.test.api.NameTest#testExpandedNameValueProperty - -org.apache.jackrabbit.test.api.NodeRemoveMixinTest#testNotAssigned -org.apache.jackrabbit.test.api.ValueFactoryTest#testValueFormatException - -org.apache.jackrabbit.test.api.GetWeakReferencesTest#testMultiValues -org.apache.jackrabbit.test.api.GetWeakReferencesTest#testSingleValue - -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyNodeDefinitionTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyNodeTypeTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyPropertyDefinitionTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testInvalidJCRNames -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNewNodeTypeTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNodeDefinitionTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNonEmptyNodeTypeTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testPropertyDefinitionTemplate -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testRegisterNodeType -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testRegisterNodeTypes -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testResidualNames -org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testSetDefaultValues - -org.apache.jackrabbit.test.api.observation.GetUserDataTest#testSave -org.apache.jackrabbit.test.api.observation.GetUserDataTest#testVersioning -org.apache.jackrabbit.test.api.observation.GetUserDataTest#testWorkspaceOperation -org.apache.jackrabbit.test.api.observation.NodeReorderTest#testNodeReorderMove - -org.apache.jackrabbit.test.api.PathTest#testResolvedIdentifierBasedPropertyValue - -org.apache.jackrabbit.test.api.query.CreateQueryTest#testUnknownQueryLanguage -org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefMultiPropWithNodeStar -org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefMultiPropWithNodeTest -org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefSinglePropWithNodeStar -org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefSinglePropWithNodeTest -org.apache.jackrabbit.test.api.query.ElementTest#testElementTest -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNode -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNodeNtBase -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNodeSomeNT -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTest -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestNtBase -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestSomeNT -org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestSomeNTWithSNS -org.apache.jackrabbit.test.api.query.GetLanguageTest#testGetLanguage -org.apache.jackrabbit.test.api.query.GetLanguageTest#testJCRQOM -org.apache.jackrabbit.test.api.query.GetLanguageTest#testJCRSQL2 -org.apache.jackrabbit.test.api.query.GetLanguageTest#testSQL -org.apache.jackrabbit.test.api.query.GetPersistentQueryPathLevel1Test#testGetStoredQueryPath -org.apache.jackrabbit.test.api.query.GetPersistentQueryPathTest#testGetPersistentQueryPath -org.apache.jackrabbit.test.api.query.GetPropertyNamesTest#testGetPropertyNames -org.apache.jackrabbit.test.api.query.GetStatementTest#testGetStatement -org.apache.jackrabbit.test.api.query.GetSupportedQueryLanguagesTest#testGetSupportedQueryLanguages -org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrder -org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderMillis -org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderNegativeTimeZone -org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderPositiveTimeZone -org.apache.jackrabbit.test.api.query.OrderByDecimalTest#testDecimal -org.apache.jackrabbit.test.api.query.OrderByDoubleTest#testDoubleOrder1 -org.apache.jackrabbit.test.api.query.OrderByDoubleTest#testDoubleOrder2 -org.apache.jackrabbit.test.api.query.OrderByLengthTest#testLength -org.apache.jackrabbit.test.api.query.OrderByLocalNameTest#testLocalName -org.apache.jackrabbit.test.api.query.OrderByLongTest#testIntegerOrder -org.apache.jackrabbit.test.api.query.OrderByLowerCaseTest#testLowerCase -org.apache.jackrabbit.test.api.query.OrderByMultiTypeTest#testMultipleOrder -org.apache.jackrabbit.test.api.query.OrderByNameTest#testName -org.apache.jackrabbit.test.api.query.OrderByStringTest#testStringOrder -org.apache.jackrabbit.test.api.query.OrderByUpperCaseTest#testLowerCase -org.apache.jackrabbit.test.api.query.OrderByURITest#testURI -org.apache.jackrabbit.test.api.query.PredicatesTest#testAnd -org.apache.jackrabbit.test.api.query.PredicatesTest#testCombinedAnd -org.apache.jackrabbit.test.api.query.PredicatesTest#testCombinedOr -org.apache.jackrabbit.test.api.query.PredicatesTest#testEquality -org.apache.jackrabbit.test.api.query.PredicatesTest#testOr -org.apache.jackrabbit.test.api.query.qom.AndConstraintTest#testAnd -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testBindVariableNames -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testBoolean -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDate -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDecimal -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDouble -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testIllegalArgumentException -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testLong -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testName -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testPath -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testReference -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testString -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testURI -org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testWeakReference -org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testInnerJoin -org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testLeftOuterJoin -org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testRightOuterJoin -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNode -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNodes -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNodesDoNotMatchSelector -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testNotASelectorName -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testPathDoesNotExist -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testRelativePath -org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testSyntacticallyInvalidPath -org.apache.jackrabbit.test.api.query.qom.ColumnTest#testColumnNames -org.apache.jackrabbit.test.api.query.qom.ColumnTest#testExpandColumnsForNodeType -org.apache.jackrabbit.test.api.query.qom.ColumnTest#testMultiColumn -org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testInnerJoin -org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testLeftOuterJoin -org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testRightOuterJoin -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNode -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNodes -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNodesDoNotMatchSelector -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testNotASelectorName -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testPathDoesNotExist -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testRelativePath -org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testSyntacticallyInvalidPath -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testInnerJoin1 -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testInnerJoin2 -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin1 -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin2 -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRightOuterJoin1 -org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRightOuterJoin2 -org.apache.jackrabbit.test.api.query.qom.FullTextSearchScoreTest#testConstraint -org.apache.jackrabbit.test.api.query.qom.FullTextSearchScoreTest#testOrdering -org.apache.jackrabbit.test.api.query.qom.GetQueryTest#testGetQuery -org.apache.jackrabbit.test.api.query.qom.GetQueryTest#testInvalidQueryException -org.apache.jackrabbit.test.api.query.qom.LengthTest#testBinaryLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testBooleanLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testDateLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testDecimalLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testDoubleLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthBinaryLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthBooleanLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDateLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDecimalLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDoubleLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthNameLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthPathLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthStringLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthURILiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthWeakReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.LengthTest#testLongLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testNameLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testPathLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testReferenceLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testStringLength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testURILength -org.apache.jackrabbit.test.api.query.qom.LengthTest#testWeakReferenceLength -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testBinaryLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testBooleanLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDateLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDecimalLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDoubleLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testGreaterThan -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testGreaterThanOrEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLessThan -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLessThanOrEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLike -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLongLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testNameLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testNotEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testPathLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testStringLiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testStringLiteralInvalidName -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral -org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testWeakReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testBinaryLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testBooleanLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDateLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDecimalLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDoubleLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testLongLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testNameLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testNotEqualTo -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testPathLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testStringLiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testStringLiteralInvalidName -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testURILiteral -org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testWeakReferenceLiteral -org.apache.jackrabbit.test.api.query.qom.NotConstraintTest#testNot -org.apache.jackrabbit.test.api.query.qom.OrConstraintTest#testOr -org.apache.jackrabbit.test.api.query.qom.OrderingTest#testMultipleSelectors -org.apache.jackrabbit.test.api.query.qom.PropertyExistenceTest#testPropertyExistence -org.apache.jackrabbit.test.api.query.qom.PropertyValueTest#testPropertyExistence -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testAnd -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testBindVariableValue -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNode -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNodeJoinCondition -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNodeWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumn -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnAllProperties -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnWithColumnName -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testComparison -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQuery -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSource -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraint -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraintAndOrdering -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraintOrderingAndColumn -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraint -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraintAndOrdering -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraintOrderingAndColumn -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNode -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNodeJoinCondition -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNodeWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testEquiJoinCondition -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearch -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchAllProperties -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchScore -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchScoreWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchWithBindVariableValue -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testJoin -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLength -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLiteral -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLowerCase -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeLocalName -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeLocalNameWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeName -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeNameWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNot -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOr -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOrderingAscending -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOrderingDescending -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyExistence -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyExistenceWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyValue -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyValueWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNode -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeJoinCondition -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeJoinConditionWithPath -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeWithSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSelector -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSelectorWithName -org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testUpperCase -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetNode -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetNodeWithSelector -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetPath -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetPathWithSelector -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetScore -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetScoreWithSelector -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetValue -org.apache.jackrabbit.test.api.query.qom.RowTest#testGetValues -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testInnerJoin -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testInnerJoinWithPath -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testLeftOuterJoin -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testLeftOuterJoinWithPath -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testRightOuterJoin -org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testRightOuterJoinWithPath -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testChildNodesDoNotMatchSelector -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testNotASelectorName -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testPathDoesNotExist -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testRelativePath -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testSameNode -org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testSyntacticallyInvalidPath -org.apache.jackrabbit.test.api.query.qom.SelectorTest#testDuplicateNodeType -org.apache.jackrabbit.test.api.query.qom.SelectorTest#testSelector -org.apache.jackrabbit.test.api.query.qom.SelectorTest#testSyntacticallyInvalidName -org.apache.jackrabbit.test.api.query.qom.SelectorTest#testUnknownNodeType -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLength -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLowerCaseTwice -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLowerUpperCase -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testNodeLocalName -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testNodeName -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testPropertyValue -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testUpperCaseTwice -org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testUpperLowerCase -org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetPosition -org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetPositionEmptyIterator -org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetSize -org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testNoSuchElementException -org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testSkip -org.apache.jackrabbit.test.api.query.SetLimitTest#testSetLimit -org.apache.jackrabbit.test.api.query.SetOffsetTest#testSetOffset -org.apache.jackrabbit.test.api.query.SimpleSelectionTest#testSingleProperty -org.apache.jackrabbit.test.api.query.SQLJcrPathTest#testJcrPath -org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoin -org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinFilterPrimaryType -org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinNtBase -org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinSNS -org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByAscending -org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByDefault -org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByDescending -org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisLeaf -org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisRoot -org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisTestRoot -org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantLeaf -org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantSelfTestRoot -org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantTestRoot -org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testFullTextSearch -org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testMultiValueSearch -org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testPathColumn -org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testRange -org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testScoreColumn -org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTest -org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestContains -org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestMultiNodes -org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestWithPosition -org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderFirstFunction -org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderLastFunction -org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderPositionFunction -org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderPositionIndex -org.apache.jackrabbit.test.api.query.XPathJcrPathTest#testJcrPath -org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderBy -org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderByAscending -org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderByDescending -org.apache.jackrabbit.test.api.query.XPathPosIndexTest#testDocOrderIndexedNotation -org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testFullTextSearch -org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testMultiValueSearch -org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testPathColumn -org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testRange -org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testScoreColumn - -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetIllegalPolicy -org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testSetInvalidPolicy - -org.apache.jackrabbit.test.api.SerializationTest#testLockExceptionSessionWithHandler -org.apache.jackrabbit.test.api.SerializationTest#testLockExceptionWorkspaceWithHandler -org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileChildSessionContentHandler -org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileChildWorkspaceContentHandler -org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileParentSessionContentHandler -org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileParentWorkspaceContentHandler - -org.apache.jackrabbit.test.api.SessionTest#testHasCapability - -org.apache.jackrabbit.test.api.version.CopyTest#testCopy -org.apache.jackrabbit.test.api.version.VersionHistoryTest#testGetAllFrozenNodes - -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetAllPolicies -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testGetPolicyAfterSet -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testResetPolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicyIsTransient -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testGetPolicyAfterSave -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterSecondSetPolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterSetPolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemovePolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemovePolicyIsTransient -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterRemovePolicy -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicyOnNewNode -org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemoveTransientlyAddedPolicy -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntry -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAggregatePrivilege -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAggregatedPrivilegesSeparately -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddPrivilegesPresentInEntries -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryAndSetPolicy -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryIsTransient -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrincipal -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryEmptyPrivilegeArray -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrivilege -org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAddedAccessControlEntry -org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAccessControlEntryAndSetPolicy -org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAccessControlEntryIsTransient -org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveIllegalAccessControlEntry -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryTwice -org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryAgain -org.apache.jackrabbit.test.api.security.AccessControlListTest#testExtendPrivileges -org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testSetPolicy - -org.apache.jackrabbit.test.api.observation.EventJournalTest - - - - derby.system.durability - test - - - derby.storage.fileSyncTransactionLog - true - - - derby.stream.error.file - target/derby.log - - - - - - - - - - - - - - - org.osgi - org.osgi.annotation - provided - - - - javax.jcr - jcr - - - org.slf4j - slf4j-api - - - - org.apache.jackrabbit - jackrabbit-jcr-commons - ${project.version} - provided - - - - - org.apache.jackrabbit - oak-jackrabbit-api - ${oak-jackrabbit-api.version.implemented} - provided - - - - - junit - junit - test - - - org.apache.jackrabbit - jackrabbit-core - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-jcr-tests - ${project.version} - test - - - ch.qos.logback - logback-classic - test - - - org.apache.derby - derby - test - - - org.apache.derby - derbytools - test - - - - diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java deleted file mode 100644 index 1b4c329c985..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Dummy remote repository instance that throws a {@link RemoteException} - * whenever any method is invoked. Used as a sentinel object by the - * {@link SafeClientRepository} class. - */ -@Deprecated(forRemoval = true) public class BrokenRemoteRepository implements RemoteRepository { - - /** - * The remote exception thrown by methods of this instance. - */ - private final RemoteException exception; - - /** - * Creates a remote repository whose methods throw the given - * exception. - * - * @param exception remote exception - */ - public BrokenRemoteRepository(RemoteException exception) { - this.exception = exception; - } - - /** - * Creates a remote repository whose methods trow a remote - * exception with the given message. - * - * @param message exception message - */ - public BrokenRemoteRepository(String message) { - this(new RemoteException(message)); - } - - /** - * Creates a remote repository whose methods throw a remote exception. - */ - public BrokenRemoteRepository() { - this(new RemoteException()); - } - - //----------------------------------------------------< RemoteRepository > - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public String getDescriptor(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @return nothing - * @throws RemoteException always thrown - */ - public String[] getDescriptorKeys() throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login() throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param workspace ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(String workspace) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param credentials ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(Credentials credentials) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param workspace ignored - * @param credentials ignored - * @return nothing - * @throws RemoteException always thrown - */ - public RemoteSession login(Credentials credentials, String workspace) - throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public Value getDescriptorValue(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public Value[] getDescriptorValues(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public boolean isSingleValueDescriptor(String key) throws RemoteException { - throw exception; - } - - /** - * Throws a {@link RemoteException}. - * - * @param key ignored - * @return nothing - * @throws RemoteException always thrown - */ - public boolean isStandardDescriptor(String key) throws RemoteException { - throw exception; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java deleted file mode 100644 index 7b8c50eaac7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.client.iterator.ClientNodeIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientNodeTypeIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientPropertyIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientRowIterator; -import org.apache.jackrabbit.rmi.client.iterator.ClientVersionIterator; -import org.apache.jackrabbit.rmi.client.principal.ClientGroup; -import org.apache.jackrabbit.rmi.client.principal.ClientPrincipal; -import org.apache.jackrabbit.rmi.client.principal.ClientPrincipalIterator; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlList; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy; -import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicyIterator; -import org.apache.jackrabbit.rmi.client.security.ClientPrivilege; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Default implementation of the - * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory LocalAdapterFactory} - * interface. This factory uses the client adapters defined in this - * package as the default adapter implementations. Subclasses can - * easily override or extend the default adapters by implementing the - * corresponding factory methods. - */ -@Deprecated(forRemoval = true) public class ClientAdapterFactory implements LocalAdapterFactory { - - /** - * Creates and returns a {@link ClientRepository ClientRepository} - * instance. - * - * {@inheritDoc} - */ - public Repository getRepository(RemoteRepository remote) { - return new ClientRepository(remote, this); - } - - /** - * Creates and returns a {@link ClientSession ClientSession} instance. - * In case the remote session is transaction enabled, the returned session - * will be transaction enabled too through the {@link ClientXASession}. - * - * {@inheritDoc} - */ - public Session getSession(Repository repository, RemoteSession remote) { - if (remote instanceof RemoteXASession) { - return new ClientXASession( - repository, (RemoteXASession) remote, this); - } else { - return new ClientSession(repository, remote, this); - } - } - - /** - * Creates and returns a {@link ClientWorkspace ClientWorkspace} instance. - * - * {@inheritDoc} - */ - public Workspace getWorkspace(Session session, RemoteWorkspace remote) { - return new ClientWorkspace(session, remote, this); - } - - /** - * Creates and returns a - * {@link ClientObservationManager ClientObservationManager} instance. - * - * {@inheritDoc} - */ - public ObservationManager getObservationManager(Workspace workspace, - RemoteObservationManager remote) { - return new ClientObservationManager(workspace, remote); - } - - /** - * Creates and returns a - * {@link ClientNamespaceRegistry ClientClientNamespaceRegistry} instance. - * - * {@inheritDoc} - */ - public NamespaceRegistry getNamespaceRegistry( - RemoteNamespaceRegistry remote) { - return new ClientNamespaceRegistry(remote, this); - } - - /** - * Creates and returns a - * {@link ClientNodeTypeManager ClienNodeTypeManager} instance. - * - * {@inheritDoc} - */ - public NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote) { - return new ClientNodeTypeManager(remote, this); - } - - /** - * Creates and returns a {@link ClientItem ClientItem} instance. - * - * {@inheritDoc} - */ - public Item getItem(Session session, RemoteItem remote) { - return new ClientItem(session, remote, this); - } - - /** - * Creates and returns a {@link ClientProperty ClientProperty} instance. - * - * {@inheritDoc} - */ - public Property getProperty(Session session, RemoteProperty remote) { - return new ClientProperty(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNode ClientNode} instance. - * - * {@inheritDoc} - */ - public Node getNode(Session session, RemoteNode remote) { - return new ClientNode(session, remote, this); - } - - /** - * Creates and returns a {@link ClientVersion ClientVersion} instance. - * - * {@inheritDoc} - */ - public Version getVersion(Session session, RemoteVersion remote) { - return new ClientVersion(session, remote, this); - } - - /** - * Creates and returns a {@link ClientVersionHistory ClientVersionHistory} - * instance. - * - * {@inheritDoc} - */ - public VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote) { - return new ClientVersionHistory(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNodeType ClientNodeType} instance. - * - * {@inheritDoc} - */ - public NodeType getNodeType(RemoteNodeType remote) { - return new ClientNodeType(remote, this); - } - - /** - * Creates and returns a {@link ClientItemDefinition ClientItemDefinition} instance. - * - * {@inheritDoc} - */ - public ItemDefinition getItemDef(RemoteItemDefinition remote) { - return new ClientItemDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientNodeDefinition ClientNodeDefinition} instance. - * - * {@inheritDoc} - */ - public NodeDefinition getNodeDef(RemoteNodeDefinition remote) { - return new ClientNodeDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientPropertyDefinition ClientPropertyDefinition} - * instance. - * - * {@inheritDoc} - */ - public PropertyDefinition getPropertyDef(RemotePropertyDefinition remote) { - return new ClientPropertyDefinition(remote, this); - } - - /** - * Creates and returns a {@link ClientLock ClientLock} instance. - * - * {@inheritDoc} - */ - public Lock getLock(Session session, RemoteLock remote) { - return new ClientLock(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQueryManager ClientQueryManager} instance. - * - * {@inheritDoc} - */ - public QueryManager getQueryManager( - Session session, RemoteQueryManager remote) { - return new ClientQueryManager(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQuery ClientQuery} instance. - * - * {@inheritDoc} - */ - public Query getQuery(Session session, RemoteQuery remote) { - return new ClientQuery(session, remote, this); - } - - /** - * Creates and returns a {@link ClientQueryResult ClientQueryResult} instance. - * - * {@inheritDoc} - */ - public QueryResult getQueryResult( - Session session, RemoteQueryResult remote) { - return new ClientQueryResult(session, remote, this); - } - - /** - * Creates and returns a {@link ClientRow ClientRow} instance. - * - * {@inheritDoc} - */ - public Row getRow(Session session, RemoteRow remote) { - return new ClientRow(session, remote, this); - } - - /** - * Creates and returns a {@link ClientNodeIterator} instance. - * {@inheritDoc} - */ - public NodeIterator getNodeIterator( - Session session, RemoteIterator remote) { - return new ClientNodeIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientPropertyIterator} instance. - * {@inheritDoc} - */ - public PropertyIterator getPropertyIterator( - Session session, RemoteIterator remote) { - return new ClientPropertyIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientVersionIterator} instance. - * {@inheritDoc} - */ - public VersionIterator getVersionIterator( - Session session, RemoteIterator remote) { - return new ClientVersionIterator(remote, session, this); - } - - /** - * Creates and returns a {@link ClientNodeTypeIterator} instance. - * {@inheritDoc} - */ - public NodeTypeIterator getNodeTypeIterator(RemoteIterator remote) { - return new ClientNodeTypeIterator(remote, this); - } - - /** - * Creates and returns a {@link ClientRowIterator} instance. - * {@inheritDoc} - */ - public RowIterator getRowIterator(Session session, RemoteIterator remote) { - return new ClientRowIterator(session, remote, this); - } - - public LockManager getLockManager( - Session session, RemoteLockManager remote) { - return new ClientLockManager(session, remote, this); - } - - public VersionManager getVersionManager( - Session session, RemoteVersionManager remote) { - return new ClientVersionManager(session, remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlManager getAccessControlManager( - RemoteAccessControlManager remote) { - return new ClientAccessControlManager(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicy getAccessControlPolicy( - RemoteAccessControlPolicy remote) { - if (remote instanceof RemoteAccessControlList) { - return new ClientAccessControlList( - (RemoteAccessControlList) remote, this); - } - return new ClientAccessControlPolicy(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicy[] getAccessControlPolicy( - RemoteAccessControlPolicy[] remote) { - final AccessControlPolicy[] local = new AccessControlPolicy[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getAccessControlPolicy(remote[i]); - } - return local; - } - - /** - * {@inheritDoc} - */ - public AccessControlPolicyIterator getAccessControlPolicyIterator( - RemoteIterator remote) { - return new ClientAccessControlPolicyIterator(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlEntry getAccessControlEntry( - RemoteAccessControlEntry remote) { - return new ClientAccessControlEntry(remote, this); - } - - /** - * {@inheritDoc} - */ - public AccessControlEntry[] getAccessControlEntry( - RemoteAccessControlEntry[] remote) { - final AccessControlEntry[] local = new AccessControlEntry[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getAccessControlEntry(remote[i]); - } - return local; - } - - /** - * {@inheritDoc} - */ - public Principal getPrincipal(RemotePrincipal remote) { - if (remote instanceof RemoteGroup) { - return new ClientGroup(remote, this); - } - return new ClientPrincipal(remote); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public Iterator getPrincipalIterator(RemoteIterator remote) { - return new ClientPrincipalIterator(remote, this); - } - - /** - * {@inheritDoc} - */ - public Privilege getPrivilege(RemotePrivilege remote) { - return new ClientPrivilege(remote, this); - } - - /** - * {@inheritDoc} - */ - public Privilege[] getPrivilege(RemotePrivilege[] remote) { - final Privilege[] local = new Privilege[remote.length]; - for (int i = 0; i < local.length; i++) { - local[i] = getPrivilege(remote[i]); - } - return local; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java deleted file mode 100644 index 901e34004dc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} - * interface. This class makes a remote item locally available using - * the JCR {@link javax.jcr.Item Item} interface. Used mainly as the - * base class for the - * {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} adapters. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.remote.RemoteItem - */ -@Deprecated(forRemoval = true) public class ClientItem extends ClientObject implements Item { - - /** Current session. */ - private Session session; - - /** The adapted remote item. */ - private RemoteItem remote; - - /** - * Creates a local adapter for the given remote item. - * - * @param session current session - * @param remote remote item - * @param factory local adapter factory - */ - public ClientItem(Session session, RemoteItem remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** - * Returns the current session without contacting the remote item. - * - * {@inheritDoc} - */ - public Session getSession() { - return session; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() throws RepositoryException { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getAncestor(int level) throws RepositoryException { - try { - return getItem(getSession(), remote.getAncestor(level)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getParent() throws RepositoryException { - try { - return getNode(getSession(), remote.getParent()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getDepth() throws RepositoryException { - try { - return remote.getDepth(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns false by default without contacting the remote item. - * This method should be overridden by {@link Node Node} subclasses. - * - * {@inheritDoc} - * - * @return false - */ - public boolean isNode() { - return false; - } - - /** {@inheritDoc} */ - public boolean isNew() { - try { - return remote.isNew(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isModified() { - try { - return remote.isModified(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** - * Checks whether this instance represents the same repository item as - * the given other instance. A simple heuristic is used to first check - * some generic conditions (null values, instance equality, type equality), - * after which the item paths are compared to determine sameness. - * A RuntimeException is thrown if the item paths cannot be retrieved. - * - * {@inheritDoc} - * - * @see Item#getPath() - */ - public boolean isSame(Item item) throws RepositoryException { - if (item == null) { - return false; - } else if (equals(item)) { - return true; - } else if (isNode() == item.isNode()) { - return getPath().equals(item.getPath()); - } else { - return false; - } - } - - /** - * Accepts the visitor to visit this item. {@link Node Node} and - * {@link Property Property} subclasses should override this method - * to call the appropriate {@link ItemVisitor ItemVisitor} methods, - * as the default implementation does nothing. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException { - try { - remote.save(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) throws RepositoryException { - try { - remote.refresh(keepChanges); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void remove() throws RepositoryException { - try { - remote.remove(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java deleted file mode 100644 index a602adc16ef..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} - * interface. This class makes a remote item definition locally available using - * the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} interface. Used mainly - * as the base class for the - * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} adapters. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition - */ -@Deprecated(forRemoval = true) public class ClientItemDefinition extends ClientObject implements ItemDefinition { - - /** The adapted remote item definition. */ - private RemoteItemDefinition remote; - - /** - * Creates a local adapter for the given remote item definition. - * - * @param remote remote item definition - * @param factory local adapter factory - */ - public ClientItemDefinition(RemoteItemDefinition remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType getDeclaringNodeType() { - try { - RemoteNodeType nt = remote.getDeclaringNodeType(); - if (nt == null) { - return null; - } else { - return getFactory().getNodeType(nt); - } - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isAutoCreated() { - try { - return remote.isAutoCreated(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMandatory() { - try { - return remote.isMandatory(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public int getOnParentVersion() { - try { - return remote.getOnParentVersion(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isProtected() { - try { - return remote.isProtected(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java deleted file mode 100644 index 39e32ad76fc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.lock.Lock; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} - * interface. This class makes a remote lock locally available using - * the JCR {@link javax.jcr.lock.Lock Lock} interface. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.remote.RemoteLock - */ -@Deprecated(forRemoval = true) public class ClientLock extends ClientObject implements Lock { - - /** Current session. */ - private Session session; - - /** The adapted remote lock. */ - private RemoteLock remote; - - /** - * Creates a local adapter for the given remote lock. - * - * @param session current session - * @param remote remote lock - * @param factory local adapter factory - */ - public ClientLock(Session session, RemoteLock remote, LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Node getNode() { - try { - return getNode(session, remote.getNode()); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } catch (RepositoryException e) { - throw new RuntimeException(e); - } - } - - /** {@inheritDoc} */ - public String getLockOwner() { - try { - return remote.getLockOwner(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isDeep() { - try { - return remote.isDeep(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getLockToken() { - try { - return remote.getLockToken(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLive() throws RepositoryException { - try { - return remote.isLive(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh() throws RepositoryException { - try { - remote.refresh(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isSessionScoped() { - try { - return remote.isSessionScoped(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public long getSecondsRemaining() throws RepositoryException { - try { - return remote.getSecondsRemaining(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLockOwningSession() { - try { - return remote.isLockOwningSession(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java deleted file mode 100644 index 02ca2d94fef..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; - -@Deprecated(forRemoval = true) public class ClientLockManager extends ClientObject implements LockManager { - - /** The current session. */ - private Session session; - - private RemoteLockManager remote; - - public ClientLockManager( - Session session, RemoteLockManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - public String[] getLockTokens() throws RepositoryException { - try { - return remote.getLockTokens(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void addLockToken(String lockToken) throws RepositoryException { - try { - remote.addLockToken(lockToken); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void removeLockToken(String lockToken) throws RepositoryException { - try { - remote.removeLockToken(lockToken); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public Lock getLock(String absPath) throws RepositoryException { - try { - return getFactory().getLock(session, remote.getLock(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public boolean holdsLock(String absPath) throws RepositoryException { - try { - return remote.holdsLock(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public boolean isLocked(String absPath) throws RepositoryException { - try { - return remote.isLocked(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public Lock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) throws RepositoryException { - try { - return getFactory().getLock(session, remote.lock( - absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void unlock(String absPath) throws RepositoryException { - try { - remote.unlock(absPath); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java deleted file mode 100644 index 0a95cc576fc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} - * interface. This class makes a remote namespace registry locally available - * using the JCR {@link javax.jcr.NamespaceRegistry NamespaceRegistry} - * interface. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry - */ -@Deprecated(forRemoval = true) public class ClientNamespaceRegistry extends ClientObject implements - NamespaceRegistry { - - /** The adapted remote namespace registry. */ - private RemoteNamespaceRegistry remote; - - /** - * Creates a local adapter for the given remote namespace registry. - * - * @param remote remote namespace registry - * @param factory local adapter factory - */ - public ClientNamespaceRegistry( - RemoteNamespaceRegistry remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public void registerNamespace(String prefix, String uri) - throws RepositoryException { - try { - remote.registerNamespace(prefix, uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unregisterNamespace(String prefix) throws RepositoryException { - try { - remote.unregisterNamespace(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getPrefixes() throws RepositoryException { - try { - return remote.getPrefixes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getURIs() throws RepositoryException { - try { - return remote.getURIs(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getURI(String prefix) throws RepositoryException { - try { - return remote.getURI(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrefix(String uri) throws RepositoryException { - try { - return remote.getPrefix(uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java deleted file mode 100644 index eb970ebeac8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.InputStream; -import java.math.BigDecimal; -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.Item; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.lock.Lock; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} - * interface. This class makes a remote node locally available using - * the JCR {@link javax.jcr.Node Node} interface. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.remote.RemoteNode - */ -@Deprecated(forRemoval = true) public class ClientNode extends ClientItem implements Node { - - /** The adapted remote node. */ - private RemoteNode remote; - - /** - * Creates a local adapter for the given remote node. - * - * @param session current session - * @param remote remote node - * @param factory local adapter factory - */ - public ClientNode( - Session session, RemoteNode remote, LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Returns true without contacting the remote node. - * - * {@inheritDoc} - */ - public boolean isNode() { - return true; - } - - /** - * Calls the {@link ItemVisitor#visit(Node) ItemVisitor.visit(Node)} - * method of the given visitor. Does not contact the remote node, but - * the visitor may invoke other methods that do contact the remote node. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - visitor.visit(this); - } - - /** {@inheritDoc} */ - public Node addNode(String path) throws RepositoryException { - try { - return getNode(getSession(), remote.addNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node addNode(String path, String type) throws RepositoryException { - try { - RemoteNode node = remote.addNode(path, type); - return getNode(getSession(), node); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void orderBefore(String src, String dst) throws RepositoryException { - try { - remote.orderBefore(src, dst); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value value) - throws RepositoryException { - try { - if (value == null) { - remote.setProperty(name, value); - return null; - } else { - RemoteProperty property = remote.setProperty( - name, SerialValueFactory.makeSerialValue(value)); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value[] values) - throws RepositoryException { - try { - if (values == null) { - remote.setProperty(name, values); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(values); - RemoteProperty property = remote.setProperty(name, serials); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String[] strings) - throws RepositoryException { - try { - if (strings == null) { - remote.setProperty(name, (Value[]) null); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(strings); - RemoteProperty property = remote.setProperty(name, serials); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, InputStream value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, boolean value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, double value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, long value) - throws RepositoryException { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Calendar value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Node value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty(name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Binary value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty( - name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, BigDecimal value) - throws RepositoryException { - if (value == null) { - return setProperty(name, (Value) null); - } else { - return setProperty( - name, getSession().getValueFactory().createValue(value)); - } - } - - /** {@inheritDoc} */ - public Node getNode(String path) throws RepositoryException { - try { - return getNode(getSession(), remote.getNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes(String pattern) throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes(pattern)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes(String[] globs) throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getNodes(globs)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property getProperty(String path) throws RepositoryException { - try { - RemoteProperty property = remote.getProperty(path); - return getFactory().getProperty(getSession(), property); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties(String pattern) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties(pattern)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getProperties(String[] globs) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getProperties(globs)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getPrimaryItem() throws RepositoryException { - try { - return getItem(getSession(), remote.getPrimaryItem()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException { - try { - return remote.getIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUUID() throws RepositoryException { - try { - return remote.getUUID(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getReferences() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getReferences()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getReferences(String name) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getReferences(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNode(String path) throws RepositoryException { - try { - return remote.hasNode(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperty(String path) throws RepositoryException { - try { - return remote.hasProperty(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNodes() throws RepositoryException { - try { - return remote.hasNodes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperties() throws RepositoryException { - try { - return remote.hasProperties(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType getPrimaryNodeType() throws RepositoryException { - try { - return getFactory().getNodeType(remote.getPrimaryNodeType()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getMixinNodeTypes() throws RepositoryException { - try { - return getNodeTypeArray(remote.getMixinNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) throws RepositoryException { - try { - return remote.isNodeType(type); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addMixin(String name) throws RepositoryException { - try { - remote.addMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeMixin(String name) throws RepositoryException { - try { - remote.removeMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddMixin(String name) throws RepositoryException { - try { - return remote.canAddMixin(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition getDefinition() throws RepositoryException { - try { - return getFactory().getNodeDef(remote.getDefinition()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version checkin() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.checkin()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void checkout() throws RepositoryException { - try { - remote.checkout(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void update(String workspace) throws RepositoryException { - try { - remote.update(workspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge(String workspace, boolean bestEffort) - throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.merge(workspace, bestEffort)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void cancelMerge(Version version) throws RepositoryException { - try { - remote.cancelMerge(version.getUUID()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void doneMerge(Version version) throws RepositoryException { - try { - remote.doneMerge(version.getUUID()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getCorrespondingNodePath(String workspace) - throws RepositoryException { - try { - return remote.getCorrespondingNodePath(workspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getIndex() throws RepositoryException { - try { - return remote.getIndex(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String version, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByUUID(version.getUUID(), removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, String path, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version.getUUID(), path, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByLabel(label, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String[] strings, int type) - throws RepositoryException { - try { - if (strings == null) { - remote.setProperty(name, (Value[]) null); - return null; - } else { - Value[] serials = SerialValueFactory.makeSerialValueArray(strings); - RemoteProperty property = remote.setProperty(name, serials, type); - return getFactory().getProperty(getSession(), property); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value[] values, int type) - throws RepositoryException { - try { - if (values != null) { - values = SerialValueFactory.makeSerialValueArray(values); - } - RemoteProperty property = remote.setProperty(name, values, type); - if (property != null) { - return getFactory().getProperty(getSession(), property); - } else { - return null; - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, Value value, int type) - throws RepositoryException { - try { - if (value != null) { - value = SerialValueFactory.makeSerialValue(value); - } - RemoteProperty property = remote.setProperty(name, value, type); - if (property != null) { - return getFactory().getProperty(getSession(), property); - } else { - return null; - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property setProperty(String name, String string, int type) - throws RepositoryException { - Value value = null; - if (string != null) { - value = getSession().getValueFactory().createValue(string); - } - return setProperty(name, value, type); - } - - /** {@inheritDoc} */ - public boolean isCheckedOut() throws RepositoryException { - try { - return remote.isCheckedOut(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionHistory getVersionHistory() throws RepositoryException { - try { - return getFactory().getVersionHistory(getSession(), remote.getVersionHistory()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getBaseVersion() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getBaseVersion()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Lock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException { - try { - RemoteLock lock = remote.lock(isDeep, isSessionScoped); - return getFactory().getLock(getSession(), lock); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Lock getLock() throws RepositoryException { - try { - return getFactory().getLock(getSession(), remote.getLock()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unlock() throws RepositoryException { - try { - remote.unlock(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean holdsLock() throws RepositoryException { - try { - return remote.holdsLock(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLocked() throws RepositoryException { - try { - return remote.isLocked(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void followLifecycleTransition(String transition) - throws RepositoryException { - try { - remote.followLifecycleTransition(transition); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAllowedLifecycleTransistions() - throws RepositoryException { - try { - return remote.getAllowedLifecycleTransistions(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getSharedSet() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getSharedSet()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getWeakReferences() throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyIterator getWeakReferences(String name) - throws RepositoryException { - try { - return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeShare() throws RepositoryException { - try { - remote.removeShare(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeSharedSet() throws RepositoryException { - try { - remote.removeSharedSet(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setPrimaryType(String nodeTypeName) - throws RepositoryException { - try { - remote.setPrimaryType(nodeTypeName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java deleted file mode 100644 index 05cbc568589..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} - * interface. This class makes a remote node definition locally available using - * the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDef} interface. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition - */ -@Deprecated(forRemoval = true) public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition { - - /** The adapted remote node definition. */ - private RemoteNodeDefinition remote; - - /** - * Creates a local adapter for the given remote node definition. - * - * @param remote remote node definition - * @param factory local adapter factory - */ - public ClientNodeDefinition(RemoteNodeDefinition remote, LocalAdapterFactory factory) { - super(remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType[] getRequiredPrimaryTypes() { - try { - return getNodeTypeArray(remote.getRequiredPrimaryTypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType getDefaultPrimaryType() { - try { - RemoteNodeType nt = remote.getDefaultPrimaryType(); - if (nt == null) { - return null; - } else { - return getFactory().getNodeType(nt); - } - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean allowsSameNameSiblings() { - try { - return remote.allowsSameNameSiblings(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getDefaultPrimaryTypeName() { - try { - return remote.getDefaultPrimaryTypeName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getRequiredPrimaryTypeNames() { - try { - return remote.getRequiredPrimaryTypeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java deleted file mode 100644 index 37bf473646e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. This class makes a remote node type locally available using - * the JCR {@link javax.jcr.nodetype.NodeType NodeType} interface. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType - */ -@Deprecated(forRemoval = true) public class ClientNodeType extends ClientObject implements NodeType { - - /** The adapted remote node type. */ - private RemoteNodeType remote; - - /** - * Creates a local adapter for the given remote node type. - * - * @param remote remote node type - * @param factory local adapter factory - */ - public ClientNodeType(RemoteNodeType remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** - * Utility method for creating an array of local node definition - * adapters for an array of remote node definitions. The node - * definition adapters are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote node definitions - * @return local node definition array - */ - private NodeDefinition[] getNodeDefArray(RemoteNodeDefinition[] remotes) { - if (remotes != null) { - NodeDefinition[] defs = new NodeDefinition[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - defs[i] = getFactory().getNodeDef(remotes[i]); - } - return defs; - } else { - return new NodeDefinition[0]; // for safety - } - } - - /** - * Utility method for creating an array of local property definition - * adapters for an array of remote property definitions. The property - * definition adapters are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote property definitions - * @return local property definition array - */ - protected PropertyDefinition[] getPropertyDefArray( - RemotePropertyDefinition[] remotes) { - if (remotes != null) { - PropertyDefinition[] defs = new PropertyDefinition[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - defs[i] = getFactory().getPropertyDef(remotes[i]); - } - return defs; - } else { - return new PropertyDefinition[0]; // for safety - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMixin() { - try { - return remote.isMixin(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasOrderableChildNodes() { - try { - return remote.hasOrderableChildNodes(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getSupertypes() { - try { - return getNodeTypeArray(remote.getSupertypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeType[] getDeclaredSupertypes() { - try { - return getNodeTypeArray(remote.getDeclaredSupertypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) { - try { - return remote.isNodeType(type); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition[] getPropertyDefinitions() { - try { - return getPropertyDefArray(remote.getPropertyDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition[] getDeclaredPropertyDefinitions() { - try { - return getPropertyDefArray(remote.getDeclaredPropertyDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition[] getChildNodeDefinitions() { - try { - return getNodeDefArray(remote.getChildNodeDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeDefinition[] getDeclaredChildNodeDefinitions() { - try { - return getNodeDefArray(remote.getDeclaredChildNodeDefs()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value value) { - try { - return remote.canSetProperty( - name, SerialValueFactory.makeSerialValue(value)); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to serialize value", e); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value[] values) { - try { - Value[] serials = SerialValueFactory.makeSerialValueArray(values); - return remote.canSetProperty(name, serials); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to serialize values", e); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name) { - try { - return remote.canAddChildNode(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name, String type) { - try { - return remote.canAddChildNode(name, type); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveItem(String name) { - try { - return remote.canRemoveItem(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrimaryItemName() { - try { - return remote.getPrimaryItemName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveNode(String nodeName) { - try { - return remote.canRemoveNode(nodeName); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canRemoveProperty(String propertyName) { - try { - return remote.canRemoveProperty(propertyName); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getDeclaredSubtypes() { - try { - return getFactory().getNodeTypeIterator(remote.getDeclaredSubtypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getSubtypes() { - try { - return getFactory().getNodeTypeIterator(remote.getSubtypes()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getDeclaredSupertypeNames() { - try { - return remote.getDeclaredSupertypeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isAbstract() { - try { - return remote.isAbstract(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isQueryable() { - try { - return remote.isQueryable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java deleted file mode 100644 index 2a4555521b5..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.nodetype.NodeDefinitionTemplate; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeDefinition; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.NodeTypeTemplate; -import javax.jcr.nodetype.PropertyDefinitionTemplate; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} - * interface. This class makes a remote node type manager locally available - * using the JCR {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} - * interface. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager - */ -@Deprecated(forRemoval = true) public class ClientNodeTypeManager extends ClientObject - implements NodeTypeManager { - - /** The adapted remote node type manager. */ - private RemoteNodeTypeManager remote; - - /** - * Creates a local adapter for the given remote node type manager. - * - * @param remote remote node type manager - * @param factory local adapter factory - */ - public ClientNodeTypeManager( - RemoteNodeTypeManager remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public NodeType getNodeType(String name) throws RepositoryException { - try { - return getFactory().getNodeType(remote.getNodeType(name)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getAllNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getAllNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getPrimaryNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeIterator getMixinNodeTypes() throws RepositoryException { - try { - return getFactory().getNodeTypeIterator(remote.getMixinNodeTypes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public NodeDefinitionTemplate createNodeDefinitionTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeTemplate createNodeTypeTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public PropertyDefinitionTemplate createPropertyDefinitionTemplate() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public boolean hasNodeType(String name) throws RepositoryException { - try { - return remote.hasNodeType(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public NodeType registerNodeType( - NodeTypeDefinition ntd, boolean allowUpdate) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public NodeTypeIterator registerNodeTypes( - NodeTypeDefinition[] ntds, boolean allowUpdate) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public void unregisterNodeType(String name) throws RepositoryException { - unregisterNodeTypes(new String[] { name }); - } - - public void unregisterNodeTypes(String[] names) throws RepositoryException { - try { - remote.unregisterNodeTypes(names); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java deleted file mode 100644 index 5241619921c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.Session; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Base class for client adapter objects. The only purpose of - * this class is to centralize the handling of the - * local adapter factory used by the client adapters to - * instantiate new adapters. - */ -@Deprecated(forRemoval = true) public class ClientObject { - - /** Local adapter factory. */ - private LocalAdapterFactory factory; - - /** - * Creates a basic client adapter that uses the given factory - * to create new adapters. - * - * @param factory local adapter factory - */ - protected ClientObject(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns the local adapter factory used to create new adapters. - * - * @return local adapter factory - */ - protected LocalAdapterFactory getFactory() { - return factory; - } - - /** - * Utility method to create a local adapter for a remote item. - * This method introspects the remote reference to determine - * whether to instantiate a {@link javax.jcr.Property}, - * a {@link Node Node}, or an {@link Item Item} adapter using - * the local adapter factory. - *

    - * If the remote item is a {@link RemoteNode}, this method delegates - * to {@link #getNode(Session, RemoteNode)}. - * - * @param session current session - * @param remote remote item - * @return local property, node, or item adapter - */ - protected Item getItem(Session session, RemoteItem remote) { - if (remote instanceof RemoteProperty) { - return factory.getProperty(session, (RemoteProperty) remote); - } else if (remote instanceof RemoteNode) { - return getNode(session, (RemoteNode) remote); - } else { - return factory.getItem(session, remote); - } - } - - /** - * Utility method to create a local adapter for a remote node. - * This method introspects the remote reference to determine - * whether to instantiate a {@link Node Node}, - * a {@link javax.jcr.version.VersionHistory VersionHistory}, or a - * {@link javax.jcr.version.Version Version} adapter using - * the local adapter factory. - * - * @param session current session - * @param remote remote node - * @return local node, version, or version history adapter - */ - protected Node getNode(Session session, RemoteNode remote) { - if (remote instanceof RemoteVersion) { - return factory.getVersion(session, (RemoteVersion) remote); - } else if (remote instanceof RemoteVersionHistory) { - return factory.getVersionHistory(session, (RemoteVersionHistory) remote); - } else { - return factory.getNode(session, remote); - } - } - - /** - * Utility method for creating an array of local node type adapters - * for an array of remote node types. The node type adapters are created - * using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote node types - * @return local node type array - */ - protected NodeType[] getNodeTypeArray(RemoteNodeType[] remotes) { - if (remotes != null) { - NodeType[] types = new NodeType[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - types[i] = factory.getNodeType(remotes[i]); - } - return types; - } else { - return new NodeType[0]; // for safety - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java deleted file mode 100644 index e30761eaf8f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.Workspace; -import javax.jcr.observation.EventJournal; -import javax.jcr.observation.EventListener; -import javax.jcr.observation.EventListenerIterator; -import javax.jcr.observation.ObservationManager; - -import org.apache.jackrabbit.rmi.iterator.ArrayEventListenerIterator; -import org.apache.jackrabbit.rmi.observation.ClientEventPoll; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ClientObservationManager class - *

    - * This class uses an instance of the - * {@link org.apache.jackrabbit.rmi.observation.ClientEventPoll} class for the - * actual registration and event dispatching. - *

    - * This class does not require the - * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory} and consequently - * calls the base class constructor with a null factory. - *

    - * See the {@link org.apache.jackrabbit.rmi.observation observation} - * package comment for a description on how event listener registration and - * notification is implemented. - * - * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll - */ -@Deprecated(forRemoval = true) public class ClientObservationManager extends ClientObject implements - ObservationManager { - - /** The remote observation manager */ - private final RemoteObservationManager remote; - - /** The Workspace to which this observation manager belongs. */ - private final Workspace workspace; - - /** The ClientEventPoll class internally used for event dispatching */ - private ClientEventPoll poller; - - /** - * Creates an instance of this class talking to the given remote observation - * manager. - * - * @param remote The {@link RemoteObservationManager} backing this - * client-side observation manager. - * @param workspace The Workspace instance to which this - * observation manager belongs. - */ - public ClientObservationManager(Workspace workspace, - RemoteObservationManager remote) { - super(null); - this.remote = remote; - this.workspace = workspace; - } - - /** {@inheritDoc} */ - public void addEventListener(EventListener listener, int eventTypes, - String absPath, boolean isDeep, String[] uuid, - String[] nodeTypeName, boolean noLocal) - throws RepositoryException { - try { - long listenerId = getClientEventPoll().addListener(listener); - remote.addEventListener(listenerId, eventTypes, absPath, - isDeep, uuid, nodeTypeName, noLocal); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeEventListener(EventListener listener) - throws RepositoryException { - try { - long id = getClientEventPoll().removeListener(listener); - remote.removeEventListener(id); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public EventListenerIterator getRegisteredEventListeners() { - EventListener[] listeners = (poller != null) - ? poller.getListeners() - : new EventListener[0]; - return new ArrayEventListenerIterator(listeners); - } - - public EventJournal getEventJournal() throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public EventJournal getEventJournal( - int eventTypes, String absPath, boolean isDeep, - String[] uuid, String[] nodeTypeName) throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public void setUserData(String userData) throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - //---------- internal ------------------------------------------------------ - - /** - * Returns the {@link ClientEventPoll} instance used by this (client-side) - * observation manager. This method creates the instance on the first call - * and starts the poller thread to wait for remote events. - * - * @return poller instance - */ - private synchronized ClientEventPoll getClientEventPoll() { - if (poller == null) { - poller = new ClientEventPoll(remote, workspace.getSession()); - poller.start(); - } - return poller; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java deleted file mode 100644 index 16f0359f6a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.InputStream; -import java.math.BigDecimal; -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.ItemNotFoundException; -import javax.jcr.ItemVisitor; -import javax.jcr.Node; -import javax.jcr.PathNotFoundException; -import javax.jcr.Property; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.ValueFactory; -import javax.jcr.ValueFormatException; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} - * interface. This class makes a remote property locally available using - * the JCR {@link javax.jcr.Property Property} interface. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.remote.RemoteProperty - */ -@Deprecated(forRemoval = true) public class ClientProperty extends ClientItem implements Property { - - /** The adapted remote property. */ - private RemoteProperty remote; - - /** - * Creates a local adapter for the given remote property. - * - * @param session current session - * @param remote remote property - * @param factory local adapter factory - */ - public ClientProperty( - Session session, RemoteProperty remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Calls the {@link ItemVisitor#visit(Property) ItemVisitor.visit(Property} - * method of the given visitor. Does not contact the remote property, but - * the visitor may invoke other methods that do contact the remote property. - * - * {@inheritDoc} - */ - public void accept(ItemVisitor visitor) throws RepositoryException { - visitor.visit(this); - } - - /** - * Returns the boolean value of this property. Implemented as - * getValue().getBoolean(). - * - * {@inheritDoc} - */ - public boolean getBoolean() throws RepositoryException { - return getValue().getBoolean(); - } - - /** - * Returns the date value of this property. Implemented as - * getValue().getDate(). - * - * {@inheritDoc} - */ - public Calendar getDate() throws RepositoryException { - return getValue().getDate(); - } - - /** - * Returns the double value of this property. Implemented as - * getValue().getDouble(). - * - * {@inheritDoc} - */ - public double getDouble() throws RepositoryException { - return getValue().getDouble(); - } - - /** - * Returns the long value of this property. Implemented as - * getValue().getLong(). - * - * {@inheritDoc} - */ - public long getLong() throws RepositoryException { - return getValue().getLong(); - } - - /** - * Returns the binary value of this property. Implemented as - * getValue().getBinary(). - * - * {@inheritDoc} - */ - public Binary getBinary() throws RepositoryException { - return getValue().getBinary(); - } - - /** - * Returns the decimal value of this property. Implemented as - * getValue().getDecimal(). - * - * {@inheritDoc} - */ - public BigDecimal getDecimal() throws RepositoryException { - return getValue().getDecimal(); - } - - /** - * Returns the binary value of this property. Implemented as - * getValue().getStream(). - * - * {@inheritDoc} - */ - @SuppressWarnings("deprecation") - public InputStream getStream() throws RepositoryException { - return getValue().getStream(); - } - - /** - * Returns the string value of this property. Implemented as - * getValue().getString(). - * - * {@inheritDoc} - */ - public String getString() throws RepositoryException { - return getValue().getString(); - } - - /** {@inheritDoc} */ - public Value getValue() throws RepositoryException { - try { - return remote.getValue(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException { - try { - return remote.getValues(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Sets the boolean value of this property. Implemented as - * setValue(new BooleanValue(value)). - * - * {@inheritDoc} - */ - public void setValue(boolean value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the date value of this property. Implemented as - * setValue(new DateValue(value)). - * - * {@inheritDoc} - */ - public void setValue(Calendar value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * Sets the double value of this property. Implemented as - * setValue(new DoubleValue(value)). - * - * {@inheritDoc} - */ - public void setValue(double value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the binary value of this property. Implemented as - * setValue(new BinaryValue(value)). - * - * {@inheritDoc} - */ - public void setValue(InputStream value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - ValueFactory factory = getSession().getValueFactory(); - Binary binary = factory.createBinary(value); - try { - setValue(factory.createValue(binary)); - } finally { - binary.dispose(); - } - } - } - - /** - * Sets the long value of this property. Implemented as - * setValue(new LongValue(value)). - * - * {@inheritDoc} - */ - public void setValue(long value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the binary value of this property. - * - * {@inheritDoc} - */ - public void setValue(Binary value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - /** - * Sets the decimal value of this property. - * - * {@inheritDoc} - */ - public void setValue(BigDecimal value) throws RepositoryException { - setValue(getSession().getValueFactory().createValue(value)); - } - - - /** - * Sets the reference value of this property. Implemented as - * setValue(new ReferenceValue(value)). - * - * {@inheritDoc} - */ - public void setValue(Node value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * Sets the string value of this property. Implemented as - * setValue(new StringValue(value)). - * - * {@inheritDoc} - */ - public void setValue(String value) throws RepositoryException { - if (value == null) { - setValue((Value) null); - } else { - setValue(getSession().getValueFactory().createValue(value)); - } - } - - /** - * {@inheritDoc} - */ - public void setValue(String[] strings) throws RepositoryException { - try { - Value[] values = null; - if (strings != null) { - values = SerialValueFactory.makeSerialValueArray(strings); - } - remote.setValue(values); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value value) throws RepositoryException { - try { - if (value != null) { - value = SerialValueFactory.makeSerialValue(value); - } - remote.setValue(value); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value[] values) throws RepositoryException { - try { - if (values != null) { - values = SerialValueFactory.makeSerialValueArray(values); - } - remote.setValue(values); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns the reference value of this property. Implemented by - * converting the reference value to an UUID string and using the - * current session to look up the referenced node. - * - * {@inheritDoc} - */ - public Node getNode() throws RepositoryException { - String value = getString(); - - switch (getType()) { - case PropertyType.REFERENCE: - case PropertyType.WEAKREFERENCE: - return getSession().getNodeByIdentifier(value); - - case PropertyType.PATH: - try { - if (value.startsWith("/")) { - return getSession().getNode(value); - } else { - return getParent().getNode(value); - } - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - - case PropertyType.NAME: - try { - return getParent().getNode(value); - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - - case PropertyType.STRING: - try { - // interpret as identifier - Value refValue = getSession().getValueFactory().createValue(value, PropertyType.REFERENCE); - return getSession().getNodeByIdentifier(refValue.getString()); - } catch (ItemNotFoundException e) { - throw e; - } catch (RepositoryException e) { - // try if STRING value can be interpreted as PATH value - Value pathValue = getSession().getValueFactory().createValue(value, PropertyType.PATH); - boolean absolute = value.startsWith("/"); - try { - return (absolute) ? getSession().getNode(pathValue.getString()) : getParent().getNode(pathValue.getString()); - } catch (PathNotFoundException e1) { - throw new ItemNotFoundException(pathValue.getString()); - } - } - - default: - throw new ValueFormatException("Property value cannot be converted to a PATH, REFERENCE or WEAKREFERENCE: " + value); - } - } - - /** {@inheritDoc} */ - public Property getProperty() throws RepositoryException { - if (getType() != PropertyType.PATH && getType() != PropertyType.NAME) { - throw new ValueFormatException("Not a path property"); - } else { - String value = getString(); - try { - if (value.startsWith("/")) { - return getSession().getProperty(value); - } else { - return getParent().getProperty(value); - } - } catch (PathNotFoundException e) { - throw new ItemNotFoundException(value); - } - } - } - - /** {@inheritDoc} */ - public long getLength() throws RepositoryException { - try { - return remote.getLength(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long[] getLengths() throws RepositoryException { - try { - return remote.getLengths(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public PropertyDefinition getDefinition() throws RepositoryException { - try { - return getFactory().getPropertyDef(remote.getDefinition()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getType() throws RepositoryException { - try { - return remote.getType(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() throws RepositoryException { - // TODO: Direct remote call for this? - return getDefinition().isMultiple(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java deleted file mode 100644 index 161ba536fd1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Value; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. This class makes a remote property definition locally available - * using the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} interface. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition - */ -@Deprecated(forRemoval = true) public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition { - - /** The adapted remote property. */ - private RemotePropertyDefinition remote; - - /** - * Creates a local adapter for the given remote property definition. - * - * @param remote remote property definition - * @param factory local adapter factory - */ - public ClientPropertyDefinition( - RemotePropertyDefinition remote, LocalAdapterFactory factory) { - super(remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public int getRequiredType() { - try { - return remote.getRequiredType(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getValueConstraints() { - try { - return remote.getValueConstraints(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getDefaultValues() { - try { - return remote.getDefaultValues(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() { - try { - return remote.isMultiple(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAvailableQueryOperators() { - try { - return remote.getAvailableQueryOperators(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isFullTextSearchable() { - try { - return remote.isFullTextSearchable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isQueryOrderable() { - try { - return remote.isQueryOrderable(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java deleted file mode 100644 index aee001a45b0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Node; -import javax.jcr.Value; -import javax.jcr.query.Query; -import javax.jcr.query.QueryResult; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link RemoteQuery RemoteQuery} - * interface. This class makes a remote query locally available using - * the JCR {@link Query Query} interface. - * - * @see javax.jcr.query.Query Query - * @see org.apache.jackrabbit.rmi.remote.RemoteQuery - */ -@Deprecated(forRemoval = true) public class ClientQuery extends ClientObject implements Query { - - /** The current session */ - private Session session; - - /** The adapted remote query manager. */ - private RemoteQuery remote; - - /** - * Creates a client adapter for the given query. - * - * @param session current session - * @param remote remote query - * @param factory adapter factory - */ - public ClientQuery( - Session session, RemoteQuery remote, LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public QueryResult execute() throws RepositoryException { - try { - return getFactory().getQueryResult(session, remote.execute()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getStatement() { - try { - return remote.getStatement(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getLanguage() { - try { - return remote.getLanguage(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getStoredQueryPath() throws RepositoryException { - try { - return remote.getStoredQueryPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node storeAsNode(String absPath) throws RepositoryException { - try { - return getNode(session, remote.storeAsNode(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void bindValue(String varName, Value value) - throws RepositoryException { - try { - remote.bindValue(varName, value); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getBindVariableNames() throws RepositoryException { - try { - return remote.getBindVariableNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setLimit(long limit) { - try { - remote.setLimit(limit); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void setOffset(long offset) { - try { - remote.setOffset(offset); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java deleted file mode 100644 index 3590c2be6e6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.qom.QueryObjectModelFactory; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteQueryManager RemoteQueryManager} - * interface. This class makes a remote query manager locally available using - * the JCR {@link QueryManager QueryManager} interface. - * - * @see javax.jcr.query.QueryManager QueryManager - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager - */ -@Deprecated(forRemoval = true) public class ClientQueryManager extends ClientObject implements QueryManager { - - /** The current session */ - private Session session; - - /** The adapted remote query manager. */ - private RemoteQueryManager remote; - - /** - * Creates a client adapter for the given remote query manager. - * - * @param session current session - * @param remote remote query manager - * @param factory adapter factory - */ - public ClientQueryManager( - Session session, RemoteQueryManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Query createQuery(String statement, String language) - throws RepositoryException { - try { - RemoteQuery query = remote.createQuery(statement, language); - return getFactory().getQuery(session, query); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Query getQuery(Node node) throws RepositoryException { - try { - // TODO fix this remote node dereferencing hack - RemoteQuery query = remote.getQuery(node.getPath()); - return getFactory().getQuery(session, query); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getSupportedQueryLanguages() throws RepositoryException { - try { - return remote.getSupportedQueryLanguages(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - public QueryObjectModelFactory getQOMFactory() { - throw new RuntimeException("TODO: JCR-3206"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java deleted file mode 100644 index a03b458622f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.QueryResult; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link RemoteQueryResult RemoteQueryResult} - * interface. This class makes a remote query result locally available using - * the JCR {@link QueryResult QueryResult} interface. - * - * @see javax.jcr.query.QueryResult QueryResult - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult - */ -@Deprecated(forRemoval = true) public class ClientQueryResult extends ClientObject implements QueryResult { - - /** The current session */ - private Session session; - - /** The adapted remote query result. */ - private RemoteQueryResult remote; - - /** - * Creates a client adapter for the given remote query result. - * - * @param session current session - * @param remote remote query result - * @param factory adapter factory - */ - public ClientQueryResult( - Session session, RemoteQueryResult remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public String[] getColumnNames() throws RepositoryException { - try { - return remote.getColumnNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RowIterator getRows() throws RepositoryException { - try { - return getFactory().getRowIterator(session, remote.getRows()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(session, remote.getNodes()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public String[] getSelectorNames() throws RepositoryException { - try { - return remote.getSelectorNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java deleted file mode 100644 index 07285c7c9ba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; -import java.util.HashSet; -import java.util.Set; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. This class makes a remote repository locally available using - * the JCR {@link javax.jcr.Repository Repository} interface. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public class ClientRepository implements Repository { - - /** - * The set of standard descriptor keys defined in the - * {@link Repository} interface. - */ - private static final Set STANDARD_KEYS = new HashSet() {{ - add(Repository.IDENTIFIER_STABILITY); - add(Repository.LEVEL_1_SUPPORTED); - add(Repository.LEVEL_2_SUPPORTED); - add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); - add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); - add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); - add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); - add(Repository.OPTION_LIFECYCLE_SUPPORTED); - add(Repository.OPTION_LOCKING_SUPPORTED); - add(Repository.OPTION_OBSERVATION_SUPPORTED); - add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); - add(Repository.OPTION_QUERY_SQL_SUPPORTED); - add(Repository.OPTION_RETENTION_SUPPORTED); - add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); - add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); - add(Repository.OPTION_TRANSACTIONS_SUPPORTED); - add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); - add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); - add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); - add(Repository.OPTION_VERSIONING_SUPPORTED); - add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); - add(Repository.OPTION_XML_EXPORT_SUPPORTED); - add(Repository.OPTION_XML_IMPORT_SUPPORTED); - add(Repository.OPTION_ACTIVITIES_SUPPORTED); - add(Repository.OPTION_BASELINES_SUPPORTED); - - add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); - add(Repository.QUERY_JOINS); - add(Repository.QUERY_LANGUAGES); - add(Repository.QUERY_STORED_QUERIES_SUPPORTED); - add(Repository.QUERY_XPATH_DOC_ORDER); - add(Repository.QUERY_XPATH_POS_INDEX); - add(Repository.REP_NAME_DESC); - add(Repository.REP_VENDOR_DESC); - add(Repository.REP_VENDOR_URL_DESC); - add(Repository.SPEC_NAME_DESC); - add(Repository.SPEC_VERSION_DESC); - add(Repository.WRITE_SUPPORTED); - }}; - - /** The adapted remote repository. */ - private final RemoteRepository remote; - - /** Local adapter factory. */ - private final LocalAdapterFactory factory; - - /** - * Creates a client adapter for the given remote repository. - * - * @param remote remote repository - * @param factory local adapter factory - */ - public ClientRepository( - RemoteRepository remote, LocalAdapterFactory factory) { - this.remote = remote; - this.factory = factory; - } - - /** {@inheritDoc} */ - public String getDescriptor(String name) { - try { - return remote.getDescriptor(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Value getDescriptorValue(String key) { - String descriptor = getDescriptor(key); - if (descriptor != null) { - return SerialValueFactory.getInstance().createValue(descriptor); - } else { - return null; - } - } - - /** {@inheritDoc} */ - public Value[] getDescriptorValues(String key) { - try { - return remote.getDescriptorValues(key); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getDescriptorKeys() { - try { - return remote.getDescriptorKeys(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isSingleValueDescriptor(String key) { - return getDescriptor(key) != null; - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - try { - RemoteSession session = remote.login(credentials, workspace); - return factory.getSession(this, session); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns true if the given key identifies a standard descriptor. - * - * @param key descriptor key - * @return true if the key identifies a standard descriptor, - * false otherwise - */ - public boolean isStandardDescriptor(String key) { - return STANDARD_KEYS.contains(key); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null arguments. - * - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * the given credentials and a null workspace name. - * - * @param credentials login credentials - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null credentials and the given workspace name. - * - * @param workspace workspace name - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java deleted file mode 100644 index dd785636835..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.net.MalformedURLException; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; -import java.util.Hashtable; - -import javax.jcr.Repository; -import javax.naming.Context; -import javax.naming.Name; -import javax.naming.RefAddr; -import javax.naming.Reference; -import javax.naming.spi.ObjectFactory; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Object factory for JCR-RMI clients. This factory can be used either - * directly or as a JNDI object factory. - * - * @see ClientRepository - */ -@Deprecated(forRemoval = true) public class ClientRepositoryFactory implements ObjectFactory { - - /** - * The JNDI parameter name for configuring the RMI URL of - * a remote repository. - */ - public static final String URL_PARAMETER = "url"; - - /** - * Local adapter factory. - */ - private LocalAdapterFactory factory; - - /** - * Creates a JCR-RMI client factory with the default adapter factory. - */ - public ClientRepositoryFactory() { - this(new ClientAdapterFactory()); - } - - /** - * Creates a JCR-RMI client factory with the given adapter factory. - * - * @param factory local adapter factory - */ - public ClientRepositoryFactory(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns a client wrapper for a remote content repository. The remote - * repository is looked up from the RMI registry using the given URL by - * the returned {@link SafeClientRepository} instance. - *

    - * The current implementation of this method will not throw any of the - * declared exceptions (because of the {@link SafeClientRepository} being - * used), but the throws clauses are kept for backwards compatibility and - * potential future use. Clients should be prepared to handle exceptions - * from this method. - * - * @param url the RMI URL of the remote repository - * @return repository client - * @throws MalformedURLException if the given URL is malfored - * @throws NotBoundException if the given URL points to nothing - * @throws ClassCastException if the given URL points to something unknown - * @throws RemoteException if the remote repository can not be accessed - */ - public Repository getRepository(final String url) - throws MalformedURLException, NotBoundException, - ClassCastException, RemoteException { - return new SafeClientRepository(factory) { - - protected RemoteRepository getRemoteRepository() - throws RemoteException { - try { - return (RemoteRepository) Naming.lookup(url); - } catch (MalformedURLException e) { - throw new RemoteException("Malformed URL: " + url, e); - } catch (NotBoundException e) { - throw new RemoteException("No target found: " + url, e); - } catch (ClassCastException e) { - throw new RemoteException("Unknown target: " + url, e); - } - } - - }; - } - - /** - * JNDI factory method for creating JCR-RMI clients. Creates a lazy - * client repository instance that uses the reference parameter "url" - * as the RMI URL where the remote repository is looked up when accessed. - * - * @param object reference parameters - * @param name unused - * @param context unused - * @param environment unused - * @return repository client - */ - public Object getObjectInstance( - Object object, Name name, Context context, Hashtable environment) { - if (object instanceof Reference) { - Reference reference = (Reference) object; - RefAddr url = reference.get(URL_PARAMETER); - if (url != null && url.getContent() != null) { - try { - return getRepository(url.getContent().toString()); - } catch (Exception e) { - return null; - } - } - } - return null; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java deleted file mode 100644 index 38701da7629..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.query.Row; - -import org.apache.jackrabbit.rmi.remote.RemoteRow; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteRow RemoteRow} - * interface. This class makes a remote query row locally available using - * the JCR {@link Row Row} interface. - * - * @see javax.jcr.query.Row Row - * @see org.apache.jackrabbit.rmi.remote.RemoteRow - */ -@Deprecated(forRemoval = true) public class ClientRow extends ClientObject implements Row { - - /** Current session. */ - private Session session; - - /** The remote query row. */ - private RemoteRow remote; - - /** - * Creates a client adapter for the given remote query row. - * - * @param remote remote query row - */ - public ClientRow(Session session, RemoteRow remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException { - try { - return remote.getValues(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getValue(String s) throws RepositoryException { - try { - return remote.getValue(s); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode() throws RepositoryException { - try { - return getFactory().getNode(session, remote.getNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode(String selectorName) throws RepositoryException { - try { - return getFactory().getNode(session, remote.getNode(selectorName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath(String selectorName) throws RepositoryException { - try { - return remote.getPath(selectorName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore() throws RepositoryException { - try { - return remote.getScore(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore(String selectorName) throws RepositoryException { - try { - return remote.getScore(selectorName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java deleted file mode 100644 index a07769bbd8b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java +++ /dev/null @@ -1,589 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.rmi.RemoteException; -import java.security.AccessControlException; - -import javax.jcr.Credentials; -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.Property; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.ValueFactory; -import javax.jcr.Workspace; -import javax.jcr.retention.RetentionManager; -import javax.jcr.security.AccessControlManager; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} - * interface. This class makes a remote session locally available using - * the JCR {@link javax.jcr.Session Session} interface. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.remote.RemoteSession - */ -@Deprecated(forRemoval = true) public class ClientSession extends ClientObject implements Session { - - /** - * Logger instance. - */ - private static final Logger log = - LoggerFactory.getLogger(ClientSession.class); - - /** The current repository. */ - private final Repository repository; - - /** - * Flag indicating whether the session is to be considered live of not. - * This flag is initially set to true and reset to - * false by the {@link #logout()} method. The {@link #isLive()} - * method first checks this flag before asking the remote session. - */ - private boolean live = true; - - /** The adapted remote session. */ - protected final RemoteSession remote; - - /** - * The adapted workspace of this session. This field is set on the first - * call to the {@link #getWorkspace()} method assuming, that a workspace - * instance is not changing during the lifetime of a session, that is, - * each call to the server-side Session.getWorkspace() allways - * returns the same object. - */ - private Workspace workspace; - - /** - * Creates a client adapter for the given remote session. - * - * @param repository current repository - * @param remote remote repository - * @param factory local adapter factory - */ - public ClientSession(Repository repository, RemoteSession remote, - LocalAdapterFactory factory) { - super(factory); - this.repository = repository; - this.remote = remote; - } - - /** - * Returns the current repository without contacting the remote session. - * - * {@inheritDoc} - */ - public Repository getRepository() { - return repository; - } - - /** {@inheritDoc} */ - public String getUserID() { - try { - return remote.getUserID(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Object getAttribute(String name) { - try { - return remote.getAttribute(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAttributeNames() { - try { - return remote.getAttributeNames(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public Workspace getWorkspace() { - if (workspace == null) { - try { - workspace = - getFactory().getWorkspace(this, remote.getWorkspace()); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - return workspace; - } - - /** {@inheritDoc} */ - public Session impersonate(Credentials credentials) - throws RepositoryException { - try { - RemoteSession session = remote.impersonate(credentials); - return getFactory().getSession(repository, session); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getRootNode() throws RepositoryException { - try { - return getNode(this, remote.getRootNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNodeByIdentifier(String id) throws RepositoryException { - try { - return getNode(this, remote.getNodeByIdentifier(id)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNodeByUUID(String uuid) throws RepositoryException { - try { - return getNode(this, remote.getNodeByUUID(uuid)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Item getItem(String path) throws RepositoryException { - try { - return getItem(this, remote.getItem(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getNode(String path) throws RepositoryException { - try { - return getNode(this, remote.getNode(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Property getProperty(String path) throws RepositoryException { - try { - return (Property) getItem(this, remote.getProperty(path)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean itemExists(String path) throws RepositoryException { - try { - return remote.itemExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean nodeExists(String path) throws RepositoryException { - try { - return remote.nodeExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public boolean propertyExists(String path) throws RepositoryException { - try { - return remote.propertyExists(path); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void removeItem(String path) throws RepositoryException { - try { - remote.removeItem(path); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) throws RepositoryException { - try { - remote.move(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException { - try { - remote.save(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) throws RepositoryException { - try { - remote.refresh(keepChanges); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPendingChanges() throws RepositoryException { - try { - return remote.hasPendingChanges(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Returns the {@link SerialValueFactory#getInstance()}. - * - * {@inheritDoc} - */ - public ValueFactory getValueFactory() { - return SerialValueFactory.getInstance(); - } - - /** {@inheritDoc} */ - public void checkPermission(String path, String actions) - throws AccessControlException, RepositoryException { - if (!hasPermission(path, actions)) { - throw new AccessControlException( - "No permission for " + actions + " on " + path); - } - } - - /** {@inheritDoc} */ - public boolean hasPermission(String path, String actions) - throws RepositoryException { - try { - return remote.hasPermission(path, actions); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, InputStream xml, int mode) - throws IOException, RepositoryException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - byte[] bytes = new byte[4096]; - for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { - buffer.write(bytes, 0, n); - } - remote.importXML(path, buffer.toByteArray(), mode); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } finally { - // JCR-2903 - try { xml.close(); } catch (IOException ignore) {} - } - } - - /** {@inheritDoc} */ - public ContentHandler getImportContentHandler( - final String path, final int mode) throws RepositoryException { - getItem(path); // Check that the path exists - try { - final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - ContentHandler handler = - SerializingContentHandler.getSerializer(buffer); - return new DefaultContentHandler(handler) { - public void endDocument() throws SAXException { - super.endDocument(); - try { - remote.importXML(path, buffer.toByteArray(), mode); - } catch (Exception e) { - throw new SAXException("XML import failed", e); - } - } - }; - } catch (SAXException e) { - throw new RepositoryException("XML serialization failed", e); - } - } - - /** {@inheritDoc} */ - public void setNamespacePrefix(String prefix, String uri) - throws RepositoryException { - try { - remote.setNamespacePrefix(prefix, uri); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getNamespacePrefixes() throws RepositoryException { - try { - return remote.getNamespacePrefixes(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespaceURI(String prefix) throws RepositoryException { - try { - return remote.getNamespaceURI(prefix); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespacePrefix(String uri) throws RepositoryException { - try { - return remote.getNamespacePrefix(uri); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void logout() { - - // ignore if we are not alive any more. - if (!isLive()) { - return; - } - - try { - remote.logout(); - } catch (RemoteException ex) { - // JCRRMI-3: Just log a warning, the connection is dead anyway - log.warn("Remote logout failed", ex); - } finally { - // mark "dead" - live = false; - } - } - - /** {@inheritDoc} */ - public void addLockToken(String name) { - try { - remote.addLockToken(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getLockTokens() { - try { - return remote.getLockTokens(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void removeLockToken(String name) { - try { - remote.removeLockToken(name); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** - * Exports the XML system view of the specified repository location - * to the given XML content handler. This method first requests the - * raw XML data from the remote session, and then uses an identity - * transformation to feed the data to the given XML content handler. - * Possible IO and transformer exceptions are thrown as SAXExceptions. - * - * {@inheritDoc} - */ - public void exportSystemView( - String path, ContentHandler handler, - boolean binaryAsLink, boolean noRecurse) - throws SAXException, RepositoryException { - try { - byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); - - Source source = new StreamSource(new ByteArrayInputStream(xml)); - Result result = new SAXResult(handler); - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.transform(source, result); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } catch (IOException ex) { - throw new SAXException(ex); - } catch (TransformerConfigurationException ex) { - throw new SAXException(ex); - } catch (TransformerException ex) { - throw new SAXException(ex); - } - } - - /** - * Exports the XML system view of the specified repository location - * to the given output stream. This method first requests the - * raw XML data from the remote session, and then writes the data to - * the output stream. - * - * {@inheritDoc} - */ - public void exportSystemView( - String path, OutputStream output, - boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException { - try { - byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse); - output.write(xml); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * Exports the XML document view of the specified repository location - * to the given XML content handler. This method first requests the - * raw XML data from the remote session, and then uses an identity - * transformation to feed the data to the given XML content handler. - * Possible IO and transformer exceptions are thrown as SAXExceptions. - * - * {@inheritDoc} - */ - public void exportDocumentView( - String path, ContentHandler handler, - boolean binaryAsLink, boolean noRecurse) - throws SAXException, RepositoryException { - try { - byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); - - Source source = new StreamSource(new ByteArrayInputStream(xml)); - Result result = new SAXResult(handler); - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.transform(source, result); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } catch (IOException ex) { - throw new SAXException(ex); - } catch (TransformerConfigurationException ex) { - throw new SAXException(ex); - } catch (TransformerException ex) { - throw new SAXException(ex); - } - } - - /** - * Exports the XML document view of the specified repository location - * to the given output stream. This method first requests the - * raw XML data from the remote session, and then writes the data to - * the output stream. - * - * {@inheritDoc} - */ - public void exportDocumentView( - String path, OutputStream output, - boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException { - try { - byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse); - output.write(xml); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * {@inheritDoc} - */ - public boolean isLive() { - try { - return live && remote.isLive(); - } catch (RemoteException e) { - log.warn("Failed to test remote session state", e); - return false; - } - } - - public AccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, RepositoryException { - try { - return getFactory().getAccessControlManager( - remote.getAccessControlManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public RetentionManager getRetentionManager() - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - - public boolean hasCapability( - String methodName, Object target, Object[] arguments) - throws RepositoryException { - throw new UnsupportedRepositoryOperationException("TODO: JCR-3206"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java deleted file mode 100644 index c48b605a74c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteVersion; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} - * interface. This class makes a remote version locally available using - * the JCR {@link javax.jcr.version.Version Version} interface. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.remote.RemoteVersion - */ -@Deprecated(forRemoval = true) public class ClientVersion extends ClientNode implements Version { - - /** The adapted remote version. */ - private RemoteVersion remote; - - /** - * Creates a local adapter for the given remote version. - * - * @param session current session - * @param remote remote version - * @param factory local adapter factory - */ - public ClientVersion(Session session, RemoteVersion remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** - * Utility method for creating a version array for an array - * of remote versions. The versions in the returned array - * are created using the local adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param remotes remote versions - * @return local version array - */ - private Version[] getVersionArray(RemoteVersion[] remotes) { - if (remotes != null) { - Version[] versions = new Version[remotes.length]; - for (int i = 0; i < remotes.length; i++) { - versions[i] = getFactory().getVersion(getSession(), remotes[i]); - } - return versions; - } else { - return new Version[0]; // for safety - } - } - - - /** {@inheritDoc} */ - public Calendar getCreated() throws RepositoryException { - try { - return remote.getCreated(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version[] getSuccessors() throws RepositoryException { - try { - return getVersionArray(remote.getSuccessors()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version[] getPredecessors() throws RepositoryException { - try { - return getVersionArray(remote.getPredecessors()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionHistory getContainingHistory() throws RepositoryException { - try { - return getFactory().getVersionHistory(getSession(), remote.getContainingHistory()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Node getFrozenNode() throws RepositoryException { - try { - return getFactory().getNode(getSession(), remote.getFrozenNode()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getLinearPredecessor() throws RepositoryException { - try { - RemoteVersion linearPredecessor = remote.getLinearPredecessor(); - if (linearPredecessor == null) { - return null; - } else { - return getFactory().getVersion(getSession(), linearPredecessor); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getLinearSuccessor() throws RepositoryException { - try { - RemoteVersion linearSuccessor = remote.getLinearSuccessor(); - if (linearSuccessor == null) { - return null; - } else { - return getFactory().getVersion(getSession(), linearSuccessor); - } - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java deleted file mode 100644 index 6e6887b8d8e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionException; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} - * interface. This class makes a remote version history locally available using - * the JCR {@link javax.jcr.version.VersionHistory VersionHistory} interface. - * - * @see javax.jcr.version.VersionHistory - * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory - */ -@Deprecated(forRemoval = true) public class ClientVersionHistory extends ClientNode implements VersionHistory { - - /** The adapted remote version history. */ - private RemoteVersionHistory remote; - - /** - * Creates a local adapter for the given remote version history. - * - * @param session current session - * @param remote remote version history - * @param factory local adapter factory - */ - public ClientVersionHistory(Session session, RemoteVersionHistory remote, - LocalAdapterFactory factory) { - super(session, remote, factory); - this.remote = remote; - } - - /** {@inheritDoc} */ - public Version getRootVersion() throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getRootVersion()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionIterator getAllVersions() throws RepositoryException { - try { - return getFactory().getVersionIterator( - getSession(), remote.getAllVersions()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getVersion(String versionName) throws VersionException, - RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getVersion(versionName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Version getVersionByLabel(String label) throws RepositoryException { - try { - return getFactory().getVersion(getSession(), remote.getVersionByLabel(label)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addVersionLabel(String versionName, String label, - boolean moveLabel) throws VersionException, RepositoryException { - try { - remote.addVersionLabel(versionName, label, moveLabel); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersionLabel(String label) - throws VersionException, RepositoryException { - try { - remote.removeVersionLabel(label); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String label) throws RepositoryException { - try { - return remote.hasVersionLabel(label); - } catch (RemoteException ex) { - // grok the exception and assume label is missing - return false; - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(Version version, String label) - throws VersionException, RepositoryException { - try { - String versionIdentifier = version.getIdentifier(); - return remote.hasVersionLabel(versionIdentifier, label); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels() throws RepositoryException { - try { - return remote.getVersionLabels(); - } catch (RemoteException ex) { - // grok the exception and return an empty array - return new String[0]; - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels(Version version) - throws VersionException, RepositoryException { - try { - String versionIdentifier = version.getIdentifier(); - return remote.getVersionLabels(versionIdentifier); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersion(String versionName) - throws UnsupportedRepositoryOperationException, VersionException, - RepositoryException { - try { - remote.removeVersion(versionName); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} - * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be - * used instead. - */ - public String getVersionableUUID() throws RepositoryException { - try { - return remote.getVersionableUUID(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getAllFrozenNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getAllFrozenNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeIterator getAllLinearFrozenNodes() throws RepositoryException { - try { - return getFactory().getNodeIterator(getSession(), remote.getAllLinearFrozenNodes()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public VersionIterator getAllLinearVersions() throws RepositoryException { - try { - return getFactory().getVersionIterator(getSession(), remote.getAllLinearVersions()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getVersionableIdentifier() throws RepositoryException { - try { - return remote.getVersionableIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java deleted file mode 100644 index 502146b85da..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; - -@Deprecated(forRemoval = true) public class ClientVersionManager extends ClientObject - implements VersionManager { - - /** The current session. */ - private Session session; - - private RemoteVersionManager remote; - - public ClientVersionManager( - Session session, RemoteVersionManager remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** {@inheritDoc} */ - public void cancelMerge(String absPath, Version version) - throws RepositoryException { - try { - remote.cancelMerge(absPath, version.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version checkin(String absPath) throws RepositoryException { - try { - return getFactory().getVersion(session, remote.checkin(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void checkout(String absPath) throws RepositoryException { - try { - remote.checkout(absPath); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version checkpoint(String absPath) throws RepositoryException { - try { - return getFactory().getVersion(session, remote.checkpoint(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node createActivity(String title) - throws RepositoryException { - try { - return getFactory().getNode(session, remote.createActivity(title)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node createConfiguration(String absPath) - throws RepositoryException { - try { - return getFactory().getNode( - session, remote.createConfiguration(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void doneMerge(String absPath, Version version) - throws RepositoryException { - try { - remote.doneMerge(absPath, version.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node getActivity() throws RepositoryException { - try { - RemoteNode activity = remote.getActivity(); - if (activity == null) { - return null; - } else { - return getFactory().getNode(session, activity); - } - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Version getBaseVersion(String absPath) throws RepositoryException { - try { - return getFactory().getVersion( - session, remote.getBaseVersion(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public VersionHistory getVersionHistory(String absPath) - throws RepositoryException { - try { - return getFactory().getVersionHistory( - session, remote.getVersionHistory(absPath)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public boolean isCheckedOut(String absPath) throws RepositoryException { - try { - return remote.isCheckedOut(absPath); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge(Node activityNode) throws RepositoryException { - try { - RemoteIterator iterator = remote.merge(activityNode.getIdentifier()); - return getFactory().getNodeIterator(session, iterator); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge( - String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException { - try { - return getFactory().getNodeIterator( - session, remote.merge(absPath, srcWorkspace, bestEffort)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public NodeIterator merge( - String absPath, String srcWorkspace, boolean bestEffort, - boolean isShallow) throws RepositoryException { - try { - return getFactory().getNodeIterator(session, remote.merge( - absPath, srcWorkspace, bestEffort, isShallow)); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void removeActivity(Node activityNode) throws RepositoryException { - try { - remote.removeActivity(activityNode.getIdentifier()); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(Version[] versions, boolean removeExisting) - throws RepositoryException { - try { - String[] versionIdentifiers = new String[versions.length]; - for (int i = 0; i < versions.length; i++) { - versionIdentifiers[i] = versions[i].getIdentifier(); - } - remote.restore(versionIdentifiers, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(version.getIdentifier(), removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore( - String absPath, String versionName, boolean removeExisting) - throws RepositoryException { - try { - remote.restore(absPath, versionName, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restore(String absPath, Version version, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreVI(absPath, version.getIdentifier(), removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel( - String absPath, String versionLabel, boolean removeExisting) - throws RepositoryException { - try { - remote.restoreByLabel(absPath, versionLabel, removeExisting); - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - - /** {@inheritDoc} */ - public Node setActivity(Node activity) throws RepositoryException { - try { - RemoteNode remoteActivity; - if (activity == null) { - remoteActivity = remote.setActivity(null); - } else { - remoteActivity = remote.setActivity(activity.getIdentifier()); - } - if (remoteActivity == null) { - return null; - } else { - return getFactory().getNode(session, remoteActivity); - } - } catch (RemoteException e) { - throw new RemoteRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java deleted file mode 100644 index ec8e74e5394..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.QueryManager; -import javax.jcr.version.Version; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteWorkspace RemoteWorkspace} - * interface. This class makes a remote workspace locally available using - * the JCR {@link Workspace Workspace} interface. - * - * @see javax.jcr.Workspace - * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace - */ -@Deprecated(forRemoval = true) public class ClientWorkspace extends ClientObject implements Workspace { - - /** The current session. */ - private Session session; - - /** The adapted remote workspace. */ - private RemoteWorkspace remote; - - /** - * The adapted observation manager of this workspace. This field is set on - * the first call to the {@link #getObservationManager()()} method assuming, - * that the observation manager instance is not changing during the lifetime - * of a workspace instance, that is, each call to the server-side - * Workspace.getObservationManager() allways returns the same - * object. - */ - private ObservationManager observationManager; - - private LockManager lockManager; - - private VersionManager versionManager; - - /** - * Creates a client adapter for the given remote workspace. - * - * @param session current session - * @param remote remote workspace - * @param factory local adapter factory - */ - public ClientWorkspace( - Session session, RemoteWorkspace remote, - LocalAdapterFactory factory) { - super(factory); - this.session = session; - this.remote = remote; - } - - /** - * Returns the current session without contacting the remote workspace. - * - * {@inheritDoc} - */ - public Session getSession() { - return session; - } - - /** {@inheritDoc} */ - public String getName() { - try { - return remote.getName(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String from, String to) throws RepositoryException { - try { - remote.copy(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String workspace, String from, String to) - throws RepositoryException { - try { - remote.copy(workspace, from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) throws RepositoryException { - try { - remote.move(from, to); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public QueryManager getQueryManager() throws RepositoryException { - try { - RemoteQueryManager manager = remote.getQueryManager(); - return getFactory().getQueryManager(session, manager); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NamespaceRegistry getNamespaceRegistry() throws RepositoryException { - try { - RemoteNamespaceRegistry registry = remote.getNamespaceRegistry(); - return getFactory().getNamespaceRegistry(registry); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public NodeTypeManager getNodeTypeManager() throws RepositoryException { - try { - RemoteNodeTypeManager manager = remote.getNodeTypeManager(); - return getFactory().getNodeTypeManager(manager); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public ObservationManager getObservationManager() - throws RepositoryException { - if (observationManager == null) { - try { - observationManager = - getFactory(). - getObservationManager(this, remote.getObservationManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return observationManager; - } - - /** {@inheritDoc} */ - public void clone( - String workspace, String src, String dst, boolean removeExisting) - throws RepositoryException { - try { - remote.clone(workspace, src, dst, removeExisting); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAccessibleWorkspaceNames() throws RepositoryException { - try { - return remote.getAccessibleWorkspaceNames(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public ContentHandler getImportContentHandler( - final String path, final int mode) throws RepositoryException { - getSession().getItem(path); // Check that the path exists - try { - final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - return new DefaultContentHandler( - SerializingContentHandler.getSerializer(buffer)) { - public void endDocument() throws SAXException { - super.endDocument(); - try { - remote.importXML(path, buffer.toByteArray(), mode); - } catch (Exception e) { - throw new SAXException("XML import failed", e); - } - } - }; - } catch (SAXException e) { - throw new RepositoryException("XML serialization failed", e); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, InputStream xml, int uuidBehaviour) - throws IOException, RepositoryException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - byte[] bytes = new byte[4096]; - for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) { - buffer.write(bytes, 0, n); - } - remote.importXML(path, buffer.toByteArray(), uuidBehaviour); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } finally { - // JCR-2903 - try { xml.close(); } catch (IOException ignore) {} - } - } - - /** {@inheritDoc} */ - public void restore(Version[] versions, boolean removeExisting) - throws RepositoryException { - getVersionManager().restore(versions, removeExisting); - } - - public void createWorkspace(String name) throws RepositoryException { - try { - remote.createWorkspace(name, null); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void createWorkspace(String name, String srcWorkspace) - throws RepositoryException { - try { - remote.createWorkspace(name, srcWorkspace); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - public void deleteWorkspace(String name) throws RepositoryException { - try { - remote.deleteWorkspace(name); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public LockManager getLockManager() throws RepositoryException { - if (lockManager == null) { - try { - lockManager = getFactory().getLockManager( - session, remote.getLockManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return lockManager; - } - - public VersionManager getVersionManager() throws RepositoryException { - if (versionManager == null) { - try { - versionManager = getFactory().getVersionManager( - session, remote.getVersionManager()); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - return versionManager; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java deleted file mode 100644 index d9fcb0f12ff..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import javax.jcr.Repository; - -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.SerializableXid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteXASession RemoteXASession} - * interface. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ClientXASession extends ClientSession implements XAResource { - - /** - * The adapted remote transaction enabled session. - */ - private RemoteXASession remote; - - /** - * Creates a client adapter for the given remote session which is - * transaction enabled. - */ - public ClientXASession( - Repository repository, RemoteXASession remote, - LocalAdapterFactory factory) { - super(repository, remote, factory); - this.remote = remote; - } - - /** - * Returns true if the given object is a local - * adapter that refers to the same remote XA resource. - * - * @see http://blogs.sun.com/fkieviet/entry/j2ee_jca_resource_adapters_the - */ - public boolean isSameRM(XAResource xares) throws XAException { - return xares instanceof ClientXASession - && remote == ((ClientXASession) xares).remote; - } - - private XAException getXAException(RemoteException e) { - XAException exception = new XAException("Remote operation failed"); - exception.initCause(e); - return exception; - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - remote.commit(new SerializableXid(xid), onePhase); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - remote.end(new SerializableXid(xid), flags); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void forget(Xid xid) throws XAException { - try { - remote.forget(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public int getTransactionTimeout() throws XAException { - try { - return remote.getTransactionTimeout(); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public int prepare(Xid xid) throws XAException { - try { - return remote.prepare(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public Xid[] recover(int flag) throws XAException { - try { - return remote.recover(flag); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void rollback(Xid xid) throws XAException { - try { - remote.rollback(new SerializableXid(xid)); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - try { - return remote.setTransactionTimeout(seconds); - } catch (RemoteException e) { - throw getXAException(e); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - remote.start(new SerializableXid(xid), flags); - } catch (RemoteException e) { - throw getXAException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java deleted file mode 100644 index c2d1765dec3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Adapter class for exposing a {@link ContentHandler} instance as - * {@link DefaultHandler} object. - */ -@Deprecated(forRemoval = true) class DefaultContentHandler extends DefaultHandler { - - /** - * The adapted content handler instance. - */ - private final ContentHandler handler; - - /** - * Creates a {@link DefaultHandler} adapter for the given content - * handler. - * - * @param handler content handler - */ - public DefaultContentHandler(ContentHandler handler) { - this.handler = handler; - } - - //------------------------------------------------------< ContentHandler > - - /** - * Delegated to {@link #handler}. - * - * @param ch passed through - * @param start passed through - * @param length passed through - * @throws SAXException if an error occurs - */ - public void characters(char[] ch, int start, int length) - throws SAXException { - handler.characters(ch, start, length); - } - - /** - * Delegated to {@link #handler}. - * - * @throws SAXException if an error occurs - */ - public void endDocument() throws SAXException { - handler.endDocument(); - } - - /** - * Delegated to {@link #handler}. - * - * @param namespaceURI passed through - * @param localName passed through - * @param qName passed through - * @throws SAXException if an error occurs - */ - public void endElement( - String namespaceURI, String localName, String qName) - throws SAXException { - handler.endElement(namespaceURI, localName, qName); - } - - /** - * Delegated to {@link #handler}. - * - * @param prefix passed through - * @throws SAXException if an error occurs - */ - public void endPrefixMapping(String prefix) throws SAXException { - handler.endPrefixMapping(prefix); - } - - /** - * Delegated to {@link #handler}. - * - * @param ch passed through - * @param start passed through - * @param length passed through - * @throws SAXException if an error occurs - */ - public void ignorableWhitespace(char[] ch, int start, int length) - throws SAXException { - handler.ignorableWhitespace(ch, start, length); - } - - /** - * Delegated to {@link #handler}. - * - * @param target passed through - * @param data passed through - * @throws SAXException if an error occurs - */ - public void processingInstruction(String target, String data) - throws SAXException { - handler.processingInstruction(target, data); - } - - /** - * Delegated to {@link #handler}. - * - * @param locator passed through - */ - public void setDocumentLocator(Locator locator) { - handler.setDocumentLocator(locator); - } - - /** - * Delegated to {@link #handler}. - * - * @param name passed through - * @throws SAXException if an error occurs - */ - public void skippedEntity(String name) throws SAXException { - handler.skippedEntity(name); - } - - /** - * Delegated to {@link #handler}. - * - * @throws SAXException if an error occurs - */ - public void startDocument() throws SAXException { - handler.startDocument(); - } - - /** - * Delegated to {@link #handler}. - * - * @param namespaceURI passed through - * @param localName passed through - * @param qName passed through - * @param atts passed through - * @throws SAXException if an error occurs - */ - public void startElement( - String namespaceURI, String localName, String qName, - Attributes atts) throws SAXException { - handler.startElement(namespaceURI, localName, qName, atts); - } - - /** - * Delegated to {@link #handler}. - * - * @param prefix passed through - * @param uri passed through - * @throws SAXException if an error occurs - */ - public void startPrefixMapping(String prefix, String uri) - throws SAXException { - handler.startPrefixMapping(prefix, uri); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java deleted file mode 100644 index 611860c072c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for creating local adapters for remote references. - * This interface defines how remote JCR-RMI references are adapted - * back to the normal JCR interfaces. The adaption mechanism can be - * modified (for example to add extra features) by changing the - * local adapter factory used by the repository client. - *

    - * Note that the - * {@link org.apache.jackrabbit.rmi.client.ClientObject ClientObject} - * base class provides a number of utility methods designed to work with - * a local adapter factory. Adapter implementations may want to inherit - * that functionality by subclassing from ClientObject. - * - * @see org.apache.jackrabbit.rmi.server.RemoteAdapterFactory - * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory - * @see org.apache.jackrabbit.rmi.client.ClientObject - */ -@Deprecated(forRemoval = true) public interface LocalAdapterFactory { - - /** - * Factory method for creating a local adapter for a remote repository. - * - * @param remote remote repository - * @return local repository adapter - */ - Repository getRepository(RemoteRepository remote); - - /** - * Factory method for creating a local adapter for a remote session. - * - * @param repository current repository - * @param remote remote session - * @return local session adapter - */ - Session getSession(Repository repository, RemoteSession remote); - - /** - * Factory method for creating a local adapter for a remote workspace. - * - * @param session current session - * @param remote remote workspace - * @return local workspace adapter - */ - Workspace getWorkspace(Session session, RemoteWorkspace remote); - - /** - * Factory method for creating a local adapter for a remote observation - * manager. - * - * @param workspace current workspace - * @param remote remote observation manager - * @return local observation manager adapter - */ - ObservationManager getObservationManager(Workspace workspace, - RemoteObservationManager remote); - - /** - * Factory method for creating a local adapter for a remote namespace - * registry. - * - * @param remote remote namespace registry - * @return local namespace registry adapter - */ - NamespaceRegistry getNamespaceRegistry(RemoteNamespaceRegistry remote); - - /** - * Factory method for creating a local adapter for a remote node type - * manager. - * - * @param remote remote node type manager - * @return local node type manager adapter - */ - NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote); - - /** - * Factory method for creating a local adapter for a remote item. - * Note that before calling this method, the client may want to - * introspect the remote item reference to determine whether to use the - * {@link #getNode(Session, RemoteNode) getNode} or - * {@link #getProperty(Session, RemoteProperty) getProperty} method - * instead, as the adapter returned by this method will only cover - * the basic {@link Item Item} interface. - * - * @param session current session - * @param remote remote item - * @return local item adapter - */ - Item getItem(Session session, RemoteItem remote); - - /** - * Factory method for creating a local adapter for a remote property. - * - * @param session current session - * @param remote remote property - * @return local property adapter - */ - Property getProperty(Session session, RemoteProperty remote); - - /** - * Factory method for creating a local adapter for a remote node. - * - * @param session current session - * @param remote remote node - * @return local node adapter - */ - Node getNode(Session session, RemoteNode remote); - - /** - * Factory method for creating a local adapter for a remote version. - * - * @param session current session - * @param remote remote version - * @return local version adapter - */ - Version getVersion(Session session, RemoteVersion remote); - - /** - * Factory method for creating a local adapter for a remote version history. - * - * @param session current session - * @param remote remote version history - * @return local version history adapter - */ - VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote); - - /** - * Factory method for creating a local adapter for a remote node type. - * - * @param remote remote node type - * @return local node type adapter - */ - NodeType getNodeType(RemoteNodeType remote); - - /** - * Factory method for creating a local adapter for a remote item - * definition. Note that before calling this method, the client may want to - * introspect the remote item definition to determine whether to use the - * {@link #getNodeDef(RemoteNodeDefinition) getNodeDef} or - * {@link #getPropertyDef(RemotePropertyDefinition) getPropertyDef} method - * instead, as the adapter returned by this method will only cover - * the {@link ItemDefinition ItemDef} base interface. - * - * @param remote remote item definition - * @return local item definition adapter - */ - ItemDefinition getItemDef(RemoteItemDefinition remote); - - /** - * Factory method for creating a local adapter for a remote node - * definition. - * - * @param remote remote node definition - * @return local node definition adapter - */ - NodeDefinition getNodeDef(RemoteNodeDefinition remote); - - /** - * Factory method for creating a local adapter for a remote property - * definition. - * - * @param remote remote property definition - * @return local property definition adapter - */ - PropertyDefinition getPropertyDef(RemotePropertyDefinition remote); - - /** - * Factory method for creating a local adapter for a remote lock. - * - * @param session current session - * @param remote remote lock - * @return local lock adapter - */ - Lock getLock(Session session, RemoteLock remote); - - /** - * Factory method for creating a local adapter for a remote query manager. - * - * @param session current session - * @param remote remote query manager - * @return local query manager adapter - */ - QueryManager getQueryManager(Session session, RemoteQueryManager remote); - - /** - * Factory method for creating a local adapter for a remote query. - * - * @param session current session - * @param remote remote query - * @return local query adapter - */ - Query getQuery(Session session, RemoteQuery remote); - - /** - * Factory method for creating a local adapter for a remote query result. - * - * @param session current session - * @param remote remote query result - * @return local query result adapter - */ - QueryResult getQueryResult(Session session, RemoteQueryResult remote); - - /** - * Factory method for creating a local adapter for a remote query row. - * - * @param session current session - * @param remote remote query row - * @return local query row adapter - */ - Row getRow(Session session, RemoteRow remote); - - /** - * Factory method for creating a local adapter for a remote node iterator. - * - * @param session current session - * @param remote remote node iterator - * @return local node iterator adapter - */ - NodeIterator getNodeIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote property iterator. - * - * @param session current session - * @param remote remote property iterator - * @return local property iterator adapter - */ - PropertyIterator getPropertyIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote version iterator. - * - * @param session current session - * @param remote remote version iterator - * @return local version iterator adapter - */ - VersionIterator getVersionIterator(Session session, RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote - * node type iterator. - * - * @param remote remote node type iterator - * @return local node type iterator adapter - */ - NodeTypeIterator getNodeTypeIterator(RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote row iterator. - * - * @param session current session - * @param remote remote row iterator - * @return local row iterator adapter - */ - RowIterator getRowIterator(Session session, RemoteIterator remote); - - LockManager getLockManager(Session session, RemoteLockManager lockManager); - - VersionManager getVersionManager( - Session session, RemoteVersionManager versionManager); - - /** - * Factory method for creating a local adapter for a remote access control - * manager - * - * @param remote remote access control manager - * @return local access control manager - */ - AccessControlManager getAccessControlManager( - RemoteAccessControlManager remote); - - /** - * Factory method for creating a local adapter for a remote access control - * policy - * - * @param remote remote access control policy - * @return local access control policy - */ - AccessControlPolicy getAccessControlPolicy(RemoteAccessControlPolicy remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote access control policies - * - * @param remote array of remote access control policies - * @return array of local access control policies - */ - AccessControlPolicy[] getAccessControlPolicy( - RemoteAccessControlPolicy[] remote); - - /** - * Factory method for creating a local adapter for a remote access control - * policy iterator - * - * @param remote access control policy iterator - * @return local access control policy iterator - */ - AccessControlPolicyIterator getAccessControlPolicyIterator( - RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote access control - * entry - * - * @param remote remote access control entry - * @return local access control entry - */ - AccessControlEntry getAccessControlEntry(RemoteAccessControlEntry remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote access control entry - * - * @param remote array of remote access control entry - * @return local array of access control entry - */ - AccessControlEntry[] getAccessControlEntry(RemoteAccessControlEntry[] remote); - - /** - * Factory method for creating a local adapter for a remote principal. - *

    - * If remote is a {@link RemoteGroup} the - * principal returned implements the org.apache.jackrabbit.api.security.principal.GroupPrincipal - * interface. - * - * @param remote principal - * @return local principal - */ - Principal getPrincipal(RemotePrincipal remote); - - /** - * Factory method for creating a local adapter for a remote principal - * iterator. - *

    - * Each entry in the remote iterator which is a - * {@link RemoteGroup} will be - * provided as a principal implementing the - * org.apache.jackrabbit.api.security.principal.GroupPrincipal interface. - * - * @param remote remote principal iterator - * @return local principal iterator - */ - Iterator getPrincipalIterator(RemoteIterator remote); - - /** - * Factory method for creating a local adapter for a remote privilege - * - * @param remote remote privilege - * @return local privilege - */ - Privilege getPrivilege(RemotePrivilege remote); - - /** - * Factory method for creating an array of local adapter for an array of - * remote privilege - * - * @param remote array of remote privilege - * @return array of local privilege - */ - Privilege[] getPrivilege(RemotePrivilege[] remote); - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java deleted file mode 100644 index ef22fd94cbe..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR-RMI remote exception. Used by the JCR-RMI client to wrap RMI errors - * into RepositoryExceptions to avoid breaking the JCR interfaces. - *

    - * Note that if a RemoteException is received by call with no declared - * exceptions, then the RemoteException is wrapped into a - * RemoteRuntimeException. - */ -@Deprecated(forRemoval = true) public class RemoteRepositoryException extends RepositoryException { - - /** - * Creates a RemoteRepositoryException based on the given RemoteException. - * - * @param ex the remote exception - */ - public RemoteRepositoryException(RemoteException ex) { - super(ex); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java deleted file mode 100644 index a446e51179d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR-RMI remote runtime exception. Used by the JCR-RMI client to wrap - * RMI errors into RuntimeExceptions to avoid breaking the JCR interfaces. - *

    - * Note that if a RemoteException is received by call that declares to - * throw RepositoryExceptions, then the RemoteException is wrapped into - * a RemoteRepositoryException. - */ -@Deprecated(forRemoval = true) public class RemoteRuntimeException extends RuntimeException { - - /** - * Creates a RemoteRuntimeException based on the given RemoteException. - * - * @param ex the remote exception - */ - public RemoteRuntimeException(RemoteException ex) { - super(ex); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java deleted file mode 100644 index c9981ba0092..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A "safe" local adapter for the JCR-RMI - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. This class uses an abstract factory method for loading - * (and reloading) the remote repository instance that is made locally - * available through the JCR {@link Repository} interface. If the remote - * reference breaks (a RemoteException is thrown by a remote call), then - * this adapter attempts to reload the remote reference once before failing. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public abstract class SafeClientRepository extends ClientObject - implements Repository { - - /** The adapted remote repository. */ - private RemoteRepository remote; - - /** - * Creates a client adapter for the given remote repository. - * - * @param factory local adapter factory - */ - public SafeClientRepository(LocalAdapterFactory factory) { - super(factory); - try { - remote = getRemoteRepository(true); - } catch (RemoteException e) { - remote = new BrokenRemoteRepository(e); - } - } - - /** - * Abstract factory class for getting the remote repository. - * - * @return remote repository - * @throws RemoteException if the remote repository could not be accessed - */ - protected abstract RemoteRepository getRemoteRepository() - throws RemoteException; - - /** - * Method to obtain the remote remote repository. - * If initialize is true and a RepositoryException will be thrown no {@link BrokenRemoteRepository} - * will be created. - * - * @return remote repository - * @throws RemoteException if the remote repository could not be accessed - */ - protected RemoteRepository getRemoteRepository(boolean initialize) - throws RemoteException { - if (initialize) { - try { - return getRemoteRepository(); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } else { - return getRemoteRepository(); - } - } - - /** {@inheritDoc} */ - public synchronized String getDescriptor(String name) { - try { - return remote.getDescriptor(name); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptor(name); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized String[] getDescriptorKeys() { - try { - return remote.getDescriptorKeys(); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorKeys(); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - private synchronized RemoteSession remoteLogin( - Credentials credentials, String workspace) - throws RepositoryException { - try { - return remote.login(credentials, workspace); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.login(credentials, workspace); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRepositoryException(e2); - } - } - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - RemoteSession session = remoteLogin(credentials, workspace); - return getFactory().getSession(this, session); - } - - /** {@inheritDoc} */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - - /** {@inheritDoc} */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** {@inheritDoc} */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** {@inheritDoc} */ - public synchronized Value getDescriptorValue(String key) { - try { - return remote.getDescriptorValue(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorValue(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized Value[] getDescriptorValues(String key) { - try { - return remote.getDescriptorValues(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.getDescriptorValues(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized boolean isSingleValueDescriptor(String key) { - try { - return remote.isSingleValueDescriptor(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.isSingleValueDescriptor(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - - /** {@inheritDoc} */ - public synchronized boolean isStandardDescriptor(String key) { - try { - return remote.isStandardDescriptor(key); - } catch (RemoteException e1) { - try { - remote = getRemoteRepository(false); - return remote.isStandardDescriptor(key); - } catch (RemoteException e2) { - remote = new BrokenRemoteRepository(e2); - throw new RemoteRuntimeException(e2); - } - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java deleted file mode 100644 index a50bcdafe45..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client; - -import java.io.OutputStream; -import java.io.StringWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Result; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; -import javax.xml.transform.stream.StreamResult; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.AttributesImpl; -import org.xml.sax.helpers.DefaultHandler; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A {@link ContentHandler} that serializes SAX events to a given - * {@link Result} instance. The JAXP {@link SAXTransformerFactory} - * facility is used for the serialization. - *

    - * This class explicitly ensures that all namespace prefixes are also - * present as xmlns attributes in the serialized XML document. This avoids - * problems with Xalan's serialization behaviour which was (at least during - * JDK 1.4) to ignore namespaces if they were not present as xmlns attributes. - *

    - * NOTE: The code in this class was originally written for Apache Cocoon and - * is included with some modifications here in Apache Jackrabbit. See the - * org.apache.cocoon.serialization.AbstractTextSerializer class in the - * cocoon-pipeline-impl component for the original code. - */ -@Deprecated(forRemoval = true) class SerializingContentHandler extends DefaultContentHandler { - - /** - * The character encoding used for serialization (UTF-8). - * The encoding is fixed to make the text/xml content type safer to use. - * - * @see https://issues.apache.org/jira/browse/JCR-1621 - */ - public static final String ENCODING = "UTF-8"; - - /** The URI for xml namespaces */ - private static final String XML = "http://www.w3.org/XML/1998/namespace"; - - /** - * The factory used to create serializing SAX transformers. - */ - private static final SAXTransformerFactory FACTORY = - // Note that the cast from below is strictly speaking only valid when - // the factory instance supports the SAXTransformerFactory.FEATURE - // feature. But since this class would be useless without this feature, - // it's no problem to fail with a ClassCastException here and prevent - // this class from even being loaded. AFAIK all common JAXP - // implementations do support this feature. - (SAXTransformerFactory) TransformerFactory.newInstance(); - - /** - * Flag that indicates whether we need to work around the issue of - * the serializer not automatically generating the required xmlns - * attributes for the namespaces used in the document. - */ - private static final boolean NEEDS_XMLNS_ATTRIBUTES = - needsXmlnsAttributes(); - - /** - * Probes the available XML serializer for xmlns support. Used to set - * the value of the {@link #NEEDS_XMLNS_ATTRIBUTES} flag. - * - * @return whether the XML serializer needs explicit xmlns attributes - */ - private static boolean needsXmlnsAttributes() { - try { - StringWriter writer = new StringWriter(); - TransformerHandler probe = FACTORY.newTransformerHandler(); - probe.setResult(new StreamResult(writer)); - probe.startDocument(); - probe.startPrefixMapping("p", "uri"); - probe.startElement("uri", "e", "p:e", new AttributesImpl()); - probe.endElement("uri", "e", "p:e"); - probe.endPrefixMapping("p"); - probe.endDocument(); - return writer.toString().indexOf("xmlns") == -1; - } catch (Exception e) { - throw new UnsupportedOperationException("XML serialization fails"); - } - } - - /** - * Creates a serializing content handler that writes to the given stream. - * - * @param stream serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(OutputStream output) - throws SAXException { - return getSerializer(new StreamResult(output)); - } - - /** - * Creates a serializing content handler that writes to the given writer. - * - * @param writer serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(Writer writer) - throws SAXException { - return getSerializer(new StreamResult(writer)); - } - - /** - * Creates a serializing content handler that writes to the given result. - * - * @param result serialization target - * @return serializing content handler - * @throws SAXException if the content handler could not be initialized - */ - public static DefaultHandler getSerializer(Result result) - throws SAXException { - try { - TransformerHandler handler = FACTORY.newTransformerHandler(); - handler.setResult(result); - - // Specify the output properties to avoid surprises especially in - // character encoding or the output method (might be html for some - // documents!) - Transformer transformer = handler.getTransformer(); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING); - transformer.setOutputProperty(OutputKeys.INDENT, "no"); - - if (NEEDS_XMLNS_ATTRIBUTES) { - // The serializer does not output xmlns declarations, - // so we need to do it explicitly with this wrapper - return new SerializingContentHandler(handler); - } else { - return new DefaultContentHandler(handler); - } - } catch (TransformerConfigurationException e) { - throw new SAXException("Failed to initialize XML serializer", e); - } - } - - /** - * The prefixes of startPrefixMapping() declarations for the coming element. - */ - private List prefixList = new ArrayList(); - - /** - * The URIs of startPrefixMapping() declarations for the coming element. - */ - private List uriList = new ArrayList(); - - /** - * Maps of URI<->prefix mappings. Used to work around a bug in the Xalan - * serializer. - */ - private Map uriToPrefixMap = new HashMap(); - private Map prefixToUriMap = new HashMap(); - - /** - * True if there has been some startPrefixMapping() for the coming element. - */ - private boolean hasMappings = false; - - /** - * Stack of the prefixes of explicitly generated prefix mapping calls - * per each element level. An entry is appended at the beginning of each - * {@link #startElement(String, String, String, Attributes)} call and - * removed at the end of each {@link #endElement(String, String, String)} - * call. By default the entry for each element is null to - * avoid losing performance, but whenever the code detects a new prefix - * mapping that needs to be registered, the null entry is - * replaced with a list of explicitly registered prefixes for that node. - * When that element is closed, the listed prefixes get unmapped. - * - * @see #checkPrefixMapping(String, String) - * @see JCR-1767 - */ - private final List addedPrefixMappings = new ArrayList(); - - private SerializingContentHandler(ContentHandler handler) { - super(handler); - } - - public void startDocument() throws SAXException { - // Cleanup - this.uriToPrefixMap.clear(); - this.prefixToUriMap.clear(); - clearMappings(); - super.startDocument(); - } - - /** - * Track mappings to be able to add xmlns: attributes - * in startElement(). - */ - public void startPrefixMapping(String prefix, String uri) throws SAXException { - // Store the mappings to reconstitute xmlns:attributes - // except prefixes starting with "xml": these are reserved - // VG: (uri != null) fixes NPE in startElement - if (uri != null && !prefix.startsWith("xml")) { - this.hasMappings = true; - this.prefixList.add(prefix); - this.uriList.add(uri); - - // append the prefix colon now, in order to save concatenations later, but - // only for non-empty prefixes. - if (prefix.length() > 0) { - this.uriToPrefixMap.put(uri, prefix + ":"); - } else { - this.uriToPrefixMap.put(uri, prefix); - } - - this.prefixToUriMap.put(prefix, uri); - } - super.startPrefixMapping(prefix, uri); - } - - /** - * Checks whether a prefix mapping already exists for the given namespace - * and generates the required {@link #startPrefixMapping(String, String)} - * call if the mapping is not found. By default the registered prefix - * is taken from the given qualified name, but a different prefix is - * automatically selected if that prefix is already used. - * - * @see JCR-1767 - * @param uri namespace URI - * @param qname element name with the prefix, or null - * @throws SAXException if the prefix mapping can not be added - */ - private void checkPrefixMapping(String uri, String qname) - throws SAXException { - // Only add the prefix mapping if the URI is not already known - if (uri != null && uri.length() > 0 && !uri.startsWith("xml") - && !uriToPrefixMap.containsKey(uri)) { - // Get the prefix - String prefix = "ns"; - if (qname != null && qname.length() > 0) { - int colon = qname.indexOf(':'); - if (colon != -1) { - prefix = qname.substring(0, colon); - } - } - - // Make sure that the prefix is unique - String base = prefix; - for (int i = 2; prefixToUriMap.containsKey(prefix); i++) { - prefix = base + i; - } - - int last = addedPrefixMappings.size() - 1; - List prefixes = (List) addedPrefixMappings.get(last); - if (prefixes == null) { - prefixes = new ArrayList(); - addedPrefixMappings.set(last, prefixes); - } - prefixes.add(prefix); - - startPrefixMapping(prefix, uri); - } - } - - /** - * Ensure all namespace declarations are present as xmlns: attributes - * and add those needed before calling superclass. This is a workaround for a Xalan bug - * (at least in version 2.0.1) : org.apache.xalan.serialize.SerializerToXML - * ignores start/endPrefixMapping(). - */ - public void startElement( - String eltUri, String eltLocalName, String eltQName, Attributes attrs) - throws SAXException { - // JCR-1767: Generate extra prefix mapping calls where needed - addedPrefixMappings.add(null); - checkPrefixMapping(eltUri, eltQName); - for (int i = 0; i < attrs.getLength(); i++) { - checkPrefixMapping(attrs.getURI(i), attrs.getQName(i)); - } - - // try to restore the qName. The map already contains the colon - if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { - eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; - } - if (this.hasMappings) { - // Add xmlns* attributes where needed - - // New Attributes if we have to add some. - AttributesImpl newAttrs = null; - - int mappingCount = this.prefixList.size(); - int attrCount = attrs.getLength(); - - for (int mapping = 0; mapping < mappingCount; mapping++) { - - // Build infos for this namespace - String uri = (String) this.uriList.get(mapping); - String prefix = (String) this.prefixList.get(mapping); - String qName = prefix.equals("") ? "xmlns" : ("xmlns:" + prefix); - - // Search for the corresponding xmlns* attribute - boolean found = false; - for (int attr = 0; attr < attrCount; attr++) { - if (qName.equals(attrs.getQName(attr))) { - // Check if mapping and attribute URI match - if (!uri.equals(attrs.getValue(attr))) { - throw new SAXException("URI in prefix mapping and attribute do not match"); - } - found = true; - break; - } - } - - if (!found) { - // Need to add this namespace - if (newAttrs == null) { - // Need to test if attrs is empty or we go into an infinite loop... - // Well know SAX bug which I spent 3 hours to remind of :-( - if (attrCount == 0) { - newAttrs = new AttributesImpl(); - } else { - newAttrs = new AttributesImpl(attrs); - } - } - - if (prefix.equals("")) { - newAttrs.addAttribute(XML, qName, qName, "CDATA", uri); - } else { - newAttrs.addAttribute(XML, prefix, qName, "CDATA", uri); - } - } - } // end for mapping - - // Cleanup for the next element - clearMappings(); - - // Start element with new attributes, if any - super.startElement(eltUri, eltLocalName, eltQName, newAttrs == null ? attrs : newAttrs); - } else { - // Normal job - super.startElement(eltUri, eltLocalName, eltQName, attrs); - } - } - - - /** - * Receive notification of the end of an element. - * Try to restore the element qName. - */ - public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException { - // try to restore the qName. The map already contains the colon - if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) { - eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName; - } - - super.endElement(eltUri, eltLocalName, eltQName); - - // JCR-1767: Generate extra prefix un-mapping calls where needed - int last = addedPrefixMappings.size() - 1; - List prefixes = (List) addedPrefixMappings.remove(last); - if (prefixes != null) { - Iterator iterator = prefixes.iterator(); - while (iterator.hasNext()) { - endPrefixMapping((String) iterator.next()); - } - } - } - - /** - * End the scope of a prefix-URI mapping: - * remove entry from mapping tables. - */ - public void endPrefixMapping(String prefix) throws SAXException { - // remove mappings for xalan-bug-workaround. - // Unfortunately, we're not passed the uri, but the prefix here, - // so we need to maintain maps in both directions. - if (this.prefixToUriMap.containsKey(prefix)) { - this.uriToPrefixMap.remove(this.prefixToUriMap.get(prefix)); - this.prefixToUriMap.remove(prefix); - } - - if (hasMappings) { - // most of the time, start/endPrefixMapping calls have an element event between them, - // which will clear the hasMapping flag and so this code will only be executed in the - // rather rare occasion when there are start/endPrefixMapping calls with no element - // event in between. If we wouldn't remove the items from the prefixList and uriList here, - // the namespace would be incorrectly declared on the next element following the - // endPrefixMapping call. - int pos = prefixList.lastIndexOf(prefix); - if (pos != -1) { - prefixList.remove(pos); - uriList.remove(pos); - } - } - - super.endPrefixMapping(prefix); - } - - public void endDocument() throws SAXException { - // Cleanup - this.uriToPrefixMap.clear(); - this.prefixToUriMap.clear(); - clearMappings(); - super.endDocument(); - } - - private void clearMappings() { - this.hasMappings = false; - this.prefixList.clear(); - this.uriList.clear(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java deleted file mode 100644 index dfc4123c1c2..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A buffering local adapter for the JCR-RMI {@link RemoteIterator} - * interface. This class makes the remote iterator locally available - * using the JCR {@link RangeIterator} interface. The element arrays - * returned by the remote iterator are buffered locally. - *

    - * See the subclasses for type-specific versions of this abstract class. - */ -@Deprecated(forRemoval = true) public abstract class ClientIterator extends ClientObject - implements RangeIterator { - - /** The adapted remote iterator. */ - private final RemoteIterator remote; - - /** - * The cached number of elements in the iterator, -1 if the iterator - * size is unknown, or -2 if the size has not been retrieved from the - * remote iterator. - */ - private long size; - - /** The position of the buffer within the iteration. */ - private long positionOfBuffer; - - /** The position within the buffer of the iteration. */ - private int positionInBuffer; - - /** - * The element buffer. Set to null when the end of the - * iteration has been reached. - */ - private Object[] buffer; - - /** - * Creates a local adapter for the given remote iterator. The element - * buffer is initially empty. - * - * @param remote remote iterator - * @param factory local adapter factory - */ - public ClientIterator(RemoteIterator remote, LocalAdapterFactory factory) { - super(factory); - this.remote = remote; - this.size = -2; - this.positionOfBuffer = 0; - this.positionInBuffer = 0; - this.buffer = new Object[0]; - } - - /** - * Returns the current position within the iterator. - * - * @return current position - * @see RangeIterator#getPosition() - */ - public long getPosition() { - return positionOfBuffer + positionInBuffer; - } - - /** - * Returns the size (the total number of elements) of this iteration. - * Returns -1 if the size is unknown. - *

    - * To minimize the number of remote method calls, the size is retrieved - * when this method is first called and cached for subsequent invocations. - * - * @return number of elements in the iteration, or -1 - * @throws RemoteRuntimeException on RMI errors - * @see RangeIterator#getSize() - */ - public long getSize() throws RemoteRuntimeException { - if (size == -2) { - try { - size = remote.getSize(); - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - return size; - } - - /** - * Skips the given number of elements in this iteration. - *

    - * The elements in the local element buffer are skipped first, and - * a remote skip method call is made only if more elements are being - * skipped than remain in the local buffer. - * - * @param skipNum the number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteRuntimeException on RMI errors - * @see RangeIterator#skip(long) - */ - public void skip(long skipNum) - throws NoSuchElementException, RemoteRuntimeException { - if (skipNum < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (buffer == null && skipNum > 0) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (positionInBuffer + skipNum <= buffer.length) { - positionInBuffer += skipNum; - } else { - try { - skipNum -= buffer.length - positionInBuffer; - remote.skip(skipNum); - positionInBuffer = buffer.length; - positionOfBuffer += skipNum; - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } catch (NoSuchElementException e) { - buffer = null; // End of iterator reached - throw e; - } - } - } - - /** - * Advances the element buffer if there are no more elements in it. The - * element buffer is set to null if the end of the iteration - * has been reached. - * - * @throws RemoteException on RMI errors - */ - private void advance() throws RemoteException { - if (buffer != null && positionInBuffer == buffer.length) { - positionOfBuffer += buffer.length; - positionInBuffer = 0; - buffer = remote.nextObjects(); - if (buffer == null) { - size = positionOfBuffer; - } - } - } - - /** - * Checks if there are more elements in this iteration. - * - * @return true if there are more elements, - * false otherwise - * @throws RemoteRuntimeException on RMI errors - */ - public boolean hasNext() throws RemoteRuntimeException { - try { - advance(); - return buffer != null; - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - - /** - * Returns a local adapter for the given remote object. This abstract - * method is used by {@link #next()} to convert the remote references - * returned by the remote iterator to local adapters. - *

    - * Subclasses should implement this method to use the local adapter - * factory to create local adapters of the specific element type. - * - * @param remote remote object - * @return local adapter - */ - protected abstract Object getObject(Object remote); - - /** - * Returns the next element in this iteration. - * - * @return next element - * @throws NoSuchElementException if there are no more elements - * @throws RemoteRuntimeException on RMI errors - */ - public Object next() throws NoSuchElementException, RemoteRuntimeException { - try { - advance(); - if (buffer == null) { - throw new NoSuchElementException("End of iterator reached"); - } else { - return getObject(buffer[positionInBuffer++]); - } - } catch (RemoteException e) { - throw new RemoteRuntimeException(e); - } - } - - /** - * Not supported. - * - * @throws UnsupportedOperationException always thrown - */ - public void remove() throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java deleted file mode 100644 index 71c7e121489..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote nodes. - */ -@Deprecated(forRemoval = true) public class ClientNodeIterator extends ClientIterator implements NodeIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientNodeIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientNodeIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote node. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getNode(session, (RemoteNode) remote); - } - - /** - * Returns the next node in this iteration. - * - * @return next node - * @see NodeIterator#nextNode() - */ - public Node nextNode() { - return (Node) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java deleted file mode 100644 index 8bf80cbf30b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote node types. - */ -@Deprecated(forRemoval = true) public class ClientNodeTypeIterator extends ClientIterator - implements NodeTypeIterator { - - /** - * Creates a ClientNodeTypeIterator instance. - * - * @param iterator remote iterator - * @param factory local adapter factory - */ - public ClientNodeTypeIterator( - RemoteIterator iterator, LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** - * Creates and returns a local adapter for the given remote node. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getNodeType((RemoteNodeType) remote); - } - - /** - * Returns the next node type in this iteration. - * - * @return next node type - * @see NodeTypeIterator#nextNodeType() - */ - public NodeType nextNodeType() { - return (NodeType) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java deleted file mode 100644 index 47e7a35ffae..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Session; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote properties. - */ -@Deprecated(forRemoval = true) public class ClientPropertyIterator extends ClientIterator - implements PropertyIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientPropertyIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientPropertyIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote property. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getProperty(session, (RemoteProperty) remote); - } - - /** - * Returns the next property in this iteration. - * - * @return next property - * @see PropertyIterator#nextProperty() - */ - public Property nextProperty() { - return (Property) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java deleted file mode 100644 index 6774b10ce07..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Session; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteRow; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote rows. - */ -@Deprecated(forRemoval = true) public class ClientRowIterator extends ClientIterator implements RowIterator { - - /** Current session. */ - private Session session; - - /** - * Creates a ClientRowIterator instance. - * - * @param iterator remote iterator - * @param factory local adapter factory - */ - public ClientRowIterator(Session session, - RemoteIterator iterator, LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote row. - * - * @param remote remote reference - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getRow(session, (RemoteRow) remote); - } - - /** - * Returns the next row in this iteration. - * - * @return next row - * @see RowIterator#nextRow() - */ - public Row nextRow() { - return (Row) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java deleted file mode 100644 index 4d1cd98ccad..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.iterator; - -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote versions. - */ -@Deprecated(forRemoval = true) public class ClientVersionIterator extends ClientIterator - implements VersionIterator { - - /** The current session. */ - private final Session session; - - /** - * Creates a ClientVersionIterator instance. - * - * @param iterator remote iterator - * @param session current session - * @param factory local adapter factory - */ - public ClientVersionIterator( - RemoteIterator iterator, Session session, - LocalAdapterFactory factory) { - super(iterator, factory); - this.session = session; - } - - /** - * Creates and returns a local adapter for the given remote version. - * - * @param remote remote referecne - * @return local adapter - * @see ClientIterator#getObject(Object) - */ - protected Object getObject(Object remote) { - return getFactory().getVersion(session, (RemoteVersion) remote); - } - - /** - * Returns the next version in this iteration. - * - * @return next version - * @see VersionIterator#nextVersion() - */ - public Version nextVersion() { - return (Version) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java deleted file mode 100755 index ad196f8e5b6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java deleted file mode 100755 index 75e643f9218..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java deleted file mode 100644 index 8953b1acbba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Enumeration; -import java.util.Iterator; - -import org.apache.jackrabbit.api.security.principal.GroupPrincipal; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface. - * - * @see RemoteGroup - */ -@Deprecated(forRemoval = true) public class ClientGroup extends ClientPrincipal implements GroupPrincipal { - - private final LocalAdapterFactory factory; - - public ClientGroup(final RemotePrincipal p, - final LocalAdapterFactory factory) { - super(p); - this.factory = factory; - } - - /** - * @return false - this method is not implemented yet - */ - public boolean addMember(Principal user) { - // no support for adding member here - return false; - } - - public boolean isMember(Principal member) { - try { - return ((RemoteGroup) getRemotePrincipal()).isMember(member.getName()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - public Enumeration members() { - try { - final RemoteIterator remote = ((RemoteGroup) getRemotePrincipal()).members(); - final Iterator pi = factory.getPrincipalIterator(remote); - return new Enumeration() { - public boolean hasMoreElements() { - return pi.hasNext(); - } - - public Principal nextElement() { - return pi.next(); - } - }; - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** - * @return false - this method is not implemented yet - */ - public boolean removeMember(Principal user) { - // no support for removing member here - return false; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java deleted file mode 100644 index 24420e51817..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import java.rmi.RemoteException; -import java.security.Principal; - -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal} - * interface. This class makes a remote principal locally available using the - * Java {@link Principal} interface. - * - * @see Principal - * @see RemotePrincipal - */ -@Deprecated(forRemoval = true) public class ClientPrincipal implements Principal { - - private final RemotePrincipal p; - - public ClientPrincipal(final RemotePrincipal p) { - this.p = p; - } - - /** {@inheritDoc} */ - public String getName() { - try { - return p.getName(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** - * Returns the {@link RemotePrincipal} encapsulated in this instance. - *

    - * NOTE: This method is intended to only be used in the JCR RMI - * implementation to be able to "send back" remote principals to the server - * for implementation of the remote JCR API. - * - * @return the {@link RemotePrincipal} encapsulated in this instance. - */ - public final RemotePrincipal getRemotePrincipal() { - return p; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java deleted file mode 100644 index 31f893b9e10..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.principal; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote principals - */ -@Deprecated(forRemoval = true) public class ClientPrincipalIterator extends ClientIterator { - - public ClientPrincipalIterator(final RemoteIterator iterator, - final LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** {@inheritDoc} */ - @Override - protected Object getObject(Object remote) { - return getFactory().getPrincipal((RemotePrincipal) remote); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java deleted file mode 100755 index 8dd28b896ab..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("4.0.0") -package org.apache.jackrabbit.rmi.client.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java deleted file mode 100644 index 1e1b3251c3d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry - * RemoteAccessControlEntry} interface. This class makes a remote - * AccessControlEntry locally available using the JCR {@link AccessControlEntry - * AccessControlEntry} interface. - * - * @see javax.jcr.security.AccessControlEntry - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry - */ -@Deprecated(forRemoval = true) public class ClientAccessControlEntry extends ClientObject implements - AccessControlEntry { - - private final RemoteAccessControlEntry race; - - public ClientAccessControlEntry(final RemoteAccessControlEntry race, - final LocalAdapterFactory factory) { - super(factory); - this.race = race; - } - - /** {@inheritDoc} */ - public Principal getPrincipal() { - try { - return getFactory().getPrincipal(race.getPrincipal()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public Privilege[] getPrivileges() { - try { - return getFactory().getPrivilege(race.getPrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - RemoteAccessControlEntry getRemoteAccessControlEntry() { - return race; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java deleted file mode 100644 index c497d95bac0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlList - * RemoteAccessControlList} interface. This class makes a remote - * AccessControlList locally available using the JCR {@link AccessControlList - * AccessControlList} interface. - * - * @see javax.jcr.security.AccessControlList - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList - */ -@Deprecated(forRemoval = true) public class ClientAccessControlList extends ClientAccessControlPolicy - implements AccessControlList { - - public ClientAccessControlList(final RemoteAccessControlList racl, - final LocalAdapterFactory factory) { - super(racl, factory); - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public boolean addAccessControlEntry(Principal principal, - Privilege[] privileges) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException( - "addAccessControlEntry"); - } - - /** {@inheritDoc} */ - public AccessControlEntry[] getAccessControlEntries() - throws RepositoryException { - try { - return getFactory().getAccessControlEntry( - ((RemoteAccessControlList) getRemoteAccessControlPolicy()).getAccessControlEntries()); - } catch (RemoteException re) { - throw new RemoteRepositoryException(re); - } - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void removeAccessControlEntry(AccessControlEntry ace) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException( - "removeAccessControlEntry"); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java deleted file mode 100644 index d8c4fd96d75..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; - -import javax.jcr.AccessDeniedException; -import javax.jcr.PathNotFoundException; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.security.AccessControlException; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlManager - * RemoteAccessControlManager} interface. This class makes a remote - * AccessControlManager locally available using the JCR - * {@link AccessControlManager AccessControlManager} interface. - * - * @see javax.jcr.security.AccessControlManager - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager - */ -@Deprecated(forRemoval = true) public class ClientAccessControlManager extends ClientObject implements - AccessControlManager { - - private final RemoteAccessControlManager racm; - - public ClientAccessControlManager(final RemoteAccessControlManager racm, - final LocalAdapterFactory factory) { - super(factory); - this.racm = racm; - } - - /** {@inheritDoc} */ - public AccessControlPolicyIterator getApplicablePolicies(String absPath) - throws RepositoryException { - try { - return getFactory().getAccessControlPolicyIterator( - racm.getApplicablePolicies(absPath)); - } catch (RemoteException re) { - throw new RemoteRepositoryException(re); - } - } - - /** {@inheritDoc} */ - public AccessControlPolicy[] getEffectivePolicies(String absPath) - throws PathNotFoundException, AccessDeniedException, - RepositoryException { - try { - return getFactory().getAccessControlPolicy( - racm.getEffectivePolicies(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public AccessControlPolicy[] getPolicies(String absPath) - throws PathNotFoundException, AccessDeniedException, - RepositoryException { - try { - return getFactory().getAccessControlPolicy( - racm.getPolicies(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Privilege[] getPrivileges(String absPath) - throws PathNotFoundException, RepositoryException { - try { - return getFactory().getPrivilege(racm.getPrivileges(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Privilege[] getSupportedPrivileges(String absPath) - throws PathNotFoundException, RepositoryException { - try { - return getFactory().getPrivilege( - racm.getSupportedPrivileges(absPath)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPrivileges(String absPath, Privilege[] privileges) - throws PathNotFoundException, RepositoryException { - String[] privNames = new String[privileges.length]; - for (int i = 0; i < privNames.length; i++) { - privNames[i] = privileges[i].getName(); - } - - try { - return racm.hasPrivileges(absPath, privNames); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - - } - - /** {@inheritDoc} */ - public Privilege privilegeFromName(String privilegeName) - throws AccessControlException, RepositoryException { - try { - return getFactory().getPrivilege( - racm.privilegeFromName(privilegeName)); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void removePolicy(String absPath, AccessControlPolicy policy) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException("removePolicy"); - } - - /** - * @throws UnsupportedRepositoryOperationException This method is not - * implemented yet - */ - public void setPolicy(String absPath, AccessControlPolicy policy) - throws UnsupportedRepositoryOperationException { - // TODO: implement client side of the story - throw new UnsupportedRepositoryOperationException("setPolicy"); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java deleted file mode 100644 index 30c12bd3ec6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import javax.jcr.security.AccessControlPolicy; -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy - * RemoteAccessControlPolicy} interface. This class makes a remote - * AccessControlPolicy locally available using the JCR - * {@link AccessControlPolicy AccessControlPolicy} interface. - * - * @see javax.jcr.security.AccessControlPolicy - * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy - */ -@Deprecated(forRemoval = true) public class ClientAccessControlPolicy extends ClientObject implements - AccessControlPolicy { - - private final RemoteAccessControlPolicy racp; - - public ClientAccessControlPolicy(final RemoteAccessControlPolicy racp, - final LocalAdapterFactory factory) { - super(factory); - this.racp = racp; - } - - RemoteAccessControlPolicy getRemoteAccessControlPolicy() { - return racp; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java deleted file mode 100644 index 80ac1bb0759..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.iterator.ClientIterator; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ClientIterator for iterating remote access control policies. - */ -@Deprecated(forRemoval = true) public class ClientAccessControlPolicyIterator extends ClientIterator implements - AccessControlPolicyIterator { - - public ClientAccessControlPolicyIterator(RemoteIterator iterator, - LocalAdapterFactory factory) { - super(iterator, factory); - } - - /** {@inheritDoc} */ - protected Object getObject(Object remote) { - return getFactory().getAccessControlPolicy( - (RemoteAccessControlList) remote); - } - - /** {@inheritDoc} */ - public AccessControlPolicy nextAccessControlPolicy() { - return (AccessControlPolicy) next(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java deleted file mode 100644 index 0bcfb22b1c1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.client.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.client.ClientObject; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Local adapter for the JCR-RMI {@link RemotePrivilege RemotePrivilege} - * interface. This class makes a remote Privilege locally available using the - * JCR {@link Privilege Privilege} interface. - * - * @see javax.jcr.security.Privilege - * @see org.apache.jackrabbit.rmi.remote.security.RemotePrivilege - */ -@Deprecated(forRemoval = true) public class ClientPrivilege extends ClientObject implements Privilege { - - private final RemotePrivilege rp; - - public ClientPrivilege(final RemotePrivilege rp, - final LocalAdapterFactory factory) { - super(factory); - this.rp = rp; - } - - /** {@inheritDoc} */ - public Privilege[] getAggregatePrivileges() { - try { - return getFactory().getPrivilege(rp.getAggregatePrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public Privilege[] getDeclaredAggregatePrivileges() { - try { - return getFactory().getPrivilege( - rp.getDeclaredAggregatePrivileges()); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public String getName() { - try { - return rp.getName(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public boolean isAbstract() { - try { - return rp.isAbstract(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - /** {@inheritDoc} */ - public boolean isAggregate() { - try { - return rp.isAggregate(); - } catch (RemoteException re) { - throw new RemoteRuntimeException(re); - } - } - - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj == null) { - return false; - } - - if (obj instanceof Privilege) { - return getName().equals(((Privilege) obj).getName()); - } - - return false; - } - - public int hashCode() { - return getName().hashCode(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java deleted file mode 100755 index fef0d6cec51..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.client.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java deleted file mode 100644 index 7b84b842279..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventIterator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.observation.EventIterator EventIterator} interface. - * This class is used by the JCR-RMI client adapters to convert - * node arrays to iterators. - */ -@Deprecated(forRemoval = true) public class ArrayEventIterator extends ArrayIterator implements EventIterator { - - /** - * Creates an iterator for the given array of events. - * - * @param nodes the nodes to iterate - */ - public ArrayEventIterator(Event[] nodes) { - super(nodes); - } - - /** {@inheritDoc} */ - public Event nextEvent() { - return (Event) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java deleted file mode 100644 index 1abc13e4cc4..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayEventListenerIterator.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import javax.jcr.observation.EventListener; -import javax.jcr.observation.EventListenerIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.observation.EventListenerIterator EventListenerIterator} interface. - * This class is used by the JCR-RMI client adapters to convert - * listener arrays to iterators. - */ -@Deprecated(forRemoval = true) public class ArrayEventListenerIterator extends ArrayIterator - implements EventListenerIterator { - - /** - * Creates an iterator for the given array of listeners. - * - * @param listeners the listeners to iterate - */ - public ArrayEventListenerIterator(EventListener[] listeners) { - super(listeners); - } - - /** {@inheritDoc} */ - public EventListener nextEventListener() { - return (EventListener) next(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java deleted file mode 100644 index bdc89d6f277..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/ArrayIterator.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.iterator; - -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Array implementation of the JCR - * {@link javax.jcr.RangeIterator RangeIterator} interface. This class - * implements the RangeIterator functionality for an underlying array - * of objects. Used as the base class for the type-specific iterator - * classes defined in this package. - */ -@Deprecated(forRemoval = true) public class ArrayIterator implements RangeIterator { - - /** The current iterator position. */ - private int position; - - /** The underlying array of objects. */ - private Object[] array; - - /** - * Creates an iterator for the given array of objects. - * - * @param array the objects to iterate - */ - public ArrayIterator(Object[] array) { - this.position = 0; - this.array = array; - } - - /** {@inheritDoc} */ - public boolean hasNext() { - return (position < array.length); - } - - /** {@inheritDoc} */ - public Object next() { - return array[position++]; - } - - /** {@inheritDoc} */ - public void remove() { - throw new UnsupportedOperationException(); - } - - /** {@inheritDoc} */ - public void skip(long items) { - position += items; - if (position > array.length) { - position = array.length; - throw new NoSuchElementException( - "Skipped past the last element of the iterator"); - } - } - - /** {@inheritDoc} */ - public long getSize() { - return array.length; - } - - /** {@inheritDoc} */ - public long getPosition() { - return position; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java deleted file mode 100755 index 06af128a016..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java deleted file mode 100644 index 5fcfb5ba432..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/JackrabbitClientAdapterFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.jackrabbit; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * @deprecated Use the normal {@link ClientAdapterFactory} instead - */ -@Deprecated(forRemoval = true) public class JackrabbitClientAdapterFactory extends ClientAdapterFactory { -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java deleted file mode 100755 index 09727fd1bba..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/jackrabbit/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.jackrabbit; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java deleted file mode 100644 index a30ebd589a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.rmi.RemoteException; -import java.util.HashMap; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.EventListener; - -import org.apache.jackrabbit.rmi.client.RemoteRepositoryException; -import org.apache.jackrabbit.rmi.client.RemoteRuntimeException; -import org.apache.jackrabbit.rmi.iterator.ArrayEventIterator; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ClientEventPoll class is the registry for client-side - * event listeners on behalf of the - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class. In - * addition this class extends the java.lang.Thread class able - * to be run in a separate thread to constantly poll the server-side observation - * manager for new events. - *

    - * Notes: - *

      - *
    1. Only one instance of this class should be instantiated for each instance - * of a {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager} class. - *
    2. EventListeners registered with this class must properly - * implement the Object.hashCode() and Object.equals() - * contracts for them to be handled correctly by this class. - *
    - * - * @see #run() - */ -@Deprecated(forRemoval = true) public class ClientEventPoll extends Thread { - - /** logger */ - private static final Logger log = - LoggerFactory.getLogger(ClientEventPoll.class); - - /** - * The time in milliseconds the {@link #run()} method should be waiting - * for remote events. - * @see #run() - */ - private static final long POLL_TIMEOUT = 5000; - - /** The thread name */ - private static final String THREAD_NAME = "Client Event Poller"; - - /** The primitive unique identifier generator. */ - private static long counter = 0; - - /** The {@link RemoteObservationManager} called for the new events. */ - private final RemoteObservationManager remote; - - /** - * The Session checked by the {@link #run} method whether it - * is still alive or the thread should terminate. - */ - private final Session session; - - /** The map of locally registered listeners indexed by the unique identifier */ - private Map listenerMap = new HashMap(); - - /** The map of unique identifieres indexed by the registered listeners */ - private Map idMap = new HashMap(); - - /** - * Flag indicating whether the {@link #run()} method should terminate. - * @see #run() - */ - private boolean running = true; - - /** - * Creates an instance of this class talking to the given - * {@link RemoteObservationManager}. - * - * @param remote The remote observation manager which is asked for new - * events. This must not be null. - * @param session The Session which is asked whether it is - * alive by the {@link #run()} method. This must not be null. - * - * @throws NullPointerException if remote or session - * is null. - */ - public ClientEventPoll(RemoteObservationManager remote, Session session) - throws NullPointerException { - super(THREAD_NAME); - - // check remote and session - if (remote == null) { - throw new NullPointerException("remote"); - } - if (session == null) { - throw new NullPointerException("session"); - } - - this.remote = remote; - this.session = session; - } - - /** - * Registers the given local listener with this instance and returns the - * unique identifier assigned to it. - * - * @param listener The EventListener to register. - * - * @return The unique identifier assigned to the newly registered event - * listener. - */ - public synchronized long addListener(EventListener listener) { - Long id = new Long(counter++); - listenerMap.put(id, listener); - idMap.put(listener, id); - return id.longValue(); - } - - /** - * Unregisters the given local listener from this instance and returns the - * unique identifier assigned to it. - * - * @param listener The EventListener to unregister. - * - * @return The unique identifier assigned to the unregistered event listener - * or -1 if the listener was not registered. - */ - public synchronized long removeListener(EventListener listener) { - Long key = (Long) idMap.remove(listener); - if (key != null) { - listenerMap.remove(key); - return key.longValue(); - } - - return -1; - } - - /** - * Returns an array of the registered event listeners. - * - * @return registered event listeners - */ - public synchronized EventListener[] getListeners() { - return (EventListener[]) listenerMap.values().toArray( - new EventListener[(listenerMap.size())]); - } - - /** - * Indicates to the {@link #run()} method, that asking for events should - * be terminated. - * - * @see #run() - */ - public void terminate() { - this.running = false; - } - - //---------- Thread overwrite --------------------------------------------- - - /** - * Checks for remote events and dispatches them to the locally registered - * event listeners. This is how this method works: - *
      - *
    1. Continue with next step if {@link #terminate()} has not been called - * yet and the session is still alive. - *
    2. Call the {@link RemoteObservationManager#getNextEvent(long)} method - * waiting for a specified time (5 seconds). - *
    3. If no event was received in the specified time go back to step #1. - *
    4. Extract the unique listener identifier from the remote event and - * find it in the list of locally registered event listeners. Go back to - * step #1 if no such listener exists. - *
    5. Convert the remote event list to an EventIterator and - * call the EventListener.onEvent() method. - *
    6. Go back to step #1. - *
    - */ - public void run() { - while (running && session.isLive()) { - try { - // ask for an event waiting at most POLL_TIMEOUT milliseconds - RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT); - - // poll time out, check running and ask again - if (remoteEvent == null) { - continue; - } - - // extract the listener id from the remote event and find - // the locally registered event listener - Long id = new Long(remoteEvent.getListenerId()); - EventListener listener = (EventListener) listenerMap.get(id); - - // if the listener is not registered (anymore), the event is - // silently ignored, running is checked and the server asked again - if (listener == null) { - continue; - } - - // otherwise convert the remote events into an EventIterator - // and the listener is called - RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents(); - EventIterator events = toEvents(remoteEvents); - try { - listener.onEvent(events); - } catch (Exception e) { - log.error("Unexpected failure of Listener " + listener, e); - } - - } catch (RemoteException re) { - log.error("Problem handling event. Looking for next one.", re); - } - } - } - - //---------- internal ----------------------------------------------------- - - /** - * Converts an array of {@link RemoteEventCollection.RemoteEvent} instances to an - * instance of EventIterator suitable to be sent to the - * event listener. - * - * @param remoteEvents array of remote events - * @return event iterator - * @throws RemoteException on RMI errors - */ - private EventIterator toEvents(RemoteEventCollection.RemoteEvent[] remoteEvents) - throws RemoteException { - Event[] events = new Event[remoteEvents.length]; - for (int i = 0; i < events.length; i++) { - events[i] = new JCREvent(remoteEvents[i]); - } - return new ArrayEventIterator(events); - } - - /** - * The JCREvent class is a simple implementation of the JCR - * Event interface to be sent to the locally registered - * event listeners. - * - * @author Felix Meschberger - */ - private static class JCREvent implements Event { - - /** The adapted remote event. */ - private final RemoteEventCollection.RemoteEvent remote; - - /** - * Creates an instance of this class from the contents of the given - * remoteEvent. - * - * @param remoteEvent The {@link RemoteEventCollection.RemoteEvent} instance - * providing the data for this event. - */ - private JCREvent(RemoteEventCollection.RemoteEvent remoteEvent) { - remote = remoteEvent; - } - - /** {@inheritDoc} */ - public int getType() { - try { - return remote.getType(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - try { - return remote.getPath(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUserID() { - try { - return remote.getUserID(); - } catch (RemoteException ex) { - throw new RemoteRuntimeException(ex); - } - } - - /** {@inheritDoc} */ - public long getDate() throws RepositoryException { - try { - return remote.getDate(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException { - try { - return remote.getIdentifier(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Map getInfo() throws RepositoryException { - try { - return remote.getInfo(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getUserData() throws RepositoryException { - try { - return remote.getUserData(); - } catch (RemoteException ex) { - throw new RemoteRepositoryException(ex); - } - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java deleted file mode 100644 index 5b39287157f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/Queue.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.util.LinkedList; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The Queue class is a very simple queue assuming that there is - * at least one consumer and potentially multiple producers. This class poses - * no restrictions on the size of the queue. - */ -@Deprecated(forRemoval = true) public class Queue { - - /** The linked list implementing the queue of data */ - private final LinkedList queue; - - /** - * Creates an instance of this queue. - */ - public Queue() { - queue = new LinkedList(); - } - - /** - * Appends the given object to the end of the queue. - *

    - * After appending the element, the queue is notified such that threads - * waiting to retrieve an element from the queue are woken up. - * - * @param object the object to be added - */ - public void put(Object object) { - synchronized (queue) { - queue.addLast(object); - queue.notifyAll(); - } - } - - /** - * Returns the first element from the queue. If the queue is currently empty - * the method waits at most the given number of milliseconds. - * - * @param timeout The maximum number of milliseconds to wait for an entry in - * the queue if the queue is empty. If zero, the method waits forever - * for an element. - * - * @return The first element of the queue or null if the method - * timed out waiting for an entry. - * - * @throws InterruptedException Is thrown if the current thread is - * interrupted while waiting for the queue to get at least one entry. - */ - public Object get(long timeout) throws InterruptedException { - synchronized (queue) { - // wait for data if the queue is empty - if (queue.isEmpty()) { - queue.wait(timeout); - } - - // return null if queue is (still) empty - if (queue.isEmpty()) { - return null; - } - - // return first if queue has content now - return queue.removeFirst(); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java deleted file mode 100644 index 94f78b6d13a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ServerEventListenerProxy.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.observation; - -import java.rmi.RemoteException; - -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.EventListener; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ServerEventListenerProxy class is the server-side event - * listener proxy registered on behalf of a client-side event listener identified - * with the unique identifier. - *

    - * The term Server in this class indicates, that this is a server-side - * class. In contrast to the classes in the - * {@link org.apache.jackrabbit.rmi.server} package, this class neither extends - * the {@link org.apache.jackrabbit.rmi.server.ServerObject} class nor does it - * implement any of the remote interfaces in the - * {@link org.apache.jackrabbit.rmi.remote} package because it only is - * instantiated to be used on the server side. - *

    - * See the package overview for an explanation of the mechanisms implemented for - * event dispatching. - */ -@Deprecated(forRemoval = true) public class ServerEventListenerProxy implements EventListener { - - /** logger */ - private static final Logger log = - LoggerFactory.getLogger(ServerEventListenerProxy.class); - - /** The factory used to convert event iterators to remote events */ - private final RemoteAdapterFactory factory; - - /** - * The unique indentifier of the client-side event listener on whose - * behalf this listener proxy is registered. - */ - private final long listenerId; - - /** - * The queue to which remote events are queue for them to be picked up - * by calls to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager#getNextEvent(long)} - * method. - */ - private final Queue queue; - - /** - * Creates a new instance of this listener proxy. - * - * @param factory The {@link RemoteAdapterFactory} used to convert the - * {@link EventIterator} instances to {@link RemoteEventCollection} objects. - * @param listenerId The unique identifier of the client-side event listener - * on whose behalf this proxy works. - * @param queue The sink to which events to be dispatched to the client are - * queued to be picked up. - */ - public ServerEventListenerProxy(RemoteAdapterFactory factory, - long listenerId, Queue queue) { - this.factory = factory; - this.listenerId = listenerId; - this.queue = queue; - } - - /** - * Converts the {@link javax.jcr.observation.Event} instances in the given - * iterator to an instance of {@link RemoteEventCollection} for them to be dispatched - * to the client-side event listener. - * - * @param events The {@link javax.jcr.observation.Event Events} to be - * dispatched. - */ - public void onEvent(EventIterator events) { - try { - RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events); - queue.put(remoteEvent); - } catch (RemoteException re) { - Throwable t = (re.getCause() == null) ? re : re.getCause(); - log.error("Problem creating remote event for " + listenerId, t); - } - } - - //---------- Object overwrite ---------------------------------------------- - - /** - * Returns the client-side listener identifier as its hash code. - * - * @return hash code - */ - public int hashCode() { - return (int) listenerId; - } - - /** - * Returns true if obj is either the same as this - * or a proxy for the same client-side listener, which is identicated by the - * same listener identifier. - * - * @param obj The object to compare to. - * - * @return true if obj is the same or a proxy for - * the same client-side listener. - */ - public boolean equals(Object obj) { - if (this == obj) { - return true; - } else if (obj instanceof ServerEventListenerProxy) { - return listenerId == ((ServerEventListenerProxy) obj).listenerId; - } else { - return false; - } - } - - /** - * Returns the a string representation of this instance, which is an - * indication of this class's name and the unique identifier of the real - * event listener. - * - * @return string representation - */ - public String toString() { - return "EventListenerProxy: listenerId=" + listenerId; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java deleted file mode 100755 index c78b4f6d8e9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.observation; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java deleted file mode 100644 index 146f1479a63..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/ArrayIterator.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A simple array-based remote iterator. Used when the iteration is - * short enough for all the elements to be sent over the network in - * one go. - */ -@Deprecated(forRemoval = true) public class ArrayIterator implements RemoteIterator, Serializable { - - /** - * The elements in this iterator. Set to null when - * all elements have been iterated. - */ - private Object[] elements; - - /** - * The position of this iterator. Set to the size of the iterator - * when all elements have been iterated. - */ - private int position; - - /** - * Creates an array-based remote iterator from the given array - * of remote references or serializable objects. - * - * @param elements elements of the iteration - */ - public ArrayIterator(Object[] elements) { - this.elements = elements; - this.position = 0; - } - - /** - * Returns the size of the iterator. - * - * @return length of the iterator - * @see RemoteIterator#getSize() - */ - public long getSize() { - if (elements == null) { - return position; - } else { - return elements.length; - } - } - - /** - * Skips the first items elements in the array. - * {@inheritDoc} - */ - public void skip(long items) - throws IllegalArgumentException, NoSuchElementException { - if (items < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (elements == null || items > elements.length) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (items == elements.length) { - position = elements.length; - elements = null; - } else { - Object[] tmp = new Object[elements.length - (int) items]; - System.arraycopy(elements, (int) items, tmp, 0, tmp.length); - elements = tmp; - position += items; - } - } - - /** - * Returns the underlying array. - * {@inheritDoc} - */ - public Object[] nextObjects() throws IllegalArgumentException { - if (elements == null) { - return null; - } else { - Object[] tmp = elements; - position += elements.length; - elements = null; - return tmp; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java deleted file mode 100644 index 43d8e7d0082..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/BufferIterator.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A buffered remote iterator. Used to transfer a remote iterator reference - * along with a buffer of the first few iterator elements in one network - * transmission. - */ -@Deprecated(forRemoval = true) public class BufferIterator implements RemoteIterator, Serializable { - - /** The element buffer. Set to null when the iterator ends. */ - private Object[] buffer; - - /** Cached size of the iterator. */ - private final long size; - - /** Remote iterator reference. */ - private final RemoteIterator remote; - - /** - * Creates a new buffered remote iterator. - * - * @param buffer first elements in the iterator - * @param size total iterator size - * @param remote reference to the remaining iterator - */ - public BufferIterator(Object[] buffer, long size, RemoteIterator remote) { - this.buffer = buffer; - this.size = size; - this.remote = remote; - } - - /** - * Returns the cached size of the iterator. - * - * @return iterator size, or -1 if unknown - * @see RemoteIterator#getSize() - */ - public long getSize() { - return size; - } - - /** - * Skips the given number of elements. First discards elements from the - * element buffer and only then contacts the remote iterator. - * - * @param items number of items to skip - * @throws IllegalArgumentException if items is negative - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - * @see RemoteIterator#skip(long) - */ - public void skip(long items) - throws IllegalArgumentException, NoSuchElementException, - RemoteException { - if (items < 0) { - throw new IllegalArgumentException("Negative skip is not allowed"); - } else if (buffer == null && items > 0) { - throw new NoSuchElementException("Skipped past the last element"); - } else if (items > buffer.length) { - remote.skip(items - buffer.length); - buffer = remote.nextObjects(); - } else { - Object[] tmp = new Object[buffer.length - (int) items]; - System.arraycopy(buffer, (int) items, tmp, 0, tmp.length); - buffer = tmp; - } - } - - /** - * Returns the currently buffered elements and fills in the buffer - * with next elements. - * - * @return buffered elements, or null if the iterator has ended - * @throws RemoteException on RMI errors - * @see RemoteIterator#nextObjects() - */ - public Object[] nextObjects() throws RemoteException { - if (buffer == null) { - return null; - } else { - Object[] tmp = buffer; - buffer = remote.nextObjects(); - return tmp; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java deleted file mode 100644 index 0013e31881a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteEventCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.Map; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The RemoteEventCollection class serves as a container for - * notifications sent to registered event listeners. Instances of this class are - * created by the server-side event listener proxies and sent to the client-side - * event poller. On the client-side the enclosed list of events is then sent to - * the listener identified by the contained listener identifier. - */ -@Deprecated(forRemoval = true) public interface RemoteEventCollection extends Remote { - - /** - * Returns unique identifier of the client-side listener to which the - * enclosed events should be sent. - * - * @return unique listener identifier - * @throws RemoteException on RMI errors - */ - long getListenerId() throws RemoteException; - - /** - * Returns the list of events to be sent to the client-side listener - * identified by {@link #getListenerId()}. - * - * @return list of events - * @throws RemoteException on RMI errors - */ - RemoteEvent[] getEvents() throws RemoteException; - - /** - * The RemoteEvent class provides an encapsulation of single - * events in an event list sent to a registered listener. - */ - public static interface RemoteEvent extends Remote { - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getType() Event.getType()} method. - * - * @return the type of this event. - * @throws RemoteException on RMI errors - */ - int getType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getPath() Event.getPath()} method. - * - * @return the absolute path associated with this event or - * null. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getUserID() Event.getUserID()} method. - * - * @return the user ID. - * @throws RemoteException on RMI errors - */ - String getUserID() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getIdentifier() Event.getIdentifier()} method. - * - * @return the identifier associated with this event or null. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getInfo() Event.getInfo()} method. - * - * @return A Map containing parameter information for instances - * of a NODE_MOVED event. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Map getInfo() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getUserData() Event.getUserData()} method. - * - * @return The user data string. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getUserData() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.Event#getDate() Event.getDate()} method. - * - * @return the date when the change was persisted that caused this event. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getDate() throws RepositoryException, RemoteException; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java deleted file mode 100644 index bc459dc06cf..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItem.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Item Item} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerItem ServerItem} - * and {@link org.apache.jackrabbit.rmi.client.ClientItem ClientItem} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Item method. The remote object will simply forward - * the method call to the underlying Item instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (Items and Nodes) are returned as remote references - * to the corresponding remote interfaces. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.client.ClientItem - * @see org.apache.jackrabbit.rmi.server.ServerItem - */ -@Deprecated(forRemoval = true) public interface RemoteItem extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Item#getPath() Item.getPath()} method. - * - * @return item path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getName() Item.getName()} method. - * - * @return item name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getName() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getAncestor(int) Item.getAncestor(int)} method. - * - * @param level ancestor level - * @return ancestor item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getAncestor(int level) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getParent() Item.getParent()} method. - * - * @return parent node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getParent() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#getDepth() Item.getDepth()} method. - * - * @return item depth - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getDepth() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#isNew() Item.isNew()} method. - * - * @return true if the item is new, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isNew() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#isModified() Item.isModified()} method. - * - * @return true if the item is modified, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isModified() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#save() Item.save()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void save() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#refresh(boolean) Item.refresh(boolean)} method. - * - * @param keepChanges flag to keep transient changes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh(boolean keepChanges) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Item#remove() Item.remove()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void remove() throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java deleted file mode 100644 index fdfedb991cb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteItemDefinition.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerItemDefinition ServerItemDefinition} and - * {@link org.apache.jackrabbit.rmi.client.ClientItemDefinition ClientItemDefinition} - * adapter base classes to provide transparent RMI access to remote item - * definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding ItemDef method. The remote object will simply forward - * the method call to the underlying ItemDef instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex {@link javax.jcr.nodetype.NodeType NodeType} return values - * are returned as remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.client.ClientItemDefinition - * @see org.apache.jackrabbit.rmi.server.ServerItemDefinition - */ -@Deprecated(forRemoval = true) public interface RemoteItemDefinition extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getDeclaringNodeType() ItemDef.getDeclaringNodeType()} - * method. - * - * @return declaring node type - * @throws RemoteException on RMI errors - */ - RemoteNodeType getDeclaringNodeType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getName() ItemDef.getName()} method. - * - * @return item name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isAutoCreated() ItemDef.isAutoCreate()} - * method. - * - * @return true if the item is automatically created, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isAutoCreated() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isMandatory() ItemDef.isMandatory()} - * method. - * - * @return true if the item is mandatory, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMandatory() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#getOnParentVersion() ItemDef.getOnParentVersion()} - * method. - * - * @return parent version behaviour - * @throws RemoteException on RMI errors - */ - int getOnParentVersion() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.ItemDefinition#isProtected() ItemDef.isProtected()} - * method. - * - * @return true if the item is protected, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isProtected() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java deleted file mode 100644 index 42604b88223..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteIterator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.NoSuchElementException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.RangeIterator} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.iterator.ServerIterator} and - * {@link org.apache.jackrabbit.rmi.client.iterator.ClientIterator} classes to - * provide transparent RMI access to remote iterators. - *

    - * This interface allows both the client and server side to control the - * amount of buffering used to increase performance. - */ -@Deprecated(forRemoval = true) public interface RemoteIterator extends Remote { - - /** - * Returns the size of the iteration, or -1 if the - * size is unknown. - * - * @return size of the iteration, or -1 if unknown - * @throws RemoteException on RMI errors - * @see javax.jcr.RangeIterator#getSize() - */ - long getSize() throws RemoteException; - - /** - * Skips the given number of elements in this iteration. - * - * @param items number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - * @see javax.jcr.RangeIterator#skip(long) - */ - void skip(long items) throws NoSuchElementException, RemoteException; - - /** - * Returns an array of remote references to the next elements in this - * iterator. Returns null if the end of this iteration has - * been reached. - *

    - * To reduce the amount of remote method calls, this method returns an - * array of one or more elements in this iteration. - * - * @return array of remote references, or null - * @throws IllegalArgumentException if maxItems is not positive - * @throws RemoteException on RMI errors - * @see java.util.Iterator#next() - */ - Object[] nextObjects() throws IllegalArgumentException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java deleted file mode 100644 index d9ba20e269b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLock.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.lock.Lock} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerLock ServerLock} - * and {@link org.apache.jackrabbit.rmi.client.ClientLock ClientLock} - * adapter classes to provide transparent RMI access to remote locks. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Lock method. The remote object will simply forward - * the method call to the underlying Lock instance. Return values and - * possible exceptions are copied over the network. RMI errors are signaled - * with RemoteExceptions. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.client.ClientLock - * @see org.apache.jackrabbit.rmi.server.ServerLock - */ -@Deprecated(forRemoval = true) public interface RemoteLock extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getNode() Lock.getNode()} method. - * - * @return remote node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @since JCR-RMI 2.0 - */ - RemoteNode getNode() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getLockOwner() Lock.getLockOwner()} method. - * - * @return lock owner - * @throws RemoteException on RMI errors - */ - String getLockOwner() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isDeep() Lock.isDeep()} method. - * - * @return true if the lock is deep, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isDeep() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getLockToken() Lock.getLockToken()} method. - * - * @return lock token - * @throws RemoteException on RMI errors - */ - String getLockToken() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isLive() Lock.isLive()} method. - * - * @return true if the lock is live, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isLive() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#refresh() Lock.refresh()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isSessionScoped()} () Lock.isSessionScoped()} method. - * - * @return true if the lock is live, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isSessionScoped() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#getSecondsRemaining()} () Lock.getSecondsRemaining()} method. - * - * @return the number of seconds remaining until this lock times out. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getSecondsRemaining() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.lock.Lock#isLockOwningSession()} () Lock.isLockOwningSession()} method. - * - * @return a boolean. - * @throws RemoteException on RMI errors - */ - boolean isLockOwningSession() throws RemoteException; - - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java deleted file mode 100644 index 894fee12f1f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteLockManager.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface RemoteLockManager extends Remote { - - String[] getLockTokens() throws RepositoryException, RemoteException; - - void addLockToken(String lockToken) - throws RepositoryException, RemoteException; - - void removeLockToken(String lockToken) - throws RepositoryException, RemoteException; - - RemoteLock getLock(String absPath) - throws RepositoryException, RemoteException; - - boolean holdsLock(String absPath) - throws RepositoryException, RemoteException; - - boolean isLocked(String absPath) - throws RepositoryException, RemoteException; - - RemoteLock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) - throws RepositoryException, RemoteException; - - void unlock(String absPath) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java deleted file mode 100644 index a241f0cc1ac..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNamespaceRegistry.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR - * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry ServerNamespaceRegistry} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry ClientNamespaceRegistry} - * adapters to provide transparent RMI access to remote namespace registries. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NamespaceRegistry method. The remote object will - * simply forward the method call to the underlying NamespaceRegistry instance. - * Argument and return values, as well as possible exceptions, are copied - * over the network. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry - * @see org.apache.jackrabbit.rmi.server.ServerNamespaceRegistry - */ -@Deprecated(forRemoval = true) public interface RemoteNamespaceRegistry extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#registerNamespace(String,String) NamespaceRegistry.registerNamespace(String,String)} - * method. - * - * @param prefix namespace prefix - * @param uri namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void registerNamespace(String prefix, String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#unregisterNamespace(String) NamespaceRegistry.unregisterNamespace(String)} - * method. - * - * @param prefix namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void unregisterNamespace(String prefix) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getPrefixes() NamespaceRegistry.getPrefixes()} - * method. - * - * @return namespace prefixes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getPrefixes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getURIs() NamespaceRegistry,getURIs()} - * method. - * - * @return namespace uris - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getURIs() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getURI(String) NamespaceRegistry.getURI(String)} - * method. - * - * @param prefix namespace prefix - * @return namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getURI(String prefix) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.NamespaceRegistry#getPrefix(String) NamespaceRegistry.getPrefix(String)} - * method. - * - * @param uri namespace uri - * @return namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPrefix(String uri) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java deleted file mode 100644 index 886cfe2bd41..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNode.java +++ /dev/null @@ -1,745 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Node Node} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} - * and {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} - * adapters to provide transparent RMI access to remote nodes. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Node method. The remote object will simply forward - * the method call to the underlying Node instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (like Nodes and Properties) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - *

    - * Note that only two generic setProperty methods are included in this - * interface. Clients should implement the type-specific setProperty - * methods by wrapping the argument values into generic Value objects - * and calling the generic setProperty methods. Note also that the - * Value objects must be serializable and implemented using classes - * available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy these requirements. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.client.ClientNode - * @see org.apache.jackrabbit.rmi.server.ServerNode - */ -@Deprecated(forRemoval = true) public interface RemoteNode extends RemoteItem { - - /** - * Remote version of the - * {@link javax.jcr.Node#addNode(String) Node.addNode(Sring)} method. - * - * @param path relative path - * @return new node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode addNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#addNode(String,String) Node.addNode(String,String)} - * method. - * - * @param path relative path - * @param type node type name - * @return new node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode addNode(String path, String type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperty(String) Node.getProperty(String)} - * method. - * - * @param path relative path - * @return node property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties() Node.getProperties()} method. - * - * @return node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties(String) Node.getProperties(String)} - * method. - * - * @param pattern property name pattern - * @return matching node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties(String pattern) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getProperties(String[]) Node.getProperties(String[])} - * method. - * - * @param globs property name globs - * @return matching node properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getProperties(String[] globs) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getPrimaryItem() Node.getPrimaryItem()} method. - * - * @return primary item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getPrimaryItem() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getIdentifier() Node.getIdentifier()} method. - * - * @return node identifier - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getUUID() Node.getUUID()} method. - * - * @return node uuid - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getUUID() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getReferences() Node.getReferences()} method. - * - * @return reference properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getReferences() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getReferences(String) Node.getReferences(String)} method. - * - * @param name reference property name - * @return reference properties - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getReferences(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes() Node.getNodes()} method. - * - * @return child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes(String) Node.getNodes(String)} method. - * - * @param pattern node name pattern - * @return matching child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes(String pattern) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNodes(String[]) Node.getNodes(String[])} method. - * - * @param globs node name globs - * @return matching child nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes(String[] globs) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasNode(String) Node.hasNode(String)} method. - * - * @param path relative path - * @return true if the identified node exists, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasProperty(String) Node.hasProperty()} method. - * - * @param path relative path - * @return true if the identified property exists, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasProperty(String path) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasNodes() Node.hasNodes()} method. - * - * @return true if this node has child nodes, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#hasProperties() Node.hasProperties()} method. - * - * @return true if this node has properties, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasProperties() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getPrimaryNodeType() Node.getPrimaryNodeType()} - * method. - * - * @return primary node type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType getPrimaryNodeType() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getMixinNodeTypes() Node.getMixinNodeTypes()} - * method. - * - * @return mixin node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getMixinNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isNodeType(String) Node.isNodeType(String)} method. - * - * @param type node type name - * @return true if this node is an instance of the - * identified type, false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isNodeType(String type) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getNode(String) Node.getNode(String)} method. - * - * @param path relative path - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#orderBefore(String,String) Node.orderBefore(String,String)} - * method. - * - * @param src source path - * @param dst destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void orderBefore(String src, String dst) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value) Node.setProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value value) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value,int) Node.setProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @param type property type - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value value, int type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value[]) Node.setProperty(String,Value[])} - * method. - * - * @param name property name - * @param values property values - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value[] values) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#addMixin(String) Node.addMixin(String)} method. - * - * @param name mixin type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void addMixin(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeMixin(String) Node.removeMixin(String)} - * method. - * - * @param name mixin type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeMixin(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#canAddMixin(String) Node.canAddMixin(String)} - * method. - * - * @param name mixin type name - * @return true if the mixin type can be added, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean canAddMixin(String name) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getDefinition() Node.getDefinition()} method. - * - * @return node definition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition getDefinition() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#checkin() Node.checkin()} method. - * - * @return checked in version - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkin() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#checkout() Node.checkout()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void checkout() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#update(String) Node.update(String)} method. - * - * @param workspace source workspace name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void update(String workspace) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#merge(String,boolean) Node.merge(String,boolean)} - * method. - * - * @param workspace source workspace name - * @param bestEffort best effort flag - * @return nodes that failed to merge - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator merge(String workspace, boolean bestEffort) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#cancelMerge(javax.jcr.version.Version) Node.cancelMerge(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void cancelMerge(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#doneMerge(javax.jcr.version.Version) Node.doneMerge(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void doneMerge(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getCorrespondingNodePath(String) Node.getCorrespondingNodePath(String)} - * method. - * - * @param workspace workspace name - * @return corresponding node path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getCorrespondingNodePath(String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getIndex() Node.getIndex()} method. - * - * @return node index - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getIndex() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(String,boolean) Node.restore(String,boolean)} - * method. - * - * @param version version name - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restore(String version, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(javax.jcr.version.Version, boolean) Node.restore(Version,boolean)} - * method. - *

    - * This method has been rename to prevent a naming clash with - * {@link #restore(String, boolean)}. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restoreByUUID(String versionUUID, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restore(javax.jcr.version.Version, String, boolean) Node.restore(Version,String,boolean)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param path the path to which the version is to be restored - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restore(String versionUUID, String path, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#restoreByLabel(String,boolean) Node.restoreByLabel(String,boolean)} - * method. - * - * @param label version label - * @param removeExisting flag to remove conflicting nodes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#unlock() Node.unlock()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void unlock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#holdsLock() Node.holdsLock()} method. - * - * @return true if this node holds a lock, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean holdsLock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isLocked() Node.isLocked()} method. - * - * @return true if this node is locked, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isLocked() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#isCheckedOut() Node.isCheckedOut()} method. - * - * @return true if this node is checked out, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isCheckedOut() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getVersionHistory() Node.getVersionHistory()} method. - * - * @return the remote version history. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getVersionHistory() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getBaseVersion() Node.getBaseVersion()} method. - * - * @return the remote base version - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion getBaseVersion() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setProperty(String,Value[],int) Node.setProperty(String,Value[],int)} - * method. - * - * @param name property name - * @param values property values - * @param type property type - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty setProperty(String name, Value[] values, int type) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#lock(boolean,boolean) Node.lock(boolean,boolean)} - * method. - * - * @param isDeep flag to create a deep lock - * @param isSessionScoped flag to create a session-scoped lock - * @return lock - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteLock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getLock() Node.getLock()} method. - * - * @return lock - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteLock getLock() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getSharedSet() Node.getSharedSet()} method. - * - * @return a NodeIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getSharedSet() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#followLifecycleTransition(String) Node.followLifecycleTransition(String)} - * method. - * - * @param transition a state transition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void followLifecycleTransition(String transition) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getAllowedLifecycleTransistions() Node.getAllowedLifecycleTransistions()} - * method. - * - * @return a String array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getAllowedLifecycleTransistions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getWeakReferences() Node.getWeakReferences()} - * method. - * - * @return A PropertyIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getWeakReferences() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#getWeakReferences(String) Node.getWeakReferences(String)} - * method. - * - * @param name name of referring WEAKREFERENCE properties to be - * returned; if null then all referring - * WEAKREFERENCEs are returned. - * @return A PropertyIterator. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getWeakReferences(String name) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeShare() Node.removeShare()} - * method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeShare() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#removeSharedSet() Node.removeSharedSet()} - * method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeSharedSet() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Node#setPrimaryType(String) Node.setPrimaryType(String)} - * method. - * - * @param nodeTypeName the node type name - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setPrimaryType(String nodeTypeName) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java deleted file mode 100644 index 49c9ce9497a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeDefinition.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} - * adapters to provide transparent RMI access to remote node definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeDef method. The remote object will simply forward - * the method call to the underlying NodeDef instance. Return values - * and possible exceptions are copied over the network. Complex - * {@link javax.jcr.nodetype.NodeType NodeType} return values - * are returned as remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.client.ClientNodeDefinition - * @see org.apache.jackrabbit.rmi.server.ServerNodeDefinition - */ -@Deprecated(forRemoval = true) public interface RemoteNodeDefinition extends RemoteItemDefinition { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypes() NodeDef.getRequiredPrimaryTypes()} - * method. - * - * @return required primary node types - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryType() NodeDef.getDefaultPrimaryType()} - * method. - * - * @return default primary node type - * @throws RemoteException on RMI errors - */ - RemoteNodeType getDefaultPrimaryType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#allowsSameNameSiblings() NodeDef.allowSameNameSibs()} - * method. - * - * @return true if same name siblings are allowed, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean allowsSameNameSiblings() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryTypeName() NodeDef.getDefaultPrimaryTypeName()} - * method. - * - * @return a String - * @throws RemoteException on RMI errors - */ - String getDefaultPrimaryTypeName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypeNames() NodeDef.getRequiredPrimaryTypeNames()} - * method. - * - * @return a String array - * @throws RemoteException on RMI errors - */ - String[] getRequiredPrimaryTypeNames() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java deleted file mode 100644 index 08240e1e494..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeType.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.NodeType NodeType} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeType ServerNodeType} and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeType ClientNodeType} - * adapters to provide transparent RMI access to remote node types. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeType method. The remote object will simply forward - * the method call to the underlying NodeType instance. Return values - * and possible exceptions are copied over the network. Complex return - * values (like NodeTypes and PropertyDefs) are returned as remote - * references to the corresponding remote interfaces. RMI errors are - * signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.client.ClientNodeType - * @see org.apache.jackrabbit.rmi.server.ServerNodeType - */ -@Deprecated(forRemoval = true) public interface RemoteNodeType extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getName() NodeType.getName()} method. - * - * @return node type name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isMixin() NodeType.isMixin()} method. - * - * @return true if this is a mixin type, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMixin() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isAbstract() NodeType.isAbstract()} method. - * - * @return true if this is an abstract type, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isAbstract() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#hasOrderableChildNodes() NodeType.hasOrderableChildNodes()} - * method. - * - * @return true if nodes of this type has orderable - * child nodes, false otherwise - * @throws RemoteException on RMI errors - */ - boolean hasOrderableChildNodes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getSupertypes() NodeType.getSupertypes()} - * method. - * - * @return supertypes - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getSupertypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypes() NodeType.getDeclaredSupertypes()} - * method. - * - * @return declared supertypes - * @throws RemoteException on RMI errors - */ - RemoteNodeType[] getDeclaredSupertypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isNodeType(String) NodeType.isNodeType(String)} - * method. - * - * @param type node type name - * @return true if this node type is or extends the - * given node type, false otherwise - * @throws RemoteException on RMI errors - */ - boolean isNodeType(String type) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getPropertyDefinitions() NodeType.getPropertyDefinitions()} - * method. - * - * @return property definitions - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition[] getPropertyDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredPropertyDefinitions() NodeType.getDeclaredPropertyDefinitions()} - * method. - * - * @return declared property definitions - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition[] getDeclaredPropertyDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getChildNodeDefinitions() NodeType.getChildNodeDefinitions()} - * method. - * - * @return child node definitions - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredChildNodeDefinitions() NodeType.getDeclaredChildNodeDefinitions()} - * method. - * - * @return declared child node definitions - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value) NodeType.canSetProperty(String,Value)} - * method. - * - * @param name property name - * @param value property value - * @return true if the property can be set, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canSetProperty(String name, Value value) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canSetProperty(String,Value[]) NodeType.canSetProperty(String,Value[])} - * method. - * - * @param name property name - * @param values property values - * @return true if the property can be set, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canSetProperty(String name, Value[] values) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String) NodeType.canAddChildNode(String)} - * method. - * - * @param name child node name - * @return true if the child node can be added, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canAddChildNode(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canAddChildNode(String,String) NodeType.canAddChildNode(String,String)} - * method. - * - * @param name child node name - * @param type child node type - * @return true if the child node can be added, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canAddChildNode(String name, String type) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveItem(String) NodeType.canRemoveItem(String)} - * method. - * - * @param name item name - * @return true if the item can be removed, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean canRemoveItem(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getPrimaryItemName() NodeType.getPrimaryItemName()} - * method. - * - * @return primary item name - * @throws RemoteException on RMI errors - */ - String getPrimaryItemName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveNode(String) NodeType.canRemoveNode()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean canRemoveNode(String nodeName) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#canRemoveProperty(String) NodeType.canRemoveProperty()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean canRemoveProperty(String propertyName) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSupertypeNames() NodeType.getDeclaredSupertypeNames()} - * method. - * - * @return a String[] - * @throws RemoteException on RMI errors - */ - String[] getDeclaredSupertypeNames() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#isQueryable() NodeType.isQueryable()} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isQueryable() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getDeclaredSubtypes() NodeType.getDeclaredSubtypes()} - * method. - * - * @return RemoteIterator - * @throws RemoteException on RMI errors - */ - RemoteIterator getDeclaredSubtypes() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeType#getSubtypes() NodeType.getSubtypes()} - * method. - * - * @return RemoteIterator - * @throws RemoteException on RMI errors - */ - RemoteIterator getSubtypes() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java deleted file mode 100644 index ba74f0981e3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteNodeTypeManager.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR - * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerNodeTypeManager ServerNodeTypeManager} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientNodeTypeManager ClientNodeTypeManager} - * adapters to provide transparent RMI access to remote node type managers. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding NodeTypeManager method. The remote object will - * simply forward the method call to the underlying NodeTypeManager instance. - * Arguments and possible exceptions are copied over the network. Complex - * {@link javax.jcr.nodetype.NodeType NodeType} values are returned as - * remote references to the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. Iterator values are transmitted as object arrays. RMI errors - * are signaled with RemoteExceptions. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.client.ClientNodeTypeManager - * @see org.apache.jackrabbit.rmi.server.ServerNodeTypeManager - */ -@Deprecated(forRemoval = true) public interface RemoteNodeTypeManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getNodeType(String) NodeTypeManager.getNodeType(String)} - * method. - * - * @param name node type name - * @return node type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeType getNodeType(String name) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes() NodeTypeManager.getAllNodeTypes()} - * method. - * - * @return all node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes() NodeTypeManager.getPrimaryNodeTypes()} - * method. - * - * @return primary node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getPrimaryNodeTypes() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes() NodeTypeManager.getMixinNodeTypes()} - * method. - * - * @return mixin node types - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getMixinNodeTypes() - throws RepositoryException, RemoteException; - - boolean hasNodeType(String name) - throws RepositoryException, RemoteException; - - void unregisterNodeTypes(String[] names) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java deleted file mode 100644 index 3bab8ecdb67..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteObservationManager.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.observation.ObservationManager ObservationManager} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerObservationManager ServerObservationManager} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager ClientObservationManager} - * adapter base classes to provide transparent RMI access to remote observation - * managers. - *

    - * See the observation - * package comment for a description on how event listener registration and - * notification is implemented. - * - * @see javax.jcr.observation.ObservationManager - * @see org.apache.jackrabbit.rmi.client.ClientObservationManager - * @see org.apache.jackrabbit.rmi.server.ServerObservationManager - */ -@Deprecated(forRemoval = true) public interface RemoteObservationManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.observation.ObservationManager#addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean) ObservationManager.addEventListener()} - * method. See class comment for an explanation on how the - * listenerId is used. - * - * @param listenerId The identification of the listener on the client - * side to which events will be directed. - * @param eventTypes The mask of event types to be sent to this listener. - * @param absPath The root item defining a subtree for which events are to - * be delivered. - * @param isDeep true if the events from the complete subtree - * rooted at absPath are to be sent or only for the item - * at the given path. - * @param uuid An optional list of node UUIDs for which events are to be - * sent. If null this parameter is ignored. - * @param nodeTypeName An optional list of node type names for which events - * are to be sent. If null this parameter is ignored. - * @param noLocal true if only events are to be sent which do - * not originate from the session to which this instance belongs. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void addEventListener(long listenerId, int eventTypes, - String absPath, boolean isDeep, String[] uuid, - String[] nodeTypeName, boolean noLocal) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.observation.ObservationManager#removeEventListener(javax.jcr.observation.EventListener) ObservationManager.removeEventListener()} - * method. See class comment for an explanation on how the - * listenerId is used. - * - * @param listenerId The identification of the listener on the client - * side to which events will be directed. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeEventListener(long listenerId) - throws RepositoryException, RemoteException; - - /** - * Returns the next event to be dispatched to registered event listeners. If - * no event is available, this method blocks until one is available or until - * the given timeout expires. - * - * @param timeout The time in milliseconds to wait for the next event - * available to be dispatched. If negative or zero, this method waits - * for ever. - * - * @return The {@link RemoteEventCollection} to be dispatched. null is - * returned if the method timed out waiting for an event to be - * dispatched. - * - * @throws RemoteException on RMI errors - */ - RemoteEventCollection getNextEvent(long timeout) - throws RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java deleted file mode 100644 index 6b61f89a517..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteProperty.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Property Property} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} - * and {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty} - * adapters to provide transparent RMI access to remote properties. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Property method. The remote object will simply forward - * the method call to the underlying Property instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} return values - * are returned as remote references to the corresponding - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. RMI errors are signaled with RemoteExceptions. - *

    - * Note that only the generic getValue and setValue methods are included - * in this interface. Clients should implement the type-specific value - * getters and setters wrapping using the generic methods. Note also that the - * Value objects must be serializable and implemented using classes - * available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy these requirements. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.client.ClientProperty - * @see org.apache.jackrabbit.rmi.server.ServerProperty - */ -@Deprecated(forRemoval = true) public interface RemoteProperty extends RemoteItem { - - /** - * Remote version of the - * {@link javax.jcr.Property#getValue() Property.getValue()} method. - * - * @return property value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value getValue() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getValues() Property.getValues()} method. - * - * @return property values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value[] getValues() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#setValue(Value) Property.setValue(Value)} - * method. - * - * @param value property value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setValue(Value value) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#setValue(Value[]) Property.setValue(Value[])} - * method. - * - * @param values property values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setValue(Value[] values) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getLength() Property.getLength()} - * method. - * - * @return value length - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long getLength() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getLengths() Property.getLengths()} - * method. - * - * @return value lengths - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - long[] getLengths() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getDefinition() Property.getDefinition()} - * method. - * - * @return property definition - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition getDefinition() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Property#getType() Property.getType()} method. - * - * @return property type - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - int getType() throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java deleted file mode 100644 index 7c0ffc78fd6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemotePropertyDefinition.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition} - * adapters to provide transparent RMI access to remote property definitions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding PropertyDef method. The remote object will simply - * forward the method call to the underlying PropertyDef instance. Return - * values and possible exceptions are copied over the network. RMI errors - * are signaled with RemoteExceptions. - *

    - * Note that the returned Value objects must be serializable and implemented - * using classes available on both the client and server side. The - * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} - * class provides two convenience methods to satisfy this requirement. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.client.ClientPropertyDefinition - * @see org.apache.jackrabbit.rmi.server.ServerPropertyDefinition - */ -@Deprecated(forRemoval = true) public interface RemotePropertyDefinition extends RemoteItemDefinition { - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getRequiredType() PropertyDefinition.getRequiredType()} - * method. - * - * @return required type - * @throws RemoteException on RMI errors - */ - int getRequiredType() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getValueConstraints() PropertyDefinition.getValueConstraints()} - * method. - * - * @return value constraints - * @throws RemoteException on RMI errors - */ - String[] getValueConstraints() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getDefaultValues() PropertyDefinition.getDefaultValues()} - * method. - * - * @return default values - * @throws RemoteException on RMI errors - */ - Value[] getDefaultValues() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isMultiple() PropertyDefinition.isMultiple()} - * method. - * - * @return true if the property is multi-valued, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isMultiple() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#getAvailableQueryOperators() PropertyDefinition.getAvailableQueryOperators()} - * method. - * - * @return a String[] - * @throws RemoteException on RMI errors - */ - String[] getAvailableQueryOperators() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isFullTextSearchable() PropertyDefinition.isFullTextSearchable()} - * method. - * - * @return a boolean - * @throws RemoteException on RMI errors - */ - boolean isFullTextSearchable() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.nodetype.PropertyDefinition#isQueryOrderable() PropertyDefinition.isQueryOrderable()} - * method. - * - * @return a boolean - * @throws RemoteException on RMI errors - */ - boolean isQueryOrderable() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java deleted file mode 100644 index 638700400d3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQuery.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.Query Query} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQuery ServerQuery} - * and {@link org.apache.jackrabbit.rmi.client.ClientQuery ClientQuery} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.Query - * @see org.apache.jackrabbit.rmi.client.ClientQuery - * @see org.apache.jackrabbit.rmi.server.ServerQuery - */ -@Deprecated(forRemoval = true) public interface RemoteQuery extends Remote { - - /** - * @see javax.jcr.query.Query#execute() - * - * @return a QueryResult - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQueryResult execute() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#setLimit(long) - * - * @param limit a long - * @throws RemoteException on RMI errors - */ - void setLimit(long limit) throws RemoteException; - - /** - * @see javax.jcr.query.Query#setOffset(long) - * - * @param offset a long - * @throws RemoteException on RMI errors - */ - void setOffset(long offset) throws RemoteException; - - /** - * @see javax.jcr.query.Query#getStatement() - * - * @return the query statement. - * @throws RemoteException on RMI errors - */ - String getStatement() throws RemoteException; - - /** - * @see javax.jcr.query.Query#getLanguage() - * - * @return the query language. - * @throws RemoteException on RMI errors - */ - String getLanguage() throws RemoteException; - - /** - * @see javax.jcr.query.Query#getStoredQueryPath() - * - * @return path of the node representing this query. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getStoredQueryPath() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#storeAsNode(String) - * - * @param absPath path at which to persist this query. - * @return stored node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode storeAsNode(String absPath) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#bindValue(String, Value) - * - * @param varName name of variable in query - * @param value value to bind - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void bindValue(String varName, Value value) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Query#getBindVariableNames() - * - * @return the names of the bind variables in this query. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - public String[] getBindVariableNames() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java deleted file mode 100644 index fd4e25fdaff..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryManager.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.query.Query; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.QueryManager QueryManager} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryManager ServerQueryManager} - * and {@link org.apache.jackrabbit.rmi.client.ClientQueryManager ClientQueryManager} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.QueryManager - * @see org.apache.jackrabbit.rmi.client.ClientQueryManager - * @see org.apache.jackrabbit.rmi.server.ServerQueryManager - */ -@Deprecated(forRemoval = true) public interface RemoteQueryManager extends Remote { - - /** - * @see javax.jcr.query.QueryManager#createQuery - * - * @param statement query statement - * @param language query language - * @return query - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQuery createQuery(String statement, String language) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryManager#getQuery - * - * @param absPath node path of a persisted query (that is, a node of type nt:query). - * @return a Query object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQuery getQuery(String absPath) - throws RepositoryException, RemoteException; - - /** - * See {@link Query}. - * - * @see javax.jcr.query.QueryManager#getSupportedQueryLanguages - * @return An string array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getSupportedQueryLanguages() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java deleted file mode 100644 index 84bff566655..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteQueryResult.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerQueryResult ServerQueryResult} - * and {@link org.apache.jackrabbit.rmi.client.ClientQueryResult ClientQueryResult} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.QueryResult - * @see org.apache.jackrabbit.rmi.client.ClientQueryResult - * @see org.apache.jackrabbit.rmi.server.ServerQueryResult - */ -@Deprecated(forRemoval = true) public interface RemoteQueryResult extends Remote { - /** - * @see javax.jcr.query.QueryResult#getColumnNames() - * - * @return a PropertyIterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getColumnNames() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getRows() - * - * @return a RowIterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getRows() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getNodes() - * - * @return a remote node iterator - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteIterator getNodes() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.QueryResult#getSelectorNames() - * - * @return a String array holding the selector names. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - public String[] getSelectorNames() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java deleted file mode 100644 index f1189b628ea..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRepository.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Repository Repository} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerRepository ServerRepository} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientRepository ClientRepository} - * adapters to provide transparent RMI access to remote repositories. -*

    - * The methods in this interface are documented only with a reference - * to a corresponding Repository method. The remote object will simply - * forward the method call to the underlying Repository instance. - * {@link javax.jcr.Session Session} objects are returned as remote references - * to the {@link RemoteSession RemoteSession} interface. Simple return - * values and possible exceptions are copied over the network to the client. - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.client.ClientRepository - * @see org.apache.jackrabbit.rmi.server.ServerRepository - */ -@Deprecated(forRemoval = true) public interface RemoteRepository extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptor(String) Repository.getDescriptor(String)} - * method. - * - * @param key descriptor key - * @return descriptor value - * @throws RemoteException on RMI errors - */ - String getDescriptor(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorKeys() Repository.getDescriptorKeys()} - * method. - * - * @return descriptor keys - * @throws RemoteException on RMI errors - */ - String[] getDescriptorKeys() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login() Repository.login(}} method. - * - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(String) Repository.login(String}} - * method. - * - * @param workspace workspace name - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(Credentials) Repository.login(Credentials}} - * method. - * - * @param credentials client credentials - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(Credentials credentials) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#login(Credentials,String) Repository.login(Credentials,String}} - * method. - * - * @param credentials client credentials - * @param workspace workspace name - * @return remote session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession login(Credentials credentials, String workspace) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorValue(String) Repository.getDescriptorValue(String)} - * method. - * - * @return descriptor value - * @throws RemoteException on RMI errors - */ - Value getDescriptorValue(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#getDescriptorValues(String) Repository.getDescriptorValues(String)} - * method. - * - * @return descriptor value array - * @throws RemoteException on RMI errors - */ - Value[] getDescriptorValues(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#isSingleValueDescriptor(String) Repository.isSingleValueDescriptor(String)} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isSingleValueDescriptor(String key) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Repository#isStandardDescriptor(String) Repository.isStandardDescriptor(String)} - * method. - * - * @return boolean - * @throws RemoteException on RMI errors - */ - boolean isStandardDescriptor(String key) throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java deleted file mode 100644 index ae9419b54a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteRow.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.query.Row Row} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerRow ServerRow} - * and {@link org.apache.jackrabbit.rmi.client.ClientRow ClientRow} - * adapter base classes to provide transparent RMI access to remote items. - *

    - * RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.query.Row - * @see org.apache.jackrabbit.rmi.client.ClientRow - * @see org.apache.jackrabbit.rmi.server.ServerRow - */ -@Deprecated(forRemoval = true) public interface RemoteRow extends Remote { - - /** - * @see javax.jcr.query.Row#getValues() - * - * @return row values - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value[] getValues() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getValue(String) - * - * @param propertyName property name - * @return identified value - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Value getValue(String propertyName) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getNode() - * - * @return a node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getNode(String) - * - * @param selectorName - * @return a node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String selectorName) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getPath() - * - * @return the path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getPath(String) - * - * @param selectorName - * @return the path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getPath(String selectorName) throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getScore() - * - * @return the score - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - double getScore() throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.query.Row#getScore(String) - * - * @param selectorName - * @return the score - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - double getScore(String selectorName) throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java deleted file mode 100644 index 6ac8f47908d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteSession.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.IOException; -import java.rmi.Remote; -import java.rmi.RemoteException; -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; - -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Session Session} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerSession ServerSession} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientSession ClientSession} - * adapters to provide transparent RMI access to remote sessions. - *

    - * Most of the methods in this interface are documented only with a reference - * to a corresponding Session method. In these cases the remote object - * will simply forward the method call to the underlying Session instance. - * Complex return values like workspaces and other objects are returned - * as remote references to the corresponding remote interface. Simple - * return values and possible exceptions are simply copied over the network - * to the client. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.client.ClientSession - * @see org.apache.jackrabbit.rmi.server.ServerSession - */ -@Deprecated(forRemoval = true) public interface RemoteSession extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Session#getUserID() Session.getUserID()} method. - * - * @return user id - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#getUserID() - */ - String getUserID() throws RemoteException; - - /** - * Returns the named attribute. Note that only serializable - * attribute values can be transmitted over the network and that - * the client should have (or be able to fetch) the object class - * to access the returned value. Failures to meet these conditions - * are signalled with RemoteExceptions. - * - * @param name attribute name - * @return attribute value - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#getAttribute(java.lang.String) - */ - Object getAttribute(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getAttributeNames() Session.getAttributeNames()} - * method. - * - * @return attribute names - * @throws RemoteException on RMI errors - */ - String[] getAttributeNames() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getWorkspace() Session.getWorkspace()} method. - * - * @return workspace - * @see javax.jcr.Session#getWorkspace() - * @throws RemoteException on RMI errors - */ - RemoteWorkspace getWorkspace() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#impersonate(Credentials) Session.impersonate(Credentials)} - * method. - * - * @param credentials credentials for the new session - * @return new session - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteSession impersonate(Credentials credentials) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNodeByIdentifier(String) Session.getNodeByIdentifier(String)} - * method. - * - * @param id node identifier - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNodeByIdentifier(String id) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNodeByUUID(String) Session.getNodeByUUID(String)} - * method. - * - * @param uuid node uuid - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNodeByUUID(String uuid) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getItem(String) Session.getItem(String)} - * method. - * - * @param path item path - * @return item - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteItem getItem(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNode(String) Session.getNode(String)} - * method. - * - * @param path node path - * @return node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getNode(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getProperty(String) Session.getProperty(String)} - * method. - * - * @param path property path - * @return property - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteProperty getProperty(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#itemExists(String) Session.itemExists(String)} - * method. - * - * @param path item path - * @return true if the item exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean itemExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#nodeExists(String) Session.nodeExists(String)} - * method. - * - * @param path node path - * @return true if the node exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean nodeExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#propertyExists(String) Session.propertyExists(String)} - * method. - * - * @param path property path - * @return true if the property exists, - * false otherwise - * @throws RepositoryException on repository exception - * @throws RemoteException on RMI errors - */ - boolean propertyExists(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#removeItem(String) Session.removeItem(String)} - * method. - * - * @param path item path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void removeItem(String path) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#move(String,String) Session.move(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void move(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#save() Session.save()} method. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void save() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#refresh(boolean) Session.refresh(boolean)} - * method. - * - * @param keepChanges flag to keep transient changes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void refresh(boolean keepChanges) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#logout() Session.logout()} - * method. - * - * @throws RemoteException on RMI errors - */ - void logout() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#isLive() Session.isLive()} - * method. - * - * @return true if the session is live, - * false otherwise - * @throws RemoteException on RMI errors - */ - boolean isLive() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getRootNode() Session.getRootNode()} method. - * - * @return root node - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getRootNode() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#hasPendingChanges() Session.hasPendingChanges()} - * method. - * - * @return true if the session has pending changes, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasPendingChanges() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#hasPermission(String,String) Session.hasPermission(String,String)} - * method. - * - * @param path item path - * @param actions actions - * @return true if permission is granted, - * false otherwise - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasPermission(String path, String actions) - throws RepositoryException, RemoteException; - - /** - * Imports the system or document view XML data into a subtree of - * the identified node. Note that the entire XML stream is transferred - * as a single byte array over the network. This may cause problems with - * large XML streams. The remote server will wrap the XML data into - * a {@link java.io.ByteArrayInputStream ByteArrayInputStream} and feed - * it to the normal importXML method. - * - * @param path node path - * @param xml imported XML document - * @param uuidBehaviour UUID handling mode - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#importXML(java.lang.String, java.io.InputStream, int) - */ - void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#setNamespacePrefix(String,String) Session.setNamespacePrefix(String,String)} - * method. - * - * @param prefix namespace prefix - * @param uri namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void setNamespacePrefix(String prefix, String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespacePrefixes() Session.getNamespacePrefixes()} - * method. - * - * @return namespace prefixes - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getNamespacePrefixes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespaceURI(String) Session.getNamespaceURI(String)} - * method. - * - * @param prefix namespace prefix - * @return namespace uri - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getNamespaceURI(String prefix) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getNamespacePrefix(String) Session.getNamespacePrefix(String)} - * method. - * - * @param uri namespace uri - * @return namespace prefix - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String getNamespacePrefix(String uri) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#addLockToken(String) Session.addLockToken(String)} - * method. - * - * @param name lock token - * @throws RemoteException on RMI errors - */ - void addLockToken(String name) throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#getLockTokens() Session.getLockTokens()} - * method. - * - * @return lock tokens - * @throws RemoteException on RMI errors - */ - String[] getLockTokens() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Session#removeLockToken(String) Session.removeLockToken(String)} - * method. - * - * @param name lock token - * @throws RemoteException on RMI errors - */ - void removeLockToken(String name) throws RemoteException; - - /** - * Exports the identified repository subtree as a system view XML - * stream. Note that the entire XML stream is transferred as a - * single byte array over the network. This may cause problems with - * large exports. The remote server uses a - * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture - * the XML data written by the normal exportSysView method. - * - * @param path node path - * @param skipBinary binary skip flag - * @param noRecurse no recursion flag - * @return exported XML document - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#exportSystemView - */ - byte[] exportSystemView(String path, boolean skipBinary, boolean noRecurse) - throws IOException, RepositoryException, RemoteException; - - /** - * Exports the identified repository subtree as a document view XML - * stream. Note that the entire XML stream is transferred as a - * single byte array over the network. This may cause problems with - * large exports. The remote server uses a - * {@link java.io.ByteArrayOutputStream ByteArrayOutputStream} to capture - * the XML data written by the normal exportDocView method. - * - * @param path node path - * @param skipBinary skip binary flag - * @param noRecurse no recursion flag - * @return exported XML document - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see javax.jcr.Session#exportDocumentView - */ - byte[] exportDocumentView(String path, boolean skipBinary, boolean noRecurse) - throws IOException, RepositoryException, RemoteException; - - /** - * Remote version of the {@link javax.jcr.Session#getAccessControlManager() - * Session.getAccessControlManager()} method. - * - * @throws UnsupportedRepositoryOperationException if the remote session - * does not support this method - * @throws RepositoryException if an error occurred getting the access - * control manager - * @throws RemoteException on RMI errors - */ - RemoteAccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, - RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java deleted file mode 100644 index b0ccc6eb11b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersion.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.version.Version Version} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.ServerVersion ServerVersion} - * and {@link org.apache.jackrabbit.rmi.client.ClientVersion ClientVersion} - * adapters to provide transparent RMI access to remote versions. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding Version method. The remote object will simply forward - * the method call to the underlying Version instance. Argument and return - * values, as well as possible exceptions, are copied over the network. - * Complex return values (like Versions) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.client.ClientVersion - * @see org.apache.jackrabbit.rmi.server.ServerVersion - */ -@Deprecated(forRemoval = true) public interface RemoteVersion extends RemoteNode { - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getContainingHistory() Version.getContainingHistory()} method. - * - * @return a RemoteVersionHistory object. - * - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getCreated() Version.getCreated()} method. - * - * @return a Calendar object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - Calendar getCreated() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getLinearSuccessor() Version.getLinearSuccessor()} method. - * - * @return a RemoteVersion or null if no linear - * successor exists. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see RemoteVersionHistory#getAllLinearVersions - */ - RemoteVersion getLinearSuccessor() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getSuccessors() Version.getSuccessors()} method. - * - * @return a RemoteVersion array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getLinearPredecessor() Version.getLinearPredecessor()} method. - * - * @return a RemoteVersion or null if no linear - * predecessor exists. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - * @see RemoteVersionHistory#getAllLinearVersions - */ - RemoteVersion getLinearPredecessor() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getPredecessors() Version.getPredecessors()} method. - * - * @return a RemoteVersion array. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.Version#getFrozenNode() Version.getFrozenNode()} method. - * - * @return a RemoteNode object. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNode getFrozenNode() throws RepositoryException, RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java deleted file mode 100644 index 21ee15fd0db..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionHistory.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JC - * {@link javax.jcr.version.VersionHistory VersionHistory} interface. Used by - * the - * {@link org.apache.jackrabbit.rmi.server.ServerVersionHistory ServerVersionHistory} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientVersionHistory ClientVersionHistory} - * adapters to provide transparent RMI access to remote version histories. - *

    - * The methods in this interface are documented only with a reference - * to a corresponding VersionHistory method. The remote object will simply - * forward the method call to the underlying VersionHistory instance. Argument - * and return values, as well as possible exceptions, are copied over the - * network. Complex return values (like Versions) are returned as remote - * references to the corresponding remote interfaces. Iterator values - * are transmitted as object arrays. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.client.ClientVersionHistory - * @see org.apache.jackrabbit.rmi.server.ServerVersionHistory - */ -@Deprecated(forRemoval = true) public interface RemoteVersionHistory extends RemoteNode { - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionableUUID()} VersionHistory.getVersionableUUID()} - * method. - * - * @return the uuid of the versionable node - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be - * used instead. - */ - String getVersionableUUID() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionableIdentifier()} VersionHistory.getVersionableIdentifier()} - * method. - * - * @return the identifier of the versionable node - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - String getVersionableIdentifier() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getRootVersion() VersionHistory.getRootVersion()} - * method. - * - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getRootVersion() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllLinearVersions() VersionHistory.getAllLinearVersions()} - * method. - * - * @return linear remote versions - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllLinearVersions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllVersions() VersionHistory.getAllVersions()} - * method. - * - * @return remote versions - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllVersions() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllLinearFrozenNodes() VersionHistory.getAllLinearFrozenNodes()} - * method. - * - * @return linear remote frozen nodes - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getAllFrozenNodes() VersionHistory.getAllFrozenNodes()} - * method. - * - * @return remote frozen nodes - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteIterator getAllFrozenNodes() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersion(String) VersionHistory.getVersion(String)} - * method. - * - * @param versionName a version name - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getVersion(String versionName) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionByLabel(String) VersionHistory.getVersionByLabel(String)} - * method. - * - * @param label a version label - * @return a Version object. - * @throws RepositoryException if an error occurs. - * @throws RemoteException on RMI errors - */ - RemoteVersion getVersionByLabel(String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#addVersionLabel(String, String, boolean) - * VersionHistory.addVersionLabel(String, String, boolean)} - * method. - * - * @param versionName the name of the version to which the label is to be added. - * @param label the label to be added. - * @param moveLabel if true, then if label is already assigned to a version in - * this version history, it is moved to the new version specified; if false, then attempting - * to assign an already used label will throw a VersionException. - * - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void addVersionLabel(String versionName, String label, boolean moveLabel) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#removeVersionLabel(String) VersionHistory.removeVersionLabel(String)} - * method. - * - * @param label a version label - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void removeVersionLabel(String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#hasVersionLabel(String) VersionHistory.hasVersionLabel(String)} - * method. - * - * @param label a version label - * @return a boolean - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean hasVersionLabel(String label) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#hasVersionLabel(javax.jcr.version.Version, String) hasVersionLabel(Version, String)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @param label a version label - * @return a boolean. - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - boolean hasVersionLabel(String versionUUID, String label) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionLabels() VersionHistory.getVersionLabels()} - * method. - * - * @return a String array containing all the labels of the version history - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getVersionLabels() throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#getVersionLabels(javax.jcr.version.Version) VersionHistory.getVersionLabels(Version)} - * method. - * - * @param versionUUID The UUID of the version whose labels are to be returned. - * @return a String array containing all the labels of the given version - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - String[] getVersionLabels(String versionUUID) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionHistory#removeVersion(String) VersionHistory.removeVersion(String)} - * method. - * - * @param versionName the name of a version in this version history. - * @throws RepositoryException if another error occurs. - * @throws RemoteException on RMI errors - */ - void removeVersion(String versionName) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java deleted file mode 100644 index 232476319a6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteVersionManager.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface RemoteVersionManager extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkin(String) VersionManager.checkin(String)} - * method. - * - * @param absPath an absolute path. - * @return the created version. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkin(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkout(String) VersionManager.checkout(String)} - * method. - * - * @param absPath an absolute path. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void checkout(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#checkpoint(String) VersionManager.checkpoint(String)} - * method. - * - * @param absPath an absolute path. - * @return the created version. - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteVersion checkpoint(String absPath) throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.version.VersionManager#isCheckedOut(String) VersionManager.isCheckedOut(String)} - * method. - * - * @param absPath an absolute path. - * @return a boolean - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - boolean isCheckedOut(String absPath) throws RepositoryException, RemoteException; - - RemoteVersionHistory getVersionHistory(String absPath) throws RepositoryException, RemoteException; - - RemoteVersion getBaseVersion(String absPath) throws RepositoryException, RemoteException; - - void restore(String[] versionIdentifiers, boolean removeExisting) throws RepositoryException, RemoteException; - - void restore(String absPath, String versionName, boolean removeExisting) throws RepositoryException, RemoteException; - - void restore(String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; - - void restoreVI(String absPath, String versionIdentifier, boolean removeExisting) throws RepositoryException, RemoteException; - - void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws RepositoryException, RemoteException; - - RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException, RemoteException; - - RemoteIterator merge(String absPath, String srcWorkspace, boolean bestEffort, boolean isShallow) - throws RepositoryException, RemoteException; - - void doneMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; - - void cancelMerge(String absPath, String versionIdentifier) throws RepositoryException, RemoteException; - - RemoteNode createConfiguration(String absPath) throws RepositoryException, RemoteException; - - RemoteNode setActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; - - RemoteNode getActivity() throws RepositoryException, RemoteException; - - RemoteNode createActivity(String title) throws RepositoryException, RemoteException; - - void removeActivity(String activityNodeIdentifier) throws RepositoryException, RemoteException; - - RemoteIterator merge(String activityNodeIdentifier) throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java deleted file mode 100644 index 82b8a66bb4b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteWorkspace.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.IOException; -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.Workspace Workspace} interface. - * Used by the - * {@link org.apache.jackrabbit.rmi.server.ServerWorkspace ServerWorkspace} - * and - * {@link org.apache.jackrabbit.rmi.client.ClientWorkspace ClientWorkspace} - * adapters to provide transparent RMI access to remote workspaces. - *

    - * Most of the methods in this interface are documented only with a reference - * to a corresponding Workspace method. In these cases the remote object - * will simply forward the method call to the underlying Workspace instance. - * Complex return values like namespace registries and other objects are - * returned as remote references to the corresponding remote interface. Simple - * return values and possible exceptions are copied over the network - * to the client. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.Workspace - * @see org.apache.jackrabbit.rmi.client.ClientWorkspace - * @see org.apache.jackrabbit.rmi.server.ServerWorkspace - */ -@Deprecated(forRemoval = true) public interface RemoteWorkspace extends Remote { - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getName() Workspace.getName()} method. - * - * @return workspace name - * @throws RemoteException on RMI errors - */ - String getName() throws RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#copy(String,String) Workspace.copy(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void copy(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#copy(String,String,String) Workspace.copy(String,String,String)} - * method. - * - * @param workspace source workspace - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void copy(String workspace, String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#clone(String,String,String,boolean) Workspace.clone(String,String,String,boolean)} - * method. - * - * @param workspace source workspace - * @param from source path - * @param to destination path - * @param removeExisting flag to remove existing items - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void clone(String workspace, String from, String to, boolean removeExisting) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#move(String,String) Workspace.move(String,String)} - * method. - * - * @param from source path - * @param to destination path - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void move(String from, String to) - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getNodeTypeManager() Workspace.getNodeTypeManager()} - * method. - * - * @return node type manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNodeTypeManager getNodeTypeManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getNamespaceRegistry() Workspace.getNamespaceRegistry()} - * method. - * - * @return namespace registry - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteNamespaceRegistry getNamespaceRegistry() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getQueryManager() Workspace.getQueryManager()} - * method. - * - * @return query manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteQueryManager getQueryManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getObservationManager() Workspace.getObservationManager()} - * method. - * - * @return observation manager - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - RemoteObservationManager getObservationManager() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#getAccessibleWorkspaceNames() Workspace.getAccessibleWorkspaceNames()} - * method. - * - * @return accessible workspace names - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - String[] getAccessibleWorkspaceNames() - throws RepositoryException, RemoteException; - - /** - * Remote version of the - * {@link javax.jcr.Workspace#importXML(String,java.io.InputStream,int) Workspace.importXML(String,InputStream,int)} - * method. - * - * @param path node path - * @param xml imported XML document - * @param uuidBehaviour uuid behaviour flag - * @throws IOException on IO errors - * @throws RepositoryException on repository errors - * @throws RemoteException on RMI errors - */ - void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException; - - void createWorkspace(String name, String source) - throws RepositoryException, RemoteException; - - void deleteWorkspace(String name) - throws RepositoryException, RemoteException; - - RemoteLockManager getLockManager() - throws RepositoryException, RemoteException; - - RemoteVersionManager getVersionManager() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java deleted file mode 100644 index 356c1cfb9e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/RemoteXASession.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.Xid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the {@link org.apache.jackrabbit.api.XASession} - * interface. - */ -@Deprecated(forRemoval = true) public interface RemoteXASession extends RemoteSession, Remote { - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#commit(Xid, boolean)} method. - */ - void commit(Xid xid, boolean onePhase) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#end(Xid, int)} method. - */ - void end(Xid xid, int flags) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#forget(Xid)} method. - */ - void forget(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#getTransactionTimeout()} method. - */ - int getTransactionTimeout() throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#prepare(Xid)} method. - */ - int prepare(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#recover(int)} method. - */ - Xid[] recover(int flag) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#rollback(Xid)} method. - */ - void rollback(Xid xid) throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#setTransactionTimeout(int)} method. - */ - boolean setTransactionTimeout(int seconds) - throws XAException, RemoteException; - - /** - * Remote version of the - * {@link javax.transaction.xa.XAResource#start(Xid, int)} method. - */ - void start(Xid xid, int flags) throws XAException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java deleted file mode 100644 index e7bf5e19e5e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/SerializableXid.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote; - -import java.io.Serializable; -import java.util.Arrays; - -import javax.transaction.xa.Xid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Serializable {@link Xid}. - * - * @since Jackrabbit JCR-RMI 1.5 - */ -@Deprecated(forRemoval = true) public class SerializableXid implements Serializable, Xid { - - private final int formatId; - - private final byte[] globalTransactionId; - - private final byte[] branchQualifier; - - private final int hashCode; - - public SerializableXid(Xid xid) { - formatId = xid.getFormatId(); - globalTransactionId = xid.getGlobalTransactionId(); - branchQualifier = xid.getBranchQualifier(); - hashCode = xid.hashCode(); - } - - public int getFormatId() { - return formatId; - } - - public byte[] getGlobalTransactionId() { - return globalTransactionId; - } - - public byte[] getBranchQualifier() { - return branchQualifier; - } - - public int hashCode() { - return hashCode; - } - - public boolean equals(Object xid) { - return (xid instanceof Xid) - && formatId == ((Xid) xid).getFormatId() - && Arrays.equals( - globalTransactionId, ((Xid) xid).getGlobalTransactionId()) - && Arrays.equals( - branchQualifier, ((Xid) xid).getBranchQualifier()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java deleted file mode 100755 index 1292557dc2a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java deleted file mode 100644 index 36fc05d892f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemoteGroup.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.principal; - -import java.rmi.RemoteException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal GroupPrincipal} interface. - * Used by the {@link org.apache.jackrabbit.rmi.server.principal.ServerGroup - * ServerGroup} and - * {@link org.apache.jackrabbit.rmi.client.principal.ClientGroup ClientGroup} - * adapter base classes to provide transparent RMI access to remote item - * definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Group method. The remote object will simply forward the method - * call to the underlying Group instance. Argument and return values, as well as - * possible exceptions, are copied over the network. Complex return values are - * returned as remote references to the corresponding remote interface. RMI - * errors are signaled with RemoteExceptions. - * - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal - * @see org.apache.jackrabbit.rmi.client.principal.ClientGroup - * @see org.apache.jackrabbit.rmi.server.principal.ServerGroup - */ -@Deprecated(forRemoval = true) public interface RemoteGroup extends RemotePrincipal { - - /** - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#isMember(java.security.Principal) - */ - boolean isMember(String member) throws RemoteException; - - /** - * @see org.apache.jackrabbit.api.security.principal.GroupPrincipal#members() - */ - RemoteIterator members() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java deleted file mode 100644 index 10bb5dd024d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/RemotePrincipal.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.principal; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link java.security.Principal Principal} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.principal.ServerPrincipal - * ServerPrincipal} and - * {@link org.apache.jackrabbit.rmi.client.principal.ClientPrincipal - * ClientPrincipal} adapter base classes to provide transparent RMI access to - * remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Principal method. The remote object will simply forward the - * method call to the underlying Principal instance. Argument and return values, - * as well as possible exceptions, are copied over the network. Complex return - * values are returned as remote references to the corresponding remote - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see java.security.Principal - * @see org.apache.jackrabbit.rmi.client.principal.ClientPrincipal - * @see org.apache.jackrabbit.rmi.server.principal.ServerPrincipal - */ -@Deprecated(forRemoval = true) public interface RemotePrincipal extends Remote { - - /** - * @see java.security.Principal#getName() - */ - public String getName() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java deleted file mode 100755 index f7a35d50ae4..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java deleted file mode 100644 index eb5dea06e67..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlEntry.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlEntry - * AccessControlEntry} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry - * ServerAccessControlEntry} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry - * ClientAccessControlEntry} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlEntry method. The remote object will simply - * forward the method call to the underlying AccessControlEntry instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlEntry - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlEntry extends Remote { - - /** - * @see javax.jcr.security.AccessControlEntry#getPrincipal() - */ - public RemotePrincipal getPrincipal() throws RemoteException; - - /** - * @see javax.jcr.security.AccessControlEntry#getPrivileges() - */ - public RemotePrivilege[] getPrivileges() throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java deleted file mode 100644 index 832eaf95798..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlList.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlList - * AccessControlList} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlList - * ServerAccessControlList} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlList - * ClientAccessControlList} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlList method. The remote object will simply forward - * the method call to the underlying AccessControlList instance. Argument and - * return values, as well as possible exceptions, are copied over the network. - * Complex return values are returned as remote references to the corresponding - * remote interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.security.AccessControlList - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlList - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlList - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlList extends RemoteAccessControlPolicy { - - /** - * @see javax.jcr.security.AccessControlList#getAccessControlEntries() - */ - public RemoteAccessControlEntry[] getAccessControlEntries() - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java deleted file mode 100644 index baf3d49917d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlManager.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlManager - * AccessControlManager} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager - * ServerAccessControlManager} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager - * ClientAccessControlManager} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlManager method. The remote object will simply - * forward the method call to the underlying AccessControlManager instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlManager - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlManager extends Remote { - - /** - * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String) - */ - public RemoteIterator getApplicablePolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getEffectivePolicies(String) - */ - public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getPolicies(String) - */ - public RemoteAccessControlPolicy[] getPolicies(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getPrivileges(String) - */ - public RemotePrivilege[] getPrivileges(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#getSupportedPrivileges(String) - */ - public RemotePrivilege[] getSupportedPrivileges(String absPath) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#privilegeFromName(String) - */ - public RemotePrivilege privilegeFromName(String privilegeName) - throws RepositoryException, RemoteException; - - /** - * @see javax.jcr.security.AccessControlManager#hasPrivileges(String, - * javax.jcr.security.Privilege[]) - */ - public boolean hasPrivileges(String absPath, String[] privileges) - throws RepositoryException, RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java deleted file mode 100644 index 353393139ae..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemoteAccessControlPolicy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.AccessControlPolicy - * AccessControlPolicy} interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy - * ServerAccessControlPolicy} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy - * ClientAccessControlPolicy} adapter base classes to provide transparent RMI - * access to remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding AccessControlPolicy method. The remote object will simply - * forward the method call to the underlying AccessControlPolicy instance. - * Argument and return values, as well as possible exceptions, are copied over - * the network. Complex return values are returned as remote references to the - * corresponding remote interface. RMI errors are signaled with - * RemoteExceptions. - * - * @see javax.jcr.security.AccessControlPolicy - * @see org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy - * @see org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy - */ -@Deprecated(forRemoval = true) public interface RemoteAccessControlPolicy extends Remote { - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java deleted file mode 100644 index f09982f30dd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/RemotePrivilege.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.remote.security; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote version of the JCR {@link javax.jcr.security.Privilege Privilege} - * interface. Used by the - * {@link org.apache.jackrabbit.rmi.server.security.ServerPrivilege - * ServerPrivilege} and - * {@link org.apache.jackrabbit.rmi.client.security.ClientPrivilege - * ClientPrivilege} adapter base classes to provide transparent RMI access to - * remote item definitions. - *

    - * The methods in this interface are documented only with a reference to a - * corresponding Privilege method. The remote object will simply forward the - * method call to the underlying Privilege instance. Argument and return values, - * as well as possible exceptions, are copied over the network. Complex return - * values are returned as remote references to the corresponding remote - * interface. RMI errors are signaled with RemoteExceptions. - * - * @see javax.jcr.security.Privilege - * @see org.apache.jackrabbit.rmi.client.security.ClientPrivilege - * @see org.apache.jackrabbit.rmi.server.security.ServerPrivilege - */ -@Deprecated(forRemoval = true) public interface RemotePrivilege extends Remote { - - /** - * @see javax.jcr.security.Privilege#getAggregatePrivileges() - */ - public RemotePrivilege[] getAggregatePrivileges() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#getDeclaredAggregatePrivileges() - */ - public RemotePrivilege[] getDeclaredAggregatePrivileges() - throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#getName() - */ - public String getName() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#isAbstract() - */ - public boolean isAbstract() throws RemoteException; - - /** - * @see javax.jcr.security.Privilege#isAggregate() - */ - public boolean isAggregate() throws RemoteException; -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java deleted file mode 100755 index ba87be38ddb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/remote/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.remote.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java deleted file mode 100644 index 1b29ac184ee..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/AbstractRemoteRepositoryFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Abstract base class for repository factories that make a remote repository - * available locally. Subclasses need to implement the - * {@link #getRemoteRepository()} method to actually retrieve the remote - * repository reference. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public abstract class AbstractRemoteRepositoryFactory - implements RepositoryFactory { - - /** - * Local adapter factory. - */ - private final LocalAdapterFactory factory; - - /** - * Creates a factory for looking up a repository from the given RMI URL. - * - * @param factory local adapter factory - */ - protected AbstractRemoteRepositoryFactory(LocalAdapterFactory factory) { - this.factory = factory; - } - - /** - * Returns a local adapter for the remote repository. - * - * @return local adapter for the remote repository - * @throws RepositoryException if the remote repository is not available - */ - public Repository getRepository() throws RepositoryException { - return factory.getRepository(getRemoteRepository()); - } - - /** - * Returns the remote repository reference. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected abstract RemoteRepository getRemoteRepository() - throws RepositoryException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java deleted file mode 100644 index df577ce1022..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepository.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository bound in JNDI. The configured repository is - * looked up from JNDI lazily during each method call. Thus the JNDI entry - * does not need to exist when this class is instantiated. The JNDI entry - * can also be replaced with another repository during the lifetime of an - * instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class JNDIRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for a remote repository in JNDI. - * - * @param factory local adapter factory - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepository( - LocalAdapterFactory factory, Context context, String location) { - super(new JNDIRemoteRepositoryFactory(factory, context, location)); - } - - /** - * Creates a proxy for the remote repository in JNDI. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepository(Context context, String location) { - this(new ClientAdapterFactory(), context, location); - } - - /** - * Creates a proxy for the remote repository in JNDI. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param location JNDI location in default context - * @throws NamingException if the default JNDI context is not available - */ - public JNDIRemoteRepository(String location) throws NamingException { - this(new InitialContext(), location); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java deleted file mode 100644 index 943b904aab6..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/JNDIRemoteRepositoryFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.RepositoryException; -import javax.naming.Context; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from JNDI. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class JNDIRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * JNDI context of the remote repository. - */ - private final Context context; - - /** - * JNDI location of the remote repository. - */ - private final String location; - - /** - * Creates a factory for looking up a remote repository from JNDI. - * - * @param factory local adapter factory - * @param context JNDI context - * @param location JNDI location - */ - public JNDIRemoteRepositoryFactory( - LocalAdapterFactory factory, Context context, String location) { - super(factory); - this.context = context; - this.location = location; - } - - /** - * Looks up a remote repository from JNDI. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - Object remote = context.lookup(location); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else if (remote == null) { - throw new RepositoryException( - "Remote repository not found: The JNDI entry " - + location + " is null"); - } else { - throw new RepositoryException( - "Invalid remote repository: The JNDI entry " - + location + " is an instance of " - + remote.getClass().getName()); - } - } catch (NamingException e) { - throw new RepositoryException( - "Remote repository not found: The JNDI entry " + location - + " could not be looked up", e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java deleted file mode 100644 index e5dd0afe10f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/ProxyRepository.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.util.HashSet; -import java.util.Set; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Repository that proxies all method calls to another repository. - * The other repository is accessed lazily using a - * {@link RepositoryFactory repository factory}. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ProxyRepository implements Repository { - - /** - * The set of standard descriptor keys defined in the - * {@link Repository} interface. - */ - private static final Set STANDARD_KEYS = new HashSet() {{ - add(Repository.IDENTIFIER_STABILITY); - add(Repository.LEVEL_1_SUPPORTED); - add(Repository.LEVEL_2_SUPPORTED); - add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES); - add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED); - add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED); - add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED); - add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED); - add(Repository.OPTION_LIFECYCLE_SUPPORTED); - add(Repository.OPTION_LOCKING_SUPPORTED); - add(Repository.OPTION_OBSERVATION_SUPPORTED); - add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED); - add(Repository.OPTION_QUERY_SQL_SUPPORTED); - add(Repository.OPTION_RETENTION_SUPPORTED); - add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED); - add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED); - add(Repository.OPTION_TRANSACTIONS_SUPPORTED); - add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED); - add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED); - add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED); - add(Repository.OPTION_VERSIONING_SUPPORTED); - add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED); - add(Repository.OPTION_XML_EXPORT_SUPPORTED); - add(Repository.OPTION_XML_IMPORT_SUPPORTED); - add(Repository.OPTION_ACTIVITIES_SUPPORTED); - add(Repository.OPTION_BASELINES_SUPPORTED); - - add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED); - add(Repository.QUERY_JOINS); - add(Repository.QUERY_LANGUAGES); - add(Repository.QUERY_STORED_QUERIES_SUPPORTED); - add(Repository.QUERY_XPATH_DOC_ORDER); - add(Repository.QUERY_XPATH_POS_INDEX); - add(Repository.REP_NAME_DESC); - add(Repository.REP_VENDOR_DESC); - add(Repository.REP_VENDOR_URL_DESC); - add(Repository.SPEC_NAME_DESC); - add(Repository.SPEC_VERSION_DESC); - add(Repository.WRITE_SUPPORTED); - }}; - - /** - * Factory for accessing the proxied repository. - */ - private final RepositoryFactory factory; - - /** - * Creates a proxy for the repository (or repositories) accessible - * through the given factory. - * - * @param factory repository factory - */ - public ProxyRepository(RepositoryFactory factory) { - this.factory = factory; - } - - /** - * Returns the descriptor keys of the proxied repository, or an empty - * array if the proxied repository can not be accessed. - * - * @return descriptor keys (possibly empty) - */ - public String[] getDescriptorKeys() { - try { - return factory.getRepository().getDescriptorKeys(); - } catch (RepositoryException e) { - return new String[0]; - } - } - - /** - * Checks whether the given key identifies a valid single-valued - * descriptor key in the proxied repository. Returns false - * if the proxied repository can not be accessed. - * - * @return true if the key identifies a valid single-valued - * descriptor in the proxied repository, - * false otherwise - */ - public boolean isSingleValueDescriptor(String key) { - try { - return factory.getRepository().isSingleValueDescriptor(key); - } catch (RepositoryException e) { - return false; - } - } - - /** - * Returns the descriptor with the given key from the proxied repository. - * Returns null if the descriptor does not exist or if the - * proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor value, or null - */ - public String getDescriptor(String key) { - try { - return factory.getRepository().getDescriptor(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Returns the value of the descriptor with the given key from the proxied - * repository. Returns null if the descriptor does not exist - * or if the proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor value, or null - */ - public Value getDescriptorValue(String key) { - try { - return factory.getRepository().getDescriptorValue(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Returns the values of the descriptor with the given key from the proxied - * repository. Returns null if the descriptor does not exist - * or if the proxied repository can not be accessed. - * - * @param key descriptor key - * @return descriptor values, or null - */ - public Value[] getDescriptorValues(String key) { - try { - return factory.getRepository().getDescriptorValues(key); - } catch (RepositoryException e) { - return null; - } - } - - /** - * Logs in to the proxied repository and returns the resulting session. - *

    - * Note that the {@link Session#getRepository()} method of the resulting - * session will return the proxied repository, not this repository proxy! - * - * @throws RepositoryException if the proxied repository can not be - * accessed, or if the login in the proxied - * repository fails - */ - public Session login(Credentials credentials, String workspace) - throws RepositoryException { - return factory.getRepository().login(credentials, workspace); - } - - /** - * Returns true if the given key identifies a standard descriptor. - * - * @param key descriptor key - * @return true if the key identifies a standard descriptor, - * false otherwise - */ - public boolean isStandardDescriptor(String key) { - return STANDARD_KEYS.contains(key); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null arguments. - * - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login() throws RepositoryException { - return login(null, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * the given credentials and a null workspace name. - * - * @param credentials login credentials - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(Credentials credentials) throws RepositoryException { - return login(credentials, null); - } - - /** - * Calls {@link Repository#login(Credentials, String)} with - * null credentials and the given workspace name. - * - * @param workspace workspace name - * @return logged in session - * @throws RepositoryException if an error occurs - */ - public Session login(String workspace) throws RepositoryException { - return login(null, workspace); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java deleted file mode 100644 index 979dc7e0ccd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepository.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository bound in RMI. The configured repository is - * looked up from RMI lazily during each method call. Thus the RMI entry - * does not need to exist when this class is instantiated. The RMI entry - * can also be replaced with another repository during the lifetime of an - * instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class RMIRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for the remote repository in the given RMI URL. - * - * @param factory local adapter factory - * @param url RMI URL of the remote repository - */ - public RMIRemoteRepository(LocalAdapterFactory factory, String url) { - super(new RMIRemoteRepositoryFactory(factory, url)); - } - - /** - * Creates a proxy for the remote repository in the given RMI URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - */ - public RMIRemoteRepository(String url) { - this(new ClientAdapterFactory(), url); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java deleted file mode 100644 index 370ec3aea36..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RMIRemoteRepositoryFactory.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.net.MalformedURLException; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from an RMI registry. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class RMIRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * RMI URL of the remote repository. - */ - private final String url; - - /** - * Creates a factory for looking up a remote repository from - * an RMI registry. - * - * @param factory local adapter factory - * @param url RMI URL of the repository - */ - public RMIRemoteRepositoryFactory(LocalAdapterFactory factory, String url) { - super(factory); - this.url = url; - } - - /** - * Looks up a remote repository from the RMI registry. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - return (RemoteRepository) Naming.lookup(url); - } catch (MalformedURLException e) { - throw new RepositoryException("Invalid repository URL: " + url, e); - } catch (NotBoundException e) { - throw new RepositoryException("Repository not found: " + url, e); - } catch (ClassCastException e) { - throw new RepositoryException("Invalid repository: " + url, e); - } catch (RemoteException e) { - throw new RepositoryException("Repository access error: " + url, e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java deleted file mode 100644 index b16f85c1d83..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RepositoryFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for JCR content repositories. - */ -@Deprecated(forRemoval = true) interface RepositoryFactory { - - /** - * Returns a content repository. - * - * @return content repository - * @throws RepositoryException if a repository is not available - */ - Repository getRepository() throws RepositoryException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java deleted file mode 100644 index 8a7b3aa99dc..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/RmiRepositoryFactory.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.rmi.Naming; -import java.rmi.NotBoundException; -import java.rmi.RemoteException; -import java.util.Hashtable; -import java.util.Map; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.RepositoryFactory; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.client.SafeClientRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -@Deprecated(forRemoval = true) public class RmiRepositoryFactory implements RepositoryFactory { - - private static final String REPOSITORY_URI = - "org.apache.jackrabbit.repository.uri"; - - @SuppressWarnings({"unchecked", "rawtypes"}) - public Repository getRepository(Map parameters) throws RepositoryException { - if (parameters != null && parameters.containsKey(REPOSITORY_URI)) { - URI uri; - try { - uri = new URI(parameters.get(REPOSITORY_URI).toString().trim()); - } catch (URISyntaxException e) { - return null; - } - - String scheme = uri.getScheme(); - if ("rmi".equalsIgnoreCase(scheme)) { - return getRmiRepository(uri.getSchemeSpecificPart()); - } else if ("jndi".equalsIgnoreCase(scheme)) { - Hashtable environment = new Hashtable(parameters); - environment.remove(REPOSITORY_URI); - return getJndiRepository( - uri.getSchemeSpecificPart(), environment); - } else { - try { - return getUrlRepository(uri.toURL()); - } catch (MalformedURLException e) { - return null; - } - } - } else { - return null; - } - } - - private Repository getUrlRepository(final URL url) - throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - InputStream stream = url.openStream(); - try { - Object remote = new ObjectInputStream(stream).readObject(); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else { - throw new RemoteException("The resource at URL " + url - + " is not a remote repository stub: " + remote); - } - } finally { - if (stream != null) { - stream.close(); - } - } - } catch (ClassNotFoundException e) { - throw new RemoteException("The resource at URL " + url - + " requires a class that is not available", e); - } catch (IOException e) { - throw new RemoteException("Failed to read the resource at URL " - + url, e); - } - } - }; - } - - @SuppressWarnings("rawtypes") - private Repository getJndiRepository(final String name, - final Hashtable environment) throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - Object value = new InitialContext(environment).lookup(name); - if (value instanceof RemoteRepository) { - return (RemoteRepository) value; - } else { - throw new RemoteException("The JNDI resource " + name - + " is not a remote repository stub: " + value); - } - } catch (NamingException e) { - throw new RemoteException( - "Failed to look up the JNDI resource " + name, e); - } - } - }; - } - - private Repository getRmiRepository(final String name) - throws RepositoryException { - return new RmiSafeClientRepository(new ClientAdapterFactory()) { - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - try { - Object value = Naming.lookup(name); - if (value instanceof RemoteRepository) { - return (RemoteRepository) value; - } else { - throw new RemoteException("The RMI resource " + name - + " is not a remote repository stub: " + value); - } - } catch (NotBoundException e) { - throw new RemoteException( - "RMI resource " + name + " not found", e); - } catch (MalformedURLException e) { - throw new RemoteException("Invalid RMI name: " + name, e); - } catch (RemoteException e) { - throw new RemoteException("Failed to look up the RMI resource " - + name, e); - } - } - }; - } - - /** - * Basic SafeClientRepository for the different lookup types of a rmi repository - */ - private static class RmiSafeClientRepository extends SafeClientRepository { - - public RmiSafeClientRepository(LocalAdapterFactory factory) { - super(factory); - } - - @Override - protected RemoteRepository getRemoteRepository() throws RemoteException { - return null; - } - - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java deleted file mode 100644 index 4d8095e7d19..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepository.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Proxy for a remote repository accessed via a URL. The configured URL is - * dereferenced lazily during each method call. Thus the resource pointed to - * by the URL does not need to exist when this class is instantiated. The - * resource can also be replaced with another remote repository instance - * during the lifetime of an instance of this class. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class URLRemoteRepository extends ProxyRepository { - - /** - * Creates a proxy for the remote repository at the given URL. - * - * @param factory local adapter factory - * @param url URL of the remote repository - */ - public URLRemoteRepository(LocalAdapterFactory factory, URL url) { - super(new URLRemoteRepositoryFactory(factory, url)); - } - - /** - * Creates a proxy for the remote repository at the given URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - */ - public URLRemoteRepository(URL url) { - this(new ClientAdapterFactory(), url); - } - - /** - * Creates a proxy for the remote repository at the given URL. - * Uses {@link ClientAdapterFactory} as the default - * local adapter factory. - * - * @param url URL of the remote repository - * @throws MalformedURLException if the given URL is malformed - */ - public URLRemoteRepository(String url) throws MalformedURLException { - this(new URL(url)); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java deleted file mode 100644 index cc950fa3e02..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/URLRemoteRepositoryFactory.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.repository; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.net.URL; - -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory that looks up a remote repository from a given URL. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class URLRemoteRepositoryFactory - extends AbstractRemoteRepositoryFactory { - - /** - * URL of the remote repository. - */ - private final URL url; - - /** - * Creates a factory for looking up a remote repository from a URL. - * - * @param factory local adapter factory - * @param url URL or the remote repository - */ - public URLRemoteRepositoryFactory(LocalAdapterFactory factory, URL url) { - super(factory); - this.url = url; - } - - /** - * Looks up and returns a remote repository from the configured URL. - * - * @return remote repository reference - * @throws RepositoryException if the remote repository is not available - */ - protected RemoteRepository getRemoteRepository() - throws RepositoryException { - try { - ObjectInputStream input = new ObjectInputStream(url.openStream()); - try { - Object remote = input.readObject(); - if (remote instanceof RemoteRepository) { - return (RemoteRepository) remote; - } else if (remote == null) { - throw new RepositoryException( - "Remote repository not found: The resource at " - + url + " is null"); - } else { - throw new RepositoryException( - "Invalid remote repository: The resource at " - + url + " is an instance of " - + remote.getClass().getName()); - } - } finally { - input.close(); - } - } catch (ClassNotFoundException e) { - throw new RepositoryException( - "Invalid remote repository: The resource at " + url - + " is an instance of an unknown class", e); - } catch (IOException e) { - throw new RepositoryException( - "Remote repository not found: The resource at " + url - + " could not be retrieved", e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java deleted file mode 100755 index 33e6942b6d8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/repository/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.repository; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java deleted file mode 100644 index d30e5d1b03f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/RemoteAdapterFactory.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Iterator; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Factory interface for creating remote adapters for local resources. - * This interface defines how the local JCR interfaces are adapted to - * remote JCR-RMI references. The adaption mechanism can be - * modified (for example to add extra features) by changing the - * remote adapter factory used by the repository server. - *

    - * Note that the {@link ServerObject ServerObject} base class provides - * a number of utility methods designed to work with a remote adapter - * factory. Adapter implementations may want to inherit that functionality - * by subclassing from ServerObject. - * - * @see org.apache.jackrabbit.rmi.client.LocalAdapterFactory - * @see org.apache.jackrabbit.rmi.server.ServerAdapterFactory - * @see org.apache.jackrabbit.rmi.server.ServerObject - */ -@Deprecated(forRemoval = true) public interface RemoteAdapterFactory { - - /** - * Returns the port number to which the server objects created by - * this factory are bound. This method is mostly used internally by - * the {@link ServerObject} constructor to determine which port number - * to use. - * - * @return port number, or 0 for a random port - */ - int getPortNumber(); - - /** - * Returns a remote adapter for the given local repository. - * - * @param repository local repository - * @return remote repository adapter - * @throws RemoteException on RMI errors - */ - RemoteRepository getRemoteRepository(Repository repository) - throws RemoteException; - - /** - * Returns a remote adapter for the given local session. - * - * @param session local session - * @return remote session adapter - * @throws RemoteException on RMI errors - */ - RemoteSession getRemoteSession(Session session) throws RemoteException; - - /** - * Returns a remote adapter for the given local workspace. - * - * @param workspace local workspace - * @return remote workspace adapter - * @throws RemoteException on RMI errors - */ - RemoteWorkspace getRemoteWorkspace(Workspace workspace) - throws RemoteException; - - /** - * Returns a remote adapter for the given local observation manager. - * - * @param observationManager local observation manager - * @return remote observation manager adapter - * @throws RemoteException on RMI errors - */ - RemoteObservationManager getRemoteObservationManager( - ObservationManager observationManager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local namespace registry. - * - * @param registry local namespace registry - * @return remote namespace registry adapter - * @throws RemoteException on RMI errors - */ - RemoteNamespaceRegistry getRemoteNamespaceRegistry( - NamespaceRegistry registry) throws RemoteException; - - /** - * Returns a remote adapter for the given local node type manager. - * - * @param manager local node type manager - * @return remote node type manager adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeTypeManager getRemoteNodeTypeManager(NodeTypeManager manager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local item. This method - * will return an adapter that implements only the - * {@link Item Item} interface. The caller may want to introspect - * the local item to determine whether to use either the - * {@link #getRemoteNode(Node) getRemoteNode} or the - * {@link #getRemoteProperty(Property) getRemoteProperty} method instead. - * - * @param item local item - * @return remote item adapter - * @throws RemoteException on RMI errors - */ - RemoteItem getRemoteItem(Item item) throws RemoteException; - - /** - * Returns a remote adapter for the given local property. - * - * @param property local property - * @return remote property adapter - * @throws RemoteException on RMI errors - */ - RemoteProperty getRemoteProperty(Property property) throws RemoteException; - - /** - * Returns a remote adapter for the given local node. - * - * @param node local node - * @return remote node adapter - * @throws RemoteException on RMI errors - */ - RemoteNode getRemoteNode(Node node) throws RemoteException; - - /** - * Returns a remote adapter for the given local version. - * - * @param version local version - * @return remote version adapter - * @throws RemoteException on RMI errors - */ - RemoteVersion getRemoteVersion(Version version) throws RemoteException; - - /** - * Returns a remote adapter for the given local version history. - * - * @param versionHistory local version history - * @return remote version history adapter - * @throws RemoteException on RMI errors - */ - RemoteVersionHistory getRemoteVersionHistory(VersionHistory versionHistory) - throws RemoteException; - - /** - * Returns a remote adapter for the given local node type. - * - * @param type local node type - * @return remote node type adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeType getRemoteNodeType(NodeType type) throws RemoteException; - - /** - * Returns a remote adapter for the given local item definition. - * This method will return an adapter that implements only the - * {@link ItemDefinition ItemDefinition} interface. The caller may want to introspect - * the local item definition to determine whether to use either the - * {@link #getRemoteNodeDefinition(NodeDefinition) getRemoteNodeDef} or the - * {@link #getRemotePropertyDefinition(PropertyDefinition) getRemotePropertyDef} - * method instead. - * - * @param def local item definition - * @return remote item definition adapter - * @throws RemoteException on RMI errors - */ - RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) throws RemoteException; - - /** - * Returns a remote adapter for the given local node definition. - * - * @param def local node definition - * @return remote node definition adapter - * @throws RemoteException on RMI errors - */ - RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) throws RemoteException; - - /** - * Returns a remote adapter for the given local property definition. - * - * @param def local property definition - * @return remote property definition adapter - * @throws RemoteException on RMI errors - */ - RemotePropertyDefinition getRemotePropertyDefinition(PropertyDefinition def) - throws RemoteException; - - /** - * Returns a remote adapter for the given local lock. - * - * @param lock local lock - * @return remote lock adapter - * @throws RemoteException on RMI errors - */ - RemoteLock getRemoteLock(Lock lock) throws RemoteException; - - /** - * Returns a remote adapter for the given local query manager. - * - * @param session current session - * @param manager local query manager - * @return remote query manager adapter - * @throws RemoteException on RMI errors - */ - RemoteQueryManager getRemoteQueryManager( - Session session, QueryManager manager) throws RemoteException; - - /** - * Returns a remote adapter for the given local query. - * - * @param query local query - * @return remote query adapter - * @throws RemoteException on RMI errors - */ - RemoteQuery getRemoteQuery(Query query) throws RemoteException; - - /** - * Returns a remote adapter for the given local query result. - * - * @param result local query result - * @return remote query result adapter - * @throws RemoteException on RMI errors - */ - RemoteQueryResult getRemoteQueryResult(QueryResult result) - throws RemoteException; - - /** - * Returns a remote adapter for the given local query row. - * - * @param row local query row - * @return remote query row adapter - * @throws RemoteException on RMI errors - */ - RemoteRow getRemoteRow(Row row) throws RemoteException; - - /** - * Returns a remote adapter for the given local events. - * - * @param listenerId The listener identifier to which the events are to be - * dispatched. - * @param events the local events - * @return remote event iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteEventCollection getRemoteEvent(long listenerId, EventIterator events) - throws RemoteException; - - - /** - * Returns a remote adapter for the given local node iterator. - * - * @param iterator local node iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteNodeIterator(NodeIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local property iterator. - * - * @param iterator local property iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local version iterator. - * - * @param iterator local version iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteVersionIterator(VersionIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local node type iterator. - * - * @param iterator local node type iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) - throws RemoteException; - - /** - * Returns a remote adapter for the given local row iterator. - * - * @param iterator local row iterator - * @return remote iterator adapter - * @throws RemoteException on RMI errors - */ - RemoteIterator getRemoteRowIterator(RowIterator iterator) - throws RemoteException; - - RemoteLockManager getRemoteLockManager(LockManager lockManager) - throws RemoteException; - - RemoteVersionManager getRemoteVersionManager(Session session, VersionManager versionManager) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @param acm local access control manager - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - RemoteAccessControlManager getRemoteAccessControlManager( - AccessControlManager acm) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrivilege getRemotePrivilege(final Privilege local) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlPolicy getRemoteAccessControlPolicy( - final AccessControlPolicy local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( - final AccessControlPolicy[] local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteIterator getRemoteAccessControlPolicyIterator( - AccessControlPolicyIterator iterator) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlEntry getRemoteAccessControlEntry( - final AccessControlEntry local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteAccessControlEntry[] getRemoteAccessControlEntry( - final AccessControlEntry[] local) throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemotePrincipal getRemotePrincipal(final Principal principal) - throws RemoteException; - - /** - * Returns a remote adapter for the given local access control manager. - * - * @return remote access control manager - * @throws RemoteException on RMI errors - */ - public RemoteIterator getRemotePrincipalIterator( - final Iterator principals) throws RemoteException; - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java deleted file mode 100644 index 2b5e1220537..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerAdapterFactory.java +++ /dev/null @@ -1,531 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.jcr.Item; -import javax.jcr.NamespaceRegistry; -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.PropertyIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.Workspace; -import javax.jcr.lock.Lock; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.nodetype.PropertyDefinition; -import javax.jcr.observation.Event; -import javax.jcr.observation.EventIterator; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; -import javax.jcr.query.QueryResult; -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; -import javax.jcr.security.Privilege; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; -import javax.jcr.version.VersionIterator; -import javax.jcr.version.VersionManager; -import javax.transaction.xa.XAResource; - -import org.apache.jackrabbit.rmi.remote.ArrayIterator; -import org.apache.jackrabbit.rmi.remote.BufferIterator; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.iterator.ServerNodeIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerNodeTypeIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerPropertyIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerRowIterator; -import org.apache.jackrabbit.rmi.server.iterator.ServerVersionIterator; -import org.apache.jackrabbit.rmi.server.principal.ServerGroup; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipalIterator; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlEntry; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlList; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicy; -import org.apache.jackrabbit.rmi.server.security.ServerAccessControlPolicyIterator; -import org.apache.jackrabbit.rmi.server.security.ServerPrivilege; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Default implementation of the {@link RemoteAdapterFactory - * RemoteAdapterFactory} interface. This factory uses the server adapters - * defined in this package as the default adapter implementations. Subclasses - * can override or extend the default adapters by implementing the corresponding - * factory methods. - *

    - * The bufferSize property can be used to configure the size of the - * buffer used by iterators to speed up iterator traversal over the network. - */ -@Deprecated(forRemoval = true) public class ServerAdapterFactory implements RemoteAdapterFactory { - - /** The default iterator buffer size. */ - private static final int DEFAULT_BUFFER_SIZE = 100; - - /** The buffer size of iterators created by this factory. */ - private int bufferSize = DEFAULT_BUFFER_SIZE; - - /** - * The port number for server objects. Initializes to the value of the - * org.apache.jackrabbit.rmi.port system property, or to 0 if - * the property is not set. Value 0 means that the server objects should use - * a random anonymous port. - */ - private int portNumber = Integer.getInteger( - "org.apache.jackrabbit.rmi.port", 0).intValue(); - - /** - * Returns the iterator buffer size. - * - * @return iterator buffer size - */ - public int getBufferSize() { - return bufferSize; - } - - /** - * Sets the iterator buffer size. - * - * @param bufferSize iterator buffer size - */ - public void setBufferSize(int bufferSize) { - this.bufferSize = bufferSize; - } - - /** - * Returns the port number for server objects. - * - * @return port number, or 0 for the default - */ - public int getPortNumber() { - return portNumber; - } - - /** - * Sets the port number for server objects. - * - * @param portNumber port number, or 0 for the default - */ - public void setPortNumber(int portNumber) { - this.portNumber = portNumber; - } - - /** - * Creates a {@link ServerRepository ServerRepository} instance. - * {@inheritDoc} - */ - public RemoteRepository getRemoteRepository(Repository repository) - throws RemoteException { - return new ServerRepository(repository, this); - } - - /** - * Creates a {@link ServerSession ServerSession} instance. In case the - * underlying session is transaction enabled, the remote interface is will - * be transaction enabled too through the {@link ServerXASession}. - * {@inheritDoc} - */ - public RemoteSession getRemoteSession(Session session) - throws RemoteException { - if (session instanceof XAResource) { - return new ServerXASession(session, (XAResource) session, this); - } else { - return new ServerSession(session, this); - } - } - - /** - * Creates a {@link ServerWorkspace ServerWorkspace} instance. {@inheritDoc} - */ - public RemoteWorkspace getRemoteWorkspace(Workspace workspace) - throws RemoteException { - return new ServerWorkspace(workspace, this); - } - - /** - * Creates a {@link ServerObservationManager ServerObservationManager} - * instance. {@inheritDoc} - */ - public RemoteObservationManager getRemoteObservationManager( - ObservationManager observationManager) throws RemoteException { - return new ServerObservationManager(observationManager, this); - } - - /** - * Creates a {@link ServerNamespaceRegistry ServerNamespaceRegistry} - * instance. {@inheritDoc} - */ - public RemoteNamespaceRegistry getRemoteNamespaceRegistry( - NamespaceRegistry registry) throws RemoteException { - return new ServerNamespaceRegistry(registry, this); - } - - /** - * Creates a {@link ServerNodeTypeManager ServerNodeTypeManager} instance. - * {@inheritDoc} - */ - public RemoteNodeTypeManager getRemoteNodeTypeManager( - NodeTypeManager manager) throws RemoteException { - return new ServerNodeTypeManager(manager, this); - } - - /** - * Creates a {@link ServerItem ServerItem} instance. {@inheritDoc} - */ - public RemoteItem getRemoteItem(Item item) throws RemoteException { - return new ServerItem(item, this); - } - - /** - * Creates a {@link ServerProperty ServerProperty} instance. {@inheritDoc} - */ - public RemoteProperty getRemoteProperty(Property property) - throws RemoteException { - return new ServerProperty(property, this); - } - - /** - * Creates a {@link ServerNode ServerNode} instance. {@inheritDoc} - */ - public RemoteNode getRemoteNode(Node node) throws RemoteException { - return new ServerNode(node, this); - } - - /** - * Creates a {@link ServerVersion ServerVersion} instance. {@inheritDoc} - */ - public RemoteVersion getRemoteVersion(Version version) - throws RemoteException { - return new ServerVersion(version, this); - } - - /** - * Creates a {@link ServerVersionHistory ServerVersionHistory} instance. - * {@inheritDoc} - */ - public RemoteVersionHistory getRemoteVersionHistory( - VersionHistory versionHistory) throws RemoteException { - return new ServerVersionHistory(versionHistory, this); - } - - /** - * Creates a {@link ServerNodeType ServerNodeType} instance. {@inheritDoc} - */ - public RemoteNodeType getRemoteNodeType(NodeType type) - throws RemoteException { - return new ServerNodeType(type, this); - } - - /** - * Creates a {@link ServerItemDefinition ServerItemDefinition} instance. - * {@inheritDoc} - */ - public RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) - throws RemoteException { - return new ServerItemDefinition(def, this); - } - - /** - * Creates a {@link ServerNodeDefinition ServerNodeDefinition} instance. - * {@inheritDoc} - */ - public RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) - throws RemoteException { - return new ServerNodeDefinition(def, this); - } - - /** - * Creates a {@link ServerPropertyDefinition ServerPropertyDefinition} - * instance. {@inheritDoc} - */ - public RemotePropertyDefinition getRemotePropertyDefinition( - PropertyDefinition def) throws RemoteException { - return new ServerPropertyDefinition(def, this); - } - - /** - * Creates a {@link ServerLock ServerLock} instance. {@inheritDoc} - */ - public RemoteLock getRemoteLock(Lock lock) throws RemoteException { - return new ServerLock(lock, this); - } - - /** - * Creates a {@link ServerQueryManager ServerQueryManager} instance. - * {@inheritDoc} - */ - public RemoteQueryManager getRemoteQueryManager(Session session, - QueryManager manager) throws RemoteException { - return new ServerQueryManager(session, manager, this); - } - - /** - * Creates a {@link ServerQuery ServerQuery} instance. {@inheritDoc} - */ - public RemoteQuery getRemoteQuery(Query query) throws RemoteException { - return new ServerQuery(query, this); - } - - /** - * Creates a {@link ServerQueryResult ServerQueryResult} instance. - * {@inheritDoc} - */ - public RemoteQueryResult getRemoteQueryResult(QueryResult result) - throws RemoteException { - return new ServerQueryResult(result, this); - } - - /** - * Creates a {@link ServerQueryResult ServerQueryResult} instance. - * {@inheritDoc} - */ - public RemoteRow getRemoteRow(Row row) throws RemoteException { - return new ServerRow(row, this); - } - - /** - * Creates a {@link ServerEventCollection ServerEventCollection} instances. - * {@inheritDoc} - */ - public RemoteEventCollection getRemoteEvent(long listenerId, - EventIterator events) throws RemoteException { - RemoteEventCollection.RemoteEvent[] remoteEvents; - if (events != null) { - List eventList = new ArrayList(); - while (events.hasNext()) { - Event event = events.nextEvent(); - eventList - .add(new ServerEventCollection.ServerEvent(event, this)); - } - remoteEvents = eventList.toArray(new RemoteEventCollection.RemoteEvent[eventList.size()]); - } else { - remoteEvents = new RemoteEventCollection.RemoteEvent[0]; // for - // safety - } - - return new ServerEventCollection(listenerId, remoteEvents, this); - } - - /** - * Optimizes the given remote iterator for transmission across the network. - * This method retrieves the first set of elements from the iterator by - * calling {@link RemoteIterator#nextObjects()} and then asks for the total - * size of the iterator. If the size is unkown or greater than the length of - * the retrieved array, then the elements, the size, and the remote iterator - * reference are wrapped into a {@link BufferIterator} instance that gets - * passed over the network. If the retrieved array of elements contains all - * the elements in the iterator, then the iterator instance is discarded and - * just the elements are wrapped into a {@link ArrayIterator} instance to be - * passed to the client. - *

    - * Subclasses can override this method to provide alternative optimizations. - * - * @param remote remote iterator - * @return optimized remote iterator - * @throws RemoteException on RMI errors - */ - protected RemoteIterator optimizeIterator(RemoteIterator remote) - throws RemoteException { - Object[] elements = remote.nextObjects(); - long size = remote.getSize(); - if (size == -1 || (elements != null && size > elements.length)) { - return new BufferIterator(elements, size, remote); - } else { - return new ArrayIterator(elements); - } - } - - /** - * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteNodeIterator(NodeIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerNodeIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerPropertyIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerPropertyIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerVersionIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteVersionIterator(VersionIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerVersionIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerNodeTypeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerNodeTypeIterator(iterator, this, - bufferSize)); - } - - /** - * Creates a {@link ServerRowIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteRowIterator(RowIterator iterator) - throws RemoteException { - return optimizeIterator(new ServerRowIterator(iterator, this, - bufferSize)); - } - - public RemoteLockManager getRemoteLockManager(LockManager lockManager) - throws RemoteException { - return new ServerLockManager(lockManager, this); - } - - public RemoteVersionManager getRemoteVersionManager(Session session, - VersionManager versionManager) throws RemoteException { - return new ServerVersionManager(session, versionManager, this); - } - - /** - * Creates a - * {@link org.apache.jackrabbit.rmi.server.security.ServerAccessControlManager} - * instance. {@inheritDoc} - */ - public RemoteAccessControlManager getRemoteAccessControlManager( - AccessControlManager acm) throws RemoteException { - return new ServerAccessControlManager(acm, this); - } - - public RemotePrivilege getRemotePrivilege(final Privilege local) - throws RemoteException { - return new ServerPrivilege(local, this); - } - - public RemotePrivilege[] getRemotePrivilege(final Privilege[] local) - throws RemoteException { - RemotePrivilege[] remote = new RemotePrivilege[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemotePrivilege(local[i]); - } - return remote; - } - - public RemoteAccessControlPolicy getRemoteAccessControlPolicy( - final AccessControlPolicy local) throws RemoteException { - if (local instanceof AccessControlList) { - return new ServerAccessControlList((AccessControlList) local, this); - } - return new ServerAccessControlPolicy(local, this); - } - - public RemoteAccessControlPolicy[] getRemoteAccessControlPolicy( - final AccessControlPolicy[] local) throws RemoteException { - RemoteAccessControlPolicy[] remote = new RemoteAccessControlPolicy[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemoteAccessControlPolicy(local[i]); - } - return remote; - } - - /** - * Creates a {@link ServerNodeIterator} instance. {@inheritDoc} - */ - public RemoteIterator getRemoteAccessControlPolicyIterator( - AccessControlPolicyIterator iterator) throws RemoteException { - return optimizeIterator(new ServerAccessControlPolicyIterator(iterator, - this, bufferSize)); - } - - public RemoteAccessControlEntry getRemoteAccessControlEntry( - final AccessControlEntry local) throws RemoteException { - return new ServerAccessControlEntry(local, this); - } - - public RemoteAccessControlEntry[] getRemoteAccessControlEntry( - final AccessControlEntry[] local) throws RemoteException { - RemoteAccessControlEntry[] remote = new RemoteAccessControlEntry[local.length]; - for (int i = 0; i < remote.length; i++) { - remote[i] = getRemoteAccessControlEntry(local[i]); - } - return remote; - } - - public RemotePrincipal getRemotePrincipal(final Principal principal) throws RemoteException { - if (ServerGroup.isGroup(principal)) { - return new ServerGroup(principal, this); - } - - return new ServerPrincipal(principal, this); - } - - public RemoteIterator getRemotePrincipalIterator( - Iterator principals) throws RemoteException { - return optimizeIterator(new ServerPrincipalIterator(principals, this, - bufferSize)); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java deleted file mode 100644 index b88192ca798..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerEventCollection.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.observation.Event; - -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ServerEventCollection class implements the - * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection}event to - * actually sent the server-side event to the client. - *

    - * This class does not directly relate to any JCR class because beside the list - * of events the unique identifier of the client-side listener has to be - * provided such that the receiving listener may be identified on the - * client-side. - */ -@Deprecated(forRemoval = true) public class ServerEventCollection extends ServerObject implements - RemoteEventCollection { - - /** The unique identifier of the receiving listener */ - private final long listenerId; - - /** - * The list of - * {@link org.apache.jackrabbit.rmi.remote.RemoteEventCollection.RemoteEvent}. - */ - private final RemoteEvent[] events; - - /** - * Creates an instance of this class. - * - * @param listenerId The unique identifier of the client-side listener to - * which the events should be sent. - * @param events The list of {@link RemoteEvent remote events}. - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - ServerEventCollection( - long listenerId, RemoteEvent[] events, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - - this.listenerId = listenerId; - this.events = events; - } - - /** {@inheritDoc} */ - public long getListenerId() { - return listenerId; - } - - /** {@inheritDoc} */ - public RemoteEvent[] getEvents() { - return events; - } - - /** - * Server side implementation of the {@link RemoteEvent} interface. - * - * {@inheritDoc} - */ - public static class ServerEvent extends ServerObject implements RemoteEvent { - - /** The adapted local event. */ - private Event event; - - /** - * Creates an instance of this class. - * @param type The event type. - * @param path The absolute path to the underlying item. - * @param userId The userID of the originating session. - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - ServerEvent(Event event, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.event = event; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException { - return event.getPath(); - } - - /** {@inheritDoc} */ - public int getType() { - return event.getType(); - } - - /** {@inheritDoc} */ - public String getUserID() { - return event.getUserID(); - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException, - RemoteException { - return event.getIdentifier(); - } - - /** {@inheritDoc} */ - public Map getInfo() throws RepositoryException, RemoteException { - return event.getInfo(); - } - - /** {@inheritDoc} */ - public String getUserData() throws RepositoryException, RemoteException { - return event.getUserData(); - } - - /** {@inheritDoc} */ - public long getDate() throws RepositoryException, RemoteException { - return event.getDate(); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java deleted file mode 100644 index d6bf0b24bc3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItem.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Item Item} interface. - * This class makes a local item available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem} - * interface. Used mainly as the base class for the - * {@link org.apache.jackrabbit.rmi.server.ServerProperty ServerProperty} - * and {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} - * adapters. - * - * @see javax.jcr.Item - * @see org.apache.jackrabbit.rmi.remote.RemoteItem - */ -@Deprecated(forRemoval = true) public class ServerItem extends ServerObject implements RemoteItem { - - /** The adapted local item. */ - private Item item; - - /** - * Creates a remote adapter for the given local item. - * - * @param item local item to be adapted - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerItem(Item item, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.item = item; - } - - /** {@inheritDoc} */ - public String getPath() throws RepositoryException, RemoteException { - try { - return item.getPath(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getName() throws RepositoryException, RemoteException { - try { - return item.getName(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException, RemoteException { - try { - item.save(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getAncestor(int level) - throws RepositoryException, RemoteException { - try { - return getRemoteItem(item.getAncestor(level)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getDepth() throws RepositoryException, RemoteException { - try { - return item.getDepth(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getParent() throws RepositoryException, RemoteException { - try { - return getRemoteNode(item.getParent()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isModified() throws RemoteException { - return item.isModified(); - } - - /** {@inheritDoc} */ - public boolean isNew() throws RemoteException { - return item.isNew(); - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) - throws RepositoryException, RemoteException { - try { - item.refresh(keepChanges); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void remove() throws RepositoryException, RemoteException { - try { - item.remove(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java deleted file mode 100644 index f9ad98d8c7b..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.ItemDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDefinition} - * interface. This class makes a local item definition available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition} - * interface. Used mainly as the base class for the - * {@link org.apache.jackrabbit.rmi.server.ServerPropertyDefinition ServerPropertyDefinition} - * and - * {@link org.apache.jackrabbit.rmi.server.ServerNodeDefinition ServerNodeDefinition} - * adapters. - * - * @see javax.jcr.nodetype.ItemDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition - */ -@Deprecated(forRemoval = true) public class ServerItemDefinition extends ServerObject implements RemoteItemDefinition { - - /** The adapted local item definition. */ - private ItemDefinition def; - - /** - * Creates a remote adapter for the given local item definition. - * - * @param def local item definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerItemDefinition(ItemDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.def = def; - } - - /** {@inheritDoc} */ - public RemoteNodeType getDeclaringNodeType() throws RemoteException { - NodeType nt = def.getDeclaringNodeType(); - if (nt == null) { - return null; - } else { - return getFactory().getRemoteNodeType(nt); - } - } - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return def.getName(); - } - - /** {@inheritDoc} */ - public boolean isAutoCreated() throws RemoteException { - return def.isAutoCreated(); - } - - /** {@inheritDoc} */ - public boolean isMandatory() throws RemoteException { - return def.isMandatory(); - } - - /** {@inheritDoc} */ - public int getOnParentVersion() throws RemoteException { - return def.getOnParentVersion(); - } - - /** {@inheritDoc} */ - public boolean isProtected() throws RemoteException { - return def.isProtected(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java deleted file mode 100644 index 59db0f39fcb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLock.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.lock.Lock; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.lock.Lock Lock} interface. - * This class makes a local lock available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock} - * interface. - * - * @see javax.jcr.lock.Lock - * @see org.apache.jackrabbit.rmi.remote.RemoteLock - */ -@Deprecated(forRemoval = true) public class ServerLock extends ServerObject implements RemoteLock { - - /** The adapted local lock. */ - private Lock lock; - - /** - * Creates a remote adapter for the given local lock. - * - * @param lock local lock - * @throws RemoteException on RMI errors - */ - public ServerLock(Lock lock, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.lock = lock; - } - - /** {@inheritDoc} */ - public RemoteNode getNode() throws RemoteException { - return getRemoteNode(lock.getNode()); - } - - /** {@inheritDoc} */ - public String getLockOwner() throws RemoteException { - return lock.getLockOwner(); - } - - /** {@inheritDoc} */ - public boolean isDeep() throws RemoteException { - return lock.isDeep(); - } - - /** {@inheritDoc} */ - public String getLockToken() throws RemoteException { - return lock.getLockToken(); - } - - /** {@inheritDoc} */ - public boolean isLive() throws RepositoryException, RemoteException { - return lock.isLive(); - } - - /** {@inheritDoc} */ - public void refresh() throws RepositoryException, RemoteException { - lock.refresh(); - } - - /** {@inheritDoc} */ - public boolean isSessionScoped() throws RemoteException { - return lock.isSessionScoped(); - } - - /** {@inheritDoc} */ - public long getSecondsRemaining() throws RepositoryException, RemoteException { - return lock.getSecondsRemaining(); - } - - /** {@inheritDoc} */ - public boolean isLockOwningSession() throws RemoteException { - return lock.isLockOwningSession(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java deleted file mode 100644 index 9221f8c6b01..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerLockManager.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.lock.LockManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; - -@Deprecated(forRemoval = true) public class ServerLockManager extends ServerObject - implements RemoteLockManager { - - /** The adapted local lock manager. */ - private LockManager manager; - - public ServerLockManager(LockManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.manager = manager; - } - - public String[] getLockTokens() throws RepositoryException { - try { - return manager.getLockTokens(); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void addLockToken(String lockToken) throws RepositoryException { - try { - manager.addLockToken(lockToken); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void removeLockToken(String lockToken) throws RepositoryException { - try { - manager.removeLockToken(lockToken); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean isLocked(String absPath) throws RepositoryException { - try { - return manager.isLocked(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean holdsLock(String absPath) throws RepositoryException { - try { - return manager.holdsLock(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteLock getLock(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(manager.getLock(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteLock lock( - String absPath, boolean isDeep, boolean isSessionScoped, - long timeoutHint, String ownerInfo) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(manager.lock( - absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void unlock(String absPath) throws RepositoryException { - try { - manager.unlock(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java deleted file mode 100644 index 445ea42d2e8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNamespaceRegistry.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; - -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.NamespaceRegistry NamespaceRegistry} interface. - * This class makes a local namespace registry available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry} - * interface. - * - * @see javax.jcr.NamespaceRegistry - * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry - */ -@Deprecated(forRemoval = true) public class ServerNamespaceRegistry extends ServerObject implements - RemoteNamespaceRegistry { - - /** The adapted local namespace registry. */ - private NamespaceRegistry registry; - - /** - * Creates a remote adapter for the given local namespace registry. - * - * @param registry local namespace registry - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNamespaceRegistry( - NamespaceRegistry registry, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.registry = registry; - } - - /** {@inheritDoc} */ - public void registerNamespace(String prefix, String uri) - throws RepositoryException, RemoteException { - try { - registry.registerNamespace(prefix, uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unregisterNamespace(String prefix) - throws RepositoryException, RemoteException { - try { - registry.unregisterNamespace(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getPrefixes() throws RepositoryException, RemoteException { - try { - return registry.getPrefixes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getURIs() throws RepositoryException, RemoteException { - try { - return registry.getURIs(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getURI(String prefix) - throws RepositoryException, RemoteException { - try { - return registry.getURI(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPrefix(String uri) - throws RepositoryException, RemoteException { - try { - return registry.getPrefix(uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java deleted file mode 100644 index cb2aa90c5aa..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNode.java +++ /dev/null @@ -1,688 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; -import javax.jcr.lock.Lock; -import javax.jcr.version.Version; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteLock; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Node Node} interface. - * This class makes a local node available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode} - * interface. - * - * @see javax.jcr.Node - * @see org.apache.jackrabbit.rmi.remote.RemoteNode - */ -@Deprecated(forRemoval = true) public class ServerNode extends ServerItem implements RemoteNode { - - /** The adapted local node. */ - private Node node; - - /** - * Creates a remote adapter for the given local node. - * - * @param node local node - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNode(Node node, RemoteAdapterFactory factory) - throws RemoteException { - super(node, factory); - this.node = node; - } - - /** {@inheritDoc} */ - public RemoteNode addNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.addNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode addNode(String path, String type) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.addNode(path, type)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteProperty(node.getProperty(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getPrimaryItem() - throws RepositoryException, RemoteException { - try { - return getRemoteItem(node.getPrimaryItem()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties(String pattern) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties(pattern)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getProperties(String[] globs) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getProperties(globs)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getReferences() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getReferences()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getReferences(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getReferences(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getIdentifier() throws RepositoryException, RemoteException { - try { - return node.getIdentifier(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - @SuppressWarnings("deprecation") - public String getUUID() throws RepositoryException, RemoteException { - try { - return node.getUUID(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNodes() throws RepositoryException, RemoteException { - try { - return node.hasNodes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperties() throws RepositoryException, RemoteException { - try { - return node.hasProperties(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasProperty(String path) - throws RepositoryException, RemoteException { - try { - return node.hasProperty(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getMixinNodeTypes() - throws RepositoryException, RemoteException { - try { - return getRemoteNodeTypeArray(node.getMixinNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeType getPrimaryNodeType() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeType(node.getPrimaryNodeType()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) - throws RepositoryException, RemoteException { - try { - return node.isNodeType(type); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes(String pattern) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes(pattern)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes(String[] globs) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.getNodes(globs)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(node.getNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasNode(String path) - throws RepositoryException, RemoteException { - try { - return node.hasNode(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value value) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteProperty(node.setProperty(name, value)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value value, int type) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, value, type); - if (property == null) { - return null; - } else { - return getFactory().getRemoteProperty(property); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addMixin(String name) - throws RepositoryException, RemoteException { - try { - node.addMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean canAddMixin(String name) - throws RepositoryException, RemoteException { - try { - return node.canAddMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeMixin(String name) - throws RepositoryException, RemoteException { - try { - node.removeMixin(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void orderBefore(String src, String dst) - throws RepositoryException, RemoteException { - try { - node.orderBefore(src, dst); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value[] values) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, values); - if (property == null) { - return null; - } else { - return getFactory().getRemoteProperty(property); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition getDefinition() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeDefinition(node.getDefinition()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion checkin() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(node.checkin()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void checkout() throws RepositoryException, RemoteException { - try { - node.checkout(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getCorrespondingNodePath(String workspace) - throws RepositoryException, RemoteException { - try { - return node.getCorrespondingNodePath(workspace); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getIndex() throws RepositoryException, RemoteException { - try { - return node.getIndex(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator merge(String workspace, boolean bestEffort) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator(node.merge(workspace, bestEffort)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void cancelMerge(String versionUUID) - throws RepositoryException, RemoteException { - try { - node.cancelMerge(getVersionByUUID(versionUUID)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void doneMerge(String versionUUID) - throws RepositoryException, RemoteException { - try { - node.doneMerge(getVersionByUUID(versionUUID)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String version, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(version, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByUUID(String versionUUID, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(getVersionByUUID(versionUUID), removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restore(String versionUUID, String path, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restore(getVersionByUUID(versionUUID), path, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void restoreByLabel(String label, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - node.restoreByLabel(label, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void update(String workspace) - throws RepositoryException, RemoteException { - try { - node.update(workspace); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean holdsLock() throws RepositoryException, RemoteException { - try { - return node.holdsLock(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isCheckedOut() throws RepositoryException, RemoteException { - try { - return node.isCheckedOut(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersionHistory getVersionHistory() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory(node.getVersionHistory()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getBaseVersion() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(node.getBaseVersion()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean isLocked() throws RepositoryException, RemoteException { - try { - return node.isLocked(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty setProperty(String name, Value[] values, int type) - throws RepositoryException, RemoteException { - try { - Property property = node.setProperty(name, values, type); - return getFactory().getRemoteProperty(property); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void unlock() throws RepositoryException, RemoteException { - try { - node.unlock(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteLock getLock() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteLock(node.getLock()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteLock lock(boolean isDeep, boolean isSessionScoped) - throws RepositoryException, RemoteException { - try { - Lock lock = node.lock(isDeep, isSessionScoped); - return getFactory().getRemoteLock(lock); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getSharedSet() - throws RepositoryException, RemoteException { - try { - NodeIterator sharedSet = node.getSharedSet(); - return getFactory().getRemoteNodeIterator(sharedSet); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void followLifecycleTransition(String transition) - throws RepositoryException, RemoteException { - try { - node.followLifecycleTransition(transition); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAllowedLifecycleTransistions() - throws RepositoryException, RemoteException { - try { - return node.getAllowedLifecycleTransistions(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getWeakReferences() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getWeakReferences()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getWeakReferences(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyIterator(node.getWeakReferences(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeShare() throws RepositoryException, RemoteException { - try { - node.removeShare(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeSharedSet() throws RepositoryException, RemoteException { - try { - node.removeSharedSet(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setPrimaryType(String nodeTypeName) - throws RepositoryException, RemoteException { - try { - node.setPrimaryType(nodeTypeName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - //---------- Implementation helper ----------------------------------------- - - /** - * Returns the {@link Version} instance for the given UUID. - * - * @param versionUUID The UUID of the version. - * - * @return The version node. - * - * @throws RepositoryException if an error occurrs accessing the version - * node or if the UUID does not denote a version. - */ - protected Version getVersionByUUID(String versionUUID) - throws RepositoryException { - - // get the version node by its UUID from the version history's session - Session session = node.getSession(); - Node versionNode = session.getNodeByUUID(versionUUID); - - // check whether the node is a session, which it should be according - // to the spec (methods returning nodes should automatically return - // the correct type). - if (versionNode instanceof Version) { - return (Version) versionNode; - } - - // otherwise fail - throw new RepositoryException("Cannot find version " + versionUUID); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java deleted file mode 100644 index 9239a3e6542..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; - -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDefinition} - * interface. This class makes a local node definition available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition} - * interface. - * - * @see javax.jcr.nodetype.NodeDefinition - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition - */ -@Deprecated(forRemoval = true) public class ServerNodeDefinition extends ServerItemDefinition implements RemoteNodeDefinition { - - /** The adapted node definition. */ - private NodeDefinition def; - - /** - * Creates a remote adapter for the given local node definition. - * - * @param def local node definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeDefinition(NodeDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(def, factory); - this.def = def; - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getRequiredPrimaryTypes() throws RemoteException { - return getRemoteNodeTypeArray(def.getRequiredPrimaryTypes()); - } - - /** {@inheritDoc} */ - public RemoteNodeType getDefaultPrimaryType() throws RemoteException { - NodeType nt = def.getDefaultPrimaryType(); - if (nt == null) { - return null; - } else { - return getFactory().getRemoteNodeType(def.getDefaultPrimaryType()); - } - } - - /** {@inheritDoc} */ - public boolean allowsSameNameSiblings() throws RemoteException { - return def.allowsSameNameSiblings(); - } - - /** {@inheritDoc} */ - public String getDefaultPrimaryTypeName() throws RemoteException { - return def.getDefaultPrimaryTypeName(); - } - - /** {@inheritDoc} */ - public String[] getRequiredPrimaryTypeNames() throws RemoteException { - return def.getRequiredPrimaryTypeNames(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java deleted file mode 100644 index c8881db8a53..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeType.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Value; -import javax.jcr.nodetype.NodeDefinition; -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.nodetype.NodeType NodeType} - * interface. This class makes a local node type available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType} - * interface. - * - * @see javax.jcr.nodetype.NodeType - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType - */ -@Deprecated(forRemoval = true) public class ServerNodeType extends ServerObject implements RemoteNodeType { - - /** The adapted local node type. */ - private NodeType type; - - /** - * Creates a remote adapter for the given local node type. - * - * @param type local node type - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeType(NodeType type, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.type = type; - } - - /** - * Utility method for creating an array of remote references for - * local node definitions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param defs local node definition array - * @return remote node definition array - * @throws RemoteException on RMI errors - */ - private RemoteNodeDefinition[] getRemoteNodeDefArray(NodeDefinition[] defs) - throws RemoteException { - if (defs != null) { - RemoteNodeDefinition[] remotes = - new RemoteNodeDefinition[defs.length]; - for (int i = 0; i < defs.length; i++) { - remotes[i] = getFactory().getRemoteNodeDefinition(defs[i]); - } - return remotes; - } else { - return new RemoteNodeDefinition[0]; // for safety - } - } - - /** - * Utility method for creating an array of remote references for - * local property definitions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param defs local property definition array - * @return remote property definition array - * @throws RemoteException on RMI errors - */ - private RemotePropertyDefinition[] getRemotePropertyDefArray( - PropertyDefinition[] defs) throws RemoteException { - if (defs != null) { - RemotePropertyDefinition[] remotes = - new RemotePropertyDefinition[defs.length]; - for (int i = 0; i < defs.length; i++) { - remotes[i] = getFactory().getRemotePropertyDefinition(defs[i]); - } - return remotes; - } else { - return new RemotePropertyDefinition[0]; // for safety - } - } - - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return type.getName(); - } - - /** {@inheritDoc} */ - public boolean isMixin() throws RemoteException { - return type.isMixin(); - } - - /** {@inheritDoc} */ - public boolean isAbstract() throws RemoteException { - return type.isAbstract(); - } - - /** {@inheritDoc} */ - public boolean hasOrderableChildNodes() throws RemoteException { - return type.hasOrderableChildNodes(); - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getSupertypes() throws RemoteException { - return getRemoteNodeTypeArray(type.getSupertypes()); - } - - /** {@inheritDoc} */ - public RemoteNodeType[] getDeclaredSupertypes() throws RemoteException { - return getRemoteNodeTypeArray(type.getDeclaredSupertypes()); - } - - /** {@inheritDoc} */ - public boolean isNodeType(String type) throws RemoteException { - return this.type.isNodeType(type); - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition[] getPropertyDefs() throws RemoteException { - PropertyDefinition[] defs = type.getPropertyDefinitions(); - return getRemotePropertyDefArray(defs); - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition[] getDeclaredPropertyDefs() - throws RemoteException { - PropertyDefinition[] defs = type.getDeclaredPropertyDefinitions(); - return getRemotePropertyDefArray(defs); - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition[] getChildNodeDefs() throws RemoteException { - return getRemoteNodeDefArray(type.getChildNodeDefinitions()); - } - - /** {@inheritDoc} */ - public RemoteNodeDefinition[] getDeclaredChildNodeDefs() throws RemoteException { - return getRemoteNodeDefArray(type.getDeclaredChildNodeDefinitions()); - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value value) - throws RemoteException { - return type.canSetProperty(name, value); - } - - /** {@inheritDoc} */ - public boolean canSetProperty(String name, Value[] values) - throws RemoteException { - return type.canSetProperty(name, values); - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name) throws RemoteException { - return type.canAddChildNode(name); - } - - /** {@inheritDoc} */ - public boolean canAddChildNode(String name, String type) - throws RemoteException { - return this.type.canAddChildNode(name, type); - } - - /** {@inheritDoc} */ - public boolean canRemoveItem(String name) throws RemoteException { - return type.canRemoveItem(name); - } - - /** {@inheritDoc} */ - public String getPrimaryItemName() throws RemoteException { - return type.getPrimaryItemName(); - } - - /** {@inheritDoc} */ - public boolean canRemoveNode(String nodeName) { - return type.canRemoveNode(nodeName); - } - - /** {@inheritDoc} */ - public boolean canRemoveProperty(String propertyName) { - return type.canRemoveProperty(propertyName); - } - - /** {@inheritDoc} */ - public String[] getDeclaredSupertypeNames() { - return type.getDeclaredSupertypeNames(); - } - - /** {@inheritDoc} */ - public boolean isQueryable() { - return type.isQueryable(); - } - - /** {@inheritDoc} */ - public RemoteIterator getDeclaredSubtypes() throws RemoteException { - return getFactory().getRemoteNodeTypeIterator(type.getDeclaredSubtypes()); - } - - /** {@inheritDoc} */ - public RemoteIterator getSubtypes() throws RemoteException { - return getFactory().getRemoteNodeTypeIterator(type.getSubtypes()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java deleted file mode 100644 index 0da63de8771..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerNodeTypeManager.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.nodetype.NodeTypeManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager} - * interface. This class makes a local node type manager available as an - * RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager} - * interface. - * - * @see javax.jcr.nodetype.NodeTypeManager - * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager - */ -@Deprecated(forRemoval = true) public class ServerNodeTypeManager extends ServerObject - implements RemoteNodeTypeManager { - - /** The adapted local node type manager. */ - private NodeTypeManager manager; - - /** - * Creates a remote adapter for the given local node type manager. - * - * @param manager local node type manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerNodeTypeManager( - NodeTypeManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.manager = manager; - } - - /** {@inheritDoc} */ - public RemoteNodeType getNodeType(String name) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeType(manager.getNodeType(name)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getAllNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getPrimaryNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getPrimaryNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getMixinNodeTypes() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeTypeIterator( - manager.getMixinNodeTypes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public boolean hasNodeType(String name) - throws RepositoryException, RemoteException { - try { - return manager.hasNodeType(name); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public void unregisterNodeTypes(String[] names) - throws RepositoryException, RemoteException { - try { - manager.unregisterNodeTypes(names); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java deleted file mode 100644 index 5a604f0f034..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObject.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.Serializable; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.util.ArrayList; -import java.util.List; - -import javax.jcr.AccessDeniedException; -import javax.jcr.InvalidItemStateException; -import javax.jcr.InvalidSerializedDataException; -import javax.jcr.Item; -import javax.jcr.ItemExistsException; -import javax.jcr.ItemNotFoundException; -import javax.jcr.LoginException; -import javax.jcr.MergeException; -import javax.jcr.NamespaceException; -import javax.jcr.NoSuchWorkspaceException; -import javax.jcr.Node; -import javax.jcr.PathNotFoundException; -import javax.jcr.Property; -import javax.jcr.ReferentialIntegrityException; -import javax.jcr.RepositoryException; -import javax.jcr.UnsupportedRepositoryOperationException; -import javax.jcr.Value; -import javax.jcr.ValueFormatException; -import javax.jcr.lock.LockException; -import javax.jcr.nodetype.ConstraintViolationException; -import javax.jcr.nodetype.NoSuchNodeTypeException; -import javax.jcr.nodetype.NodeType; -import javax.jcr.query.InvalidQueryException; -import javax.jcr.security.AccessControlException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionException; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteNodeType; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Base class for remote adapters. The purpose of this class is to - * centralize the handling of the RemoteAdapterFactory instance used - * to instantiate new server adapters. - */ -@Deprecated(forRemoval = true) public class ServerObject extends UnicastRemoteObject { - - /** Factory for creating server adapters. */ - private RemoteAdapterFactory factory; - - /** - * Creates a basic server adapter that uses the given factory - * to create new adapters. - * - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - protected ServerObject(RemoteAdapterFactory factory) - throws RemoteException { - super(factory.getPortNumber()); - this.factory = factory; - } - - /** - * Returns the remote adapter factory used to create new adapters. - * - * @return remote adapter factory - */ - protected RemoteAdapterFactory getFactory() { - return factory; - } - - /** - * Returns a cleaned version of the given exception. In some cases - * the underlying repository implementation may throw exceptions - * that are either unserializable, use exception subclasses that are - * only locally available, contain references to unserializable or - * only locally available classes. This method returns a cleaned - * version of such an exception. The returned exception contains only - * the message string from the original exception, and uses the public - * JCR exception class that most specifically matches the original - * exception. - * - * @param ex the original exception - * @return clean exception - */ - protected RepositoryException getRepositoryException( - RepositoryException ex) { - if (ex instanceof AccessDeniedException) { - return new AccessDeniedException(ex.getMessage()); - } else if (ex instanceof ConstraintViolationException) { - return new ConstraintViolationException(ex.getMessage()); - } else if (ex instanceof InvalidItemStateException) { - return new InvalidItemStateException(ex.getMessage()); - } else if (ex instanceof InvalidQueryException) { - return new InvalidQueryException(ex.getMessage()); - } else if (ex instanceof InvalidSerializedDataException) { - return new InvalidSerializedDataException(ex.getMessage()); - } else if (ex instanceof ItemExistsException) { - return new ItemExistsException(ex.getMessage()); - } else if (ex instanceof ItemNotFoundException) { - return new ItemNotFoundException(ex.getMessage()); - } else if (ex instanceof LockException) { - return new LockException(ex.getMessage()); - } else if (ex instanceof LoginException) { - return new LoginException(ex.getMessage()); - } else if (ex instanceof MergeException) { - return new MergeException(ex.getMessage()); - } else if (ex instanceof NamespaceException) { - return new NamespaceException(ex.getMessage()); - } else if (ex instanceof NoSuchNodeTypeException) { - return new NoSuchNodeTypeException(ex.getMessage()); - } else if (ex instanceof NoSuchWorkspaceException) { - return new NoSuchWorkspaceException(ex.getMessage()); - } else if (ex instanceof PathNotFoundException) { - return new PathNotFoundException(ex.getMessage()); - } else if (ex instanceof ReferentialIntegrityException) { - return new ReferentialIntegrityException(ex.getMessage()); - } else if (ex instanceof UnsupportedRepositoryOperationException) { - return new UnsupportedRepositoryOperationException(ex.getMessage()); - } else if (ex instanceof ValueFormatException) { - return new ValueFormatException(ex.getMessage()); - } else if (ex instanceof VersionException) { - return new VersionException(ex.getMessage()); - } else if (ex instanceof AccessControlException) { - return new AccessControlException(ex.getMessage()); - } else { - return new RepositoryException(ex.getMessage()); - } - } - - /** - * Utility method for creating a remote reference for a local item. - * Unlike the factory method for creating remote item references, this - * method introspects the type of the local item and returns the - * corresponding node, property, or item remote reference using the - * remote adapter factory. - *

    - * If the item, this method calls the - * {@link #getRemoteNode(Node)} to return the correct remote type. - * - * @param item local node, property, or item - * @return remote node, property, or item reference - * @throws RemoteException on RMI errors - */ - protected RemoteItem getRemoteItem(Item item) throws RemoteException { - if (item instanceof Property) { - return factory.getRemoteProperty((Property) item); - } else if (item instanceof Node) { - return getRemoteNode((Node) item); - } else { - return factory.getRemoteItem(item); - } - } - - /** - * Utility method for creating a remote reference for a local node. - * Unlike the factory method for creating remote node references, this - * method introspects the type of the local node and returns the - * corresponding node, version, or version history remote reference using - * the remote adapter factory. - * - * @param node local version, versionhistory, or normal node - * @return remote node, property, or item reference - * @throws RemoteException on RMI errors - */ - protected RemoteNode getRemoteNode(Node node) throws RemoteException { - if (node instanceof Version) { - return factory.getRemoteVersion((Version) node); - } else if (node instanceof VersionHistory) { - return factory.getRemoteVersionHistory((VersionHistory) node); - } else { - return factory.getRemoteNode(node); - } - } - - /** - * Utility method for creating an array of remote references for - * local node types. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param types local node type array - * @return remote node type array - * @throws RemoteException on RMI errors - */ - protected RemoteNodeType[] getRemoteNodeTypeArray(NodeType[] types) - throws RemoteException { - if (types != null) { - RemoteNodeType[] remotes = new RemoteNodeType[types.length]; - for (int i = 0; i < types.length; i++) { - remotes[i] = factory.getRemoteNodeType(types[i]); - } - return remotes; - } else { - return new RemoteNodeType[0]; // for safety - } - } - - /** - * Utility method for preparing an array of values for serialization. - * The returned array will contain serializable versions of all the - * given values. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the values to be decorated - * @return array of decorated values - * @throws RepositoryException if the values can not be serialized - */ - protected Value[] getSerialValues(Value[] values) - throws RepositoryException { - List serials = new ArrayList(); - if (values != null) { - for (Value value : values) { - if (value != null) { - serials.add(getSerialValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Utility method for decorating a value. Note that the contents of the - * original values will only be copied when the decorators are serialized. - * Null referenced and already serializable values are passed as-is. - * - * @param value the value to be decorated, or null - * @return the decorated value, or null - * @throws RepositoryException if the value can not be serialized - */ - protected Value getSerialValue(Value value) throws RepositoryException { - // if the value is null or already serializable, just return it - if (value == null || value instanceof Serializable) { - return value; - } else { - return SerialValueFactory.makeSerialValue(value); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java deleted file mode 100644 index e1589876867..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerObservationManager.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.HashMap; -import java.util.Map; - -import javax.jcr.RepositoryException; -import javax.jcr.observation.ObservationManager; - -import org.apache.jackrabbit.rmi.observation.Queue; -import org.apache.jackrabbit.rmi.observation.ServerEventListenerProxy; -import org.apache.jackrabbit.rmi.remote.RemoteEventCollection; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.observation.ObservationManager ObservationManager} interface. - * This class makes a local item available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteObservationManager RemoteObservationManager} - * interface. - *

    - * This class works in conjunction with the - * {@link org.apache.jackrabbit.rmi.client.ClientObservationManager} class to - * implement the distributed the event listener registration described in - * observation package - * comment. - * - * @see javax.jcr.observation.ObservationManager - * @see org.apache.jackrabbit.rmi.remote.RemoteObservationManager - */ -@Deprecated(forRemoval = true) public class ServerObservationManager extends ServerObject implements - RemoteObservationManager { - - /** The adapted local observation manager. */ - private ObservationManager observationManager; - - /** - * The map of event listener proxies indexed by the unique identifier. - */ - private Map proxyMap; - - /** - * The queue to which event listener proxies post events to be reported - * by the {@link #getNextEvent(long)} method. - */ - private Queue queue; - - /** - * Creates a remote adapter for the given local workspace. - * - * @param observationManager local observation manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerObservationManager(ObservationManager observationManager, - RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.observationManager = observationManager; - } - - /** {@inheritDoc} */ - public void addEventListener(long listenerId, int eventTypes, - String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, - boolean noLocal) throws RepositoryException, RemoteException { - - // find the proxy or create one - ServerEventListenerProxy proxy; - synchronized (this) { - if (proxyMap == null) { - proxyMap = new HashMap(); - } - - Long id = Long.valueOf(listenerId); - proxy = proxyMap.get(id); - if (proxy == null) { - proxy = new ServerEventListenerProxy(getFactory(), listenerId, - getQueue()); - proxyMap.put(id, proxy); - } - } - - // register the proxy with the observation manager - observationManager.addEventListener(proxy, eventTypes, absPath, - isDeep, uuid, nodeTypeName, noLocal); - } - - /** {@inheritDoc} */ - public void removeEventListener(long listenerId) - throws RepositoryException, RemoteException { - - // try to find the proxy in the map - ServerEventListenerProxy proxy; - synchronized (this) { - if (proxyMap == null) { - return; - } - - Long id = new Long(listenerId); - proxy = (ServerEventListenerProxy) proxyMap.remove(id); - if (proxy == null) { - return; - } - } - - // register the proxy with the observation manager - observationManager.removeEventListener(proxy); - } - - /** {@inheritDoc} */ - public RemoteEventCollection getNextEvent(long timeout) throws RemoteException { - // need the queue - checkQueue(); - - try { - if (timeout < 0) { - timeout = 0; - } - return (RemoteEventCollection) queue.get(timeout); - } catch (InterruptedException ie) { - // don't retry, but log - } - - // did not get anything, fall back to nothing - return null; - } - - //---------- internal ------------------------------------------------------ - - /** - * Makes sure, the {@link #queue} field is assigned a value. - */ - private synchronized void checkQueue() { - if (queue == null) { - queue = new Queue(); - } - } - - /** - * Returns the Channel allocating it if required. - * - * @return queue - */ - private Queue getQueue() { - checkQueue(); - return queue; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java deleted file mode 100644 index 1b1ab01d14f..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerProperty.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Property; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Property Property} - * interface. This class makes a local property available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty} - * interface. - * - * @see javax.jcr.Property - * @see org.apache.jackrabbit.rmi.remote.RemoteProperty - */ -@Deprecated(forRemoval = true) public class ServerProperty extends ServerItem implements RemoteProperty { - - /** The adapted local property. */ - private Property property; - - /** - * Creates a remote adapter for the given local property. - * - * @param property local property - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerProperty(Property property, RemoteAdapterFactory factory) - throws RemoteException { - super(property, factory); - this.property = property; - } - - /** {@inheritDoc} */ - public Value getValue() throws RepositoryException, RemoteException { - try { - return SerialValueFactory.makeSerialValue(property.getValue()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException, RemoteException { - try { - return getSerialValues(property.getValues()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value value) - throws RepositoryException, RemoteException { - try { - property.setValue(value); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setValue(Value[] values) - throws RepositoryException, RemoteException { - try { - property.setValue(values); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long getLength() throws RepositoryException, RemoteException { - try { - return property.getLength(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public long[] getLengths() throws RepositoryException, RemoteException { - try { - return property.getLengths(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemotePropertyDefinition getDefinition() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemotePropertyDefinition(property.getDefinition()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public int getType() throws RepositoryException, RemoteException { - try { - return property.getType(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java deleted file mode 100644 index 647831ed2ab..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerPropertyDefinition.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.nodetype.PropertyDefinition; - -import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR - * {@link javax.jcr.nodetype.PropertyDefinition PropertyDefinition} interface. This - * class makes a local property definition available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition} - * interface. - * - * @see javax.jcr.nodetype.PropertyDefinition - * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition - */ -@Deprecated(forRemoval = true) public class ServerPropertyDefinition extends ServerItemDefinition - implements RemotePropertyDefinition { - - /** The adapted local property definition. */ - private PropertyDefinition def; - - /** - * Creates a remote adapter for the given local property definition. - * - * @param def local property definition - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerPropertyDefinition(PropertyDefinition def, RemoteAdapterFactory factory) - throws RemoteException { - super(def, factory); - this.def = def; - } - - /** {@inheritDoc} */ - public int getRequiredType() throws RemoteException { - return def.getRequiredType(); - } - - /** {@inheritDoc} */ - public String[] getValueConstraints() throws RemoteException { - return def.getValueConstraints(); - } - - /** {@inheritDoc} */ - public Value[] getDefaultValues() throws RemoteException { - try { - return getSerialValues(def.getDefaultValues()); - } catch (RepositoryException e) { - throw new RemoteException("Unable to serialize default values"); - } - } - - /** {@inheritDoc} */ - public boolean isMultiple() throws RemoteException { - return def.isMultiple(); - } - - /** {@inheritDoc} */ - public String[] getAvailableQueryOperators() throws RemoteException { - return def.getAvailableQueryOperators(); - } - - /** {@inheritDoc} */ - public boolean isFullTextSearchable() throws RemoteException { - return def.isFullTextSearchable(); - } - - /** {@inheritDoc} */ - public boolean isQueryOrderable() throws RemoteException { - return def.isQueryOrderable(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java deleted file mode 100644 index 5cc63f8d4a3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQuery.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.query.Query; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; -import org.apache.jackrabbit.rmi.remote.RemoteNode; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.Query Query} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQuery RemoteQuery} - * interface. - * - * @see javax.jcr.query.Query - * @see org.apache.jackrabbit.rmi.remote.RemoteQuery - */ -@Deprecated(forRemoval = true) public class ServerQuery extends ServerObject implements RemoteQuery { - - /** The adapted local query manager. */ - private Query query; - - /** - * Creates a remote adapter for the given local Query. - * - * @param query local Query - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQuery(Query query, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.query = query; - } - - /** {@inheritDoc} */ - public RemoteQueryResult execute() - throws RepositoryException, RemoteException { - return getFactory().getRemoteQueryResult(query.execute()); - } - - /** {@inheritDoc} */ - public String getStatement() throws RemoteException { - return query.getStatement(); - } - - /** {@inheritDoc} */ - public String getLanguage() throws RemoteException { - return query.getLanguage(); - } - - /** {@inheritDoc} */ - public String getStoredQueryPath() - throws RepositoryException, RemoteException { - return query.getStoredQueryPath(); - } - - /** {@inheritDoc} */ - public RemoteNode storeAsNode(String absPath) - throws RepositoryException, RemoteException { - return getRemoteNode(query.storeAsNode(absPath)); - } - - /** {@inheritDoc} */ - public void bindValue(String varName, Value value) - throws RepositoryException, RemoteException { - query.bindValue(varName, value); - } - - /** {@inheritDoc} */ - public String[] getBindVariableNames() - throws RepositoryException, RemoteException { - try { - return query.getBindVariableNames(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setLimit(long limit) throws RemoteException { - query.setLimit(limit); - } - - /** {@inheritDoc} */ - public void setOffset(long offset) throws RemoteException { - query.setOffset(offset); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java deleted file mode 100644 index 4310bfc51eb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryManager.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Item; -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.query.InvalidQueryException; -import javax.jcr.query.Query; -import javax.jcr.query.QueryManager; - -import org.apache.jackrabbit.rmi.remote.RemoteQuery; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.QueryManager QueryManager} - * interface. This class makes a local query manager available as an RMI - * service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryManager RemoteQueryManager} - * interface. - * - * @see javax.jcr.query.QueryManager - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager - */ -@Deprecated(forRemoval = true) public class ServerQueryManager extends ServerObject - implements RemoteQueryManager { - - /** The current session. */ - private Session session; - - /** The adapted local query manager. */ - private QueryManager manager; - - /** - * Creates a remote adapter for the given local query manager. - * - * @param session current session - * @param manager local query manager - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQueryManager( - Session session, QueryManager manager, ServerAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - this.manager = manager; - } - - /** {@inheritDoc} */ - public RemoteQuery createQuery(String statement, String language) - throws RepositoryException, RemoteException { - try { - Query query = manager.createQuery(statement, language); - return getFactory().getRemoteQuery(query); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteQuery getQuery(String absPath) - throws RepositoryException, RemoteException { - try { - Item item = session.getItem(absPath); - if (!item.isNode()) { - throw new InvalidQueryException("Not a query node: " + absPath); - } - return getFactory().getRemoteQuery(manager.getQuery((Node) item)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getSupportedQueryLanguages() - throws RepositoryException, RemoteException { - try { - return manager.getSupportedQueryLanguages(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java deleted file mode 100644 index 2a4cc66b298..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerQueryResult.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.query.QueryResult; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteQueryResult; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.QueryResult QueryResult} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteQueryResult RemoteQueryResult} - * interface. - * - * @see javax.jcr.query.QueryResult - * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult - */ -@Deprecated(forRemoval = true) public class ServerQueryResult extends ServerObject - implements RemoteQueryResult { - - /** The adapted local query result. */ - private QueryResult result; - - /** - * Creates a remote adapter for the given local QueryResult. - * - * @param result local QueryResult - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerQueryResult(QueryResult result, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.result = result; - } - - /** {@inheritDoc} */ - public String[] getColumnNames() - throws RepositoryException, RemoteException { - return result.getColumnNames(); - } - - /** {@inheritDoc} */ - public RemoteIterator getRows() throws RepositoryException, RemoteException { - return getFactory().getRemoteRowIterator(result.getRows()); - } - - /** {@inheritDoc} */ - public RemoteIterator getNodes() throws RepositoryException, RemoteException { - return getFactory().getRemoteNodeIterator(result.getNodes()); - } - - /** {@inheritDoc} */ - public String[] getSelectorNames() throws RepositoryException, RemoteException { - return result.getSelectorNames(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java deleted file mode 100644 index 0cac82f6e25..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRepository.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.Value; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Repository Repository} - * interface. This class makes a local repository available as an RMI service - * using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository} - * interface. - * - * @see javax.jcr.Repository - * @see org.apache.jackrabbit.rmi.remote.RemoteRepository - */ -@Deprecated(forRemoval = true) public class ServerRepository extends ServerObject implements RemoteRepository { - - /** The adapted local repository. */ - private Repository repository; - - /** - * Creates a remote adapter for the given local repository. - * - * @param repository local repository - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerRepository( - Repository repository, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.repository = repository; - } - - /** {@inheritDoc} */ - public String getDescriptor(String name) throws RemoteException { - return repository.getDescriptor(name); - } - - /** {@inheritDoc} */ - public String[] getDescriptorKeys() throws RemoteException { - return repository.getDescriptorKeys(); - } - - /** {@inheritDoc} */ - public RemoteSession login() throws RepositoryException, RemoteException { - try { - Session session = repository.login(); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(String workspace) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(workspace); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(Credentials credentials) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(credentials); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteSession login(Credentials credentials, String workspace) - throws RepositoryException, RemoteException { - try { - Session session = repository.login(credentials, workspace); - return getFactory().getRemoteSession(session); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getDescriptorValue(String key) throws RemoteException { - try { - return SerialValueFactory.makeSerialValue(repository.getDescriptorValue(key)); - } catch (RepositoryException ex) { - throw new RemoteException(ex.getMessage(), ex); - } - } - - /** {@inheritDoc} */ - public Value[] getDescriptorValues(String key) throws RemoteException { - try { - return SerialValueFactory.makeSerialValueArray(repository.getDescriptorValues(key)); - } catch (RepositoryException ex) { - throw new RemoteException(ex.getMessage(), ex); - } - } - - /** {@inheritDoc} */ - public boolean isSingleValueDescriptor(String key) throws RemoteException { - return repository.isSingleValueDescriptor(key); - } - - /** {@inheritDoc} */ - public boolean isStandardDescriptor(String key) throws RemoteException { - return repository.isStandardDescriptor(key); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java deleted file mode 100644 index f41571bdf5e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerRow.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.query.Row; - -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteRow; -import org.apache.jackrabbit.rmi.value.SerialValueFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.query.Row Row} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteRow RemoteRow} - * interface. - * - * @see javax.jcr.query.Row - * @see org.apache.jackrabbit.rmi.remote.RemoteRow - */ -@Deprecated(forRemoval = true) public class ServerRow extends ServerObject implements RemoteRow { - - /** The adapted local row. */ - private Row row; - - /** - * Creates a remote adapter for the given local query row. - * - * @param row local query row - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerRow(Row row, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.row = row; - } - - /** {@inheritDoc} */ - public Value[] getValues() throws RepositoryException, RemoteException { - try { - return getSerialValues(row.getValues()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Value getValue(String propertyName) - throws RepositoryException, RemoteException { - try { - return SerialValueFactory.makeSerialValue(row.getValue(propertyName)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode() - throws RepositoryException, RemoteException { - try { - return getRemoteNode(row.getNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String selectorName) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(row.getNode(selectorName)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath() - throws RepositoryException, RemoteException { - try { - return row.getPath(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getPath(String selectorName) - throws RepositoryException, RemoteException { - try { - return row.getPath(selectorName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore() - throws RepositoryException, RemoteException { - try { - return row.getScore(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public double getScore(String selectorName) - throws RepositoryException, RemoteException { - try { - return row.getScore(selectorName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java deleted file mode 100644 index f5ce9c04c12..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerSession.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.rmi.RemoteException; - -import javax.jcr.Credentials; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.UnsupportedRepositoryOperationException; - -import org.apache.jackrabbit.rmi.remote.RemoteItem; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteProperty; -import org.apache.jackrabbit.rmi.remote.RemoteSession; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.Session Session} interface. - * This class makes a local session available as an RMI service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession} - * interface. - * - * @see javax.jcr.Session - * @see org.apache.jackrabbit.rmi.remote.RemoteSession - */ -@Deprecated(forRemoval = true) public class ServerSession extends ServerObject implements RemoteSession { - - /** The adapted local session. */ - private Session session; - - /** - * The server workspace for this session. This field is assigned on demand - * by the first call to {@link #getWorkspace()}. The assumption is that - * there is only one workspace instance per session and that each call to - * the Session.getWorkspace() method of a single session will - * allways return the same object. - */ - private RemoteWorkspace remoteWorkspace; - - /** - * Creates a remote adapter for the given local session. - * - * @param session local session - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerSession(Session session, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - } - - /** {@inheritDoc} */ - public String getUserID() throws RemoteException { - return session.getUserID(); - } - - /** {@inheritDoc} */ - public Object getAttribute(String name) throws RemoteException { - return session.getAttribute(name); - } - - /** {@inheritDoc} */ - public String[] getAttributeNames() throws RemoteException { - return session.getAttributeNames(); - } - - /** {@inheritDoc} */ - public RemoteSession impersonate(Credentials credentials) - throws RepositoryException, RemoteException { - try { - Session newSession = session.impersonate(credentials); - return getFactory().getRemoteSession(newSession); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteWorkspace getWorkspace() throws RemoteException { - if (remoteWorkspace == null) { - remoteWorkspace = - getFactory().getRemoteWorkspace(session.getWorkspace()); - } - - return remoteWorkspace; - } - - /** {@inheritDoc} */ - public boolean hasPermission(String path, String actions) - throws RepositoryException, RemoteException { - return session.hasPermission(path, actions); - } - - /** {@inheritDoc} */ - public String getNamespacePrefix(String uri) - throws RepositoryException, RemoteException { - try { - return session.getNamespacePrefix(uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getNamespacePrefixes() - throws RepositoryException, RemoteException { - try { - return session.getNamespacePrefixes(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getNamespaceURI(String prefix) - throws RepositoryException, RemoteException { - try { - return session.getNamespaceURI(prefix); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void setNamespacePrefix(String prefix, String uri) - throws RepositoryException, RemoteException { - try { - session.setNamespacePrefix(prefix, uri); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean itemExists(String path) throws RepositoryException, RemoteException { - return session.itemExists(path); - } - - /** {@inheritDoc} */ - public boolean nodeExists(String path) throws RepositoryException, RemoteException { - return session.nodeExists(path); - } - - /** {@inheritDoc} */ - public boolean propertyExists(String path) throws RepositoryException, RemoteException { - return session.propertyExists(path); - } - - /** {@inheritDoc} */ - public RemoteNode getNodeByIdentifier(String id) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNodeByIdentifier(id)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - @SuppressWarnings("deprecation") - public RemoteNode getNodeByUUID(String uuid) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNodeByUUID(uuid)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getRootNode() - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getRootNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteItem getItem(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteItem(session.getItem(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getNode(String path) - throws RepositoryException, RemoteException { - try { - return getRemoteNode(session.getNode(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteProperty getProperty(String path) - throws RepositoryException, RemoteException { - try { - return (RemoteProperty) getRemoteItem(session.getProperty(path)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasPendingChanges() - throws RepositoryException, RemoteException { - try { - return session.hasPendingChanges(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeItem(String path) - throws RepositoryException, RemoteException { - try { - session.removeItem(path); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) - throws RepositoryException, RemoteException { - try { - session.move(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void save() throws RepositoryException, RemoteException { - try { - session.save(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void refresh(boolean keepChanges) - throws RepositoryException, RemoteException { - try { - session.refresh(keepChanges); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void logout() throws RemoteException { - session.logout(); - } - - /** {@inheritDoc} */ - public boolean isLive() throws RemoteException { - return session.isLive(); - } - - /** {@inheritDoc} */ - public void importXML(String path, byte[] xml, int mode) - throws IOException, RepositoryException, RemoteException { - try { - session.importXML(path, new ByteArrayInputStream(xml), mode); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addLockToken(String token) throws RemoteException { - session.addLockToken(token); - } - - /** {@inheritDoc} */ - public String[] getLockTokens() throws RemoteException { - return session.getLockTokens(); - } - - /** {@inheritDoc} */ - public void removeLockToken(String token) throws RemoteException { - session.removeLockToken(token); - } - - /** {@inheritDoc} */ - public byte[] exportDocumentView( - String path, boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException, RemoteException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - session.exportDocumentView(path, buffer, binaryAsLink, noRecurse); - return buffer.toByteArray(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public byte[] exportSystemView( - String path, boolean binaryAsLink, boolean noRecurse) - throws IOException, RepositoryException, RemoteException { - try { - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - session.exportSystemView(path, buffer, binaryAsLink, noRecurse); - return buffer.toByteArray(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteAccessControlManager getAccessControlManager() - throws UnsupportedRepositoryOperationException, - RepositoryException, RemoteException { - try { - return getFactory().getRemoteAccessControlManager( - session.getAccessControlManager()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java deleted file mode 100644 index 2dda97f12aa..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersion.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; -import java.util.Calendar; - -import javax.jcr.RepositoryException; -import javax.jcr.version.Version; - -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.version.Version Version} interface. - * This class makes a local version available as an RMI service using - * the {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion} - * interface. - * - * @see javax.jcr.version.Version - * @see org.apache.jackrabbit.rmi.remote.RemoteVersion - */ -@Deprecated(forRemoval = true) public class ServerVersion extends ServerNode implements RemoteVersion { - - /** The adapted local version. */ - private Version version; - - /** - * Creates a remote adapter for the given local version. - * - * @param version local version - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerVersion(Version version, RemoteAdapterFactory factory) - throws RemoteException { - super(version, factory); - this.version = version; - } - - /** - * Utility method for creating an array of remote references for - * local versions. The remote references are created using the - * remote adapter factory. - *

    - * A null input is treated as an empty array. - * - * @param versions local version array - * @return remote version array - * @throws RemoteException on RMI errors - */ - private RemoteVersion[] getRemoteVersionArray(Version[] versions) - throws RemoteException { - if (versions != null) { - RemoteVersion[] remotes = new RemoteVersion[versions.length]; - for (int i = 0; i < remotes.length; i++) { - remotes[i] = getFactory().getRemoteVersion(versions[i]); - } - return remotes; - } else { - return new RemoteVersion[0]; // for safety - } - } - - /** {@inheritDoc} */ - public RemoteVersionHistory getContainingHistory() throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory(version.getContainingHistory()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public Calendar getCreated() throws RepositoryException { - try { - return version.getCreated(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getLinearSuccessor() throws RepositoryException, - RemoteException { - try { - Version linearSuccessor = version.getLinearSuccessor(); - if (linearSuccessor == null) { - return null; - } else { - return getFactory().getRemoteVersion(linearSuccessor); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion[] getSuccessors() throws RepositoryException, RemoteException { - try { - return getRemoteVersionArray(version.getSuccessors()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getLinearPredecessor() throws RepositoryException, - RemoteException { - try { - Version linearPredecessor = version.getLinearPredecessor(); - if (linearPredecessor == null) { - return null; - } else { - return getFactory().getRemoteVersion(linearPredecessor); - } - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion[] getPredecessors() throws RepositoryException, RemoteException { - try { - return getRemoteVersionArray(version.getPredecessors()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNode getFrozenNode() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNode(version.getFrozenNode()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java deleted file mode 100644 index ac31de6c573..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionHistory.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.version.Version; -import javax.jcr.version.VersionHistory; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link javax.jcr.version.VersionHistory VersionHistory} - * interface. This class makes a local version history available as an RMI - * service using the - * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory} - * interface. - * - * @see javax.jcr.version.VersionHistory - * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory - */ -@Deprecated(forRemoval = true) public class ServerVersionHistory extends ServerNode - implements RemoteVersionHistory { - - /** The adapted local version history. */ - private VersionHistory versionHistory; - - /** - * Creates a remote adapter for the given local version history. - * - * @param versionHistory local version history - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerVersionHistory(VersionHistory versionHistory, - RemoteAdapterFactory factory) throws RemoteException { - super(versionHistory, factory); - this.versionHistory = versionHistory; - } - - /** {@inheritDoc} */ - public String getVersionableIdentifier() throws RepositoryException, - RemoteException { - try { - return versionHistory.getVersionableIdentifier(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getRootVersion() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(versionHistory.getRootVersion()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllLinearVersions() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteVersionIterator( - versionHistory.getAllLinearVersions()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllVersions() - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionIterator( - versionHistory.getAllVersions()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllLinearFrozenNodes() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNodeIterator( - versionHistory.getAllLinearFrozenNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteIterator getAllFrozenNodes() throws RepositoryException, - RemoteException { - try { - return getFactory().getRemoteNodeIterator( - versionHistory.getAllFrozenNodes()); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getVersion(String versionName) - throws RepositoryException, RemoteException { - try { - Version version = versionHistory.getVersion(versionName); - return getFactory().getRemoteVersion(version); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteVersion getVersionByLabel(String label) - throws RepositoryException, RemoteException { - try { - Version version = versionHistory.getVersionByLabel(label); - return getFactory().getRemoteVersion(version); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void addVersionLabel(String versionName, String label, - boolean moveLabel) throws RepositoryException, RemoteException { - try { - versionHistory.addVersionLabel(versionName, label, moveLabel); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersionLabel(String label) throws RepositoryException, - RemoteException { - try { - versionHistory.removeVersionLabel(label); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String label) throws RepositoryException, RemoteException { - return versionHistory.hasVersionLabel(label); - } - - /** {@inheritDoc} */ - public boolean hasVersionLabel(String versionUUID, String label) - throws RepositoryException, RemoteException { - try { - Version version = getVersionByUUID(versionUUID); - return versionHistory.hasVersionLabel(version, label); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getVersionLabels() throws RepositoryException, RemoteException { - return versionHistory.getVersionLabels(); - } - - /** {@inheritDoc} */ - public String[] getVersionLabels(String versionUUID) - throws RepositoryException, RemoteException { - try { - Version version = getVersionByUUID(versionUUID); - return versionHistory.getVersionLabels(version); - } catch (ClassCastException cce) { - // we do not expect this here as nodes should be returned correctly - throw getRepositoryException(new RepositoryException(cce)); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void removeVersion(String versionName) - throws RepositoryException, RemoteException { - try { - versionHistory.removeVersion(versionName); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String getVersionableUUID() throws RepositoryException, RemoteException { - return versionHistory.getVersionableUUID(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java deleted file mode 100644 index 61d2fd6f94d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerVersionManager.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.version.Version; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.RemoteNode; -import org.apache.jackrabbit.rmi.remote.RemoteVersion; -import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; - -@Deprecated(forRemoval = true) public class ServerVersionManager extends ServerObject - implements RemoteVersionManager { - - private final Session session; - - private final VersionManager manager; - - public ServerVersionManager(Session session, - VersionManager manager, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.session = session; - this.manager = manager; - } - - public RemoteVersion checkin(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(manager.checkin(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void checkout(String absPath) throws RepositoryException { - try { - manager.checkout(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersion checkpoint(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion(manager.checkpoint(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode createActivity(String title) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNode(manager.createActivity(title)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode createConfiguration(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNode( - manager.createConfiguration(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteNode getActivity() - throws RepositoryException, RemoteException { - try { - Node activity = manager.getActivity(); - if (activity == null) { - return null; - } else { - return getFactory().getRemoteNode(activity); - } - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersion getBaseVersion(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersion( - manager.getBaseVersion(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteVersionHistory getVersionHistory(String absPath) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteVersionHistory( - manager.getVersionHistory(absPath)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public boolean isCheckedOut(String absPath) - throws RepositoryException { - try { - return manager.isCheckedOut(absPath); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteIterator merge( - String absPath, String srcWorkspace, boolean bestEffort) - throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator( - manager.merge(absPath, srcWorkspace, bestEffort)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public RemoteIterator merge( - String absPath, String srcWorkspace, boolean bestEffort, - boolean isShallow) throws RepositoryException, RemoteException { - try { - return getFactory().getRemoteNodeIterator( - manager.merge(absPath, srcWorkspace, bestEffort, isShallow)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void restore( - String absPath, String versionName, boolean removeExisting) - throws RepositoryException { - try { - manager.restore(absPath, versionName, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void restoreByLabel( - String absPath, String versionLabel, boolean removeExisting) - throws RepositoryException { - try { - manager.restoreByLabel(absPath, versionLabel, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void cancelMerge(String absPath, String versionIdentifier) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.cancelMerge(absPath, version); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - public void doneMerge(String absPath, String versionIdentifier) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.doneMerge(absPath, version); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restore(String[] versionIdentifiers, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - Version[] versions = new Version[versionIdentifiers.length]; - for (int i = 0; i < versions.length; i++) { - Version version = (Version) session.getNodeByIdentifier(versionIdentifiers[i]); - versions[i] = version; - } - manager.restore(versions, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restore(String versionIdentifier, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.restore(version, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public RemoteNode setActivity(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node newActivityNode; - if (activityNodeIdentifier == null) { - newActivityNode = null; - } else { - newActivityNode = session.getNodeByIdentifier(activityNodeIdentifier); - } - Node oldActivityNode = manager.setActivity(newActivityNode); - if (oldActivityNode == null) { - return null; - } else { - return getFactory().getRemoteNode(oldActivityNode); - } - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void removeActivity(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); - manager.removeActivity(activityNode); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public RemoteIterator merge(String activityNodeIdentifier) - throws RepositoryException, RemoteException { - try { - Node activityNode = session.getNodeByIdentifier(activityNodeIdentifier); - return getFactory().getRemoteNodeIterator(manager.merge(activityNode)); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - - @Override - public void restoreVI(String absPath, String versionIdentifier, - boolean removeExisting) throws RepositoryException, RemoteException { - try { - Version version = (Version) session.getNodeByIdentifier(versionIdentifier); - manager.restore(absPath, version, removeExisting); - } catch (RepositoryException e) { - throw getRepositoryException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java deleted file mode 100644 index f3c18efbf40..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerWorkspace.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.rmi.RemoteException; - -import javax.jcr.NamespaceRegistry; -import javax.jcr.RepositoryException; -import javax.jcr.Workspace; -import javax.jcr.lock.LockManager; -import javax.jcr.nodetype.NodeTypeManager; -import javax.jcr.observation.ObservationManager; -import javax.jcr.query.QueryManager; -import javax.jcr.version.VersionManager; - -import org.apache.jackrabbit.rmi.remote.RemoteLockManager; -import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry; -import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager; -import org.apache.jackrabbit.rmi.remote.RemoteObservationManager; -import org.apache.jackrabbit.rmi.remote.RemoteQueryManager; -import org.apache.jackrabbit.rmi.remote.RemoteVersionManager; -import org.apache.jackrabbit.rmi.remote.RemoteWorkspace; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link Workspace Workspace} interface. - * This class makes a local workspace available as an RMI service using the - * {@link RemoteWorkspace RemoteWorkspace} interface. - * - * @see Workspace - * @see RemoteWorkspace - */ -@Deprecated(forRemoval = true) public class ServerWorkspace extends ServerObject implements RemoteWorkspace { - - /** The adapted local workspace. */ - private Workspace workspace; - - /** - * The remote observation manager for this workspace. This field is assigned - * on demand by the first call to {@link #getObservationManager()}. The - * assumption is that there is only one observation manager instance per - * workspace and that each call to the - * Workspace.getObservationManager() method of a single - * workspace will allways return the same object. - */ - private RemoteObservationManager remoteObservationManager; - - private RemoteLockManager remoteLockManager; - - private RemoteVersionManager remoteVersionManager; - - /** - * Creates a remote adapter for the given local workspace. - * - * @param workspace local workspace - * @param factory remote adapter factory - * @throws RemoteException on RMI errors - */ - public ServerWorkspace(Workspace workspace, RemoteAdapterFactory factory) - throws RemoteException { - super(factory); - this.workspace = workspace; - } - - /** {@inheritDoc} */ - public String getName() throws RemoteException { - return workspace.getName(); - } - - /** {@inheritDoc} */ - public void copy(String from, String to) - throws RepositoryException, RemoteException { - try { - workspace.copy(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void copy(String workspace, String from, String to) - throws RepositoryException, RemoteException { - try { - this.workspace.copy(workspace, from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void clone( - String workspace, String from, String to, boolean removeExisting) - throws RepositoryException, RemoteException { - try { - this.workspace.clone(workspace, from, to, removeExisting); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void move(String from, String to) - throws RepositoryException, RemoteException { - try { - workspace.move(from, to); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNodeTypeManager getNodeTypeManager() - throws RepositoryException, RemoteException { - try { - NodeTypeManager manager = workspace.getNodeTypeManager(); - return getFactory().getRemoteNodeTypeManager(manager); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteNamespaceRegistry getNamespaceRegistry() - throws RepositoryException, RemoteException { - try { - NamespaceRegistry registry = workspace.getNamespaceRegistry(); - return getFactory().getRemoteNamespaceRegistry(registry); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteQueryManager getQueryManager() - throws RepositoryException, RemoteException { - try { - QueryManager queryManager = workspace.getQueryManager(); - return getFactory().getRemoteQueryManager( - workspace.getSession(), queryManager); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public RemoteObservationManager getObservationManager() - throws RepositoryException, RemoteException { - try { - if (remoteObservationManager == null) { - ObservationManager observationManager = - workspace.getObservationManager(); - remoteObservationManager = - getFactory().getRemoteObservationManager(observationManager); - } - return remoteObservationManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public String[] getAccessibleWorkspaceNames() - throws RepositoryException, RemoteException { - try { - return workspace.getAccessibleWorkspaceNames(); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - /** {@inheritDoc} */ - public void importXML(String path, byte[] xml, int uuidBehaviour) - throws IOException, RepositoryException, RemoteException { - try { - workspace.importXML( - path, new ByteArrayInputStream(xml), uuidBehaviour); - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public void createWorkspace(String name, String source) - throws RepositoryException, RemoteException { - if (source != null) { - workspace.createWorkspace(name, source); - } else { - workspace.createWorkspace(name); - } - } - - public void deleteWorkspace(String name) - throws RepositoryException, RemoteException { - workspace.deleteWorkspace(name); - } - - /** {@inheritDoc} */ - public RemoteLockManager getLockManager() - throws RepositoryException, RemoteException { - try { - if (remoteLockManager == null) { - LockManager lockManager = workspace.getLockManager(); - remoteLockManager = - getFactory().getRemoteLockManager(lockManager); - } - return remoteLockManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - - public RemoteVersionManager getVersionManager() - throws RepositoryException, RemoteException { - try { - if (remoteVersionManager == null) { - VersionManager versionManager = workspace.getVersionManager(); - remoteVersionManager = - getFactory().getRemoteVersionManager(workspace.getSession(), versionManager); - } - return remoteVersionManager; - } catch (RepositoryException ex) { - throw getRepositoryException(ex); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java deleted file mode 100644 index 661c027f8ce..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/ServerXASession.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server; - -import java.rmi.RemoteException; - -import javax.jcr.Session; -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import org.apache.jackrabbit.rmi.remote.RemoteXASession; -import org.apache.jackrabbit.rmi.remote.SerializableXid; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for XA-enabled sessions. - * - * @since 1.4 - */ -@Deprecated(forRemoval = true) public class ServerXASession extends ServerSession implements RemoteXASession { - - /** - * The adapted local XA resource - */ - private final XAResource resource; - - /** - * Creates a remote adapter for the given local, transaction enabled, - * session. - */ - public ServerXASession( - Session session, XAResource resource, RemoteAdapterFactory factory) - throws RemoteException { - super(session, factory); - this.resource = resource; - } - - private static XAException getXAException(XAException e) { - return new XAException(e.getMessage()); - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - resource.commit(xid, onePhase); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - resource.end(xid, flags); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void forget(Xid xid) throws XAException { - try { - resource.forget(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public int getTransactionTimeout() throws XAException { - try { - return resource.getTransactionTimeout(); - } catch (XAException e) { - throw getXAException(e); - } - } - - public int prepare(Xid xid) throws XAException { - try { - return resource.prepare(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public Xid[] recover(int flag) throws XAException { - try { - Xid[] xids = resource.recover(flag); - for (int i = 0; i < xids.length; i++) { - xids[i] = new SerializableXid(xids[i]); - } - return xids; - } catch (XAException e) { - throw getXAException(e); - } - } - - public void rollback(Xid xid) throws XAException { - try { - resource.rollback(xid); - } catch (XAException e) { - throw getXAException(e); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - try { - return resource.setTransactionTimeout(seconds); - } catch (XAException e) { - throw getXAException(e); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - resource.start(xid, flags); - } catch (XAException e) { - throw getXAException(e); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java deleted file mode 100644 index f675dd453a8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerIterator.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.NoSuchElementException; - -import javax.jcr.RangeIterator; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Remote adapter for the JCR {@link RangeIterator} interface. This - * class makes a local iterator available as an RMI service using the - * {@link RemoteIterator} interface. - */ -@Deprecated(forRemoval = true) public abstract class ServerIterator extends ServerObject - implements RemoteIterator { - - /** The adapted local iterator. */ - private final RangeIterator iterator; - - /** The maximum number of elements to send per request. */ - private final int maxBufferSize; - - /** - * The cached number of elements in the iterator, -1 if the iterator - * size is unknown, or -2 if the size has not been retrieved from the - * adapted local iterator. This variable is useful in cases when the - * underlying iterator does not know its sizes (getSize() returns -1) - * but we reach the end of the iterator in a nextObjects() call and - * can thus determine the size of the iterator. - */ - private long size; - - /** - * Creates a remote adapter for the given local item. - * - * @param iterator local iterator to be adapted - * @param factory remote adapter factory - * @param maxBufferSize maximum buffer size - * @throws RemoteException on RMI errors - */ - public ServerIterator( - RangeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(factory); - this.iterator = iterator; - this.maxBufferSize = maxBufferSize; - this.size = -2; - } - - /** - * Returns the size of the iterator. The size is cached by invoking the - * adapted local iterator when this method is first called or by - * determining the size from an end-of-iterator condition in nextObjects(). - * - * @return size of the iterator - * @throws RemoteException on RMI errors - */ - @Override - public long getSize() throws RemoteException { - if (size == -2) { - size = iterator.getSize(); - } - return size; - } - - /** - * Skips the given number of elements. - * - * @param items number of elements to skip - * @throws NoSuchElementException if skipped past the last element - * @throws RemoteException on RMI errors - */ - @Override - public void skip(long items) - throws NoSuchElementException, RemoteException { - try { - iterator.skip(items); - } catch (NoSuchElementException e) { - throw new NoSuchElementException(e.getMessage()); - } - } - - /** - * Returns a remote adapter for the given local object. This abstract - * method is used by {@link #nextObjects()} to convert the local - * objects to remote references to be sent to the client. - *

    - * Subclasses should implement this method to use the remote adapter - * factory to create remote adapters of the specific element type. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - */ - protected abstract Object getRemoteObject(Object object) - throws RemoteException; - - /** - * Returns an array of remote references to the next elements in this - * iteration. - * - * @return array of remote references, or null - * @throws RemoteException on RMI errors - */ - @Override - public Object[] nextObjects() throws RemoteException { - ArrayList items = new ArrayList(); - while (items.size() < maxBufferSize && iterator.hasNext()) { - items.add(getRemoteObject(iterator.next())); - } - if (items.size() > 0) { - return items.toArray(new Object[items.size()]); - } else { - size = iterator.getPosition(); - return null; - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java deleted file mode 100644 index 471e6859be2..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating nodes. - */ -@Deprecated(forRemoval = true) public class ServerNodeIterator extends ServerIterator { - - /** - * Creates a ServerNodeIterator instance. - * - * @param iterator local node iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerNodeIterator( - NodeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given node. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getRemoteNode((Node) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java deleted file mode 100644 index 5e817880f84..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerNodeTypeIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.nodetype.NodeType; -import javax.jcr.nodetype.NodeTypeIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating node types. - */ -@Deprecated(forRemoval = true) public class ServerNodeTypeIterator extends ServerIterator { - - /** - * Creates a ServerNodeTypeIterator instance. - * - * @param iterator local node type iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerNodeTypeIterator( - NodeTypeIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given node type. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteNodeType((NodeType) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java deleted file mode 100644 index 47862666941..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerPropertyIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.Property; -import javax.jcr.PropertyIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating properties. - */ -@Deprecated(forRemoval = true) public class ServerPropertyIterator extends ServerIterator { - - /** - * Creates a ServerPropertyIterator instance. - * - * @param iterator local property iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerPropertyIterator( - PropertyIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given property. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteProperty((Property) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java deleted file mode 100644 index 07ea0a3a8e8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerRowIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.query.Row; -import javax.jcr.query.RowIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating rows. - */ -@Deprecated(forRemoval = true) public class ServerRowIterator extends ServerIterator { - - /** - * Creates a ServerRowIterator instance. - * - * @param iterator local row iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerRowIterator( - RowIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given row. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteRow((Row) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java deleted file mode 100644 index b235f259344..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/ServerVersionIterator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.iterator; - -import java.rmi.RemoteException; - -import javax.jcr.version.Version; -import javax.jcr.version.VersionIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating versions. - */ -@Deprecated(forRemoval = true) public class ServerVersionIterator extends ServerIterator { - - /** - * Creates a ServerVersionIterator instance. - * - * @param iterator local version iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerVersionIterator( - VersionIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given version.. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteVersion((Version) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java deleted file mode 100755 index a6b11fd475a..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/iterator/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.iterator; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java deleted file mode 100644 index 62b10c3e543..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServer.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.jmx; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.Properties; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; -import javax.naming.InitialContext; - -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * MBean that registers a JCR RMI server through JNDI. - */ -@Deprecated(forRemoval = true) public class JCRServer implements JCRServerMBean { - - /** - * local repository address - */ - private String localAddress; - - /** - * remote repository address - */ - private String remoteAddress; - - /** - * Optional local JNDI environment properties - */ - private String localEnvironment; - - /** - * Optional remote JNDI environment properties - */ - private String remoteEnvironment; - - /** - * Remote repository instance - */ - RemoteRepository remote; - - /** - * Local repository instance - */ - private Repository localRepository; - - public void start() throws Exception { - - if (this.localAddress == null) { - throw new IllegalStateException("local repository address is null"); - } - - if (this.remoteAddress == null) { - throw new IllegalStateException("remote repository address is null"); - } - - // local repository - InitialContext localContext = createInitialContext(localEnvironment); - localRepository = (Repository) localContext.lookup(this.localAddress); - if (localRepository == null) { - throw new IllegalArgumentException("local repository not found at " - + this.localAddress); - } - - // remote repository - InitialContext remoteContext = createInitialContext(remoteEnvironment); - RemoteAdapterFactory factory = new ServerAdapterFactory(); - remote = factory.getRemoteRepository(localRepository); - - // bind remote server - remoteContext.bind(this.remoteAddress, remote); - } - - /** - * - * @param jndiProps - * jndi environment properties - * @return an InitialContext for the given environment properties - * @throws Exception - * if any error occurs - */ - private InitialContext createInitialContext(String jndiProps) - throws Exception { - InitialContext initialContext = null; - if (jndiProps != null) { - InputStream is = new ByteArrayInputStream(jndiProps.getBytes()); - Properties props = new Properties(); - props.load(is); - initialContext = new InitialContext(props); - } else { - initialContext = new InitialContext(); - } - return initialContext; - } - - public void stop() throws Exception { - // unbind remote server - InitialContext ctx = new InitialContext(); - ctx.unbind(this.remoteAddress); - remote = null; - } - - public void createWorkspace( - String username, String password, String name) - throws RepositoryException { - Session session = localRepository.login( - new SimpleCredentials(username, password.toCharArray())); - try { - session.getWorkspace().createWorkspace(name); - } finally { - session.logout(); - } - } - - public String getLocalAddress() { - return localAddress; - } - - public void setLocalAddress(String localAddress) { - this.localAddress = localAddress; - } - - public String getRemoteAddress() { - return remoteAddress; - } - - public void setRemoteAddress(String remoteAddress) { - this.remoteAddress = remoteAddress; - } - - public String getLocalEnvironment() { - return localEnvironment; - } - - public void setLocalEnvironment(String localEnvironment) { - this.localEnvironment = localEnvironment; - } - - public String getRemoteEnvironment() { - return remoteEnvironment; - } - - public void setRemoteEnvironment(String remoteEnvironment) { - this.remoteEnvironment = remoteEnvironment; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java deleted file mode 100644 index cb8a76a48bb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/JCRServerMBean.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.jmx; - -import javax.jcr.RepositoryException; - -@Deprecated(forRemoval = true) public interface JCRServerMBean { - - void start() throws Exception; - - void stop() throws Exception; - - /** - * Creates a workspace in the managed repository. - * - * @param username administrator username - * @param password administrator password - * @param workspace name of the workspace to create - * @throws RepositoryException if the workspace could not be created - */ - void createWorkspace(String username, String password, String workspace) - throws RepositoryException; - - String getLocalAddress(); - - void setLocalAddress(String address); - - String getRemoteAddress(); - - void setRemoteAddress(String address); - - String getRemoteEnvironment(); - - void setRemoteEnvironment(String remoteEnvironment); - - String getLocalEnvironment(); - - void setLocalEnvironment(String localEnvironment); - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java deleted file mode 100755 index 26c77efd422..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/jmx/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.jmx; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java deleted file mode 100755 index 99ee18d2327..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java deleted file mode 100644 index 256929b7ea9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerGroup.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Iterator; - -import org.apache.jackrabbit.api.security.principal.GroupPrincipal; -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; - -@Deprecated(forRemoval = true) public class ServerGroup extends ServerPrincipal implements RemoteGroup { - - public ServerGroup(final GroupPrincipal principal, final RemoteAdapterFactory factory) - throws RemoteException { - super(principal, factory); - } - - public ServerGroup(final Principal principal, final RemoteAdapterFactory factory) - throws RemoteException { - super(principal, factory); - } - - public boolean isMember(String member) { - return isMember(member, getPrincipal()); - } - - public RemoteIterator members() throws RemoteException { - Iterator members = new Iterator() { - final Enumeration base = members(getPrincipal()); - - public boolean hasNext() { - return base.hasMoreElements(); - } - - public Principal next() { - return base.nextElement(); - } - - public void remove() { - throw new UnsupportedOperationException("remove"); - } - }; - return getFactory().getRemotePrincipalIterator(members); - } - - private static boolean isMember(final String memberName, final Principal group) { - Enumeration pe = members(group); - while (pe.hasMoreElements()) { - Principal p = pe.nextElement(); - if (memberName.equals(p.getName())) { - return true; - } - - if (isGroup(p) && isMember(memberName, p)) { - return true; - } - } - return false; - } - - public static boolean isGroup(Principal principal) { - return principal instanceof GroupPrincipal; - } - - private static Enumeration members(Principal principal) { - if (principal instanceof GroupPrincipal) { - return ((GroupPrincipal) principal).members(); - } - return Collections.emptyEnumeration(); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java deleted file mode 100644 index c7d3dc414b3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipal.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerPrincipal extends ServerObject implements RemotePrincipal { - - private final Principal principal; - - public ServerPrincipal(final Principal principal, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.principal = principal; - } - - public String getName() { - return principal.getName(); - } - - /** - * Returns the {@link Principal} encapsulated in this instance. - *

    - * NOTE: This method is intended to only be used in the JCR RMI - * implementation to be able to "send back" remote principals to the server - * for implementation of the remote JCR API. - * - * @return the {@link Principal} encapsulated in this instance. - */ - public Principal getPrincipal() { - return principal; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java deleted file mode 100644 index 1d5cb1c1bc7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/ServerPrincipalIterator.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.principal; - -import java.rmi.RemoteException; -import java.security.Principal; -import java.util.Iterator; -import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; - -@Deprecated(forRemoval = true) public class ServerPrincipalIterator extends ServerIterator { - - public ServerPrincipalIterator(Iterator iterator, - RemoteAdapterFactory factory, int maxBufferSize) - throws RemoteException { - super(new RangeIteratorAdapter(iterator), factory, maxBufferSize); - } - - /** - * {@inheritDoc} - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemotePrincipal((Principal) object); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java deleted file mode 100755 index a51fb001028..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/principal/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("4.0.0") -package org.apache.jackrabbit.rmi.server.principal; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java deleted file mode 100644 index ae6ed38cfe7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlEntry.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlEntry; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlEntry extends ServerObject implements - RemoteAccessControlEntry { - - private final AccessControlEntry ace; - - public ServerAccessControlEntry(final AccessControlEntry ace, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.ace = ace; - } - - public RemotePrincipal getPrincipal() throws RemoteException { - return getFactory().getRemotePrincipal(ace.getPrincipal()); - } - - public RemotePrivilege[] getPrivileges() throws RemoteException { - return getFactory().getRemotePrivilege(ace.getPrivileges()); - } - - AccessControlEntry getAccessControlEntry() { - return ace; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java deleted file mode 100644 index d4e3bf475a7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlList.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; -import java.security.Principal; - -import javax.jcr.RepositoryException; -import javax.jcr.security.AccessControlEntry; -import javax.jcr.security.AccessControlList; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.principal.ServerPrincipal; - -@Deprecated(forRemoval = true) public class ServerAccessControlList extends ServerAccessControlPolicy - implements RemoteAccessControlList { - - public ServerAccessControlList(final AccessControlList acl, - final RemoteAdapterFactory factory) throws RemoteException { - super(acl, factory); - } - - public RemoteAccessControlEntry[] getAccessControlEntries() - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlEntry( - ((AccessControlList) getAccessControlPolicy()).getAccessControlEntries()); - } - - public boolean addAccessControlEntry(RemotePrincipal principal, - RemotePrivilege[] privileges) throws RepositoryException { - - Principal p = null; - if (principal instanceof ServerPrincipal) { - p = ((ServerPrincipal) principal).getPrincipal(); - } - Privilege[] privs = new Privilege[privileges.length]; - for (int i = 0; privs != null && i < privs.length; i++) { - if (privileges[i] instanceof ServerPrivilege) { - privs[i] = ((ServerPrivilege) privileges[i]).getPrivilege(); - } else { - // not a compatible remote privilege, abort - privs = null; - } - } - - if (p != null && privs != null) { - return ((AccessControlList) getAccessControlPolicy()).addAccessControlEntry( - p, privs); - } - - throw new RepositoryException("Unsupported Remote types"); - } - - public void removeAccessControlEntry(RemoteAccessControlEntry ace) - throws RepositoryException { - if (ace instanceof ServerAccessControlEntry) { - AccessControlEntry lace = ((ServerAccessControlEntry) ace).getAccessControlEntry(); - ((AccessControlList) getAccessControlPolicy()).removeAccessControlEntry(lace); - } else { - throw new RepositoryException( - "Unsupported RemoteAccessControlEntry type " + ace.getClass()); - } - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java deleted file mode 100644 index 84b451156ee..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.RepositoryException; -import javax.jcr.security.AccessControlManager; -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.RemoteIterator; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager; -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlManager extends ServerObject implements - RemoteAccessControlManager { - - private final AccessControlManager acm; - - public ServerAccessControlManager(AccessControlManager acm, - RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.acm = acm; - } - - public RemoteIterator getApplicablePolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicyIterator( - acm.getApplicablePolicies(absPath)); - } - - public RemoteAccessControlPolicy[] getEffectivePolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicy( - acm.getEffectivePolicies(absPath)); - } - - public RemoteAccessControlPolicy[] getPolicies(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemoteAccessControlPolicy( - acm.getPolicies(absPath)); - } - - public RemotePrivilege[] getPrivileges(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege(acm.getPrivileges(absPath)); - } - - public RemotePrivilege[] getSupportedPrivileges(String absPath) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege( - acm.getSupportedPrivileges(absPath)); - } - - public boolean hasPrivileges(String absPath, String[] privileges) - throws RepositoryException { - Privilege[] privs = new Privilege[privileges.length]; - for (int i = 0; i < privs.length; i++) { - privs[i] = acm.privilegeFromName(privileges[i]); - } - - return acm.hasPrivileges(absPath, privs); - } - - public RemotePrivilege privilegeFromName(String privilegeName) - throws RepositoryException, RemoteException { - return getFactory().getRemotePrivilege( - acm.privilegeFromName(privilegeName)); - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java deleted file mode 100644 index 0e6c75cb2d3..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicy.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlPolicy; - -import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerAccessControlPolicy extends ServerObject implements - RemoteAccessControlPolicy { - - private final AccessControlPolicy acp; - - public ServerAccessControlPolicy(final AccessControlPolicy acp, - final RemoteAdapterFactory factory) - - throws RemoteException { - super(factory); - this.acp = acp; - } - - AccessControlPolicy getAccessControlPolicy() { - return acp; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java deleted file mode 100644 index 5f17ca941d9..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerAccessControlPolicyIterator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; - -import javax.jcr.security.AccessControlPolicy; -import javax.jcr.security.AccessControlPolicyIterator; - -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.iterator.ServerIterator; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * A ServerIterator for iterating rows. - */ -@Deprecated(forRemoval = true) public class ServerAccessControlPolicyIterator extends ServerIterator { - - /** - * Creates a ServerRowIterator instance. - * - * @param iterator local row iterator - * @param factory remote adapter factory - * @param maxBufferSize maximum size of the element buffer - * @throws RemoteException on RMI errors - */ - public ServerAccessControlPolicyIterator( - AccessControlPolicyIterator iterator, RemoteAdapterFactory factory, - int maxBufferSize) throws RemoteException { - super(iterator, factory, maxBufferSize); - } - - /** - * Creates and returns a remote adapter for the given row. - * - * @param object local object - * @return remote adapter - * @throws RemoteException on RMI errors - * @see ServerIterator#getRemoteObject(Object) - */ - protected Object getRemoteObject(Object object) throws RemoteException { - return getFactory().getRemoteAccessControlPolicy( - (AccessControlPolicy) object); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java deleted file mode 100644 index 8fd174319e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/ServerPrivilege.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.server.security; - -import java.rmi.RemoteException; -import java.rmi.server.RemoteStub; - -import javax.jcr.security.Privilege; - -import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerObject; - -@Deprecated(forRemoval = true) public class ServerPrivilege extends ServerObject implements RemotePrivilege { - - private final Privilege privilege; - - public ServerPrivilege(final Privilege privilege, - final RemoteAdapterFactory factory) throws RemoteException { - super(factory); - this.privilege = privilege; - } - - public RemotePrivilege[] getAggregatePrivileges() throws RemoteException { - return getFactory().getRemotePrivilege( - privilege.getAggregatePrivileges()); - } - - public RemotePrivilege[] getDeclaredAggregatePrivileges() - throws RemoteException { - return getFactory().getRemotePrivilege( - privilege.getDeclaredAggregatePrivileges()); - } - - public String getName() { - return privilege.getName(); - } - - public boolean isAbstract() { - return privilege.isAbstract(); - } - - public boolean isAggregate() { - return privilege.isAggregate(); - } - - Privilege getPrivilege() { - return privilege; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java deleted file mode 100755 index ebf25621192..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/server/security/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.server.security; diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java deleted file mode 100644 index d4a5bf109f0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/AbstractValue.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.FilterInputStream; -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.nio.charset.StandardCharsets; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Abstract base class for {@link Value} implementations. This class - * implements all {@link Value} methods except getString and - * getType. - *

    - * Most of the default value getters always throw {@link ValueFormatException}s - * and expect type-specific subclasses to override that behaviour with the - * appropriate value conversions. - *

    - * The {@link #getBinary()} method is implemented based on the abstract - * {@link #getString()} method, but subclasses can override that default - * implementation. - *

    - * The {@link #getStream()} method uses {@link #getBinary()} to implement - * the deprecated JCR 1.0 behaviour. This method must not be overridden. - */ -@Deprecated(forRemoval = true) abstract class AbstractValue implements Value, Serializable { - - /** - * Serial version UID - */ - private static final long serialVersionUID = -1989277354799918598L; - - /** - * The stream instance returned by {@link #getStream()}. Note that - * the stream is not included when serializing the value. - */ - private transient InputStream stream = null; - - /** - * Returns the stream representation of this value. This method implements - * the deprecated JCR 1.0 behaviour of always returning the same stream - * instance. The stream is retrieved from a {@link Binary} instance - * returned by {@link #getBinary()}. - * - * @return stream representation of this value - * @throws RepositoryException if the stream can not be created - */ - public synchronized final InputStream getStream() - throws RepositoryException { - if (stream == null) { - final Binary binary = getBinary(); - try { - stream = new FilterInputStream(binary.getStream()) { - @Override - public void close() throws IOException { - super.close(); - binary.dispose(); - } - }; - } finally { - // Proper cleanup also when binary.getStream() fails - if (stream == null) { - binary.dispose(); - } - } - } - return stream; - } - - /** - * Returns the binary representation of this value. The default - * implementation uses the UTF-8 serialization of the string returned - * by {@link #getString()}. Subclasses - */ - public Binary getBinary() throws RepositoryException { - final byte[] value = getString().getBytes(StandardCharsets.UTF_8); - return new Binary() { - public int read(byte[] b, long position) { - if (position >= value.length) { - return -1; - } else { - int p = (int) position; - int n = Math.min(b.length, value.length - p); - System.arraycopy(value, p, b, 0, n); - return n; - } - } - public InputStream getStream() { - return new ByteArrayInputStream(value); - } - public long getSize() { - return value.length; - } - public void dispose() { - } - }; - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to boolean is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * boolean. - */ - public boolean getBoolean() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_BOOLEAN); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to Calender is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * Calendar instance. - */ - public Calendar getDate() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_DATE); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to a {@link BigDecimal} is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * {@link BigDecimal}. - */ - public BigDecimal getDecimal() throws RepositoryException { - throw getValueFormatException(PropertyType.TYPENAME_DECIMAL); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to double is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * double. - */ - public double getDouble() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_DOUBLE); - } - - /** - * Always throws a ValueFormatException. Implementations should - * overwrite if conversion to long is supported. - * - * @return nothing - * @throws ValueFormatException If the value cannot be converted to a - * long. - */ - public long getLong() throws ValueFormatException { - throw getValueFormatException(PropertyType.TYPENAME_LONG); - } - - /** - * Returns a ValueFormatException with a message indicating - * what kind of type conversion is not supported. - * - * @return nothing - * @param destType The name of the value type to which this value cannot - * be converted. - */ - protected ValueFormatException getValueFormatException(String destType) { - return new ValueFormatException( - "Cannot convert value \"" + this + "\" of type " - + PropertyType.nameFromValue(getType()) + " to " + destType); - } - - //--------------------------------------------------------------< Object > - - /** - * Compares values as defined in the JCR specification. - * - * @param object value for comparison - * @return true if the values are equal, - * false otherwise - * @see JCRRMI-16 - */ - public boolean equals(Object object) { - try { - return (object instanceof Value) - && getType() == ((Value) object).getType() - && getString().equals(((Value) object).getString()); - } catch (RepositoryException e) { - return false; - } - } - - /** - * Returns a hash code that's in line with how the {@link #equals(Object)} - * method is implemented. - * - * @return hash code of this value - */ - public int hashCode() { - try { - return getType() + getString().hashCode(); - } catch (RepositoryException e) { - return getType(); - } - } - - /** - * Returns a string representation of this value. - * - * @return value string - */ - public String toString() { - try { - return getString(); - } catch (RepositoryException e) { - return PropertyType.nameFromValue(getType()); - } - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java deleted file mode 100644 index 3ab01d1b2bd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BinaryValue.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.Serializable; -import java.math.BigDecimal; -import java.nio.charset.StandardCharsets; -import java.util.Calendar; - -import javax.jcr.Binary; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Binary value. - */ -@Deprecated(forRemoval = true) class BinaryValue implements Value, Serializable { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 1719020811685971215L; - - /** - * The binary value - */ - private final Binary value; - - /** - * The stream instance returned by {@link #getStream()}. Note that - * the stream is not included when serializing the value. - */ - private transient InputStream stream = null; - - /** - * Creates a binary value. - */ - public BinaryValue(Binary value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#BINARY}. - */ - public int getType() { - return PropertyType.BINARY; - } - - public Binary getBinary() { - return value; - } - - public String getString() throws RepositoryException { - try { - InputStream stream = value.getStream(); - try { - Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8); - StringBuilder builder = new StringBuilder(); - char[] buffer = new char[1024]; - int n = reader.read(buffer); - while (n != -1) { - builder.append(buffer, 0, n); - n = reader.read(buffer); - } - return builder.toString(); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RepositoryException("Unable to read the binary value", e); - } - } - - public synchronized InputStream getStream() throws RepositoryException { - if (stream == null) { - stream = value.getStream(); - } - return stream; - } - - public boolean getBoolean() throws RepositoryException { - return new StringValue(getString()).getBoolean(); - } - - public Calendar getDate() throws RepositoryException { - return new StringValue(getString()).getDate(); - } - - public BigDecimal getDecimal() throws RepositoryException { - return new StringValue(getString()).getDecimal(); - } - - public double getDouble() throws RepositoryException { - return new StringValue(getString()).getDouble(); - } - - public long getLong() throws RepositoryException { - return new StringValue(getString()).getLong(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java deleted file mode 100644 index 030dc5622b0..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/BooleanValue.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Boolean value. - */ -@Deprecated(forRemoval = true) class BooleanValue extends AbstractValue { - - /** - * Serial version UID - */ - private static final long serialVersionUID = 5266937874230536517L; - - /** - * The boolean value - */ - private final boolean value; - - /** - * Creates an instance for the given boolean value. - */ - public BooleanValue(boolean value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#BOOLEAN}. - */ - public int getType() { - return PropertyType.BOOLEAN; - } - - /** - * Returns the boolean value. - */ - @Override - public boolean getBoolean() { - return value; - } - - /** - * The boolean is converted using {@link Boolean#toString()}. - */ - public String getString() { - return Boolean.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java deleted file mode 100644 index 51e0931bd82..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DateValue.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Date value. - */ -@Deprecated(forRemoval = true) class DateValue extends AbstractValue { - - /** - * Serial version UID - */ - private static final long serialVersionUID = -2382837055824423966L; - - // misc. numeric formats used in formatting - private static final DecimalFormat XX_FORMAT = new DecimalFormat("00"); - private static final DecimalFormat XXX_FORMAT = new DecimalFormat("000"); - private static final DecimalFormat XXXX_FORMAT = new DecimalFormat("0000"); - - /** - * The date value - */ - private final Calendar value; - - /** - * Creates an instance for the given date value. - * - * @param value the date value - */ - public DateValue(Calendar value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DATE}. - */ - public int getType() { - return PropertyType.DATE; - } - - /** - * Returns a copy of this Calendar value. Modifying the - * returned Calendar does not change the value of this - * instance. - */ - @Override - public Calendar getDate() { - return (Calendar) value.clone(); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - */ - @Override - public BigDecimal getDecimal() { - return new BigDecimal(value.getTimeInMillis()); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number - * is out-of-range for a double, a ValueFormatException is thrown. - */ - @Override - public double getDouble() { - return value.getTimeInMillis(); - } - - /** - * The date is converted to the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). If this number - * is out-of-range for a long, a ValueFormatException is thrown. - */ - @Override - public long getLong() { - return value.getTimeInMillis(); - } - - /** - * The date is converted to the following format: - * sYYYY-MM-DDThh:mm:ss.sssTZD - * where: - *

    - *
    sYYYY
    - *
    - * Four-digit year with optional leading positive (โ€˜+โ€™) or - * negative (โ€˜-โ€™) sign. 0000 , -0000 and +0000 all indicate - * the year 1 BCE. โ€“YYYY where YYYY is the number y indicates - * the year (y+1) BCE. The absence of a sign or the presence - * of a positive sign indicates a year CE. For example, -0054 - * would indicate the year 55 BCE, while +1969 and 1969 - * indicate the year 1969 CE. - *
    - *
    MM
    - *
    - * Two-digit month (01 = January, etc.) - *
    - *
    DD
    - *
    - * Two-digit day of month (01 through 31) - *
    - *
    hh
    - *
    - * Two digits of hour (00 through 23, or 24 if mm is 00 and - * ss.sss is 00.000) - *
    - *
    mm
    - *
    - * Two digits of minute (00 through 59) - *
    - *
    ss.sss
    - *
    - * Seconds, to three decimal places (00.000 through 59.999 or - * 60.999 in the case of leap seconds) - *
    - *
    TZD
    - *
    - * Time zone designator (either Z for Zulu, i.e. UTC, or +hh:mm or - * -hh:mm, i.e. an offset from UTC) - *
    - *
    - *

    - * Note that the โ€œTโ€ separating the date from the time and the - * separators โ€œ-โ€and โ€œ:โ€ appear literally in the string. - *

    - * This format is a subset of the format defined by ISO 8601:2004. - * If the DATE value cannot be represented in this format a - * {@link ValueFormatException} is thrown. - */ - public String getString() { - // determine era and adjust year if necessary - int year = value.get(Calendar.YEAR); - if (value.isSet(Calendar.ERA) - && value.get(Calendar.ERA) == GregorianCalendar.BC) { - // calculate year using astronomical system: - // year n BCE => astronomical year - n + 1 - year = 0 - year + 1; - } - - // note that we cannot use java.text.SimpleDateFormat for - // formatting because it can't handle years <= 0 and TZD's - StringBuilder buf = new StringBuilder(32); - - // year ([-]YYYY) - buf.append(XXXX_FORMAT.format(year)); - buf.append('-'); - // month (MM) - buf.append(XX_FORMAT.format(value.get(Calendar.MONTH) + 1)); - buf.append('-'); - // day (DD) - buf.append(XX_FORMAT.format(value.get(Calendar.DAY_OF_MONTH))); - buf.append('T'); - // hour (hh) - buf.append(XX_FORMAT.format(value.get(Calendar.HOUR_OF_DAY))); - buf.append(':'); - // minute (mm) - buf.append(XX_FORMAT.format(value.get(Calendar.MINUTE))); - buf.append(':'); - // second (ss) - buf.append(XX_FORMAT.format(value.get(Calendar.SECOND))); - buf.append('.'); - // millisecond (SSS) - buf.append(XXX_FORMAT.format(value.get(Calendar.MILLISECOND))); - - // time zone designator (Z or +00:00 or -00:00) - TimeZone tz = value.getTimeZone(); - // time zone offset (in minutes) from UTC (including daylight saving) - int offset = tz.getOffset(value.getTimeInMillis()) / 1000 / 60; - if (offset != 0) { - int hours = Math.abs(offset / 60); - int minutes = Math.abs(offset % 60); - buf.append(offset < 0 ? '-' : '+'); - buf.append(XX_FORMAT.format(hours)); - buf.append(':'); - buf.append(XX_FORMAT.format(minutes)); - } else { - buf.append('Z'); - } - - return buf.toString(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java deleted file mode 100644 index 718907220c7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DecimalValue.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Decimal value. - */ -@Deprecated(forRemoval = true) class DecimalValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 2077767642124007133L; - - /** - * The minimum value for date conversion. - */ - private static final BigDecimal MIN_DATE = - BigDecimal.valueOf(Long.MIN_VALUE); - - /** - * The maximum value for date conversion. - */ - private static final BigDecimal MAX_DATE = - BigDecimal.valueOf(Long.MAX_VALUE); - - /** - * The decimal value. - */ - private final BigDecimal value; - - /** - * Creates an instance for the given decimal value. - */ - public DecimalValue(BigDecimal value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DECIMAL}. - */ - public int getType() { - return PropertyType.DECIMAL; - } - - /** - * The decimal is converted to a long and interpreted as the number of - * milliseconds since 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - * If the resulting value is out of range for a date, - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - if (value.compareTo(MIN_DATE) >= 0 && value.compareTo(MAX_DATE) <= 0) { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis(getLong()); - return date; - } else { - throw new ValueFormatException( - "Decimal value is outside the date range: " + value); - } - } - - /** - * Returns the decimal value. - */ - @Override - public BigDecimal getDecimal() { - return value; - } - - /** - * The decimal is converted using {@link BigDecimal#doubleValue()}. - */ - @Override - public double getDouble() { - return value.doubleValue(); - } - - /** - * The decimal is converted using {@link BigDecimal#longValue()}. - */ - @Override - public long getLong() { - return value.longValue(); - } - - /** - * The decimal is converted using {@link BigDecimal#toString()}. - */ - public String getString() { - return value.toString(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java deleted file mode 100644 index e11828313da..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/DoubleValue.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Double value. - */ -@Deprecated(forRemoval = true) class DoubleValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -2767063038068929611L; - - /** - * The double value. - */ - private final double value; - - /** - * Creates an instance for the given double value. - */ - public DoubleValue(double value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#DOUBLE}. - */ - public int getType() { - return PropertyType.DOUBLE; - } - - /** - * Returns a Calendar instance interpreting the double as the - * time in milliseconds since the epoch (1.1.1970, 0:00, UTC). If the - * resulting value is out of range for a date, - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - if (Long.MIN_VALUE <= value && value <= Long.MAX_VALUE) { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis((long) value); - return date; - } else { - throw new ValueFormatException( - "Double value is outside the date range: " + value); - } - } - - /** - * The double is converted using the constructor - * {@link BigDecimal#BigDecimal(double)}. - */ - @Override - public BigDecimal getDecimal() { - return new BigDecimal(value); - } - - /** - * Returns the double value. - */ - @Override - public double getDouble() { - return value; - } - - /** - * Standard Java type coercion is used. - */ - @Override - public long getLong() { - return (long) value; - } - - /** - * The double is converted using {@link Double#toString(double)}. - */ - public String getString() { - return Double.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java deleted file mode 100644 index 4e813f1d94d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/LongValue.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; - -import javax.jcr.PropertyType; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Long value. - */ -@Deprecated(forRemoval = true) class LongValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -5983072186237752887L; - - /** The long value */ - private final long value; - - /** - * Creates an instance for the given long value. - */ - public LongValue(long value) { - this.value = value; - } - - /** - * Returns PropertyType.LONG. - */ - public int getType() { - return PropertyType.LONG; - } - - /** - * The long is interpreted as the number of milliseconds since - * 00:00 (UTC) 1 January 1970 (1970-01-01T00:00:00.000Z). - */ - @Override - public Calendar getDate() { - Calendar date = Calendar.getInstance(); - date.setTimeInMillis(value); - return date; - } - - /** - * The long is converted using the method {@link BigDecimal#valueOf(long)}. - */ - @Override - public BigDecimal getDecimal() { - return BigDecimal.valueOf(value); - } - - /** - * Standard Java type coercion is used. - */ - @Override - public double getDouble() { - return value; - } - - /** - * Returns the long value. - */ - @Override - public long getLong() { - return value; - } - - /** - * The long is converted using {@link Long#toString(long)}. - */ - public String getString() { - return Long.toString(value); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java deleted file mode 100644 index 5c26a5cec58..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/NameValue.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The NameValue class implements the committed value state for - * Name values as a part of the State design pattern (Gof) used by this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class NameValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 4598175360244278453L; - - /** The name value. */ - private final String value; - - /** - * Creates an instance for the given name value. - */ - protected NameValue(String value) throws ValueFormatException { - // TODO: Check name format - this.value = value; - } - - /** - * Returns PropertyType.NAME. - */ - public int getType() { - return PropertyType.NAME; - } - - /** - * Returns the string representation of the Name value. - */ - public String getString() throws RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java deleted file mode 100644 index 1efe3f5ef3e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/PathValue.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The PathValue class implements the committed value state for - * Path values as a part of the State design pattern (Gof) used by this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class PathValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 6233090249008329224L; - - /** The path value. */ - private final String value; - - /** - * Creates an instance for the given path value. - */ - protected PathValue(String value) throws ValueFormatException { - // TODO: Check path format - this.value = value; - } - - /** - * Returns PropertyType.PATH. - */ - public int getType() { - return PropertyType.PATH; - } - - /** - * Returns the string representation of the path value. - */ - public String getString() throws ValueFormatException, RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java deleted file mode 100644 index 6e55a573c60..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/ReferenceValue.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The ReferenceValue class implements the committed value state - * for Reference values as a part of the State design pattern (Gof) used by - * this package. - * - * @since 0.16.4.1 - */ -@Deprecated(forRemoval = true) public class ReferenceValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 5245358709465803351L; - - /** The reference value */ - private final String value; - - /** - * Creates an instance for the given reference value. - */ - protected ReferenceValue(String value) throws ValueFormatException { - // TODO: check syntax - this.value = value; - } - - /** - * Returns PropertyType.REFERENCE. - */ - public int getType() { - return PropertyType.REFERENCE; - } - - /** - * Returns the string representation of the reference value. - */ - public String getString() throws ValueFormatException, RepositoryException { - return value; - } -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java deleted file mode 100644 index 9d1173fb1f8..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.List; - -import javax.jcr.Binary; -import javax.jcr.Node; -import javax.jcr.PropertyType; -import javax.jcr.RepositoryException; -import javax.jcr.Value; -import javax.jcr.ValueFactory; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * The SerialValueFactory class is used in the RMI infrastructure - * to create serializable Value instances on the client side. - *

    - * This class works in conjunction with the implementations of the - * javax.jcr.Value interface found in this package. - *

    - * This class may be extended to overwrite any of the - * createXXXValue methods to create instances of the respective - * type of {@link Value} implementation. The - * methods of the ValueFactory interface are declared final to - * guard against breaking the rules. - */ -@Deprecated(forRemoval = true) public class SerialValueFactory implements ValueFactory { - - /** The singleton value factory instance */ - private static final SerialValueFactory INSTANCE = new SerialValueFactory(); - - /** - * Returns the ValueFactory instance, which currently is a - * singleton instance of this class. - *

    - * Future revisions will support some kind of configuration to specify - * which concrete class should be used. - */ - public static final SerialValueFactory getInstance() { - return INSTANCE; - } - - /** - * Utility method for decorating an array of values. The returned array will - * contain serializable value decorators for all the given values. Note that - * the contents of the original values will only be copied when the - * decorators are serialized. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the values to be decorated - * @return array of decorated values - * @throws RepositoryException if the values can not be serialized - */ - public static Value[] makeSerialValueArray(Value[] values) - throws RepositoryException { - List serials = new ArrayList(); - if (values != null) { - for (Value value : values) { - if (value != null) { - serials.add(makeSerialValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Utility method for decorating a value. Note that the contents of the - * original values will only be copied when the decorators are serialized. - * Null referenced and already serializable values are passed as-is. - * - * @param value the value to be decorated, or null - * @return the decorated value, or null - * @throws RepositoryException if the value can not be serialized - */ - public static Value makeSerialValue(Value value) throws RepositoryException { - // if the value is null or already serializable, just return it - if (value == null || value instanceof Serializable) { - return value; - } else { - return INSTANCE.createValue(value); - } - } - - /** - * Utility method for converting an array of strings to serializable - * string values. - *

    - * If the given array is null, then an empty array is - * returned. - * - * @param values the string array - * @return array of string values - */ - public static Value[] makeSerialValueArray(String[] values) { - List serials = new ArrayList(); - if (values != null) { - for (String value : values) { - if (value != null) { - serials.add(INSTANCE.createValue(value)); - } - } - } - return serials.toArray(new Value[serials.size()]); - } - - /** - * Default constructor only visible to extensions of this class. See - * class comments for details. - */ - protected SerialValueFactory() { - } - - /** {@inheritDoc} */ - public Value createValue(String value) { - return new StringValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(String value, int type) - throws ValueFormatException { - try { - return createValue(new StringValue(value), type); - } catch (ValueFormatException e) { - throw e; - } catch (RepositoryException e) { - throw new ValueFormatException( - "Unexpected error when creating value: " + value, e); - } - } - - private Value createValue(Value value) throws RepositoryException { - return createValue(value, value.getType()); - } - - private Value createValue(Value value, int type) - throws RepositoryException { - switch (type) { - case PropertyType.BINARY: - Binary binary = value.getBinary(); - try { - return createValue(binary.getStream()); - } finally { - binary.dispose(); - } - case PropertyType.BOOLEAN: - return createValue(value.getBoolean()); - case PropertyType.DATE: - return createValue(value.getDate()); - case PropertyType.DECIMAL: - return createValue(value.getDecimal()); - case PropertyType.DOUBLE: - return createValue(value.getDouble()); - case PropertyType.LONG: - return createValue(value.getLong()); - case PropertyType.NAME: - return new NameValue(value.getString()); - case PropertyType.PATH: - return new PathValue(value.getString()); - case PropertyType.REFERENCE: - return new ReferenceValue(value.getString()); - case PropertyType.STRING: - return createValue(value.getString()); - default: - throw new ValueFormatException("Unknown value type " + type); - } - } - - /** {@inheritDoc} */ - public final Value createValue(long value) { - return new LongValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(double value) { - return new DoubleValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(boolean value) { - return new BooleanValue(value); - } - - /** {@inheritDoc} */ - public Value createValue(BigDecimal value) { - return new DecimalValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(Calendar value) { - return new DateValue(value); - } - - /** {@inheritDoc} */ - public final Value createValue(InputStream value) { - try { - return createValue(createBinary(value)); - } catch (RepositoryException e) { - throw new RuntimeException("Unable to create a binary value", e); - } - } - - /** {@inheritDoc} */ - public final Value createValue(Node value) throws RepositoryException { - return createValue(value.getUUID(), PropertyType.REFERENCE); - } - - public Binary createBinary(InputStream stream) throws RepositoryException { - try { - try { - return new SerializableBinary(stream); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RepositoryException("Unable to read binary stream", e); - } - } - - public Value createValue(Binary value) { - return new BinaryValue(value); - } - - public Value createValue(Node value, boolean weak) - throws RepositoryException { - return new ReferenceValue(value.getUUID()); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java deleted file mode 100644 index 8da0a56a920..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerializableBinary.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.io.RandomAccessFile; -import java.io.Serializable; - -import javax.jcr.Binary; -import javax.jcr.RepositoryException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * Serializable binary. - */ -@Deprecated(forRemoval = true) class SerializableBinary implements Binary, Serializable { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -7742179594834275853L; - - private static final int BUFFER_SIZE = 64 * 1024; - - private transient long length; - - private transient byte[] data; - - private transient File file; - - /** - * Creates a binary from the given stream. The stream is not closed. - * - * @param stream binary stream - */ - public SerializableBinary(InputStream stream) throws IOException { - length = 0; - data = null; - file = null; - - OutputStream output = null; - try { - byte[] buffer = new byte[BUFFER_SIZE]; - int n = stream.read(buffer); - while (n != -1) { - length += n; - if (length < buffer.length) { - n = stream.read( - buffer, (int) length, buffer.length - (int) length); - } else { - if (file == null) { - file = File.createTempFile("jackrabbit-jcr-rmi-", null); - output = new FileOutputStream(file); - output.write(buffer); - } else { - output.write(buffer, 0, n); - } - n = stream.read(buffer); - } - } - if (file == null) { - data = new byte[(int) length]; - System.arraycopy(buffer, 0, data, 0, (int) length); - } - } finally { - if (output != null) { - output.close(); - } - } - } - - public synchronized int read(byte[] b, long position) - throws RepositoryException { - if (position < 0 || position >= length) { - return -1; - } else if (data != null) { - int n = Math.min(b.length, data.length - (int) position); - System.arraycopy(data, (int) position, b, 0, n); - return n; - } else if (file != null) { - try { - RandomAccessFile random = new RandomAccessFile(file, "r"); - try { - random.seek(position); - return random.read(b); - } finally { - random.close(); - } - } catch (FileNotFoundException e) { - throw new RepositoryException("Binary file is missing", e); - } catch (IOException e) { - throw new RepositoryException("Unable to read the binary", e); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - public synchronized InputStream getStream() throws RepositoryException { - if (data != null) { - return new ByteArrayInputStream(data); - } else if (file != null) { - try { - return new FileInputStream(file); - } catch (FileNotFoundException e) { - throw new RepositoryException("Binary file is missing", e); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - public long getSize() { - return length; - } - - public synchronized void dispose() { - data = null; - if (file != null) { - file.delete(); - file = null; - } - } - - private synchronized void writeObject(ObjectOutputStream stream) - throws IOException { - stream.writeLong(length); - if (data != null) { - stream.write(data); - } else if (file != null) { - InputStream input = new FileInputStream(file); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - int n = input.read(buffer); - while (n != -1) { - stream.write(buffer, 0, n); - n = input.read(buffer); - } - } finally { - input.close(); - } - } else { - throw new IllegalStateException("This binary has been disposed"); - } - } - - private void readObject(ObjectInputStream stream) - throws IOException { - length = stream.readLong(); - if (length <= BUFFER_SIZE) { - data = new byte[(int) length]; - stream.readFully(data); - file = null; - } else { - data = null; - file = File.createTempFile("jackrabbit-jcr-rmi-", null); - OutputStream output = new FileOutputStream(file); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - long count = 0; - int n = stream.read(buffer); - while (n != -1 && count < length) { - output.write(buffer, 0, n); - count += n; - n = stream.read(buffer, 0, Math.min( - buffer.length, (int) (length - count))); - } - } finally { - output.close(); - } - } - } - - public void finalize() { - dispose(); - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java deleted file mode 100644 index 8d9ffb85ccd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/StringValue.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi.value; - -import java.math.BigDecimal; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import javax.jcr.PropertyType; -import javax.jcr.ValueFormatException; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * String value. - */ -@Deprecated(forRemoval = true) class StringValue extends AbstractValue { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 220963478492833703L; - - /** The string value */ - private final String value; - - /** - * Creates an instance for the given string value. - */ - public StringValue(String value) { - this.value = value; - } - - /** - * Returns {@link PropertyType#STRING}. - */ - public int getType() { - return PropertyType.STRING; - } - - /** - * The string is converted using {@link Boolean#valueOf(String)}. - */ - @Override - public boolean getBoolean() { - return Boolean.valueOf(value); - } - - /** - * If the string is in the format described in - * {@link DateValue#getString()}, it is converted directly, otherwise - * a {@link ValueFormatException} is thrown. - */ - @Override - public Calendar getDate() throws ValueFormatException { - // check optional leading sign - char sign = '+'; - int start = 0; - if (value.startsWith("-")) { - sign = '-'; - start = 1; - } else if (value.startsWith("+")) { - sign = '+'; - start = 1; - } - - // note that we cannot use java.text.SimpleDateFormat for - // parsing because it can't handle years <= 0 and TZD's - int year, month, day, hour, min, sec, ms; - String tzID; - try { - // year (YYYY) - year = Integer.parseInt(value.substring(start, start + 4)); - start += 4; - // delimiter '-' - if (value.charAt(start) != '-') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // month (MM) - month = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter '-' - if (value.charAt(start) != '-') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // day (DD) - day = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter 'T' - if (value.charAt(start) != 'T') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // hour (hh) - hour = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter ':' - if (value.charAt(start) != ':') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // minute (mm) - min = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter ':' - if (value.charAt(start) != ':') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // second (ss) - sec = Integer.parseInt(value.substring(start, start + 2)); - start += 2; - // delimiter '.' - if (value.charAt(start) != '.') { - throw new ValueFormatException("Not a date: " + value); - } - start++; - // millisecond (SSS) - ms = Integer.parseInt(value.substring(start, start + 3)); - start += 3; - // time zone designator (Z or +00:00 or -00:00) - if (value.charAt(start) == '+' || value.charAt(start) == '-') { - // offset to UTC specified in the format +00:00/-00:00 - tzID = "GMT" + value.substring(start); - } else if (value.substring(start).equals("Z")) { - tzID = "GMT"; - } else { - throw new ValueFormatException( - "Invalid time zone in a date: " + value); - } - } catch (IndexOutOfBoundsException e) { - throw new ValueFormatException("Not a date: " + value, e); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a date: " + value, e); - } - - TimeZone tz = TimeZone.getTimeZone(tzID); - // verify id of returned time zone (getTimeZone defaults to "GMT") - if (!tz.getID().equals(tzID)) { - throw new ValueFormatException( - "Invalid time zone in a date: " + value); - } - - // initialize Calendar object - Calendar cal = Calendar.getInstance(tz); - cal.setLenient(false); - // year and era - if (sign == '-' || year == 0) { - // not CE, need to set era (BCE) and adjust year - cal.set(Calendar.YEAR, year + 1); - cal.set(Calendar.ERA, GregorianCalendar.BC); - } else { - cal.set(Calendar.YEAR, year); - cal.set(Calendar.ERA, GregorianCalendar.AD); - } - // month (0-based!) - cal.set(Calendar.MONTH, month - 1); - // day of month - cal.set(Calendar.DAY_OF_MONTH, day); - // hour - cal.set(Calendar.HOUR_OF_DAY, hour); - // minute - cal.set(Calendar.MINUTE, min); - // second - cal.set(Calendar.SECOND, sec); - // millisecond - cal.set(Calendar.MILLISECOND, ms); - - try { - // the following call will trigger an IllegalArgumentException - // if any of the set values are illegal or out of range - cal.getTime(); - } catch (IllegalArgumentException e) { - throw new ValueFormatException("Not a date: " + value, e); - } - - return cal; - } - - /** - * The string is converted using the constructor - * {@link BigDecimal#BigDecimal(String)}. - */ - @Override - public BigDecimal getDecimal() throws ValueFormatException { - try { - return new BigDecimal(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a decimal value: " + value, e); - } - } - - - /** - * The string is converted using {@link Double#valueOf(String)}. - */ - @Override - public double getDouble() throws ValueFormatException { - try { - return Double.valueOf(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a double value: " + value, e); - } - } - - /** - * The string is converted using {@link Long#valueOf(String)}. - */ - @Override - public long getLong() throws ValueFormatException { - try { - return Long.valueOf(value); - } catch (NumberFormatException e) { - throw new ValueFormatException("Not a long value: " + value, e); - } - } - - /** - * Returns the string value. - */ - public String getString() { - return value; - } - -} diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java deleted file mode 100755 index 05fc56e6e4c..00000000000 --- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ -@org.osgi.annotation.versioning.Version("3.1.0") -package org.apache.jackrabbit.rmi.value; diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html deleted file mode 100644 index 2bcd960b8e1..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/iterator/package.html +++ /dev/null @@ -1,19 +0,0 @@ - - -Local adapters for remote iterators. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html deleted file mode 100644 index bc61b5b85f7..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/client/package.html +++ /dev/null @@ -1,76 +0,0 @@ - - -Client implementation of the transparent JCR-RMI layer. -

    -This package contains the default client implementation of the -transparent JCR-RMI layer. The classes in this package can be used -to make a remote JCR-RMI service seem like a local JCR repository. -

    -The contents of this package is designed using two design patterns, -Factory and Adapter. All the ClientObject subclasses implement the -Adapter pattern to adapt a remote JCR-RMI reference to the corresponding -local JCR interface. The Factory pattern is used to centralize the -creation and configuration of all adapter instances. - -

    Looking up a JCR-RMI client

    -

    -The ClientRepositoryFactory class provides a convenient mechanism for -looking up a remote JCR-RMI repository. The factory can be used either -directly or as a JNDI object factory. -

    -The following example shows how to use the ClientRepositoryFactory -directly: - -

    -    String name = ...; // The RMI URL of the repository
    -    
    -    ClientRepositoryFactory factory = new ClientRepositoryFactory();
    -    Repository repository = factory.getRepository(name);
    -
    - -

    -The ClientRepositoryFactory can also be used via JNDI. The following -example settings and code demonstrate how to configure and use the -transparent JCR-RMI layer in a Tomcat 5.5 web application: - -

    -context.xml:
    -    <Resource name="jcr/Repository" auth="Container"
    -              type="javax.jcr.Repository"
    -              factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
    -              url="..."/>
    -              
    -web.xml:
    -    <resource-env-ref>
    -      <description>The external content repository</description>
    -      <resource-env-ref-name>jcr/Repository</resource-env-ref-name>
    -      <resource-env-ref-type>javac.jcr.Repository</resource-env-ref-type>
    -    </resource-env-ref>
    -
    -...SomeServlet.java:
    -    Context initial = new InitialContext();
    -    Context context = (Context) initial.lookup("java:comp/env");
    -    Repository repository = (Repository) context.lookup("jcr/Repository");
    -
    - -

    -Note that in the example above only the context.xml configuration file -contains a direct references to the JCR-RMI layer. All other parts of the -web application can be implemented using the standard JCR interfaces. - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html deleted file mode 100644 index 00327bdc80e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/iterator/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Utility classes for implementing JCR iterators based on static arrays. -

    -This package contains array-based implementations of the JCR -{@link javax.jcr.RangeIterator RangeIterator} interfaces. -

    -These utility classes were designed for the transparent JCR-RMI layer, -but can easily be used as a part of any JCR repository implementation. -This package depends only on the standard JCR and J2SE APIs. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html deleted file mode 100644 index 79e5eac5cac..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/observation/package.html +++ /dev/null @@ -1,71 +0,0 @@ - - -

    -Helper class used by the observation manager classes. -The JCR observation framework defines a notification mechanism where an -EventListener is registered with the observation manager -to receive certain events during the lifetime of the registration. For -the remote case, where the repository and the application run in different -Java VMs on possibly different hosts, there are issues related to the -observation framework. -

    -The listener mechanism is a call-back mechanism where the server calls -code in the client application. The client application code most probably -hooks into other parts of that application. Therefore it is not practically -feasible to just require the client listener to be serializable to be sent -to the server for several reasons: -

      -
    • The RMI server cannot call any method on the RMI client. To support such -call-back situations, the client side application would have to register -another server, which the server side would have to call. -
    • When trying to "transfer" the listener to the server side, the listener -class would have to be available to the server side - either locally in the -class path or through RMI class loading mechanisms. -
    -

    -To circumvent these issues and still be able to register event listeners, -support for observation events is implemented in a manner similar to the Java -Management Extensions Remote API 1.0 (JSR 160) as laid out in Chapter 2.4, -Adding Remote Listeners: -

    -The ObservationManager interface is not implemented in the RMI layer like -other interfaces, which just forward calls to the API to the corresponding -remote object by means of the RMI framework. Instead the client-side -ObservationManager manages its own list of registered event listeners. Each -listener registered with an ObservationManager is assigned a unique -identifier. -

    -The unique identifier along with the filter configuration (event type, -path, depth flag, uuid list, node type list, local flag) is sent to the -server-side remote observation manager. This latter instantiates a proxy -event listener representing the client side event listener contains the -unique identifier as a ilnk to the client side event listener. The proxy -event listener is the registered to the repository's ObservationManager -with the configuration received from the client side. -

    -When an event arrives at the event listener proxy, the proxy creates a -new RemoteEvent instance, which contains the client-side event listener -identifier along with the Event objects from the EventIterator. This -RemoteEvent instance is added to a server-side queue, which may be -retrieved from the client-side. -

    -The client-side ObservationManager has a helper class ClientEventPoll, -which works in the background asking the server for the RemoteEvents from -the event queue. Each such event is then dispatched to the client-side -event listener by calling the EventListener.onEvent() method. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html deleted file mode 100644 index 4d971e6eefd..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/remote/package.html +++ /dev/null @@ -1,35 +0,0 @@ - - -Remote interfaces of the transparent JCR-RMI layer. -

    -This package contains all the interfaces and classes used by both -the client and server sides of the transparent JCR-RMI layer. -The compiled contents of this package should thus be included -in both client and server installations. Note also that RMI stubs and -skeletons need to be generated for all the remote interfaces when using -old JDK versions (stubs for JDK < 1.5, skeletons for JDK < 1.2). -

    -The interfaces in this package are remote versions of the -corresponding interfaces in the javax.jcr packages. They are used by -the adapter classes in the .rmi.client and .rmi.server packages. The server -classes adapt local JCR objects to the remote interfaces, and the client -classes adapt the resulting remote references back to the JCR interfaces. -

    -The SerialValue class is a decorator utility used by both the client and -server classes to safely pass Value objects over the network. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html deleted file mode 100644 index 1fd4bb78e1d..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/iterator/package.html +++ /dev/null @@ -1,19 +0,0 @@ - - -Remote adapters for local iterators. - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html deleted file mode 100644 index 7ee6b820ccb..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/server/package.html +++ /dev/null @@ -1,80 +0,0 @@ - - -Server implementation of the transparent JCR-RMI layer. -

    -This package contains the default server implementation of the -transparent JCR-RMI layer. The classes in this package can be used -to make a local JCR repository available as an RMI service. In addition, -this package offers a straightforward mechanism for extending or modifying -the behaviour of the server layer. -

    -The contents of this package is designed using two design patterns, -Factory and Adapter. All the remotely accessible ServerObject subclasses -implement the Adapter pattern to adapt a local JCR interface to the -corresponding remote JCR-RMI interface. The Factory pattern is used -to centralize the creation and configuration of all adapter instances. - -

    Setting up a JCR-RMI server

    -

    -Setting up the server part of the JCR-RMI layer is quite straightforward. -After instantiating a local JCR repository you need to wrap it into a -remote adapter and create an RMI binding for the repository. A variation -of the following code is usually all that is needed in addition to the -standard RMI setup (starting rmiregistry, etc.): - -

    -    Repository repository = ...; // The local repository
    -    String name = ...; // The RMI URL for the repository
    -    
    -    RemoteAdapterFactory factory = new ServerAdapterFactory();
    -    RemoteRepository remote = factory.getRemoteRepository(repository);
    -    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    -
    - -

    Extending the JCR-RMI server

    -

    -The Factory pattern used by this package makes it easy to extend -the behaviour of the JCR-RMI server. Such changes in behaviour or policy -can be implemented by modifying or replacing the default -ServerAdapterFactory used in the example above. -

    -The following example code adds transparent logging of all session logins -and logouts: - -

    -    Repository repository = ...; // The local repository
    -    String name = ...; // The RMI URL for the repository
    -    
    -    RemoteAdapterFactory factory = new ServerAdapterFactory() {
    -        public RemoteSession getRemoteSession(Session session)
    -                throws RemoteException {
    -            System.out.println("LOGIN: " + session.getUserId());
    -            return new ServerSession(session, this) {
    -                public void logout() {
    -                    System.out.println("LOGOUT: " + session.getUserId());
    -                    super.logout();
    -                }
    -            };
    -        }
    -    };
    -
    -    RemoteRepository remote = factory.getRemoteRepository(repository);
    -    Naming.bind(name, remote);  // Make the RMI binding using java.rmi.Naming
    -
    - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html deleted file mode 100644 index 8dc61302031..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/value/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - -Serializable implementation of the JCR Value interfaces. -

    -This package contains a simple in-memory implementation of the JCR -{@link javax.jcr.Value Value} and {@link javax.jcr.ValueFactory ValueFactory} -interfaces. The implementation has no external dependencies and supports -serialization of Value instances. -

    -

    -Note that the Value instances created by this package are thread safe. -

    - - diff --git a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html b/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html deleted file mode 100644 index 9040e137b0e..00000000000 --- a/jackrabbit-jcr-rmi/src/main/javadoc/org/apache/jackrabbit/rmi/xml/package.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Utility classes for importing SAX event streams. -

    -The classes in this package can be used for to implement the JCR -{@link javax.jcr.Session#getImportContentHandler(java.lang.String) Session.getImportContentHandler(String)} -and -{@link javax.jcr.Workspace#getImportContentHandler(java.lang.String, int) Workspace.getImportContentHandler(String, int)} -methods in terms of the corresponding importXML() methods. -

    -These utility classes were designed for the transparent JCR-RMI layer, -but can easily be used as a part of any JCR repository implementation. -The public interface of this package depends only on the standard JCR and -J2SE APIs. The implementation uses Xerces as an extra dependency to -serialize the SAX event streams. - diff --git a/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory b/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory deleted file mode 100644 index 26b601efd87..00000000000 --- a/jackrabbit-jcr-rmi/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory diff --git a/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml b/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml deleted file mode 100644 index 3ef2674f748..00000000000 --- a/jackrabbit-jcr-rmi/src/main/resources/jackrabbit-rmi-service.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - java:jcr/local - jnp://localhost:1099/jcrServer - - - jboss.jca:service=ManagedConnectionFactory,name=jcr/local - - diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java deleted file mode 100644 index 3272ab6c915..00000000000 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/ConformanceTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi; - -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import org.apache.jackrabbit.test.JCRTestSuite; - -/** - * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information. - *

    - * JCR API conformance test suite. - */ -@Deprecated(forRemoval = true) public class ConformanceTest extends TestCase { - - public static TestSuite suite() { - TestSuite suite = new TestSuite(); - if (Boolean.getBoolean("jackrabbit.test.integration")) { - suite.addTest(new JCRTestSuite()); - } - return suite; - } - -} diff --git a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java b/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java deleted file mode 100644 index 34e7e535633..00000000000 --- a/jackrabbit-jcr-rmi/src/test/java/org/apache/jackrabbit/rmi/RepositoryStubImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.rmi; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.rmi.server.RemoteObject; -import java.security.Principal; -import java.util.Properties; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; - -import org.apache.jackrabbit.core.JackrabbitRepositoryStub; -import org.apache.jackrabbit.core.SessionImpl; -import org.apache.jackrabbit.rmi.client.ClientAdapterFactory; -import org.apache.jackrabbit.rmi.client.LocalAdapterFactory; -import org.apache.jackrabbit.rmi.remote.RemoteRepository; -import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory; -import org.apache.jackrabbit.rmi.server.ServerAdapterFactory; -import org.apache.jackrabbit.rmi.server.principal.ServerGroup; -import org.apache.jackrabbit.test.RepositoryStubException; - -@Deprecated(forRemoval = true) public class RepositoryStubImpl extends JackrabbitRepositoryStub { - - /** - * A known principal used for access control tests. - */ - private Principal principal; - - private RemoteRepository remote; - - private Repository repository; - - public RepositoryStubImpl(Properties env) { - super(env); - } - - @Override - public synchronized Repository getRepository() - throws RepositoryStubException { - if (repository == null) { - try { - Repository repo = super.getRepository(); - principal = findKnownPrincipal(repo); - - RemoteAdapterFactory raf = new ServerAdapterFactory(); - remote = raf.getRemoteRepository(repo); - - // Make sure that the remote reference survives serialization - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(buffer); - oos.writeObject(RemoteObject.toStub(remote)); - oos.close(); - - ObjectInputStream ois = new ObjectInputStream( - new ByteArrayInputStream(buffer.toByteArray())); - LocalAdapterFactory laf = new ClientAdapterFactory(); - repository = - laf.getRepository((RemoteRepository) ois.readObject()); - } catch (Exception e) { - throw new RepositoryStubException(e); - } - } - return repository; - } - - private static Principal findKnownPrincipal(Repository repo) - throws RepositoryException { - SessionImpl session = (SessionImpl) repo.login( - new SimpleCredentials("admin", "admin".toCharArray())); - try { - for (Principal principal : session.getSubject().getPrincipals()) { - if (!ServerGroup.isGroup(principal)) { - return principal; - } - } - throw new RepositoryException("Known principal not found"); - } finally { - session.logout(); - } - } - - @Override - public Principal getKnownPrincipal(Session ignored) - throws RepositoryException { - return principal; - } - -} diff --git a/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml b/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml deleted file mode 100644 index 15d98f9b73f..00000000000 --- a/jackrabbit-jcr-rmi/src/test/resources/logback-test.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - target/jcr.log - - %date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n - - - - - - - - diff --git a/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties b/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties deleted file mode 100644 index bc101aaba6e..00000000000 --- a/jackrabbit-jcr-rmi/src/test/resources/repositoryStubImpl.properties +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -# Stub implementation class -javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.rmi.RepositoryStubImpl diff --git a/pom.xml b/pom.xml index 6d3d7d55f45..04770baf12f 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ jackrabbit-core jackrabbit-webdav jackrabbit-jcr-server - jackrabbit-jcr-rmi jackrabbit-jcr-servlet jackrabbit-webapp jackrabbit-jca From 1366662d1eba8ce3632e43bc8cf92e2434b850c4 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 4 Apr 2024 16:47:07 +0200 Subject: [PATCH 173/271] JCR-5044: Update tomcat dependency to 9.0.87 (#171) --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 760a7e7b32a..f5ee111256a 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.86 + 9.0.87 From 99e151b05fedd93adae2887b74cabebd01b2066b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 4 Apr 2024 18:46:06 +0200 Subject: [PATCH 174/271] JCR-5045: Update commons-io dependency to 2.16.0 (#172) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 19e081b8819..e8cc52672bc 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -459,7 +459,7 @@ commons-io commons-io - 2.15.1 + 2.16.0 javax.transaction From 3cfbb898cc8024b10746cfbe8de16da1a00baeef Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 9 Apr 2024 09:34:39 +0200 Subject: [PATCH 175/271] JCR-5046: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.62.0 (#173) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index e8cc52672bc..f472a8e1fb6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.60.0 + 1.62.0 1.22.19 9.4.53.v20231009 From fd93acf7fe0e9727c8eaf5f0e7df358452fd480d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 19 Apr 2024 13:56:06 +0200 Subject: [PATCH 176/271] JCR-5047: Update to jacoco version 0.8.12 (#174) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index f472a8e1fb6..2bfaf2d0064 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -264,7 +264,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.12 pre-unit-test From c419176e819d5499f90a25705899641fd043ede6 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 15:20:15 +0200 Subject: [PATCH 177/271] JCR-5052: Update commons-io dependency to 2.16.1 (#175) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 2bfaf2d0064..b995ba7a962 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -459,7 +459,7 @@ commons-io commons-io - 2.16.0 + 2.16.1 javax.transaction From 290264af9bf615a36a38cf7ff11f675c141e3ab7 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 16:30:08 +0200 Subject: [PATCH 178/271] JCR-5053: Update commons-cli dependency to 1.7.0 (#176) --- jackrabbit-standalone-components/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 42bb28f26e3..6711fbfc50c 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -134,7 +134,7 @@ commons-cli commons-cli - 1.6.0 + 1.7.0 commons-chain From 9c5f6dc4349a2b346bfc8e45958b3eff31fd98ac Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 16:56:23 +0200 Subject: [PATCH 179/271] JCR-5054: vfs-ext: update hadoop-hdfs-client dependency to 3.4.0 (#177) --- jackrabbit-vfs-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index a0fddf96f53..e3f53484c96 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -61,7 +61,7 @@ org.apache.hadoop hadoop-hdfs-client - 3.3.6 + 3.4.0 org.jetbrains.kotlin From e9f0eaf827c9a9044d283be45ecb3014d9117a2b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 17:38:32 +0200 Subject: [PATCH 180/271] JCR-5055: update Apache parent pom to version 32 (#178) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index b995ba7a962..11c6da73fad 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 31 + 32 From c6597ddd8fc0c1f4efabf0ee49d5918c3344763f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 18:20:15 +0200 Subject: [PATCH 181/271] JCR-5056: Update maven-jar-plugin to 3.4.1 (#179) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 11c6da73fad..0ecb28488f2 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -343,7 +343,7 @@ maven-jar-plugin - 3.3.0 + 3.4.1 maven-rar-plugin From 8f98b9521b8cabb3ff5e28f59133631a30c70180 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 18:48:13 +0200 Subject: [PATCH 182/271] JCR-5057: Update pmd-plugin dependency to 3.22.0 (#180) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0ecb28488f2..67a54b88db7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -420,7 +420,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.21.2 + 3.22.0 ${java.version} From 3969652e414211b459b084c5331530f81754399f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 7 May 2024 19:23:33 +0200 Subject: [PATCH 183/271] JCR-5058: Update spotbugs-maven-plugin to 4.8.5.0 (#181) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 67a54b88db7..1f1d54bf3b5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -428,7 +428,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.3.1 + 4.8.5.0 From b7a674b3886990dab79e2afa827113311e714696 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 13 May 2024 07:17:24 +0200 Subject: [PATCH 184/271] JCR-5059: set baseline comparisonVersion to latest stable (2.20.16) (#182) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1f1d54bf3b5..87dac89e83c 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -383,7 +383,7 @@ - 2.20.15 + 2.20.16 From b59edd356a36948eadcf1b956459c13d767f1b4a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 13 May 2024 18:15:54 +0200 Subject: [PATCH 185/271] JCR-5060: Update oak-jackrabbit-api.version.used to Oak 1.22.20 (#183) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 87dac89e83c..c813236ada5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -57,7 +57,7 @@ 1.62.0 - 1.22.19 + 1.22.20 9.4.53.v20231009 2.4.1 ${project.build.sourceEncoding} From d381445a8c11fd28b816d7a4b56e2735e6079087 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 23 May 2024 17:03:08 +0200 Subject: [PATCH 186/271] JCR-5063: Update build-helper-maven-plugin to version 3.6.0 (#184) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c813236ada5..fd62cd6e72a 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -391,7 +391,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.5.0 + 3.6.0 org.codehaus.mojo From f16352ab1a996db8c41a10b1f1a787928218652e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 23 May 2024 17:58:10 +0200 Subject: [PATCH 187/271] JCR-5064: Update mockito dependency to 5.12.0 (#185) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index fd62cd6e72a..7d7d1133a89 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -626,7 +626,7 @@ org.mockito mockito-core - 5.11.0 + 5.12.0 From d94a173df4752a09d2dde3f858155014db8fb468 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 27 May 2024 14:10:21 +0200 Subject: [PATCH 188/271] JCR-5068: update aws java sdk version to 1.12.730 (#186) --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index c61515698b5..5547505433a 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.678 + 1.12.730 org.apache.jackrabbit From 1c1e08bcc1b6be8a60cc1368aef32f44a7dec8bc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 27 May 2024 14:46:19 +0200 Subject: [PATCH 189/271] JCR-5069: Update commons-cli dependency to 1.8.0 (#187) --- jackrabbit-standalone-components/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 6711fbfc50c..08e4acc99f1 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -134,7 +134,7 @@ commons-cli commons-cli - 1.7.0 + 1.8.0 commons-chain From 72fac7f01b11c2a58213302ea110e0d39f352c19 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 27 May 2024 15:12:53 +0200 Subject: [PATCH 190/271] JCR-5070: Update tomcat dependency to 9.0.89 (#188) --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index f5ee111256a..c2b8eb7be53 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.87 + 9.0.89 From e557bd7d0fa0bb1350b3b384dac85f938040f0c5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 27 May 2024 22:27:06 +0200 Subject: [PATCH 191/271] JCR-5071: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.64.0 (#189) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 7d7d1133a89..fee6673fcec 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.62.0 + 1.64.0 1.22.20 9.4.53.v20231009 From c803d09549f5f31ece0247c85f64ab7e8414e90b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 30 May 2024 11:52:38 +0100 Subject: [PATCH 192/271] JCR-5066: Release Jackrabbit 2.21.27-beta - Candidate Release Notes --- RELEASE-NOTES.txt | 48 +++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index b77618984d4..713529ec7a1 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,37 +1,45 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.26 +Release Notes -- Apache Jackrabbit -- Version 2.21.27-beta Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.26, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.21.27-beta, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.26 is an unstable release cut directly from +Apache Jackrabbit 2.21.27-beta is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.26 ------------------------------ - -Bug - - [JCR-5041] - Javadoc build is broken due to JCR 2.0 API docs being unavailable +Changes in Jackrabbit 2.21.27-beta +---------------------------------- Task - [JCR-4902] - Update mockito dependency to 5.11.0 - [JCR-4977] - use 'beta' identifier for releases in unstable branch - [JCR-5026] - standalone: remove remote repository support (RMI and JNDI) - [JCR-5027] - jackrabbit-webapp: remove RMI support - [JCR-5032] - jackrabbit-jcr-servlet: deprecate RMI support - [JCR-5034] - set baseline comparisonVersion to latest stable (2.20.15) - [JCR-5035] - Update tomcat dependency to 9.0.86 - [JCR-5037] - update aws java sdk version to 1.12.678 - [JCR-5038] - Update spotbugs-maven-plugin to 4.8.3.1 - [JCR-5039] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.19 - [JCR-5040] - Update javacc-maven-plugin to version 3.1.0 + [JCR-4972] - Remove RMI support + [JCR-5028] - jackrabbit-jcr-rmi: remove + [JCR-5042] - jackrabbit-jcr-servlet: remove RMI support + [JCR-5044] - Update tomcat dependency to 9.0.87 + [JCR-5045] - Update commons-io dependency to 2.16.0 + [JCR-5046] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.62.0 + [JCR-5047] - Update to jacoco version 0.8.12 + [JCR-5052] - Update commons-io dependency to 2.16.1 + [JCR-5053] - Update commons-cli dependency to 1.7.0 + [JCR-5054] - vfs-ext: update hadoop-hdfs-client dependency to 3.4.0 + [JCR-5055] - update Apache parent pom to version 32 + [JCR-5056] - Update maven-jar-plugin to 3.4.1 + [JCR-5057] - Update pmd-plugin dependency to 3.22.0 + [JCR-5058] - Update spotbugs-maven-plugin to 4.8.5.0 + [JCR-5059] - set baseline comparisonVersion to latest stable (2.20.16) + [JCR-5060] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.20 + [JCR-5063] - Update build-helper-maven-plugin to version 3.6.0 + [JCR-5064] - Update mockito dependency to 5.12.0 + [JCR-5068] - update aws java sdk version to 1.12.730 + [JCR-5069] - Update commons-cli dependency to 1.8.0 + [JCR-5070] - Update tomcat dependency to 9.0.89 + [JCR-5071] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.64.0 + For more detailed information about all the changes in this and other Jackrabbit releases, please see the Jackrabbit issue tracker at From e41dacc826720b2202a7156d5b654f2998ae5e8a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sun, 2 Jun 2024 14:37:33 +0200 Subject: [PATCH 193/271] [maven-release-plugin] prepare release jackrabbit-2.21.27-beta --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 5547505433a..125e7eb7781 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 25a0ea5f51b..a1265ae4665 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index ae8b33e1da5..6636695e342 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index a93cfe6e7f8..8bbce0a42fe 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 1033dbcb090..f7bc2fea062 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 34b8f9e1ad3..e3504392e53 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 3b58c0d9e52..9296238b3fa 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 4b5fbff44fc..2f2b8efb047 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 8a43fb83789..d09444bdf70 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 3d060e8305b..b4052c3233a 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index a6ca023bcad..d7133c49596 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index b597215cf8b..12f9ad3b883 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index fee6673fcec..4c054de793c 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.27-beta-SNAPSHOT + 2.21.27-beta pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.26-beta + jackrabbit-2.21.27-beta @@ -76,7 +76,7 @@ 0.0 - 1711358406 + 1717330822 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index eabf8fa1a30..75380e7605b 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 0a6e31e5f79..40ee997db38 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 4a71d7faff3..1fb3c61998e 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index bedb8a83016..9c6f01fe61a 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 08e4acc99f1..9ed9b85b661 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index d4af22abb57..58f130feb19 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index e3f53484c96..fed00245169 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index c2b8eb7be53..9645af39758 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index cc0020218d3..b7666f3bd50 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 04770baf12f..0b8509483c9 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta-SNAPSHOT + 2.21.27-beta jackrabbit-parent/pom.xml From a4a7ecd661693b32f6e7f7f53c582530e75fe7f3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Sun, 2 Jun 2024 14:37:43 +0200 Subject: [PATCH 194/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 125e7eb7781..723b82d0889 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index a1265ae4665..9ae65ce2d36 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 6636695e342..a1eaaa58320 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 8bbce0a42fe..3dd4b0b468b 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index f7bc2fea062..c25b31bd109 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index e3504392e53..a1275783538 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 9296238b3fa..c7230e8bccc 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 2f2b8efb047..e77160aa379 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index d09444bdf70..b02b2476ee5 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index b4052c3233a..e9d769dcfcf 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index d7133c49596..74fa2a3c30d 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 12f9ad3b883..8b66758433e 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4c054de793c..cc7617c4777 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.27-beta + 2.21.28-beta-SNAPSHOT pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.27-beta + jackrabbit-2.21.26-beta @@ -76,7 +76,7 @@ 0.0 - 1717330822 + 1717331862 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 75380e7605b..b8a9511b2a6 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 40ee997db38..ad9f80c260b 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 1fb3c61998e..0868d7505f6 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 9c6f01fe61a..379f04a0184 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 9ed9b85b661..ff367477d84 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 58f130feb19..0c1c5edcaef 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index fed00245169..b910efeeb4a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 9645af39758..7c3a23184c0 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index b7666f3bd50..f3daf3399e4 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 0b8509483c9..cebd0a85f3b 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.27-beta + 2.21.28-beta-SNAPSHOT jackrabbit-parent/pom.xml From 65cdc6769b56c09d5b40f49c91191771a6e93a00 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 7 Jun 2024 07:47:13 +0100 Subject: [PATCH 195/271] JCR-5067: branch Jackrabbit 2.22 - update trunk version --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 723b82d0889..19198f51684 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 9ae65ce2d36..5c3a26bd093 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index a1eaaa58320..bc1b689084b 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 3dd4b0b468b..51f2e3e1938 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index c25b31bd109..8b390fc797d 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index a1275783538..f2a414f2245 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index c7230e8bccc..8bb9d94ebd2 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index e77160aa379..5a9e95b2af9 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index b02b2476ee5..bb27fdbd375 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index e9d769dcfcf..d53654a6f0e 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 74fa2a3c30d..2ed1283f791 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 8b66758433e..a4058c7a12a 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index cc7617c4777..7582b51b9a7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.21.26-beta + jackrabbit-2.23.0-beta @@ -76,7 +76,7 @@ 0.0 - 1717331862 + 1717742788 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index b8a9511b2a6..ede63b40134 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index ad9f80c260b..33f0cf4dc6d 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 0868d7505f6..a191d5d2bd8 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 379f04a0184..0c02a845f10 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index ff367477d84..59222410d00 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 0c1c5edcaef..962fd3680b8 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index b910efeeb4a..6d5c61a7434 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 7c3a23184c0..4aa3b3e1242 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index f3daf3399e4..d1c7c62ea33 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index cebd0a85f3b..0531091eaa2 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.21.28-beta-SNAPSHOT + 2.23.0-beta-SNAPSHOT jackrabbit-parent/pom.xml From 7f9888f69d6340c9d2da1cec9f4a9b50ef15603b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 10 Jun 2024 15:06:44 +0100 Subject: [PATCH 196/271] JCR-5073: core: avoid varargs related compiler warnings in tests --- .../org/apache/jackrabbit/core/AbstractConcurrencyTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/AbstractConcurrencyTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/AbstractConcurrencyTest.java index d3706f58726..ddcd61abc67 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/AbstractConcurrencyTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/AbstractConcurrencyTest.java @@ -153,11 +153,11 @@ protected long getOneYearAhead() { */ protected static void dumpStacks(Thread[] threads) { try { - Method m = Thread.class.getMethod("getStackTrace", null); + Method m = Thread.class.getMethod("getStackTrace", (Class[]) null); StringBuffer dumps = new StringBuffer(); for (int t = 0; t < threads.length; t++) { StackTraceElement[] elements = (StackTraceElement[]) m.invoke( - threads[t], null); + threads[t], (Object[]) null); dumps.append(threads[t].toString()).append('\n'); for (int i = 0; i < elements.length; i++) { dumps.append("\tat " + elements[i]).append('\n'); From b7a84c819d922044c5658e087510a62de9733f40 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 14 Jun 2024 17:12:42 +0200 Subject: [PATCH 197/271] JCR-5075: set baseline comparisonVersion to latest stable (2.22.0) (#193) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 7582b51b9a7..1fd3959015a 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -383,7 +383,7 @@ - 2.20.16 + 2.22.0 From a2890f08c200a063df284155f7b0e4945f6846ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Steen=20M=C3=B8ller?= Date: Sat, 22 Jun 2024 23:24:31 +0200 Subject: [PATCH 198/271] JCR-4892: Drop Apache Tika back to 2.4.1 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index bff77fe10e1..7582b51b9a7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -59,7 +59,7 @@ 1.22.20 9.4.53.v20231009 - 2.7.0 + 2.4.1 ${project.build.sourceEncoding} 1.7.36 1.7.36 From 6313b0502a13c623410e95dc918ba84558b3531a Mon Sep 17 00:00:00 2001 From: kevan Jahanshahi Date: Wed, 3 Jul 2024 13:15:27 +0200 Subject: [PATCH 199/271] JCR-5076: use scope test fot dependency of type: test-jar (#194) --- jackrabbit-aws-ext/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 19198f51684..ccc83c8f85a 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -61,6 +61,7 @@ jackrabbit-data ${project.version} test-jar + test org.slf4j From c5447c23c4b5dbec28b6b9edae2069610257826d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 11 Jul 2024 06:12:03 +0200 Subject: [PATCH 200/271] JCR-5077: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.66.0 (#196) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1fd3959015a..d76cba105c9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.64.0 + 1.66.0 1.22.20 9.4.53.v20231009 From e9e0ae2500b3af2d7b6dc3cf6a121706839738c2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 15 Jul 2024 12:09:46 +0200 Subject: [PATCH 201/271] JCR-5078: update Apache parent pom to version 33 (#197) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d76cba105c9..8cd8de16d17 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -27,7 +27,7 @@ org.apache apache - 32 + 33 From df83cbab2f3da9b0fe76caf3c241a24eb5724ef5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 15 Jul 2024 12:43:04 +0200 Subject: [PATCH 202/271] JCR-5079: Update tomcat dependency to 9.0.91 (#198) --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 4aa3b3e1242..b97b64e0838 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.89 + 9.0.81 From 62944682709a40e0c97b6b1be6169b9b1d3ae6ed Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 15 Jul 2024 12:11:09 +0100 Subject: [PATCH 203/271] JCR-5079: Update tomcat dependency to 9.0.91 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index b97b64e0838..4c54c998384 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.81 + 9.0.91 From 1305cf9785dc922fb6b7d44a69417c79041f5bd2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 15 Jul 2024 13:50:23 +0200 Subject: [PATCH 204/271] JCR-5080: Update easymock dependency to 5.3.0 (#200) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 8cd8de16d17..4cbd26232d2 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -616,7 +616,7 @@ org.easymock easymock - 5.2.0 + 5.3.0 junit From dac8dea1eec9f735a4fa472865a85914f62f889c Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 10:27:36 +0200 Subject: [PATCH 205/271] JCR-5081: update aws java sdk version to 1.12.761 (#201) --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index ccc83c8f85a..fe4a493575b 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.730 + 1.12.761 org.apache.jackrabbit From cd862214fb98783944dd3204a528d083e356d4ce Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 11:38:30 +0200 Subject: [PATCH 206/271] JCR-5082: update Jetty to 9.4.55.v20240627 (#202) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4cbd26232d2..185b4ba82b5 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -58,7 +58,7 @@ 1.66.0 1.22.20 - 9.4.53.v20231009 + 9.4.55.v20240627 2.4.1 ${project.build.sourceEncoding} 1.7.36 From 96aa13504a6cc7d419d1cb234b73800705c5d20e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 12:02:08 +0200 Subject: [PATCH 207/271] JCR-5083: Update maven-jar-plugin to 3.4.2 (#203) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 185b4ba82b5..c7ee832e764 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -343,7 +343,7 @@ maven-jar-plugin - 3.4.1 + 3.4.2 maven-rar-plugin From 1c799ec13964f519dd8fd325b8bef4171c5fe246 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 13:09:57 +0200 Subject: [PATCH 208/271] JCR-5084: Update pmd-plugin dependency to 3.24.0 (#204) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c7ee832e764..0e2ab2f55c3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -420,7 +420,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.22.0 + 3.24.0 ${java.version} From 804d7076062f757faf1548c2cc029ba7b9dfaab3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 13:59:38 +0200 Subject: [PATCH 209/271] JCR-5085: update checkstyle-plugin dependency to 3.4.0 (#205) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0e2ab2f55c3..5785d089b30 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -415,7 +415,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + 3.4.0 org.apache.maven.plugins From 2da22f422a8c1317eb56a3c8317d883c0b22dadd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 14:42:47 +0200 Subject: [PATCH 210/271] JCR-5086: Update spotbugs-maven-plugin to 4.8.6.2 (#206) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 5785d089b30..9c7ff14aefe 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -428,7 +428,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.5.0 + 4.8.6.2 From 2cf6f5cc67cff592c189c0bb8d156a5c504617fc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 16 Jul 2024 18:06:42 +0100 Subject: [PATCH 211/271] JCR-5087: Release Jackrabbit 2.23.0-beta: Candidate Release Notes --- RELEASE-NOTES.txt | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 713529ec7a1..bdaaab6c747 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,44 +1,34 @@ -Release Notes -- Apache Jackrabbit -- Version 2.21.27-beta +Release Notes -- Apache Jackrabbit -- Version 2.23.0-beta Introduction ------------ -This is Apache Jackrabbit(TM) 2.21.27-beta, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.23.0-beta, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.21.27-beta is an unstable release cut directly from +Apache Jackrabbit 2.23.0-beta is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.21.27-beta +Changes in Jackrabbit 2.23.0-beta ---------------------------------- Task - [JCR-4972] - Remove RMI support - [JCR-5028] - jackrabbit-jcr-rmi: remove - [JCR-5042] - jackrabbit-jcr-servlet: remove RMI support - [JCR-5044] - Update tomcat dependency to 9.0.87 - [JCR-5045] - Update commons-io dependency to 2.16.0 - [JCR-5046] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.62.0 - [JCR-5047] - Update to jacoco version 0.8.12 - [JCR-5052] - Update commons-io dependency to 2.16.1 - [JCR-5053] - Update commons-cli dependency to 1.7.0 - [JCR-5054] - vfs-ext: update hadoop-hdfs-client dependency to 3.4.0 - [JCR-5055] - update Apache parent pom to version 32 - [JCR-5056] - Update maven-jar-plugin to 3.4.1 - [JCR-5057] - Update pmd-plugin dependency to 3.22.0 - [JCR-5058] - Update spotbugs-maven-plugin to 4.8.5.0 - [JCR-5059] - set baseline comparisonVersion to latest stable (2.20.16) - [JCR-5060] - Update oak-jackrabbit-api.version.used in trunk and 2.20 to Oak 1.22.20 - [JCR-5063] - Update build-helper-maven-plugin to version 3.6.0 - [JCR-5064] - Update mockito dependency to 5.12.0 - [JCR-5068] - update aws java sdk version to 1.12.730 - [JCR-5069] - Update commons-cli dependency to 1.8.0 - [JCR-5070] - Update tomcat dependency to 9.0.89 - [JCR-5071] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.64.0 + [JCR-5073] - core: avoid varargs related compiler warnings in tests + [JCR-5075] - set baseline comparisonVersion to latest stable (2.22.0) + [JCR-5076] - Use correctly test scope for dependencies of type: test-jar + [JCR-5077] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.66.0 + [JCR-5078] - update Apache parent pom to version 33 + [JCR-5079] - Update tomcat dependency to 9.0.91 + [JCR-5080] - Update easymock dependency to 5.3.0 + [JCR-5081] - update aws java sdk version to 1.12.761 + [JCR-5082] - update Jetty to 9.4.55.v20240627 + [JCR-5083] - Update maven-jar-plugin to 3.4.2 + [JCR-5084] - Update pmd-plugin dependency to 3.24.0 + [JCR-5086] - Update spotbugs-maven-plugin to 4.8.6.2 For more detailed information about all the changes in this and other From b94047fcda958c3c009703bc09b012898a826e0d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 17 Jul 2024 16:45:39 +0200 Subject: [PATCH 212/271] [maven-release-plugin] prepare release jackrabbit-2.23.0-beta --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index fe4a493575b..86fbde60e5c 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 5c3a26bd093..d0e0407c360 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index bc1b689084b..470c5ceb0a1 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 51f2e3e1938..af0f451c547 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 8b390fc797d..e9e09463c9d 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index f2a414f2245..1625f5621e4 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 8bb9d94ebd2..719f9b515af 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5a9e95b2af9..78938a0e8da 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index bb27fdbd375..5b7235df57d 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index d53654a6f0e..db5183bf07e 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 2ed1283f791..6237220725a 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index a4058c7a12a..d2005e39931 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9c7ff14aefe..5325e1f90f6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.23.0-beta-SNAPSHOT + 2.23.0-beta pom @@ -76,7 +76,7 @@ 0.0 - 1717742788 + 1721226539 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index ede63b40134..1ffe8d1d154 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 33f0cf4dc6d..d2cc98e682d 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index a191d5d2bd8..736d6d50940 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index 0c02a845f10..f84661e0043 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 59222410d00..fe4b20f8a2b 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 962fd3680b8..0ec7fac871a 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 6d5c61a7434..11260b7034d 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 4c54c998384..5ae21f91da0 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index d1c7c62ea33..fdf5f8a06b2 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 0531091eaa2..1eaf3d91f13 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta-SNAPSHOT + 2.23.0-beta jackrabbit-parent/pom.xml From 1b605836bdbd183a79c5a4db536be10b7bcc6844 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 17 Jul 2024 16:45:48 +0200 Subject: [PATCH 213/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 86fbde60e5c..e2ac772b351 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index d0e0407c360..58ab9a284e5 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 470c5ceb0a1..8db1c255af1 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index af0f451c547..c92d0988e37 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index e9e09463c9d..67d93389994 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 1625f5621e4..71ddc4c2dd6 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 719f9b515af..5ca50204f20 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 78938a0e8da..5fe9210f413 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 5b7235df57d..4d607938135 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index db5183bf07e..249edab9d97 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 6237220725a..76851d8ca51 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index d2005e39931..3ae901c2f59 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 5325e1f90f6..881258215d4 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.23.0-beta + 2.23.1-beta-SNAPSHOT pom @@ -76,7 +76,7 @@ 0.0 - 1721226539 + 1721227548 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 1ffe8d1d154..6ec57ac0638 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index d2cc98e682d..bd6bb30b6c1 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 736d6d50940..27a693440c3 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index f84661e0043..c29b8910174 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index fe4b20f8a2b..1c25db0d1ad 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 0ec7fac871a..b2872b8ea63 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 11260b7034d..8e5974ab10a 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 5ae21f91da0..cdfea7a376b 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index fdf5f8a06b2..57ac2122a6c 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 1eaf3d91f13..e8c4a9a62ac 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.0-beta + 2.23.1-beta-SNAPSHOT jackrabbit-parent/pom.xml From 64278e0d593e6ee37e13d99409fab8851c9e0d83 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 18 Jul 2024 16:02:25 +0200 Subject: [PATCH 214/271] JCR-5088: remove warnings about missing @deprecated annotations (#207) --- .../java/org/apache/jackrabbit/core/HierarchyManager.java | 1 + .../main/java/org/apache/jackrabbit/core/ItemManager.java | 2 ++ .../src/main/java/org/apache/jackrabbit/core/NodeImpl.java | 2 ++ .../java/org/apache/jackrabbit/core/cluster/LockRecord.java | 1 + .../org/apache/jackrabbit/core/config/RepositoryConfig.java | 3 +++ .../jackrabbit/core/fs/db/JNDIDatabaseFileSystem.java | 1 + .../org/apache/jackrabbit/core/journal/DatabaseJournal.java | 2 ++ .../apache/jackrabbit/core/journal/JNDIDatabaseJournal.java | 1 + .../core/persistence/pool/BundleDbPersistenceManager.java | 2 ++ .../apache/jackrabbit/core/query/AbstractQueryHandler.java | 1 + .../apache/jackrabbit/core/query/lucene/NodeIndexer.java | 5 +++++ .../apache/jackrabbit/core/query/lucene/SearchIndex.java | 3 +++ .../org/apache/jackrabbit/core/security/AccessManager.java | 5 +++++ .../core/security/authentication/AbstractLoginModule.java | 4 ++++ .../security/authentication/CryptedSimpleCredentials.java | 1 + .../authentication/token/TokenBasedAuthentication.java | 1 + .../security/authorization/AbstractCompiledPermissions.java | 2 ++ .../core/security/authorization/CompiledPermissions.java | 1 + .../core/security/authorization/PrivilegeRegistry.java | 6 ++++++ .../apache/jackrabbit/core/security/user/UserConstants.java | 2 ++ .../jackrabbit/core/security/user/UserManagerImpl.java | 1 + .../org/apache/jackrabbit/core/util/RepositoryLock.java | 1 + .../core/version/InternalFrozenVersionHistory.java | 1 + .../jackrabbit/core/virtual/VirtualItemStateProvider.java | 1 + .../org/apache/jackrabbit/core/data/db/DbDataStore.java | 4 +++- .../apache/jackrabbit/core/fs/RandomAccessOutputStream.java | 1 + .../org/apache/jackrabbit/commons/flat/FilterIterator.java | 1 + .../org/apache/jackrabbit/commons/flat/SizedIterator.java | 1 + .../java/org/apache/jackrabbit/webdav/jcr/JcrValueType.java | 1 + .../jackrabbit/jcr2spi/nodetype/EffectiveNodeType.java | 1 + .../java/org/apache/jackrabbit/spi/commons/EventImpl.java | 1 + .../org/apache/jackrabbit/spi/commons/ItemInfoImpl.java | 1 + .../org/apache/jackrabbit/spi/commons/LockInfoImpl.java | 1 + .../org/apache/jackrabbit/spi/commons/NodeInfoImpl.java | 1 + .../org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java | 1 + .../apache/jackrabbit/spi/commons/iterator/Iterators.java | 1 + .../apache/jackrabbit/spi/commons/iterator/Predicate.java | 1 + .../apache/jackrabbit/spi/commons/iterator/Predicates.java | 1 + .../java/org/apache/jackrabbit/spi/commons/lock/Locked.java | 1 + .../spi/commons/namespace/AbstractNamespaceResolver.java | 1 + .../jackrabbit/spi/commons/namespace/NamespaceListener.java | 1 + .../apache/jackrabbit/spi/commons/query/OrderQueryNode.java | 3 +++ .../jackrabbit/spi/commons/query/TextsearchQueryNode.java | 2 ++ .../jackrabbit/spi/commons/query/sql/SimpleCharStream.java | 4 ++-- .../apache/jackrabbit/spi/commons/query/sql2/Parser.java | 1 + .../spi/commons/query/xpath/SimpleCharStream.java | 4 ++-- .../src/main/java/org/apache/jackrabbit/spi/NodeInfo.java | 1 + .../java/org/apache/jackrabbit/spi/RepositoryService.java | 2 ++ .../apache/jackrabbit/webdav/property/PropContainer.java | 1 + .../apache/jackrabbit/webdav/version/WorkspaceResource.java | 1 + .../main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java | 1 + 51 files changed, 85 insertions(+), 5 deletions(-) diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/HierarchyManager.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/HierarchyManager.java index 7ba4245b5a0..f5b3c222ae5 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/HierarchyManager.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/HierarchyManager.java @@ -49,6 +49,7 @@ public interface HierarchyManager { * if there's no item at path. * @throws RepositoryException if an error occurs */ + @Deprecated ItemId resolvePath(Path path) throws RepositoryException; /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java index dbd40a4c8c1..322e9d699c7 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java @@ -467,6 +467,7 @@ private boolean canRead(ItemData parent, ItemId childId) throws RepositoryExcept * @param path path to the item to be checked * @return true if the specified item exists */ + @Deprecated public boolean itemExists(Path path) { try { sanityCheck(); @@ -544,6 +545,7 @@ NodeImpl getRootNode() throws RepositoryException { * @throws AccessDeniedException * @throws RepositoryException */ + @Deprecated public ItemImpl getItem(Path path) throws PathNotFoundException, AccessDeniedException, RepositoryException { ItemId id = hierMgr.resolvePath(path); diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java index 3519d9211d6..7f59ef4bb56 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java @@ -565,6 +565,7 @@ protected synchronized NodeImpl createChildNode(Name name, * @throws RepositoryException * @deprecated use #renameChildNode(NodeId, Name, boolean) */ + @Deprecated protected void renameChildNode(Name oldName, int index, NodeId id, Name newName) throws RepositoryException { @@ -3072,6 +3073,7 @@ public boolean isLocked() throws RepositoryException { * @throws RepositoryException if some other error occurs * @deprecated */ + @Deprecated protected void checkLock() throws LockException, RepositoryException { if (isNew()) { // a new node needs no check diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java index e29c3cf7f96..94dd49ca128 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java @@ -166,6 +166,7 @@ public boolean isDeep() { * @return user id * @deprecated User {@link #getOwner()} instead. */ + @Deprecated public String getUserId() { return lockOwner; } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java index 7801c01dacd..d0c78d61793 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/RepositoryConfig.java @@ -933,6 +933,7 @@ public FileSystem getFileSystem() throws RepositoryException { * @return repository name * @deprecated Use {@link SecurityConfig#getAppName()} instead. */ + @Deprecated public String getAppName() { return sec.getAppName(); } @@ -943,6 +944,7 @@ public String getAppName() { * @return access manager configuration * @deprecated Use {@link SecurityConfig#getAccessManagerConfig()} instead. */ + @Deprecated public AccessManagerConfig getAccessManagerConfig() { return sec.getAccessManagerConfig(); } @@ -954,6 +956,7 @@ public AccessManagerConfig getAccessManagerConfig() { * JAAS mechanism should be used. * @deprecated Use {@link SecurityConfig#getLoginModuleConfig()} instead. */ + @Deprecated public LoginModuleConfig getLoginModuleConfig() { return sec.getLoginModuleConfig(); } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/JNDIDatabaseFileSystem.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/JNDIDatabaseFileSystem.java index 7d21a066fe5..93eb6698c0d 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/JNDIDatabaseFileSystem.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/JNDIDatabaseFileSystem.java @@ -35,6 +35,7 @@ * for the entire lifetime of the file system instance. The configured data * source should be prepared for this. */ +@Deprecated public class JNDIDatabaseFileSystem extends DatabaseFileSystem { /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java index 786c92c1e60..2a0b71d7496 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java @@ -651,6 +651,7 @@ public String getDatabaseType() { * * @return the database type */ + @Deprecated public String getSchema() { return databaseType; } @@ -706,6 +707,7 @@ public void setDatabaseType(String databaseType) { * * @param databaseType the database type */ + @Deprecated public void setSchema(String databaseType) { this.databaseType = databaseType; } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/JNDIDatabaseJournal.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/JNDIDatabaseJournal.java index fa4a0d24743..48b149fae60 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/JNDIDatabaseJournal.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/JNDIDatabaseJournal.java @@ -38,6 +38,7 @@ * for the entire lifetime of the journal instance. The configured data * source should be prepared for this. */ +@Deprecated public class JNDIDatabaseJournal extends DatabaseJournal { /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java index 8d5a6cd0de8..86fdc7304aa 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java @@ -296,6 +296,7 @@ public void setSchemaObjectPrefix(String schemaObjectPrefix) { * * @return the database type name. */ + @Deprecated public String getSchema() { return databaseType; } @@ -317,6 +318,7 @@ public String getDatabaseType() { * * @param databaseType database type name */ + @Deprecated public void setSchema(String databaseType) { this.databaseType = databaseType; } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java index 40502b033e9..7fc6088e8b1 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java @@ -183,6 +183,7 @@ public String getQueryClass() { * * @param idleTime the query handler idle time. */ + @Deprecated public void setIdleTime(String idleTime) { log.warn("Parameter 'idleTime' is not supported anymore. " + "Please use 'maxIdleTime' in the repository configuration."); diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java index efc3c253abb..47d76cb40bf 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java @@ -665,6 +665,7 @@ protected void addURIValue(Document doc, String fieldName, URI internalValue) { * @deprecated Use {@link #addStringValue(Document, String, String, boolean) * addStringValue(Document, String, Object, boolean)} instead. */ + @Deprecated protected void addStringValue(Document doc, String fieldName, String internalValue) { addStringValue(doc, fieldName, internalValue, true, true, DEFAULT_BOOST, true); } @@ -702,6 +703,7 @@ protected void addStringValue(Document doc, String fieldName, * @param boost the boost value for this string field. * @deprecated use {@link #addStringValue(Document, String, String, boolean, boolean, float, boolean)} instead. */ + @Deprecated protected void addStringValue(Document doc, String fieldName, String internalValue, boolean tokenized, boolean includeInNodeIndex, float boost) { @@ -791,6 +793,7 @@ protected void addNameValue(Document doc, String fieldName, Name internalValue) * @return a lucene field. * @deprecated use {@link #createFulltextField(String, boolean, boolean, boolean)} instead. */ + @Deprecated protected Field createFulltextField(String value) { return createFulltextField(value, supportHighlighting, supportHighlighting); } @@ -804,6 +807,7 @@ protected Field createFulltextField(String value) { * @return a lucene field. * @deprecated use {@link #createFulltextField(String, boolean, boolean, boolean)} instead. */ + @Deprecated protected Field createFulltextField(String value, boolean store, boolean withOffsets) { @@ -855,6 +859,7 @@ protected Field createFulltextField(String value, * @return a lucene field. * @deprecated use {@link #createFulltextField(InternalValue, Metadata, boolean)} instead. */ + @Deprecated protected Fieldable createFulltextField( InternalValue value, Metadata metadata) { return createFulltextField(value, metadata, true); diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java index 6baef1fdbe7..8e4db22cc2e 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java @@ -177,6 +177,7 @@ public class SearchIndex extends AbstractQueryHandler { * @deprecated this value is not used anymore. Instead the default value * is calculated as follows: 2 * Runtime.getRuntime().availableProcessors(). */ + @Deprecated public static final int DEFAULT_EXTRACTOR_POOL_SIZE = 0; /** @@ -2101,6 +2102,7 @@ public int getMaxExtractLength() { * @param filterClasses comma separated list of class names * @deprecated */ + @Deprecated public void setTextFilterClasses(String filterClasses) { log.warn("The textFilterClasses configuration parameter has" + " been deprecated, and the configured value will" @@ -2114,6 +2116,7 @@ public void setTextFilterClasses(String filterClasses) { * @return class names of the text filters in use. * @deprecated */ + @Deprecated public String getTextFilterClasses() { return "deprectated"; } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/AccessManager.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/AccessManager.java index 3343bafe4d0..cc3f5cb6c1a 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/AccessManager.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/AccessManager.java @@ -36,18 +36,21 @@ public interface AccessManager { * READ permission constant * @deprecated */ + @Deprecated int READ = 1; /** * WRITE permission constant * @deprecated */ + @Deprecated int WRITE = 2; /** * REMOVE permission constant * @deprecated */ + @Deprecated int REMOVE = 4; /** @@ -102,6 +105,7 @@ void init(AMContext context, AccessControlProvider acProvider, * @throws RepositoryException it an error occurs * @deprecated */ + @Deprecated void checkPermission(ItemId id, int permissions) throws AccessDeniedException, ItemNotFoundException, RepositoryException; @@ -145,6 +149,7 @@ void checkPermission(ItemId id, int permissions) * @throws RepositoryException if another error occurs * @deprecated */ + @Deprecated boolean isGranted(ItemId id, int permissions) throws ItemNotFoundException, RepositoryException; diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java index d2b5237d491..767c3da6b20 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java @@ -77,6 +77,7 @@ public abstract class AbstractLoginModule implements LoginModule { * deprecated and will no longer be supported in a subsequent release. * See also JCR-3293 */ + @Deprecated private static final String PRE_AUTHENTICATED_ATTRIBUTE_OPTION = "trust_credentials_attribute"; private String principalProviderClassName; @@ -95,6 +96,7 @@ public abstract class AbstractLoginModule implements LoginModule { * has been deprecated and will no longer be available in a subsequent release. * See also JCR-3293 */ + @Deprecated private String preAuthAttributeName; @@ -759,6 +761,7 @@ public void setPrincipalProvider(String principalProvider) { * has been deprecated and will no longer be available in a subsequent release. * See also JCR-3293 */ + @Deprecated protected final String getPreAuthAttributeName() { return preAuthAttributeName; } @@ -783,6 +786,7 @@ protected final String getPreAuthAttributeName() { * has been deprecated and will no longer be available in a subsequent release. * See also JCR-3293 */ + @Deprecated protected boolean isPreAuthenticated(final Credentials creds) { final String preAuthAttrName = getPreAuthAttributeName(); boolean isPreAuth = preAuthAttrName != null diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/CryptedSimpleCredentials.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/CryptedSimpleCredentials.java index c4370edb0db..8d5bd048361 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/CryptedSimpleCredentials.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/CryptedSimpleCredentials.java @@ -51,6 +51,7 @@ public class CryptedSimpleCredentials implements Credentials { * @throws UnsupportedEncodingException * @deprecated */ + @Deprecated public CryptedSimpleCredentials(SimpleCredentials credentials) throws NoSuchAlgorithmException, UnsupportedEncodingException { userId = credentials.getUserID(); diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java index d578d217727..60409e1d928 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java @@ -58,6 +58,7 @@ public class TokenBasedAuthentication implements Authentication { * behavior of the {@code TokenBasedAuthentication}. Note that as of OAK 1.0 * this flag will no be supported. */ + @Deprecated public static final String PARAM_COMPAT = "TokenCompatMode"; private final TokenInfo tokenInfo; diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AbstractCompiledPermissions.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AbstractCompiledPermissions.java index fcb6d3d5ce0..939c5bed560 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AbstractCompiledPermissions.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AbstractCompiledPermissions.java @@ -159,6 +159,7 @@ public static class Result { /** * @deprecated */ + @Deprecated public Result(int allows, int denies, int allowPrivileges, int denyPrivileges) { this(allows, denies, PrivilegeBits.getInstance(allowPrivileges), PrivilegeBits.getInstance(denyPrivileges)); } @@ -178,6 +179,7 @@ public boolean grants(int permissions) { /** * @deprecated jackrabbit 2.3 (throws UnsupportedOperationException, use getPrivilegeBits instead) */ + @Deprecated public int getPrivileges() { throw new UnsupportedOperationException("use #getPrivilegeBits instead."); } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/CompiledPermissions.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/CompiledPermissions.java index 57b9e92dd2d..cad868392bb 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/CompiledPermissions.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/CompiledPermissions.java @@ -62,6 +62,7 @@ public interface CompiledPermissions { * @throws RepositoryException if an error occurs * @deprecated Use {@link #getPrivilegeSet(Path)} instead. */ + @Deprecated int getPrivileges(Path absPath) throws RepositoryException; /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java index 0114df4fe5c..8aa0d71273d 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java @@ -183,6 +183,7 @@ public PrivilegeRegistry(NamespaceRegistry namespaceRegistry, FileSystem fs) * @deprecated Use {@link org.apache.jackrabbit.api.security.authorization.PrivilegeManager} instead. * @see org.apache.jackrabbit.api.JackrabbitWorkspace#getPrivilegeManager() */ + @Deprecated public PrivilegeRegistry(NameResolver resolver) { cacheDefinitions(createBuiltInPrivilegeDefinitions()); @@ -225,6 +226,7 @@ public void setEventChannel(PrivilegeEventChannel eventChannel) { * @return all registered privileges. * @deprecated Use {@link org.apache.jackrabbit.api.security.authorization.PrivilegeManager#getRegisteredPrivileges()} instead. */ + @Deprecated public Privilege[] getRegisteredPrivileges() { try { return new PrivilegeManagerImpl(this, resolver).getRegisteredPrivileges(); @@ -243,6 +245,7 @@ public Privilege[] getRegisteredPrivileges() { * @throws RepositoryException If another error occurs. * @deprecated Use {@link org.apache.jackrabbit.api.security.authorization.PrivilegeManager#getPrivilege(String)} instead. */ + @Deprecated public Privilege getPrivilege(String privilegeName) throws AccessControlException, RepositoryException { return new PrivilegeManagerImpl(this, resolver).getPrivilege(privilegeName); } @@ -258,6 +261,7 @@ public Privilege getPrivilege(String privilegeName) throws AccessControlExceptio * @see #getBits(Privilege[]) * @deprecated Use {@link PrivilegeManagerImpl#getPrivileges(PrivilegeBits)} instead. */ + @Deprecated public Privilege[] getPrivileges(int bits) { Set prvs = new PrivilegeManagerImpl(this, resolver).getPrivileges(PrivilegeBits.getInstance(bits)); return prvs.toArray(new Privilege[prvs.size()]); @@ -274,6 +278,7 @@ public Privilege[] getPrivileges(int bits) { * @see #getPrivileges(int) * @deprecated Use {@link PrivilegeManagerImpl#getBits(javax.jcr.security.Privilege...)} instead. */ + @Deprecated public static int getBits(Privilege[] privileges) throws AccessControlException { if (privileges == null || privileges.length == 0) { throw new AccessControlException("Privilege array is empty or null."); @@ -346,6 +351,7 @@ public static int calculatePermissions(PrivilegeBits privs, PrivilegeBits parent * @return the permissions granted evaluating the given privileges. * @deprecated Use {@link #calculatePermissions(PrivilegeBits, PrivilegeBits, boolean, boolean)} instead. */ + @Deprecated public static int calculatePermissions(int privs, int parentPrivs, boolean isAllow, boolean protectsPolicy) { return calculatePermissions((long) privs, (long) parentPrivs, isAllow, protectsPolicy); } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserConstants.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserConstants.java index a5d994d278d..7eecd91db74 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserConstants.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserConstants.java @@ -52,6 +52,7 @@ interface UserConstants { * rep:userId property redundant. It has been removed from the node type * definition. */ + @Deprecated Name P_USERID = NF.create(Name.NS_REP_URI, "userId"); Name P_PASSWORD = NF.create(Name.NS_REP_URI, "password"); Name P_DISABLED = NF.create(Name.NS_REP_URI, "disabled"); @@ -60,6 +61,7 @@ interface UserConstants { * @deprecated As of 2.0 group membership is stored with the group node. * @see #P_MEMBERS */ + @Deprecated Name P_GROUPS = NF.create(Name.NS_REP_URI, "groups"); Name P_MEMBERS = NF.create(Name.NS_REP_URI, "members"); diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java index cc50a886f43..7c415683f27 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java @@ -190,6 +190,7 @@ public class UserManagerImpl extends ProtectedItemModifier /** * @deprecated Use {@link #PARAM_COMPATIBLE_JR16} instead. */ + @Deprecated public static final String PARAM_COMPATIBILE_JR16 = "compatibleJR16"; /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java index d9268a7c5a7..5f100a2916d 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java @@ -98,6 +98,7 @@ public RepositoryLock() { * @throws RepositoryException if the canonical path of the directory * can not be determined */ + @Deprecated public RepositoryLock(String path) throws RepositoryException { init(path); } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVersionHistory.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVersionHistory.java index 05d3c22ff94..df812e9253c 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVersionHistory.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVersionHistory.java @@ -55,6 +55,7 @@ InternalVersionHistory getVersionHistory() /** * @deprecated use {@link #getBaseVersion()} instead */ + @Deprecated InternalVersion getBaseVesion() throws VersionException; /** diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java index 26bdc9c9081..c2339f045e9 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java @@ -45,6 +45,7 @@ public interface VirtualItemStateProvider extends ItemStateManager { * @return the id of the root node of the virtual tree. * @deprecated use {@link #getVirtualRootIds()} instead. */ + @Deprecated NodeId getVirtualRootId(); /** diff --git a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java index be80f83e3cb..fff2cb8d8cd 100644 --- a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java +++ b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java @@ -930,6 +930,7 @@ protected synchronized MessageDigest getDigest() throws DataStoreException { * @deprecated * @return the maximum number of connections. */ + @Deprecated public int getMaxConnections() { return -1; } @@ -938,9 +939,10 @@ public int getMaxConnections() { * Set the maximum number of concurrent connections in the pool. * At least 3 connections are required if the garbage collection process is used. * - *@deprecated + * @deprecated * @param maxConnections the new value */ + @Deprecated public void setMaxConnections(int maxConnections) { // no effect } diff --git a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/fs/RandomAccessOutputStream.java b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/fs/RandomAccessOutputStream.java index fd7c7bedd31..b5409086712 100644 --- a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/fs/RandomAccessOutputStream.java +++ b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/fs/RandomAccessOutputStream.java @@ -26,6 +26,7 @@ * * @deprecated this class should no longer be used */ +@Deprecated public abstract class RandomAccessOutputStream extends OutputStream { /** diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/FilterIterator.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/FilterIterator.java index 8b18b423ae9..417b0e44d76 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/FilterIterator.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/FilterIterator.java @@ -26,6 +26,7 @@ * @param * @deprecated use {@link org.apache.jackrabbit.commons.iterator.FilterIterator} */ +@Deprecated public class FilterIterator extends org.apache.jackrabbit.commons.iterator.FilterIterator { /** diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java index da083efcd24..364f1701973 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java @@ -23,5 +23,6 @@ * @param the type of elements of this iterator * @deprecated use {@link org.apache.jackrabbit.commons.iterator.SizedIterator} */ +@Deprecated public interface SizedIterator extends org.apache.jackrabbit.commons.iterator.SizedIterator { } diff --git a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JcrValueType.java b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JcrValueType.java index 9d941c551d5..5f119377ee1 100644 --- a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JcrValueType.java +++ b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JcrValueType.java @@ -20,6 +20,7 @@ * * @deprecated As of Jackrabbit 2.2. Please Use {@link org.apache.jackrabbit.commons.webdav.JcrValueType} instead. */ +@Deprecated public final class JcrValueType extends org.apache.jackrabbit.commons.webdav.JcrValueType { } \ No newline at end of file diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeType.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeType.java index 210c11ee103..5c551656ebe 100644 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeType.java +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeType.java @@ -106,6 +106,7 @@ public void checkAddNodeConstraints(Name name, QNodeTypeDefinition nodeTypeDefin * @deprecated Use {@link #hasRemoveNodeConstraint(Name)} and * {@link #hasRemovePropertyConstraint(Name)} respectively. */ + @Deprecated public void checkRemoveItemConstraints(Name name) throws ConstraintViolationException; /** diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/EventImpl.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/EventImpl.java index 2baa3c8baa7..8edd58bf38a 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/EventImpl.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/EventImpl.java @@ -81,6 +81,7 @@ public class EventImpl implements Event, Serializable { * Creates a new serializable event. * @deprecated */ + @Deprecated public EventImpl(int type, Path path, ItemId itemId, NodeId parentId, Name primaryNodeTypeName, Name[] mixinTypeNames, String userId) { diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java index 0c8b0edef58..4ba735b1305 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoImpl.java @@ -50,6 +50,7 @@ public abstract class ItemInfoImpl implements ItemInfo, Serializable { * parentId is not used any more and the corresponding getter has been * removed. */ + @Deprecated public ItemInfoImpl(NodeId parentId, Name name, Path path, boolean isNode) { this(path, isNode); } diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/LockInfoImpl.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/LockInfoImpl.java index 04906cad5d9..c9f5c161f91 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/LockInfoImpl.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/LockInfoImpl.java @@ -72,6 +72,7 @@ public class LockInfoImpl implements LockInfo, Serializable { * @param nodeId the node id of the locked node. * @deprecated Use {@link #LockInfoImpl(String, String, boolean, boolean, long, boolean, NodeId)} instaed. */ + @Deprecated public LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId) { this(lockToken, lockOwner, isDeep, isSessionScoped, Long.MAX_VALUE, lockToken != null, nodeId); diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java index c4c0f8319c8..1d4ab8c3242 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java @@ -149,6 +149,7 @@ public void remove() { * @deprecated Use {@link #NodeInfoImpl(Path, NodeId, int, Name, Name[], Iterator, Iterator, Iterator)} * instead. The parentId is not used any more. */ + @Deprecated public NodeInfoImpl(NodeId parentId, Name name, Path path, NodeId id, int index, Name primaryTypeName, Name[] mixinNames, Iterator references, Iterator propertyIds, diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java index 8abf38b66ec..fd78d4b3b69 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/PropertyInfoImpl.java @@ -87,6 +87,7 @@ public static PropertyInfo createSerializablePropertyInfo( * @deprecated Use {@link #PropertyInfoImpl(Path, PropertyId, int, boolean, QValue[])} * instead. The parentId is not used any more. */ + @Deprecated public PropertyInfoImpl(NodeId parentId, Name name, Path path, PropertyId id, int type, boolean isMultiValued, QValue[] values) { diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java index 88301d098ff..4acdf65fad9 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java @@ -121,6 +121,7 @@ public static Iterator arrayIterator(T[] values, int from, int to) { * @return * @deprecated use {@link #filterIterator(Iterator, java.util.function.Predicate)} instead */ + @Deprecated public static Iterator filterIterator(Iterator iterator, final Predicate predicate) { diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java index b94bcbd3bfc..18c788bd236 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java @@ -22,6 +22,7 @@ * @param type of values this predicate is defined on * @deprecated use {@link java.util.function.Predicate} instead */ +@Deprecated public interface Predicate { /** diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java index be81d1110b7..b6880a282dc 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java @@ -21,6 +21,7 @@ * Utility class containing pre defined {@link Predicate}s * @deprecated use instances of {@link java.util.function.Predicate} instead */ +@Deprecated public final class Predicates { /** diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/lock/Locked.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/lock/Locked.java index b9447957c5c..29e0ae1246c 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/lock/Locked.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/lock/Locked.java @@ -78,6 +78,7 @@ * * @deprecated Use org.apache.jackrabbit.util.Locked instead. */ +@Deprecated public abstract class Locked { /** diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/AbstractNamespaceResolver.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/AbstractNamespaceResolver.java index bdcb95227c4..6b74d015770 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/AbstractNamespaceResolver.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/AbstractNamespaceResolver.java @@ -35,6 +35,7 @@ * * @deprecated https://issues.apache.org/jira/browse/JCR-1700 */ +@Deprecated public abstract class AbstractNamespaceResolver implements NamespaceResolver { private final Set listeners; diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceListener.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceListener.java index a3ee219e596..e3203996bc1 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceListener.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceListener.java @@ -21,6 +21,7 @@ * * @deprecated https://issues.apache.org/jira/browse/JCR-1700 */ +@Deprecated public interface NamespaceListener { /** diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java index f5a1d244073..542d1933b49 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java @@ -135,6 +135,7 @@ public boolean isValid() { * ordered ascending; descending if false. * @deprecated use {@link #addOrderSpec(Path , boolean)} instead. */ + @Deprecated public void addOrderSpec(Name property, boolean ascending) { addOrderSpec(createPath(property), ascending); } @@ -232,6 +233,7 @@ public static final class OrderSpec { * ascending, otherwise descending. * @deprecated use {@link OrderSpec#OrderSpec(Path, boolean)} instead. */ + @Deprecated public OrderSpec(Name property, boolean ascending) { this(createPath(property), ascending); } @@ -254,6 +256,7 @@ public OrderSpec(Path property, boolean ascending) { * @return the name of the property. * @deprecated use {@link #getPropertyPath()} instead. */ + @Deprecated public Name getProperty() { return property.getName(); } diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java index 15d1686e64f..3c2fe14ce82 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java @@ -98,6 +98,7 @@ public String getQuery() { * @return property name or null. * @deprecated Use {@link #getRelativePath()} instead. */ + @Deprecated public Name getPropertyName() { return relPath == null ? null : relPath.getName(); } @@ -108,6 +109,7 @@ public Name getPropertyName() { * @param property the name of the property. * @deprecated Use {@link #setRelativePath(Path)} instead. */ + @Deprecated public void setPropertyName(Name property) { PathBuilder builder = new PathBuilder(); builder.addLast(property); diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/SimpleCharStream.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/SimpleCharStream.java index 2e085993bd7..9df5d742496 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/SimpleCharStream.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/SimpleCharStream.java @@ -218,7 +218,7 @@ public char readChar() throws java.io.IOException * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -227,7 +227,7 @@ public int getColumn() { * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql2/Parser.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql2/Parser.java index d8603db6197..22500e701f8 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql2/Parser.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql2/Parser.java @@ -25,6 +25,7 @@ * @deprecated use {@link org.apache.jackrabbit.commons.query.sql2.Parser} * instead. */ +@Deprecated public class Parser extends org.apache.jackrabbit.commons.query.sql2.Parser { diff --git a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/SimpleCharStream.java b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/SimpleCharStream.java index 1547afa8cb8..1d7f294d0e0 100644 --- a/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/SimpleCharStream.java +++ b/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/SimpleCharStream.java @@ -202,7 +202,7 @@ public char readChar() throws java.io.IOException * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -211,7 +211,7 @@ public int getColumn() { * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } diff --git a/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java b/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java index da56567d520..13c454b3c32 100644 --- a/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java +++ b/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java @@ -71,6 +71,7 @@ public interface NodeInfo extends ItemInfo { * @see PropertyInfo#getId() * @deprecated Use {@link RepositoryService#getReferences(SessionInfo, NodeId, Name, boolean)} instead. */ + @Deprecated public PropertyId[] getReferences(); /** diff --git a/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java b/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java index a01385bec7b..09e6841766e 100644 --- a/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java +++ b/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java @@ -302,6 +302,7 @@ public SessionInfo obtain(SessionInfo sessionInfo, String workspaceName) * @see javax.jcr.version.Version#getContainingHistory() * @deprecated Use {@link #getItemInfos(SessionInfo, ItemId)} */ + @Deprecated public NodeInfo getNodeInfo(SessionInfo sessionInfo, NodeId nodeId) throws ItemNotFoundException, RepositoryException; /** @@ -382,6 +383,7 @@ public SessionInfo obtain(SessionInfo sessionInfo, String workspaceName) * @see javax.jcr.Node#getProperty(String) * @deprecated Use {@link #getItemInfos(SessionInfo, ItemId)} */ + @Deprecated public PropertyInfo getPropertyInfo(SessionInfo sessionInfo, PropertyId propertyId) throws ItemNotFoundException, RepositoryException; //-----------------------------------------------< general modification >--- diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/PropContainer.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/PropContainer.java index a86e55fea36..63d3b81be63 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/PropContainer.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/property/PropContainer.java @@ -42,6 +42,7 @@ public abstract class PropContainer implements XmlSerializable, DavConstants { * @return true if the object could be added; false otherwise * @deprecated Use {@link #addContent(PropEntry)} instead. */ + @Deprecated public boolean addContent(Object contentEntry) { if (contentEntry instanceof PropEntry) { return addContent((PropEntry) contentEntry); diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/WorkspaceResource.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/WorkspaceResource.java index bfbbe5ff6e1..a5e6e309e28 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/WorkspaceResource.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/WorkspaceResource.java @@ -56,6 +56,7 @@ public interface WorkspaceResource extends DeltaVResource { /** * @deprecated Use {@link #CURRENT_ACTIVITY_SET} instead. */ + @Deprecated public static final DavPropertyName CUURENT_ACTIVITY_SET = DavPropertyName.create("current-activity-set", DeltaVConstants.NAMESPACE); /** diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java index 07a603fa5d6..86d19133a6a 100644 --- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java +++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java @@ -736,6 +736,7 @@ public static Element hrefToXml(String href, Document factory) { * is called Expanded Name. * */ + @Deprecated public static String getQualifiedName(String localName, Namespace namespace) { return getExpandedName(localName, namespace); } From 01cc9acd4999decaa2797abe207359d41b4b0fc9 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 19 Jul 2024 15:47:20 +0200 Subject: [PATCH 215/271] JCR-5089: avoid use of deprecated junit.framework.Assert (#208) --- .../jackrabbit/core/cluster/DbClusterTestJCR3162.java | 3 +-- .../jackrabbit/core/query/lucene/ComparableArrayTest.java | 2 +- .../apache/jackrabbit/test/api/SysViewContentHandler.java | 3 +-- .../org/apache/jackrabbit/test/api/TreeComparator.java | 6 ++++-- .../jackrabbit/acl/AccessControlListImplTest.java | 7 +++---- .../org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java | 3 +-- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java index 93d36aeab05..c80d8725bbb 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java @@ -30,14 +30,13 @@ import javax.jcr.query.Query; import javax.jcr.query.RowIterator; -import junit.framework.Assert; - import org.apache.commons.io.FileUtils; import org.apache.jackrabbit.JcrConstants; import org.apache.jackrabbit.commons.JcrUtils; import org.apache.jackrabbit.core.RepositoryImpl; import org.apache.jackrabbit.core.config.RepositoryConfig; import org.apache.jackrabbit.test.JUnitTest; +import org.junit.Assert; /** * Test for JCR3162 diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/ComparableArrayTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/ComparableArrayTest.java index 49507d6b796..368bad8fadd 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/ComparableArrayTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/lucene/ComparableArrayTest.java @@ -16,7 +16,7 @@ */ package org.apache.jackrabbit.core.query.lucene; -import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertEquals; import javax.jcr.RepositoryException; diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java index ca3e88a1c95..46af661eea4 100644 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java +++ b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java @@ -20,6 +20,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.apache.jackrabbit.test.AbstractJCRTest; +import org.junit.Assert; import javax.jcr.nodetype.NodeType; import javax.jcr.Session; @@ -45,8 +46,6 @@ import java.util.Iterator; import java.util.Map; -import junit.framework.Assert; - /** * ContentHandler implementation which checks if the system view export of * a node tree is compliant to the specification. diff --git a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TreeComparator.java b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TreeComparator.java index 590819a6861..0b8daba3328 100644 --- a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TreeComparator.java +++ b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TreeComparator.java @@ -28,12 +28,14 @@ import javax.jcr.Value; import javax.jcr.PathNotFoundException; import javax.jcr.nodetype.NodeTypeManager; + +import org.junit.Assert; + import javax.jcr.nodetype.NodeTypeIterator; import javax.jcr.nodetype.NodeType; import java.util.Calendar; -import java.io.ByteArrayInputStream; -import junit.framework.Assert; +import java.io.ByteArrayInputStream; /** * TreeComparator compares two trees. This allows re-use for diff --git a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/security/authorization/jackrabbit/acl/AccessControlListImplTest.java b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/security/authorization/jackrabbit/acl/AccessControlListImplTest.java index 9c6a9789d71..f0fe19ed5ee 100644 --- a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/security/authorization/jackrabbit/acl/AccessControlListImplTest.java +++ b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/security/authorization/jackrabbit/acl/AccessControlListImplTest.java @@ -28,7 +28,6 @@ import javax.jcr.security.AccessControlList; import javax.jcr.security.Privilege; -import junit.framework.Assert; import org.apache.jackrabbit.api.security.JackrabbitAccessControlList; import org.apache.jackrabbit.spi.Name; import org.apache.jackrabbit.spi.QValueFactory; @@ -36,6 +35,7 @@ import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver; import org.apache.jackrabbit.spi.commons.value.QValueFactoryImpl; import org.apache.jackrabbit.test.api.security.AbstractAccessControlTest; +import org.junit.Assert; /** * Tests the functionality of the JCR AccessControlList API implementation. The @@ -97,15 +97,14 @@ public void testAddingDifferentEntries() throws Exception { // four different entries Assert.assertEquals(4, acl.size()); - + // UnknownPrincipal entries AccessControlEntry[] pentries = getEntries(acl, unknownPrincipal); Assert.assertEquals(2, pentries.length); - + // secondPrincipal entries AccessControlEntry[] sentries = getEntries(acl, knownPrincipal); Assert.assertEquals(2, sentries.length); - } public void testMultipleEntryEffect() throws Exception { diff --git a/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java b/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java index c8c89d2162a..869223a31f8 100644 --- a/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java +++ b/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java @@ -32,14 +32,13 @@ import org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder; import org.apache.jackrabbit.core.data.CachingDataStore; import org.apache.jackrabbit.core.data.TestCaseBase; +import org.junit.Assert; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.InputSource; -import junit.framework.Assert; - /** * Test {@link CachingDataStore} with VFSBackend with a VFS file system (local file system) by default. *

    From 885a0f93071cab85839f7e2b571aa35e416faa5d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 29 Jul 2024 16:11:10 +0200 Subject: [PATCH 216/271] JCR-5092: jackrabbit-jcr2spi: switch to commons-collections4 4.5.0-M2 (#210) --- .../hierarchy/CopyOfAbstractLinkedList.java | 1123 ----------------- .../jcr2spi/hierarchy/LinkedEntries.java | 3 +- jackrabbit-parent/pom.xml | 2 +- 3 files changed, 3 insertions(+), 1125 deletions(-) delete mode 100644 jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java deleted file mode 100644 index 2b45bb7a475..00000000000 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/CopyOfAbstractLinkedList.java +++ /dev/null @@ -1,1123 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.jcr2spi.hierarchy; - -/* - * This is a copy of org.apache.commons.collections4.list.AbstractLinkedList - * with dependencies inlined and two methods changed for JDK 21 conformance; - * see https://issues.apache.org/jira/browse/COLLECTIONS-842 and https://issues.apache.org/jira/browse/JCR-4940 - */ - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.lang.reflect.Array; -import java.util.AbstractList; -import java.util.Collection; -import java.util.ConcurrentModificationException; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.NoSuchElementException; -import java.util.Objects; - -/** - * An abstract implementation of a linked list which provides numerous points for - * subclasses to override. - *

    - * Overridable methods are provided to change the storage node and to change how - * nodes are added to and removed. Hopefully, all you need for unusual subclasses - * is here. - *

    - * - * @param the type of elements in this list - * @since 3.0 - */ -abstract class CopyOfAbstractLinkedList implements List { - - /* - * Implementation notes: - * - a standard circular doubly-linked list - * - a marker node is stored to mark the start and the end of the list - * - node creation and removal always occurs through createNode() and - * removeNode(). - * - a modification count is kept, with the same semantics as - * {@link java.util.LinkedList}. - * - respects {@link AbstractList#modCount} - */ - - /** - * A {@link Node} which indicates the start and end of the list and does not - * hold a value. The value of {@code next} is the first item in the - * list. The value of {@code previous} is the last item in the list. - */ - transient Node header; - - /** The size of the list */ - transient int size; - - /** Modification count for iterators */ - transient int modCount; - - /** - * Constructor that does nothing (intended for deserialization). - *

    - * If this constructor is used by a serializable subclass then the init() - * method must be called. - */ - protected CopyOfAbstractLinkedList() { - } - - /** - * Constructs a list copying data from the specified collection. - * - * @param coll the collection to copy - */ - protected CopyOfAbstractLinkedList(final Collection coll) { - init(); - addAll(coll); - } - - /** - * The equivalent of a default constructor, broken out so it can be called - * by any constructor and by {@code readObject}. - * Subclasses which override this method should make sure they call super, - * so the list is initialized properly. - */ - protected void init() { - header = createHeaderNode(); - } - - - @Override - public int size() { - return size; - } - - @Override - public boolean isEmpty() { - return size() == 0; - } - - @Override - public E get(final int index) { - final Node node = getNode(index, false); - return node.getValue(); - } - - - @Override - public Iterator iterator() { - return listIterator(); - } - - @Override - public ListIterator listIterator() { - return new LinkedListIterator<>(this, 0); - } - - @Override - public ListIterator listIterator(final int fromIndex) { - return new LinkedListIterator<>(this, fromIndex); - } - - - @Override - public int indexOf(final Object value) { - int i = 0; - for (Node node = header.next; node != header; node = node.next) { - if (isEqualValue(node.getValue(), value)) { - return i; - } - i++; - } - return INDEX_NOT_FOUND; - } - - @Override - public int lastIndexOf(final Object value) { - int i = size - 1; - for (Node node = header.previous; node != header; node = node.previous) { - if (isEqualValue(node.getValue(), value)) { - return i; - } - i--; - } - return INDEX_NOT_FOUND; - } - - @Override - public boolean contains(final Object value) { - return indexOf(value) != -1; - } - - @Override - public boolean containsAll(final Collection coll) { - for (final Object o : coll) { - if (!contains(o)) { - return false; - } - } - return true; - } - - - @Override - public Object[] toArray() { - return toArray(new Object[size]); - } - - @Override - @SuppressWarnings("unchecked") - public T[] toArray(T[] array) { - // Extend the array if needed - if (array.length < size) { - final Class componentType = array.getClass().getComponentType(); - array = (T[]) Array.newInstance(componentType, size); - } - // Copy the values into the array - int i = 0; - for (Node node = header.next; node != header; node = node.next, i++) { - array[i] = (T) node.getValue(); - } - // Set the value after the last value to null - if (array.length > size) { - array[size] = null; - } - return array; - } - - /** - * Gets a sublist of the main list. - * - * @param fromIndexInclusive the index to start from - * @param toIndexExclusive the index to end at - * @return the new sublist - */ - @Override - public List subList(final int fromIndexInclusive, final int toIndexExclusive) { - return new LinkedSubList<>(this, fromIndexInclusive, toIndexExclusive); - } - - - @Override - public boolean add(final E value) { - addLast(value); - return true; - } - - @Override - public void add(final int index, final E value) { - final Node node = getNode(index, true); - addNodeBefore(node, value); - } - - @Override - public boolean addAll(final Collection coll) { - return addAll(size, coll); - } - - @Override - public boolean addAll(final int index, final Collection coll) { - final Node node = getNode(index, true); - for (final E e : coll) { - addNodeBefore(node, e); - } - return true; - } - - - @Override - public E remove(final int index) { - final Node node = getNode(index, false); - final E oldValue = node.getValue(); - removeNode(node); - return oldValue; - } - - @Override - public boolean remove(final Object value) { - for (Node node = header.next; node != header; node = node.next) { - if (isEqualValue(node.getValue(), value)) { - removeNode(node); - return true; - } - } - return false; - } - - /** - * {@inheritDoc} - *

    - * This implementation iterates over the elements of this list, checking each element in - * turn to see if it's contained in {@code coll}. If it's contained, it's removed - * from this list. As a consequence, it is advised to use a collection type for - * {@code coll} that provides a fast (e.g. O(1)) implementation of - * {@link Collection#contains(Object)}. - */ - @Override - public boolean removeAll(final Collection coll) { - boolean modified = false; - final Iterator it = iterator(); - while (it.hasNext()) { - if (coll.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - - /** - * {@inheritDoc} - *

    - * This implementation iterates over the elements of this list, checking each element in - * turn to see if it's contained in {@code coll}. If it's not contained, it's removed - * from this list. As a consequence, it is advised to use a collection type for - * {@code coll} that provides a fast (e.g. O(1)) implementation of - * {@link Collection#contains(Object)}. - */ - @Override - public boolean retainAll(final Collection coll) { - boolean modified = false; - final Iterator it = iterator(); - while (it.hasNext()) { - if (!coll.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - @Override - public E set(final int index, final E value) { - final Node node = getNode(index, false); - final E oldValue = node.getValue(); - updateNode(node, value); - return oldValue; - } - - @Override - public void clear() { - removeAllNodes(); - } - - - public E getFirst() { - final Node node = header.next; - if (node == header) { - throw new NoSuchElementException(); - } - return node.getValue(); - } - - public E getLast() { - final Node node = header.previous; - if (node == header) { - throw new NoSuchElementException(); - } - return node.getValue(); - } - - public void addFirst(final E o) { - addNodeAfter(header, o); - } - - public void addLast(final E o) { - addNodeBefore(header, o); - } - - public E removeFirst() { - final Node node = header.next; - if (node == header) { - throw new NoSuchElementException(); - } - final E oldValue = node.getValue(); - removeNode(node); - return oldValue; - } - - public E removeLast() { - final Node node = header.previous; - if (node == header) { - throw new NoSuchElementException(); - } - final E oldValue = node.getValue(); - removeNode(node); - return oldValue; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof List)) { - return false; - } - final List other = (List) obj; - if (other.size() != size()) { - return false; - } - final ListIterator it1 = listIterator(); - final ListIterator it2 = other.listIterator(); - while (it1.hasNext() && it2.hasNext()) { - if (!Objects.equals(it1.next(), it2.next())) { - return false; - } - } - return !(it1.hasNext() || it2.hasNext()); - } - - @Override - public int hashCode() { - int hashCode = 1; - for (final E e : this) { - hashCode = 31 * hashCode + (e == null ? 0 : e.hashCode()); - } - return hashCode; - } - - @Override - public String toString() { - if (isEmpty()) { - return "[]"; - } - final StringBuilder buf = new StringBuilder(16 * size()); - buf.append(DEFAULT_TOSTRING_PREFIX); - - final Iterator it = iterator(); - boolean hasNext = it.hasNext(); - while (hasNext) { - final Object value = it.next(); - buf.append(value == this ? "(this Collection)" : value); - hasNext = it.hasNext(); - if (hasNext) { - buf.append(", "); - } - } - buf.append(DEFAULT_TOSTRING_SUFFIX); - return buf.toString(); - } - - /** - * Compares two values for equals. - * This implementation uses the equals method. - * Subclasses can override this to match differently. - * - * @param value1 the first value to compare, may be null - * @param value2 the second value to compare, may be null - * @return true if equal - */ - protected boolean isEqualValue(final Object value1, final Object value2) { - return Objects.equals(value1, value2); - } - - /** - * Updates the node with a new value. - * This implementation sets the value on the node. - * Subclasses can override this to record the change. - * - * @param node node to update - * @param value new value of the node - */ - protected void updateNode(final Node node, final E value) { - node.setValue(value); - } - - /** - * Creates a new node with previous, next and element all set to null. - * This implementation creates a new empty Node. - * Subclasses can override this to create a different class. - * - * @return newly created node - */ - protected Node createHeaderNode() { - return new Node<>(); - } - - /** - * Creates a new node with the specified properties. - * This implementation creates a new Node with data. - * Subclasses can override this to create a different class. - * - * @param value value of the new node - * @return a new node containing the value - */ - protected Node createNode(final E value) { - return new Node<>(value); - } - - /** - * Creates a new node with the specified object as its - * {@code value} and inserts it before {@code node}. - *

    - * This implementation uses {@link #createNode(Object)} and - * {@link #addNode(CopyOfAbstractLinkedList.Node,CopyOfAbstractLinkedList.Node)}. - * - * @param node node to insert before - * @param value value of the newly added node - * @throws NullPointerException if {@code node} is null - */ - protected void addNodeBefore(final Node node, final E value) { - final Node newNode = createNode(value); - addNode(newNode, node); - } - - /** - * Creates a new node with the specified object as its - * {@code value} and inserts it after {@code node}. - *

    - * This implementation uses {@link #createNode(Object)} and - * {@link #addNode(CopyOfAbstractLinkedList.Node,CopyOfAbstractLinkedList.Node)}. - * - * @param node node to insert after - * @param value value of the newly added node - * @throws NullPointerException if {@code node} is null - */ - protected void addNodeAfter(final Node node, final E value) { - final Node newNode = createNode(value); - addNode(newNode, node.next); - } - - /** - * Inserts a new node into the list. - * - * @param nodeToInsert new node to insert - * @param insertBeforeNode node to insert before - * @throws NullPointerException if either node is null - */ - protected void addNode(final Node nodeToInsert, final Node insertBeforeNode) { - Objects.requireNonNull(nodeToInsert, "nodeToInsert"); - Objects.requireNonNull(insertBeforeNode, "insertBeforeNode"); - nodeToInsert.next = insertBeforeNode; - nodeToInsert.previous = insertBeforeNode.previous; - insertBeforeNode.previous.next = nodeToInsert; - insertBeforeNode.previous = nodeToInsert; - size++; - modCount++; - } - - /** - * Removes the specified node from the list. - * - * @param node the node to remove - * @throws NullPointerException if {@code node} is null - */ - protected void removeNode(final Node node) { - Objects.requireNonNull(node, "node"); - node.previous.next = node.next; - node.next.previous = node.previous; - size--; - modCount++; - } - - /** - * Removes all nodes by resetting the circular list marker. - */ - protected void removeAllNodes() { - header.next = header; - header.previous = header; - size = 0; - modCount++; - } - - /** - * Gets the node at a particular index. - * - * @param index the index, starting from 0 - * @param endMarkerAllowed whether or not the end marker can be returned if - * startIndex is set to the list's size - * @return the node at the given index - * @throws IndexOutOfBoundsException if the index is less than 0; equal to - * the size of the list and endMakerAllowed is false; or greater than the - * size of the list - */ - protected Node getNode(final int index, final boolean endMarkerAllowed) throws IndexOutOfBoundsException { - // Check the index is within the bounds - if (index < 0) { - throw new IndexOutOfBoundsException("Couldn't get the node: " + - "index (" + index + ") less than zero."); - } - if (!endMarkerAllowed && index == size) { - throw new IndexOutOfBoundsException("Couldn't get the node: " + - "index (" + index + ") is the size of the list."); - } - if (index > size) { - throw new IndexOutOfBoundsException("Couldn't get the node: " + - "index (" + index + ") greater than the size of the " + - "list (" + size + ")."); - } - // Search the list and get the node - Node node; - if (index < size / 2) { - // Search forwards - node = header.next; - for (int currentIndex = 0; currentIndex < index; currentIndex++) { - node = node.next; - } - } else { - // Search backwards - node = header; - for (int currentIndex = size; currentIndex > index; currentIndex--) { - node = node.previous; - } - } - return node; - } - - /** - * Creates an iterator for the sublist. - * - * @param subList the sublist to get an iterator for - * @return a new iterator on the given sublist - */ - protected Iterator createSubListIterator(final LinkedSubList subList) { - return createSubListListIterator(subList, 0); - } - - /** - * Creates a list iterator for the sublist. - * - * @param subList the sublist to get an iterator for - * @param fromIndex the index to start from, relative to the sublist - * @return a new list iterator on the given sublist - */ - protected ListIterator createSubListListIterator(final LinkedSubList subList, final int fromIndex) { - return new LinkedSubListIterator<>(subList, fromIndex); - } - - /** - * Serializes the data held in this object to the stream specified. - *

    - * The first serializable subclass must call this method from - * {@code writeObject}. - * - * @param outputStream the stream to write the object to - * @throws IOException if anything goes wrong - */ - protected void doWriteObject(final ObjectOutputStream outputStream) throws IOException { - // Write the size so we know how many nodes to read back - outputStream.writeInt(size()); - for (final E e : this) { - outputStream.writeObject(e); - } - } - - /** - * Deserializes the data held in this object to the stream specified. - *

    - * The first serializable subclass must call this method from - * {@code readObject}. - * - * @param inputStream the stream to read the object from - * @throws IOException if any error occurs while reading from the stream - * @throws ClassNotFoundException if a class read from the stream can not be loaded - */ - @SuppressWarnings("unchecked") - protected void doReadObject(final ObjectInputStream inputStream) throws IOException, ClassNotFoundException { - init(); - final int size = inputStream.readInt(); - for (int i = 0; i < size; i++) { - add((E) inputStream.readObject()); - } - } - - /** - * A node within the linked list. - *

    - * From Commons Collections 3.1, all access to the {@code value} property - * is via the methods on this class. - */ - protected static class Node { - - /** A pointer to the node before this node */ - protected Node previous; - /** A pointer to the node after this node */ - protected Node next; - /** The object contained within this node */ - protected E value; - - /** - * Constructs a new header node. - */ - protected Node() { - previous = this; - next = this; - } - - /** - * Constructs a new node. - * - * @param value the value to store - */ - protected Node(final E value) { - this.value = value; - } - - /** - * Constructs a new node. - * - * @param previous the previous node in the list - * @param next the next node in the list - * @param value the value to store - */ - protected Node(final Node previous, final Node next, final E value) { - this.previous = previous; - this.next = next; - this.value = value; - } - - /** - * Gets the value of the node. - * - * @return the value - * @since 3.1 - */ - protected E getValue() { - return value; - } - - /** - * Sets the value of the node. - * - * @param value the value - * @since 3.1 - */ - protected void setValue(final E value) { - this.value = value; - } - - /** - * Gets the previous node. - * - * @return the previous node - * @since 3.1 - */ - protected Node getPreviousNode() { - return previous; - } - - /** - * Sets the previous node. - * - * @param previous the previous node - * @since 3.1 - */ - protected void setPreviousNode(final Node previous) { - this.previous = previous; - } - - /** - * Gets the next node. - * - * @return the next node - * @since 3.1 - */ - protected Node getNextNode() { - return next; - } - - /** - * Sets the next node. - * - * @param next the next node - * @since 3.1 - */ - protected void setNextNode(final Node next) { - this.next = next; - } - } - - /** - * A list iterator over the linked list. - * - * @param the type of elements in this iterator. - */ - protected static class LinkedListIterator implements ListIterator, CopyOfOrderedIterator { - - /** The parent list */ - protected final CopyOfAbstractLinkedList parent; - - /** - * The node that will be returned by {@link #next()}. If this is equal - * to {@link CopyOfAbstractLinkedList#header} then there are no more values to return. - */ - protected Node next; - - /** - * The index of {@link #next}. - */ - protected int nextIndex; - - /** - * The last node that was returned by {@link #next()} or {@link - * #previous()}. Set to {@code null} if {@link #next()} or {@link - * #previous()} haven't been called, or if the node has been removed - * with {@link #remove()} or a new node added with {@link #add(Object)}. - * Should be accessed through {@link #getLastNodeReturned()} to enforce - * this behavior. - */ - protected Node current; - - /** - * The modification count that the list is expected to have. If the list - * doesn't have this count, then a - * {@link java.util.ConcurrentModificationException} may be thrown by - * the operations. - */ - protected int expectedModCount; - - /** - * Create a ListIterator for a list. - * - * @param parent the parent list - * @param fromIndex the index to start at - * @throws IndexOutOfBoundsException if fromIndex is less than 0 or greater than the size of the list - */ - protected LinkedListIterator(final CopyOfAbstractLinkedList parent, final int fromIndex) - throws IndexOutOfBoundsException { - this.parent = parent; - this.expectedModCount = parent.modCount; - this.next = parent.getNode(fromIndex, true); - this.nextIndex = fromIndex; - } - - /** - * Checks the modification count of the list is the value that this - * object expects. - * - * @throws ConcurrentModificationException If the list's modification - * count isn't the value that was expected. - */ - protected void checkModCount() { - if (parent.modCount != expectedModCount) { - throw new ConcurrentModificationException(); - } - } - - /** - * Gets the last node returned. - * - * @return the last node returned - * @throws IllegalStateException If {@link #next()} or {@link #previous()} haven't been called, - * or if the node has been removed with {@link #remove()} or a new node added with {@link #add(Object)}. - */ - protected Node getLastNodeReturned() throws IllegalStateException { - if (current == null) { - throw new IllegalStateException(); - } - return current; - } - - @Override - public boolean hasNext() { - return next != parent.header; - } - - @Override - public E next() { - checkModCount(); - if (!hasNext()) { - throw new NoSuchElementException("No element at index " + nextIndex + "."); - } - final E value = next.getValue(); - current = next; - next = next.next; - nextIndex++; - return value; - } - - @Override - public boolean hasPrevious() { - return next.previous != parent.header; - } - - @Override - public E previous() { - checkModCount(); - if (!hasPrevious()) { - throw new NoSuchElementException("Already at start of list."); - } - next = next.previous; - final E value = next.getValue(); - current = next; - nextIndex--; - return value; - } - - @Override - public int nextIndex() { - return nextIndex; - } - - @Override - public int previousIndex() { - // not normally overridden, as relative to nextIndex() - return nextIndex() - 1; - } - - @Override - public void remove() { - checkModCount(); - if (current == next) { - // remove() following previous() - next = next.next; - parent.removeNode(getLastNodeReturned()); - } else { - // remove() following next() - parent.removeNode(getLastNodeReturned()); - nextIndex--; - } - current = null; - expectedModCount++; - } - - @Override - public void set(final E obj) { - checkModCount(); - getLastNodeReturned().setValue(obj); - } - - @Override - public void add(final E obj) { - checkModCount(); - parent.addNodeBefore(next, obj); - current = null; - nextIndex++; - expectedModCount++; - } - - } - - /** - * A list iterator over the linked sub list. - * - * @param the type of elements in this iterator. - */ - protected static class LinkedSubListIterator extends LinkedListIterator { - - /** The sub list */ - protected final LinkedSubList sub; - - protected LinkedSubListIterator(final LinkedSubList sub, final int startIndex) { - super(sub.parent, startIndex + sub.offset); - this.sub = sub; - } - - @Override - public boolean hasNext() { - return nextIndex() < sub.size; - } - - @Override - public boolean hasPrevious() { - return previousIndex() >= 0; - } - - @Override - public int nextIndex() { - return super.nextIndex() - sub.offset; - } - - @Override - public void add(final E obj) { - super.add(obj); - sub.expectedModCount = parent.modCount; - sub.size++; - } - - @Override - public void remove() { - super.remove(); - sub.expectedModCount = parent.modCount; - sub.size--; - } - } - - /** - * The sublist implementation for CopyOfAbstractLinkedList. - * - * @param the type of elements in this list. - */ - protected static class LinkedSubList extends AbstractList { - /** The main list */ - CopyOfAbstractLinkedList parent; - /** Offset from the main list */ - int offset; - /** Sublist size */ - int size; - /** Sublist modCount */ - int expectedModCount; - - protected LinkedSubList(final CopyOfAbstractLinkedList parent, final int fromIndex, final int toIndex) { - if (fromIndex < 0) { - throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); - } - if (toIndex > parent.size()) { - throw new IndexOutOfBoundsException("toIndex = " + toIndex); - } - if (fromIndex > toIndex) { - throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); - } - this.parent = parent; - this.offset = fromIndex; - this.size = toIndex - fromIndex; - this.expectedModCount = parent.modCount; - } - - @Override - public int size() { - checkModCount(); - return size; - } - - @Override - public E get(final int index) { - rangeCheck(index, size); - checkModCount(); - return parent.get(index + offset); - } - - @Override - public void add(final int index, final E obj) { - rangeCheck(index, size + 1); - checkModCount(); - parent.add(index + offset, obj); - expectedModCount = parent.modCount; - size++; - modCount++; - } - - @Override - public E remove(final int index) { - rangeCheck(index, size); - checkModCount(); - final E result = parent.remove(index + offset); - expectedModCount = parent.modCount; - size--; - modCount++; - return result; - } - - @Override - public boolean addAll(final Collection coll) { - return addAll(size, coll); - } - - @Override - public boolean addAll(final int index, final Collection coll) { - rangeCheck(index, size + 1); - final int cSize = coll.size(); - if (cSize == 0) { - return false; - } - - checkModCount(); - parent.addAll(offset + index, coll); - expectedModCount = parent.modCount; - size += cSize; - modCount++; - return true; - } - - @Override - public E set(final int index, final E obj) { - rangeCheck(index, size); - checkModCount(); - return parent.set(index + offset, obj); - } - - @Override - public void clear() { - checkModCount(); - final Iterator it = iterator(); - while (it.hasNext()) { - it.next(); - it.remove(); - } - } - - @Override - public Iterator iterator() { - checkModCount(); - return parent.createSubListIterator(this); - } - - @Override - public ListIterator listIterator(final int index) { - rangeCheck(index, size + 1); - checkModCount(); - return parent.createSubListListIterator(this, index); - } - - @Override - public List subList(final int fromIndexInclusive, final int toIndexExclusive) { - return new LinkedSubList<>(parent, fromIndexInclusive + offset, toIndexExclusive + offset); - } - - protected void rangeCheck(final int index, final int beyond) { - if (index < 0 || index >= beyond) { - throw new IndexOutOfBoundsException("Index '" + index + "' out of bounds for size '" + size + "'"); - } - } - - protected void checkModCount() { - if (parent.modCount != expectedModCount) { - throw new ConcurrentModificationException(); - } - } - } - - // inlined dependencies from commons-collections - - private interface CopyOfOrderedIterator extends Iterator { - - /** - * Checks to see if there is a previous element that can be iterated to. - * - * @return {@code true} if the iterator has a previous element - */ - boolean hasPrevious(); - - /** - * Gets the previous element from the container. - * - * @return the previous element in the iteration - * @throws java.util.NoSuchElementException if the iteration is finished - */ - E previous(); - - } - - /** - * The index value when an element is not found in a collection or array: {@code -1}. - */ - private static final int INDEX_NOT_FOUND = -1; - - /** - * Default prefix used while converting an Iterator to its String representation. - */ - private static final String DEFAULT_TOSTRING_PREFIX = "["; - - /** - * Default suffix used while converting an Iterator to its String representation. - */ - private static final String DEFAULT_TOSTRING_SUFFIX = "]"; -} diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java index 67c5b154a6e..e8e877d45d8 100644 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java @@ -22,6 +22,7 @@ import java.util.Iterator; import java.util.NoSuchElementException; +import org.apache.commons.collections4.list.AbstractLinkedListForJava21; import org.apache.jackrabbit.spi.Name; import org.apache.jackrabbit.spi.Path; @@ -30,7 +31,7 @@ * LinkNode which links the entries of the list. */ @SuppressWarnings("rawtypes") -class LinkedEntries extends CopyOfAbstractLinkedList { +class LinkedEntries extends AbstractLinkedListForJava21 { private Node header; private volatile int modCount; diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 881258215d4..1898d002e77 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -454,7 +454,7 @@ org.apache.commons commons-collections4 - 4.4 + 4.5.0-M2 commons-io From bfa0187b685fbdc00b05a14ffb034f4ef6ee520e Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Sun, 4 Aug 2024 11:16:53 +0200 Subject: [PATCH 217/271] JCR-5093 Remove Commons IO dependency from JCR2SPI (#211) --- jackrabbit-jcr2spi/pom.xml | 4 ---- .../org/apache/jackrabbit/jcr2spi/BinaryTest.java | 13 +++++++------ .../jackrabbit/jcr2spi/CopyMoveToJsonTest.java | 15 +++++++++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 3ae901c2f59..3100aeccef2 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -128,10 +128,6 @@ org.apache.commons commons-collections4 - - commons-io - commons-io - concurrent concurrent diff --git a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/BinaryTest.java b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/BinaryTest.java index a01d8209baa..11651c78470 100644 --- a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/BinaryTest.java +++ b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/BinaryTest.java @@ -16,19 +16,18 @@ */ package org.apache.jackrabbit.jcr2spi; -import java.util.Random; - import static org.junit.Assert.assertArrayEquals; import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Random; +import javax.jcr.Binary; import javax.jcr.Node; -import javax.jcr.Session; import javax.jcr.Property; -import javax.jcr.Binary; +import javax.jcr.Session; import javax.jcr.ValueFormatException; -import org.apache.commons.io.IOUtils; import org.apache.jackrabbit.jcr2spi.state.PropertyState; import org.apache.jackrabbit.spi.QValue; import org.apache.jackrabbit.test.AbstractJCRTest; @@ -186,7 +185,9 @@ public void testStreamIntegrity() throws Exception { // check the binaries are indeed the same (JCR-4154) byte[] result = new byte[bytes.length]; - IOUtils.readFully(p.getBinary().getStream(), result); + try (InputStream in = p.getBinary().getStream()) { + result = in.readAllBytes(); + } assertArrayEquals(bytes, result); } finally { s.logout(); diff --git a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java index 9b7e6c26b4d..2ac41fee50c 100755 --- a/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java +++ b/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java @@ -17,14 +17,15 @@ package org.apache.jackrabbit.jcr2spi; import java.io.ByteArrayInputStream; +import java.io.InputStream; import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.RepositoryException; import javax.jcr.Session; -import org.apache.commons.io.IOUtils; import org.apache.jackrabbit.JcrConstants; import org.apache.jackrabbit.test.AbstractJCRTest; @@ -39,7 +40,9 @@ public void testCreateJson() throws Exception { try { Property p = s.getNode(testRoot).getNode("test.json").getNode(JcrConstants.JCR_CONTENT) .getProperty(JcrConstants.JCR_DATA); - assertEquals(jsondata, IOUtils.toString(p.getBinary().getStream(), "UTF-8")); + try (InputStream in = p.getBinary().getStream()) { + assertEquals(jsondata, new String(in.readAllBytes(), StandardCharsets.UTF_8)); + } } finally { s.logout(); } @@ -53,7 +56,9 @@ public void testCopyJson() throws Exception { try { Property p = s.getNode(testRoot).getNode("target.json").getNode(JcrConstants.JCR_CONTENT) .getProperty(JcrConstants.JCR_DATA); - assertEquals(jsondata, IOUtils.toString(p.getBinary().getStream(), "UTF-8")); + try (InputStream in = p.getBinary().getStream()) { + assertEquals(jsondata, new String(in.readAllBytes(), StandardCharsets.UTF_8)); + } } finally { s.logout(); } @@ -67,7 +72,9 @@ public void testMoveJson() throws Exception { try { Property p = s.getNode(testRoot).getNode("target.json").getNode(JcrConstants.JCR_CONTENT) .getProperty(JcrConstants.JCR_DATA); - assertEquals(jsondata, IOUtils.toString(p.getBinary().getStream(), "UTF-8")); + try (InputStream in = p.getBinary().getStream()) { + assertEquals(jsondata, new String(in.readAllBytes(), StandardCharsets.UTF_8)); + } } finally { s.logout(); } From 71443c90788153f02c0f99034f72840f7a6302d8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 5 Aug 2024 09:08:49 +0200 Subject: [PATCH 218/271] JCR-5094: webapp: bump htmlunit to 4.4.0 (#212) * JCR-5094: webapp: bump htmlunit to 4.4.0 --- jackrabbit-webapp/pom.xml | 4 ++-- .../test/java/org/apache/jackrabbit/j2ee/TomcatIT.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index cdfea7a376b..8b3384d7d4d 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -102,9 +102,9 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit - 2.70.0 + 4.4.0 test diff --git a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java index b7d4b27aed4..bf2e57a157d 100644 --- a/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java +++ b/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java @@ -30,11 +30,11 @@ import org.apache.tomcat.util.scan.StandardJarScanner; import org.slf4j.bridge.SLF4JBridgeHandler; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlElement; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlElement; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlInput; +import org.htmlunit.html.HtmlPage; public class TomcatIT extends TestCase { From a4a3c7c38b1159472110b80d087549b146eeb54a Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Mon, 5 Aug 2024 17:41:12 +0200 Subject: [PATCH 219/271] JCR-5095 Improve exception handling in TokenBasedLoginTest (#213) --- .../token/TokenBasedLoginTest.java | 263 +++++++++--------- 1 file changed, 125 insertions(+), 138 deletions(-) diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedLoginTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedLoginTest.java index 78d8194e3ea..2e54684e526 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedLoginTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedLoginTest.java @@ -16,6 +16,23 @@ */ package org.apache.jackrabbit.core.security.authentication.token; +import java.lang.Thread.UncaughtExceptionHandler; +import java.security.Principal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import javax.jcr.LoginException; +import javax.jcr.Node; +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.SimpleCredentials; + import org.apache.jackrabbit.api.JackrabbitSession; import org.apache.jackrabbit.api.security.authentication.token.TokenCredentials; import org.apache.jackrabbit.api.security.principal.ItemBasedPrincipal; @@ -26,18 +43,6 @@ import org.apache.jackrabbit.test.NotExecutableException; import org.apache.jackrabbit.test.RepositoryStub; -import javax.jcr.LoginException; -import javax.jcr.Node; -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; -import java.security.Principal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Set; - /** * TokenBasedLoginTest... */ @@ -230,120 +235,69 @@ public void testLogin() throws RepositoryException { * Tests concurrent login on the Repository including token creation. * Test copied and slightly adjusted from org.apache.jackrabbit.core.ConcurrentLoginTest */ - public void testConcurrentLogin() throws RepositoryException, NotExecutableException { - final Exception[] exception = new Exception[1]; - List testRunner = new ArrayList(); - for (int i = 0; i < 10; i++) { - testRunner.add(new Thread(new Runnable() { - public void run() { - for (int i = 0; i < 100; i++) { - try { - SimpleCredentials sc = new SimpleCredentials(testuser.getID(), testuser.getID().toCharArray()); - sc.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); - - Session s = getHelper().getRepository().login(sc); - try { - Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); - assertFalse(tcs.isEmpty()); - } finally { - s.logout(); - } - } catch (Exception e) { - exception[0] = e; - break; - } + public void testConcurrentLogin() throws Throwable { + assertParallelExecutionSucceeds(10, new JcrRunnable() { + public void run() throws RepositoryException { + for (int i = 0; i < 100; i++) { + SimpleCredentials sc = new SimpleCredentials(testuser.getID(), testuser.getID().toCharArray()); + sc.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); + + Session s = getHelper().getRepository().login(sc); + try { + Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); + assertFalse(tcs.isEmpty()); + } finally { + s.logout(); } } - })); - } - - // start threads - for (Object aTestRunner : testRunner) { - ((Thread) aTestRunner).start(); - } - - // join threads - for (Object aTestRunner : testRunner) { - try { - ((Thread) aTestRunner).join(); - } catch (InterruptedException e) { - fail(e.toString()); } - } + }); - if (exception[0] != null) { - fail(exception[0].toString()); - } } /** * Tests concurrent login of 3 different users on the Repository including * token creation. * Test copied and slightly adjusted from org.apache.jackrabbit.core.ConcurrentLoginTest + * @throws InterruptedException */ - public void testConcurrentLoginOfDifferentUsers() throws RepositoryException, NotExecutableException { - final Exception[] exception = new Exception[1]; - List testRunner = new ArrayList(); - for (int i = 0; i < 10; i++) { - testRunner.add(new Thread(new Runnable() { - public void run() { - for (int i = 0; i < 100; i++) { - try { - SimpleCredentials c; - double rand = 3 * Math.random(); - int index = (int) Math.floor(rand); - switch (index) { - case 0: - c = new SimpleCredentials(testuser.getID(), testuser.getID().toCharArray()); - break; - case 1: - c = new SimpleCredentials(getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_SUPERUSER_NAME), getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_SUPERUSER_PWD).toCharArray()); - break; - default: - c = new SimpleCredentials(getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_READONLY_NAME), getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_READONLY_PWD).toCharArray()); - break; - } - c.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); - Session s = getHelper().getRepository().login(c); - try { - Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); - assertFalse(tcs.isEmpty()); - } finally { - s.logout(); - } - } catch (Exception e) { - exception[0] = e; + public void testConcurrentLoginOfDifferentUsers() throws InterruptedException { + assertParallelExecutionSucceeds(10, new JcrRunnable() { + public void run() throws RepositoryException { + for (int i = 0; i < 100; i++) { + SimpleCredentials c; + double rand = 3 * Math.random(); + int index = (int) Math.floor(rand); + switch (index) { + case 0: + c = new SimpleCredentials(testuser.getID(), testuser.getID().toCharArray()); + break; + case 1: + c = new SimpleCredentials(getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_SUPERUSER_NAME), getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_SUPERUSER_PWD).toCharArray()); break; - } + default: + c = new SimpleCredentials(getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_READONLY_NAME), getHelper().getProperty(RepositoryStub.PROP_PREFIX + "." + RepositoryStub.PROP_READONLY_PWD).toCharArray()); + break; + } + c.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); + Session s = getHelper().getRepository().login(c); + try { + Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); + assertFalse(tcs.isEmpty()); + } finally { + s.logout(); } } - })); - } - - // start threads - for (Object aTestRunner : testRunner) { - ((Thread) aTestRunner).start(); - } - - // join threads - for (Object aTestRunner : testRunner) { - try { - ((Thread) aTestRunner).join(); - } catch (InterruptedException e) { - fail(e.toString()); } - } - - if (exception[0] != null) { - fail(exception[0].toString()); - } + }); } /** * Tests concurrent login on the Repository including token creation. * Test copied and slightly adjusted from org.apache.jackrabbit.core.ConcurrentLoginTest + * @throws InterruptedException */ - public void testConcurrentLoginDifferentWorkspaces() throws RepositoryException, NotExecutableException { + public void testConcurrentLoginDifferentWorkspaces() throws RepositoryException, NotExecutableException, InterruptedException { final String testID = testuser.getID(); // check if test is executable @@ -367,53 +321,86 @@ public void testConcurrentLoginDifferentWorkspaces() throws RepositoryException, } } - final Exception[] exception = new Exception[1]; + assertParallelExecutionSucceeds(10, new JcrRunnable() { + public void run() throws RepositoryException { + for (int i = 0; i < 100; i++) { + double rand = wspNames.size() * Math.random(); + int index = (int) Math.floor(rand); + String wspName = wspNames.get(index); + + SimpleCredentials sc = new SimpleCredentials(testID, testID.toCharArray()); + sc.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); + + Session s = getHelper().getRepository().login(sc, wspName); + try { + Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); + assertFalse(tcs.isEmpty()); + } finally { + s.logout(); + } + } + } + }); + } + + static class UncheckedRepositoryException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public UncheckedRepositoryException(RepositoryException e) { + super(e); + } + } + + /** + * Similar to {@link Runnable} but allows to throw {@link RepositoryException} in its {@link #run()} method. + */ + static interface JcrRunnable { + public void run() throws RepositoryException; + } + + private static void assertParallelExecutionSucceeds(int numThreads, JcrRunnable runnable) throws InterruptedException { List testRunner = new ArrayList(); - for (int i = 0; i < 10; i++) { + for (int i = 0; i < numThreads; i++) { testRunner.add(new Thread(new Runnable() { public void run() { - for (int i = 0; i < 100; i++) { - try { - double rand = wspNames.size() * Math.random(); - int index = (int) Math.floor(rand); - String wspName = wspNames.get(index); - - SimpleCredentials sc = new SimpleCredentials(testID, testID.toCharArray()); - sc.setAttribute(TokenBasedAuthentication.TOKEN_ATTRIBUTE, ""); - - Session s = getHelper().getRepository().login(sc, wspName); - try { - Set tcs = ((SessionImpl) s).getSubject().getPublicCredentials(TokenCredentials.class); - assertFalse(tcs.isEmpty()); - } finally { - s.logout(); - } - - } catch (Exception e) { - exception[0] = e; - break; - } + try { + runnable.run(); + } catch (RepositoryException e) { + throw new UncheckedRepositoryException(e); } } })); } + assertThreadExecutionSucceeds(testRunner); + } + /** + * Executes all given threads and waits for them to finish. Exception in any of the thread will make the calling thread die with an exception as well + * @param testRunner the threads to execute + * @throws InterruptedException + */ + private static void assertThreadExecutionSucceeds(Collection testRunner) throws InterruptedException { + Map threadExceptions = new ConcurrentHashMap<>(); // start threads - for (Object aTestRunner : testRunner) { - ((Thread) aTestRunner).start(); + for (Thread aTestRunner : testRunner) { + aTestRunner.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + public void uncaughtException(Thread t, Throwable e) { + threadExceptions.put(t.getName() + " (id " + t.getId() +")", e); + } + } ); + aTestRunner.start(); } // join threads - for (Object aTestRunner : testRunner) { - try { - ((Thread) aTestRunner).join(); - } catch (InterruptedException e) { - fail(e.toString()); - } + for (Thread aTestRunner : testRunner) { + aTestRunner.join(); } - if (exception[0] != null) { - fail(exception[0].toString()); + // only rethrow one exception (put the other ones as suppressed) + IllegalStateException mainException = threadExceptions.entrySet().stream().findFirst().map(e -> new IllegalStateException("Thread " + e.getKey() + " failed", e.getValue())).orElse(null); + if (mainException != null) { + threadExceptions.entrySet().stream().skip(1).forEach(e -> mainException.addSuppressed(new IllegalStateException("Thread " + e.getKey() + " failed", e.getValue()))); + throw mainException; } } } \ No newline at end of file From bda59c786545cfa839ff8f82d6a88d244e035398 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 6 Aug 2024 09:52:51 +0200 Subject: [PATCH 220/271] trivial: Remove prerequisites from POM Those only matter for maven plugins, all other packagings need to use maven-enforcer instead for build time prerequisites --- jackrabbit-parent/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1898d002e77..36a3325c8c6 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -94,10 +94,6 @@ - - 3.2.1 - - javadoc From 85e5d0cca855a2a4c43972fb2f97042a6b81e7e3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 7 Aug 2024 15:22:48 +0200 Subject: [PATCH 221/271] JCR-5096: JcrConstants: refer to the constants in javax.jcr.Property and javax.jcr.nodetype.NodeType (#214) --- .../java/org/apache/jackrabbit/JcrConstants.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index 3b15c90d876..d66c1313e65 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -19,11 +19,19 @@ import javax.jcr.Session; /** - * This Interface defines some of the item names that are defined in the - * jcr spec 1.0, using the default prefixes 'jcr', 'nt' and 'mix'. Please note - * that those prefixes can by redefined by an application using the + * This interface defines some of the item names that are defined in the JCR Specification 1.0, using + * the default prefixes 'jcr', 'nt' and 'mix'. + *

    + * Please note that those prefixes can by redefined by an application using the * {@link Session#setNamespacePrefix(String, String)} method. As a result, the * constants may not refer to the respective items. + *

    + * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType} and + * {@link javax.jcr.Property} are more complete (covering + * JCR 2.0 as well) and also + * define names using expanded form, which is immune to session local + * remappings. */ public interface JcrConstants { /** From 0f914f161e694028d5e21dbb5eb0c0a1ddce9e71 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 19 Aug 2024 07:28:19 +0100 Subject: [PATCH 222/271] JCR-5097: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.68.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 36a3325c8c6..a354ee389f8 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.66.0 + 1.68.0 1.22.20 9.4.55.v20240627 From befd56032c285be4159520bda70d4d04fbd1e654 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 20 Aug 2024 08:49:15 +0100 Subject: [PATCH 223/271] JCR-5096: JcrConstants: refer to the constants in javax.jcr.Property and javax.jcr.nodetype.NodeType - fix broken Javadoc --- .../src/main/java/org/apache/jackrabbit/JcrConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index d66c1313e65..e5160ca6cd7 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -20,7 +20,7 @@ /** * This interface defines some of the item names that are defined in the JCR Specification 1.0, using + * href="https://s.apache.org/jcr-1.0-javadoc/">JCR Specification 1.0, using * the default prefixes 'jcr', 'nt' and 'mix'. *

    * Please note that those prefixes can by redefined by an application using the From 6bdc43966272cbcc9b3dc56889e9c0ec1a259248 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 20 Aug 2024 10:40:32 +0100 Subject: [PATCH 224/271] JCR-5098: jackrabbit-jcr-server: Java 24 javadoc errors --- .../jackrabbit/webdav/jcr/property/LengthsProperty.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java index fb1ef82a90b..ebd1b9bce12 100644 --- a/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java +++ b/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/property/LengthsProperty.java @@ -23,7 +23,7 @@ import org.w3c.dom.Element; /** - * LengthsProperty extends {@link org.apache.jackrabbit.webdav.property.DavProperty} providing + * {@code LengthsProperty} extends {@link org.apache.jackrabbit.webdav.property.DavProperty} providing * utilities to handle the multiple lengths of the property item represented * by this resource. */ @@ -32,7 +32,7 @@ public class LengthsProperty extends AbstractDavProperty implements Item private final long[] value; /** - * Create a new LengthsProperty from the given long array. + * Create a new {@code LengthsProperty} from the given long array. * * @param lengths as retrieved from the JCR property */ @@ -42,10 +42,10 @@ public LengthsProperty(long[] lengths) { } /** - * Returns an array of {@link long}s representing the value of this + * Returns an array of {@code long}s representing the value of this * property. * - * @return an array of {@link long}s + * @return an array of {@code long}s */ public long[] getValue() { return value; From 7dc978018d9321d4c4ee0f2b40e99965e7c22450 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 3 Sep 2024 05:30:59 +0200 Subject: [PATCH 225/271] JCR-5099: Update Logback version to 1.2.13 (#215) --- .../src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java | 4 ++-- jackrabbit-parent/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java b/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java index 066656f8517..fb8b0f803b2 100644 --- a/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java +++ b/jackrabbit-it-osgi/src/test/java/org/apache/jackrabbit/osgi/OSGiIT.java @@ -66,8 +66,8 @@ public Option[] configuration() throws IOException, URISyntaxException { mavenBundle("org.apache.felix", "org.apache.felix.fileinstall", "3.2.6"), mavenBundle("org.slf4j", "slf4j-api", "1.7.36"), mavenBundle("commons-logging", "commons-logging", "1.2"), - mavenBundle("ch.qos.logback", "logback-core", "1.2.11"), - mavenBundle("ch.qos.logback", "logback-classic", "1.2.11"), + mavenBundle("ch.qos.logback", "logback-core", "1.2.13"), + mavenBundle("ch.qos.logback", "logback-classic", "1.2.13"), frameworkProperty("repository.home").value("target"), systemProperties( systemProperty("logback.configurationFile") diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index a354ee389f8..4188b3f3be7 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -63,7 +63,7 @@ ${project.build.sourceEncoding} 1.7.36 1.7.36 - 1.2.11 + 1.2.13 11 From 4e97260ff3c062014a652a714d058734834d6dc1 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Sep 2024 14:53:54 +0100 Subject: [PATCH 226/271] JCR-5100: Update commons-cli dependency to 1.9.0 --- jackrabbit-standalone-components/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 1c25db0d1ad..3afa6f0f33c 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -134,7 +134,7 @@ commons-cli commons-cli - 1.8.0 + 1.9.0 commons-chain From 901d44344e2cd24b875cf84b3cd796e6aa6b5eda Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Sep 2024 16:05:11 +0100 Subject: [PATCH 227/271] JCR-5101: Update easymock dependency to 5.4.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4188b3f3be7..79526f6bde3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -612,7 +612,7 @@ org.easymock easymock - 5.3.0 + 5.4.0 junit From 6fa88a1e020c47b75e9755c40de61c4c31586dd3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 5 Sep 2024 16:36:32 +0100 Subject: [PATCH 228/271] JCR-5102: Update mockito dependency to 5.13.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 79526f6bde3..416bbec8fe9 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -622,7 +622,7 @@ org.mockito mockito-core - 5.12.0 + 5.13.0 From ca98beccef5d4cd57d3a6a73db515ed5fcb9185e Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 12 Sep 2024 15:13:13 +0100 Subject: [PATCH 229/271] JCR-5103: Update oak-jackrabbit-api.version.used to Oak 1.22.21 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 416bbec8fe9..6795c301261 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -57,7 +57,7 @@ 1.68.0 - 1.22.20 + 1.22.21 9.4.55.v20240627 2.4.1 ${project.build.sourceEncoding} From 545ca83d78970a81683c791d92d16c1cc44dc82d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 1 Oct 2024 10:07:04 +0200 Subject: [PATCH 230/271] JCR-5104: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.70.0 (#216) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 6795c301261..1dbb71f581f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.68.0 + 1.70.0 1.22.21 9.4.55.v20240627 From 81491e777e2b2204c308a427c3cb2500966719f9 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 3 Oct 2024 17:11:48 +0100 Subject: [PATCH 231/271] JCR-5106: core tests: improve diagnostics in DBDataStoreTest --- .../apache/jackrabbit/core/data/DBDataStoreTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java index 8152d197afa..d1b2c835249 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java @@ -74,7 +74,9 @@ public void testGetRecord() throws Exception { try { assertNotNull(stream); for (int j = 0; j < data.length; j++) { - assertEquals((data[j]) & 0xff, stream.read()); + int b = stream.read(); + assertTrue("early EOF at position " + j + " of stream #" + i, b >= 0); + assertEquals("data should be equal on read of stream #" + i + " at position " + j, (data[j]) & 0xff, b); } assertEquals(-1, stream.read()); } finally { @@ -103,7 +105,7 @@ public void testDbInputStreamReset() throws Exception { // test integrity of replayed bytes byte[] replayedBytes = new byte[data.length]; int length = in.read(replayedBytes); - assertEquals(length, data.length); + assertEquals(data.length, length); for (int i = 0; i < data.length; i++) { log.append(i + " data: " + data[i] + " replayed: " + replayedBytes[i] + "\n"); @@ -175,7 +177,9 @@ public void testConcurrentRead() throws Exception { // verify the contents of all the streams, reading them in parallel for (int i = 0; i < data.length; i++) { for (int j = 0; j < streams.length; j++) { - assertEquals((data[i]) & 0xff, streams[j].read()); + int b = streams[j].read(); + assertTrue("early EOF at position " + i + " of stream #" + j, b >= 0); + assertEquals((data[i]) & 0xff, b); } } From 577da037c0014d0ae024510cc15be70aaed56d0f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 3 Oct 2024 18:52:12 +0100 Subject: [PATCH 232/271] JCR-5107: DbInputStream makes incorrect assumptions about commons-io internals --- .../jackrabbit/core/data/db/DbInputStream.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbInputStream.java b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbInputStream.java index 3bc2f0c50b4..99a482c5760 100644 --- a/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbInputStream.java +++ b/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/db/DbInputStream.java @@ -18,6 +18,7 @@ import java.io.EOFException; import java.io.IOException; +import java.io.InputStream; import java.sql.ResultSet; import org.apache.commons.io.input.AutoCloseInputStream; @@ -40,6 +41,7 @@ public class DbInputStream extends AutoCloseInputStream { protected boolean endOfStream; protected ResultSet rs; + private InputStream initialStream; /** * Create a database input stream for the given identifier. @@ -52,6 +54,7 @@ protected DbInputStream(DbDataStore store, DataIdentifier identifier) { super(null); this.store = store; this.identifier = identifier; + this.initialStream = super.in; } /** @@ -63,13 +66,11 @@ protected void openStream() throws IOException { if (endOfStream) { throw new EOFException(); } - if (in == null) { + if (in == initialStream) { try { in = store.openStream(this, identifier); } catch (DataStoreException e) { - IOException e2 = new IOException(e.getMessage()); - e2.initCause(e); - throw e2; + throw new IOException(e.getMessage(), e); } } } @@ -121,9 +122,9 @@ public int read(byte[] b, int off, int len) throws IOException { * When the stream is consumed, the database objects held by the instance are closed. */ public void close() throws IOException { - if (in != null) { + if (in != initialStream) { in.close(); - in = null; + in = initialStream; // some additional database objects // may need to be closed if (rs != null) { From 8837e8ed71bd1a5879d51cad1c769051738ee734 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 3 Oct 2024 19:35:56 +0100 Subject: [PATCH 233/271] JCR-5105: Update commons-io dependency to 2.17.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1dbb71f581f..4af0172f70c 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -455,7 +455,7 @@ commons-io commons-io - 2.16.1 + 2.17.0 javax.transaction From 5adf0602bbe8ee688ab170a2ab02f2255e245eb5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 09:46:00 +0100 Subject: [PATCH 234/271] JCR-5108: remove commons-collections4 version-specific dependency from jackrabbit-standalone --- jackrabbit-standalone-components/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 3afa6f0f33c..63554a9a2c7 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -150,7 +150,6 @@ org.apache.commons commons-collections4 - 4.4 commons-digester From a4ecbfc1b91212eefe3a24b2b373251a60f60dd5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 11:09:58 +0100 Subject: [PATCH 235/271] JCR-5102: Update mockito dependency to 5.14.1 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4af0172f70c..9d04ca54dc3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -622,7 +622,7 @@ org.mockito mockito-core - 5.13.0 + 5.14.1 From c439f3c82788cf756487f8395fbd1bbfafafdd10 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 11:38:59 +0100 Subject: [PATCH 236/271] JCR-5109: Update tomcat dependency to 9.0.95 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 8b3384d7d4d..30a35f1d79e 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.91 + 9.0.95 From c7812ca323dcd7b81e3601ebc27e6b3dbfe6a44b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 12:13:11 +0100 Subject: [PATCH 237/271] JCR-5110: update aws java sdk version to 1.12.773 --- jackrabbit-aws-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index e2ac772b351..c82908ee57a 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -49,7 +49,7 @@ com.amazonaws aws-java-sdk-s3 - 1.12.761 + 1.12.773 org.apache.jackrabbit From 790dd67089710e57ec3d6f6fb61de24f275e94cf Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 12:37:56 +0100 Subject: [PATCH 238/271] JCR-5111: update kotlin-stdlib dependency to 1.9.25 --- jackrabbit-vfs-ext/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 8e5974ab10a..c00d470277f 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -73,7 +73,7 @@ org.jetbrains.kotlin kotlin-stdlib - 1.9.0 + 1.9.25 org.apache.commons From fd5ceab87417a220aa37b9972dc683cb2e18c7ba Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 13:19:37 +0100 Subject: [PATCH 239/271] JCR-5112: update Jetty to 9.4.56.v20240826 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 9d04ca54dc3..e60852f85ff 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -58,7 +58,7 @@ 1.70.0 1.22.21 - 9.4.55.v20240627 + 9.4.56.v20240826 2.4.1 ${project.build.sourceEncoding} 1.7.36 From 30f05ab19e6cc2afb5dd3cfce3ddc73832a1657b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 13:48:28 +0100 Subject: [PATCH 240/271] JCR-5113: Update pmd-plugin dependency to 3.25.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index e60852f85ff..c4148247f17 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -416,7 +416,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.24.0 + 3.25.0 ${java.version} From 98e413cafac194690c495d397d3c8a325beb51e0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 14:14:41 +0100 Subject: [PATCH 241/271] JCR-5114: update checkstyle-plugin dependency to 3.5.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c4148247f17..d41f9e1cf8f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -411,7 +411,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.4.0 + 3.5.0 org.apache.maven.plugins From df0335953b283fb692eaa751877fccc6bc690eff Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 14:35:10 +0100 Subject: [PATCH 242/271] JCR-5115: Update spotbugs-maven-plugin to 4.8.6.4 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index d41f9e1cf8f..5fd90424c40 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -424,7 +424,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.6.2 + 4.8.6.4 From e8655fe8a314712fec8aa85a2538a0ffdd2d2ec7 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 4 Oct 2024 14:42:04 +0100 Subject: [PATCH 243/271] JCR-5116: Release Jackrabbit 2.23.1-beta - Candidate Release Notes --- RELEASE-NOTES.txt | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index bdaaab6c747..eedb68ca538 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,34 +1,55 @@ -Release Notes -- Apache Jackrabbit -- Version 2.23.0-beta +Release Notes -- Apache Jackrabbit -- Version 2.23.1-beta Introduction ------------ -This is Apache Jackrabbit(TM) 2.23.0-beta, a fully compliant implementation of the +This is Apache Jackrabbit(TM) 2.23.1-beta, a fully compliant implementation of the Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as specified in the Java Specification Request 283 (JSR 283). -Apache Jackrabbit 2.23.0-beta is an unstable release cut directly from +Apache Jackrabbit 2.23.1-beta is an unstable release cut directly from Jackrabbit trunk, with a focus on new features and other improvements. For production use we recommend the latest stable 2.20.x release. -Changes in Jackrabbit 2.23.0-beta +Changes in Jackrabbit 2.23.1-beta ---------------------------------- +Bug + + [JCR-5107] - DbInputStream makes incorrect assumptions about commons-io internals + +Improvement + + [JCR-5093] - jcr2spi: get rid of Commons IO dependency + [JCR-5106] - core tests: improve diagnostics in DBDataStoreTest + +Test + + [JCR-5098] - jackrabbit-jcr-server: Java 24 javadoc errors + Task - [JCR-5073] - core: avoid varargs related compiler warnings in tests - [JCR-5075] - set baseline comparisonVersion to latest stable (2.22.0) - [JCR-5076] - Use correctly test scope for dependencies of type: test-jar - [JCR-5077] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.66.0 - [JCR-5078] - update Apache parent pom to version 33 - [JCR-5079] - Update tomcat dependency to 9.0.91 - [JCR-5080] - Update easymock dependency to 5.3.0 - [JCR-5081] - update aws java sdk version to 1.12.761 - [JCR-5082] - update Jetty to 9.4.55.v20240627 - [JCR-5083] - Update maven-jar-plugin to 3.4.2 - [JCR-5084] - Update pmd-plugin dependency to 3.24.0 - [JCR-5086] - Update spotbugs-maven-plugin to 4.8.6.2 + [JCR-5088] - remove warnings about missing @deprecated annotations + [JCR-5089] - avoid use of deprecated junit.framework.Assert + [JCR-5094] - webapp: bump htmlunit to 4.4.0 + [JCR-5096] - JcrConstants: refer to the constants in javax.jcr.Property and javax.jcr.nodetype.NodeType + [JCR-5097] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.68.0 + [JCR-5099] - Update Logback version to 1.2.13 + [JCR-5100] - Update commons-cli dependency to 1.9.0 + [JCR-5101] - Update easymock dependency to 5.4.0 + [JCR-5102] - Update mockito dependency to 5.14.1 + [JCR-5103] - Update oak-jackrabbit-api.version.used to Oak 1.22.21 + [JCR-5104] - Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.70.0 + [JCR-5105] - Update commons-io dependency to 2.17.0 + [JCR-5108] - remove commons-collections4 version-specific dependency from jackrabbit-standalone + [JCR-5109] - Update tomcat dependency to 9.0.95 + [JCR-5110] - update aws java sdk version to 1.12.773 + [JCR-5111] - update kotlin-stdlib dependency to 1.9.25 + [JCR-5112] - update Jetty to 9.4.56.v20240826 + [JCR-5113] - Update pmd-plugin dependency to 3.25.0 + [JCR-5114] - update checkstyle-plugin dependency to 3.5.0 + [JCR-5115] - Update spotbugs-maven-plugin to 4.8.6.4 For more detailed information about all the changes in this and other From cae1e7851c99599547d5af992ea56357f50d05a2 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 8 Oct 2024 11:21:12 +0200 Subject: [PATCH 244/271] [maven-release-plugin] prepare release jackrabbit-2.23.1-beta --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 6 +++--- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index c82908ee57a..36e3169c075 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 58ab9a284e5..023e40bdb0d 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index 8db1c255af1..db63f36211b 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index c92d0988e37..44ae59d334b 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 67d93389994..184872aceb4 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 71ddc4c2dd6..75d9cc2d52d 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 5ca50204f20..3407bebfecc 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 5fe9210f413..6222700eb23 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 4d607938135..906f2de27f4 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 249edab9d97..5a6f43ef938 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index 76851d8ca51..a718845d206 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 3100aeccef2..7dac390b518 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 5fd90424c40..c0d55775dc3 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.23.1-beta-SNAPSHOT + 2.23.1-beta pom @@ -47,7 +47,7 @@ scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git scm:git:https://gitbox.apache.org/repos/asf/jackrabbit.git https://github.com/apache/jackrabbit/tree/${project.scm.tag} - jackrabbit-2.23.0-beta + jackrabbit-2.23.1-beta @@ -76,7 +76,7 @@ 0.0 - 1721227548 + 1728373871 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 6ec57ac0638..557a546d4d7 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index bd6bb30b6c1..4cb10cc672e 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 27a693440c3..21a9315b90e 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index c29b8910174..a106ab30135 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index 63554a9a2c7..aefd61daf09 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index b2872b8ea63..7e6d6882106 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index c00d470277f..5eb4d43fd2d 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 30a35f1d79e..99425a5d73e 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index 57ac2122a6c..cebe1c2bf22 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index e8c4a9a62ac..528a014ca4f 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta-SNAPSHOT + 2.23.1-beta jackrabbit-parent/pom.xml From dae69e7c2444e13e93a11d384aa4c4d430373903 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Tue, 8 Oct 2024 11:21:21 +0200 Subject: [PATCH 245/271] [maven-release-plugin] prepare for next development iteration --- jackrabbit-aws-ext/pom.xml | 2 +- jackrabbit-core/pom.xml | 2 +- jackrabbit-data/pom.xml | 2 +- jackrabbit-it-osgi/pom.xml | 2 +- jackrabbit-jca/pom.xml | 2 +- jackrabbit-jcr-client/pom.xml | 2 +- jackrabbit-jcr-commons/pom.xml | 2 +- jackrabbit-jcr-server/pom.xml | 2 +- jackrabbit-jcr-servlet/pom.xml | 2 +- jackrabbit-jcr-tests/pom.xml | 2 +- jackrabbit-jcr2dav/pom.xml | 2 +- jackrabbit-jcr2spi/pom.xml | 2 +- jackrabbit-parent/pom.xml | 4 ++-- jackrabbit-spi-commons/pom.xml | 2 +- jackrabbit-spi/pom.xml | 2 +- jackrabbit-spi2dav/pom.xml | 2 +- jackrabbit-spi2jcr/pom.xml | 2 +- jackrabbit-standalone-components/pom.xml | 2 +- jackrabbit-standalone/pom.xml | 2 +- jackrabbit-vfs-ext/pom.xml | 2 +- jackrabbit-webapp/pom.xml | 2 +- jackrabbit-webdav/pom.xml | 2 +- pom.xml | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jackrabbit-aws-ext/pom.xml b/jackrabbit-aws-ext/pom.xml index 36e3169c075..c16d7718e3a 100644 --- a/jackrabbit-aws-ext/pom.xml +++ b/jackrabbit-aws-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-aws-ext diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index 023e40bdb0d..ecfaf6740a5 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-core diff --git a/jackrabbit-data/pom.xml b/jackrabbit-data/pom.xml index db63f36211b..2dc8d48acea 100644 --- a/jackrabbit-data/pom.xml +++ b/jackrabbit-data/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-data diff --git a/jackrabbit-it-osgi/pom.xml b/jackrabbit-it-osgi/pom.xml index 44ae59d334b..db8ff449df2 100644 --- a/jackrabbit-it-osgi/pom.xml +++ b/jackrabbit-it-osgi/pom.xml @@ -23,7 +23,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jca/pom.xml b/jackrabbit-jca/pom.xml index 184872aceb4..1366162bf85 100644 --- a/jackrabbit-jca/pom.xml +++ b/jackrabbit-jca/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jca diff --git a/jackrabbit-jcr-client/pom.xml b/jackrabbit-jcr-client/pom.xml index 75d9cc2d52d..e84ce8ce709 100644 --- a/jackrabbit-jcr-client/pom.xml +++ b/jackrabbit-jcr-client/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-client diff --git a/jackrabbit-jcr-commons/pom.xml b/jackrabbit-jcr-commons/pom.xml index 3407bebfecc..b249bb00f91 100644 --- a/jackrabbit-jcr-commons/pom.xml +++ b/jackrabbit-jcr-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-commons diff --git a/jackrabbit-jcr-server/pom.xml b/jackrabbit-jcr-server/pom.xml index 6222700eb23..929f5c3aaa9 100644 --- a/jackrabbit-jcr-server/pom.xml +++ b/jackrabbit-jcr-server/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet/pom.xml b/jackrabbit-jcr-servlet/pom.xml index 906f2de27f4..715c6e7d588 100644 --- a/jackrabbit-jcr-servlet/pom.xml +++ b/jackrabbit-jcr-servlet/pom.xml @@ -22,7 +22,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml diff --git a/jackrabbit-jcr-tests/pom.xml b/jackrabbit-jcr-tests/pom.xml index 5a6f43ef938..a829311864f 100644 --- a/jackrabbit-jcr-tests/pom.xml +++ b/jackrabbit-jcr-tests/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr-tests diff --git a/jackrabbit-jcr2dav/pom.xml b/jackrabbit-jcr2dav/pom.xml index a718845d206..15ca9a62f68 100644 --- a/jackrabbit-jcr2dav/pom.xml +++ b/jackrabbit-jcr2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2dav diff --git a/jackrabbit-jcr2spi/pom.xml b/jackrabbit-jcr2spi/pom.xml index 7dac390b518..d87b86cac90 100644 --- a/jackrabbit-jcr2spi/pom.xml +++ b/jackrabbit-jcr2spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-jcr2spi diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index c0d55775dc3..0d52f3a7596 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -34,7 +34,7 @@ org.apache.jackrabbit jackrabbit-parent Jackrabbit Parent POM - 2.23.1-beta + 2.23.2-beta-SNAPSHOT pom @@ -76,7 +76,7 @@ 0.0 - 1728373871 + 1728379281 3.6.1 diff --git a/jackrabbit-spi-commons/pom.xml b/jackrabbit-spi-commons/pom.xml index 557a546d4d7..f16b4e33442 100644 --- a/jackrabbit-spi-commons/pom.xml +++ b/jackrabbit-spi-commons/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi-commons diff --git a/jackrabbit-spi/pom.xml b/jackrabbit-spi/pom.xml index 4cb10cc672e..7c7d7b86da6 100644 --- a/jackrabbit-spi/pom.xml +++ b/jackrabbit-spi/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi diff --git a/jackrabbit-spi2dav/pom.xml b/jackrabbit-spi2dav/pom.xml index 21a9315b90e..4f5935aeaf9 100644 --- a/jackrabbit-spi2dav/pom.xml +++ b/jackrabbit-spi2dav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2dav diff --git a/jackrabbit-spi2jcr/pom.xml b/jackrabbit-spi2jcr/pom.xml index a106ab30135..eaa313deb1d 100644 --- a/jackrabbit-spi2jcr/pom.xml +++ b/jackrabbit-spi2jcr/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-spi2jcr diff --git a/jackrabbit-standalone-components/pom.xml b/jackrabbit-standalone-components/pom.xml index aefd61daf09..4391f69058e 100644 --- a/jackrabbit-standalone-components/pom.xml +++ b/jackrabbit-standalone-components/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone-components diff --git a/jackrabbit-standalone/pom.xml b/jackrabbit-standalone/pom.xml index 7e6d6882106..fa8e011c8e6 100644 --- a/jackrabbit-standalone/pom.xml +++ b/jackrabbit-standalone/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-standalone diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index 5eb4d43fd2d..fe7841ee9f6 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -20,7 +20,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-vfs-ext diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 99425a5d73e..e0a2e6492d5 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webapp diff --git a/jackrabbit-webdav/pom.xml b/jackrabbit-webdav/pom.xml index cebe1c2bf22..7c27ec28da3 100644 --- a/jackrabbit-webdav/pom.xml +++ b/jackrabbit-webdav/pom.xml @@ -26,7 +26,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT ../jackrabbit-parent/pom.xml jackrabbit-webdav diff --git a/pom.xml b/pom.xml index 528a014ca4f..20726f32c97 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ org.apache.jackrabbit jackrabbit-parent - 2.23.1-beta + 2.23.2-beta-SNAPSHOT jackrabbit-parent/pom.xml From 27cb78632128593ce6cc4cdfd9736839db0ff9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hoh?= Date: Thu, 14 Nov 2024 09:01:28 +0100 Subject: [PATCH 246/271] JCR-5118 Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.72.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0d52f3a7596..0a5da7a7e74 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.70.0 + 1.72.0 1.22.21 9.4.56.v20240826 From 0a9867ebc5a346703253c23b6c0a2dc4c29c0abd Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 9 Dec 2024 13:56:41 +0100 Subject: [PATCH 247/271] JCR-5119: webapp: bump htmlunit to 4.7.0 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index e0a2e6492d5..62b410fcc3e 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -104,7 +104,7 @@ org.htmlunit htmlunit - 4.4.0 + 4.7.0 test From 99daff23d437ee91e519ec0c31cb0b8bafb3080f Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 9 Dec 2024 15:27:24 +0100 Subject: [PATCH 248/271] JCR-5120: webapp: update tomcat dependency to 9.0.97 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 62b410fcc3e..53a568512b6 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.95 + 9.0.97 From 71e2080f5534945bb2e5b33131e3c09d27d4ff3d Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 16 Jan 2025 09:31:11 +0100 Subject: [PATCH 249/271] JCR-5128: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.74.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0a5da7a7e74..0eb3eb76b99 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.72.0 + 1.74.0 1.22.21 9.4.56.v20240826 From 5586c6493f791843c01b1c6a14183eddb784472b Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Fri, 7 Feb 2025 12:23:44 +0100 Subject: [PATCH 250/271] JCR-5127 Explicitly link to constants in expanded form in JCR (#221) 2.0 API Highlight where expanded form names should be used instead --- .../org/apache/jackrabbit/JcrConstants.java | 149 +++++++++--------- 1 file changed, 74 insertions(+), 75 deletions(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index e5160ca6cd7..539705a671a 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -20,210 +20,209 @@ /** * This interface defines some of the item names that are defined in the JCR Specification 1.0, using - * the default prefixes 'jcr', 'nt' and 'mix'. + * href="https://s.apache.org/jcr-1.0-javadoc/">JCR Specification 1.0 in the qualified form, + * using the default prefixes {@code jcr}, {@code nt} and {@code mix}. *

    * Please note that those prefixes can by redefined by an application using the * {@link Session#setNamespacePrefix(String, String)} method. As a result, the * constants may not refer to the respective items. *

    - * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType} and - * {@link javax.jcr.Property} are more complete (covering - * JCR 2.0 as well) and also - * define names using expanded form, which is immune to session local - * remappings. + * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType}, + * {@link javax.jcr.Nodex}, {@link javax.jcr.Property} and {@link javax.jcr.Workspace} + * are more complete (covering JCR 2.0 + * as well) and also define names using expanded form, which is immune to session local + * remappings, so it is recommended to use those constants instead whenever possible. */ public interface JcrConstants { /** - * jcr:autoCreated + * Use {@link javax.jcr.Property#JCR_AUTOCREATED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_AUTOCREATED = "jcr:autoCreated"; /** - * jcr:baseVersion + * Use {@link javax.jcr.Property#JCR_BASE_VERSION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_BASEVERSION = "jcr:baseVersion"; - /** - * jcr:child - */ + public static final String JCR_CHILD = "jcr:child"; /** - * jcr:childNodeDefinition + * Use {@link javax.jcr.Node#JCR_CHILD_NODE_DEFINITION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_CHILDNODEDEFINITION = "jcr:childNodeDefinition"; /** - * jcr:content + * Use {@link javax.jcr.Node#JCR_CONTENT} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_CONTENT = "jcr:content"; /** - * jcr:created + * Use {@link javax.jcr.Property#JCR_CREATED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_CREATED = "jcr:created"; /** - * jcr:data + * Use {@link javax.jcr.Property#JCR_DATA} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_DATA = "jcr:data"; /** - * jcr:defaultPrimaryType + * Use {@link javax.jcr.Property#JCR_DEFAULT_PRIMARY_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_DEFAULTPRIMARYTYPE = "jcr:defaultPrimaryType"; /** - * jcr:defaultValues + * Use {@link javax.jcr.Property#JCR_DEFAULT_VALUES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_DEFAULTVALUES = "jcr:defaultValues"; /** - * jcr:encoding + * Use {@link javax.jcr.Property#JCR_ENCODING} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_ENCODING = "jcr:encoding"; /** - * jcr:frozenMixinTypes + * Use {@link javax.jcr.Property#JCR_FROZEN_MIXIN_TYPES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_FROZENMIXINTYPES = "jcr:frozenMixinTypes"; /** - * jcr:frozenNode + * Use {@link javax.jcr.Node#JCR_FROZEN_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_FROZENNODE = "jcr:frozenNode"; /** - * jcr:frozenPrimaryType + * Use {@link javax.jcr.Property#JCR_FROZEN_PRIMARY_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_FROZENPRIMARYTYPE = "jcr:frozenPrimaryType"; /** - * jcr:frozenUuid + * Use {@link javax.jcr.Property#JCR_FROZEN_UUID} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_FROZENUUID = "jcr:frozenUuid"; /** - * jcr:hasOrderableChildNodes + * Use {@link javax.jcr.Property#JCR_HAS_ORDERABLE_CHILD_NODES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_HASORDERABLECHILDNODES = "jcr:hasOrderableChildNodes"; /** - * jcr:isCheckedOut + * Use {@link javax.jcr.Property#JCR_IS_CHECKED_OUT} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_ISCHECKEDOUT = "jcr:isCheckedOut"; /** - * jcr:isMixin + * Use {@link javax.jcr.Property#JCR_IS_MIXIN} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_ISMIXIN = "jcr:isMixin"; /** - * jcr:language + * Use {@link javax.jcr.Property#JCR_LANGUAGE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_LANGUAGE = "jcr:language"; /** - * jcr:lastModified + * Use {@link javax.jcr.Property#JCR_LAST_MODIFIED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_LASTMODIFIED = "jcr:lastModified"; /** - * jcr:lockIsDeep + * Use {@link javax.jcr.Property#JCR_LOCK_IS_DEEP} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_LOCKISDEEP = "jcr:lockIsDeep"; /** - * jcr:lockOwner + * Use {@link javax.jcr.Property#JCR_LOCK_OWNER} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_LOCKOWNER = "jcr:lockOwner"; /** - * jcr:mandatory + * Use {@link javax.jcr.Property#JCR_MANDATORY} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MANDATORY = "jcr:mandatory"; /** - * jcr:mergeFailed + * Use {@link javax.jcr.Property#JCR_MERGE_FAILED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MERGEFAILED = "jcr:mergeFailed"; /** - * jcr:mimeType + * Use {@link javax.jcr.Property#JCR_MIME_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MIMETYPE = "jcr:mimeType"; /** - * jcr:mixinTypes + * Use {@link javax.jcr.Property#JCR_MIXIN_TYPES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MIXINTYPES = "jcr:mixinTypes"; /** - * jcr:multiple + * Use {@link javax.jcr.Property#JCR_MULTIPLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MULTIPLE = "jcr:multiple"; /** - * jcr:name + * Use {@link javax.jcr.Property#JCR_NAME} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_NAME = "jcr:name"; /** - * jcr:nodeTypeName + * Use {@link javax.jcr.Property#JCR_NODE_TYPE_NAME} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_NODETYPENAME = "jcr:nodeTypeName"; /** - * jcr:onParentVersion + * Use {@link javax.jcr.Property#JCR_ON_PARENT_VERSION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_ONPARENTVERSION = "jcr:onParentVersion"; /** - * jcr:predecessors + * Use {@link javax.jcr.Property#JCR_PREDECESSORS} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_PREDECESSORS = "jcr:predecessors"; /** - * jcr:primaryItemName + * Use {@link javax.jcr.Property#JCR_PRIMARY_ITEM_NAME} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_PRIMARYITEMNAME = "jcr:primaryItemName"; /** - * jcr:primaryType + * Use {@link javax.jcr.Property#JCR_PRIMARY_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_PRIMARYTYPE = "jcr:primaryType"; /** - * jcr:propertyDefinition + * Use {@link javax.jcr.Node#JCR_PROPERTY_DEFINITION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_PROPERTYDEFINITION = "jcr:propertyDefinition"; /** - * jcr:protected + * Use {@link javax.jcr.Property#JCR_PROTECTED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_PROTECTED = "jcr:protected"; /** - * jcr:requiredPrimaryTypes + * Use {@link javax.jcr.Property#JCR_REQUIRED_PRIMARY_TYPES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_REQUIREDPRIMARYTYPES = "jcr:requiredPrimaryTypes"; /** - * jcr:requiredType + * Use {@link javax.jcr.Property#JCR_REQUIRED_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_REQUIREDTYPE = "jcr:requiredType"; /** - * jcr:rootVersion + * Use {@link javax.jcr.Node#JCR_ROOT_VERSION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_ROOTVERSION = "jcr:rootVersion"; /** * jcr:sameNameSiblings + * Use {@link javax.jcr.Property#JCR_SAME_NAME_SIBLINGS} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_SAMENAMESIBLINGS = "jcr:sameNameSiblings"; /** - * jcr:statement + * Use {@link javax.jcr.Property#JCR_STATEMENT} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_STATEMENT = "jcr:statement"; /** - * jcr:successors + * Use {@link javax.jcr.Property#JCR_SUCCESSORS} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_SUCCESSORS = "jcr:successors"; /** - * jcr:supertypes + * Use {@link javax.jcr.Property#JCR_SUPERTYPES} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_SUPERTYPES = "jcr:supertypes"; /** - * jcr:system + * Use {@link javax.jcr.Workspace#NAME_SYSTEM_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_SYSTEM = "jcr:system"; /** - * jcr:uuid + * Use {@link javax.jcr.Property#JCR_UUID} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_UUID = "jcr:uuid"; /** - * jcr:valueConstraints + * Use {@link javax.jcr.Property#JCR_VALUE_CONSTRAINTS} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_VALUECONSTRAINTS = "jcr:valueConstraints"; /** - * jcr:versionHistory + * Use {@link javax.jcr.Property#JCR_VERSION_HISTORY} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_VERSIONHISTORY = "jcr:versionHistory"; /** - * jcr:versionLabels + * Use {@link javax.jcr.Node#JCR_VERSION_LABELS} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_VERSIONLABELS = "jcr:versionLabels"; /** - * jcr:versionStorage + * Use {@link javax.jcr.Workspace#NAME_VERSION_STORAGE_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_VERSIONSTORAGE = "jcr:versionStorage"; /** - * jcr:versionableUuid + * Use {@link javax.jcr.Property#JCR_VERSIONABLE_UUID} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_VERSIONABLEUUID = "jcr:versionableUuid"; @@ -237,75 +236,75 @@ public interface JcrConstants { public static final String JCR_SCORE = "jcr:score"; /** - * mix:lockable + * Use {@link javax.jcr.nodetype.NodeType#MIX_LOCKABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_LOCKABLE = "mix:lockable"; /** - * mix:referenceable + * Use {@link javax.jcr.nodetype.NodeType#MIX_REFERENCEABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_REFERENCEABLE = "mix:referenceable"; /** - * mix:versionable + * Use {@link javax.jcr.nodetype.NodeType#MIX_VERSIONABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_VERSIONABLE = "mix:versionable"; /** - * mix:shareable + * Use {@link javax.jcr.nodetype.NodeType#MIX_SHAREABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_SHAREABLE = "mix:shareable"; /** - * nt:base + * Use {@link javax.jcr.nodetype.NodeType#NT_BASE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_BASE = "nt:base"; /** - * nt:childNodeDefinition + * Use {@link javax.jcr.nodetype.NodeType#NT_CHILD_NODE_DEFINITION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_CHILDNODEDEFINITION = "nt:childNodeDefinition"; /** - * nt:file + * Use {@link javax.jcr.nodetype.NodeType#NT_FILE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_FILE = "nt:file"; /** - * nt:folder + * Use {@link javax.jcr.nodetype.NodeType#NT_FOLDER} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_FOLDER = "nt:folder"; /** - * nt:frozenNode + * Use {@link javax.jcr.nodetype.NodeType#NT_FROZEN_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_FROZENNODE = "nt:frozenNode"; /** - * nt:hierarchyNode + * Use {@link javax.jcr.nodetype.NodeType#NT_HIERARCHY_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_HIERARCHYNODE = "nt:hierarchyNode"; /** - * nt:linkedFile + * Use {@link javax.jcr.nodetype.NodeType#NT_LINKED_FILE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_LINKEDFILE = "nt:linkedFile"; /** - * nt:nodeType + * Use {@link javax.jcr.nodetype.NodeType#NT_NODE_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_NODETYPE = "nt:nodeType"; /** - * nt:propertyDefinition + * Use {@link javax.jcr.nodetype.NodeType#NT_PROPERTY_DEFINITION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_PROPERTYDEFINITION = "nt:propertyDefinition"; /** - * nt:query + * Use {@link javax.jcr.nodetype.NodeType#NT_QUERY} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_QUERY = "nt:query"; /** - * nt:resource + * Use {@link javax.jcr.nodetype.NodeType#NT_RESOURCE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_RESOURCE = "nt:resource"; /** - * nt:unstructured + * Use {@link javax.jcr.nodetype.NodeType#NT_UNSTRUCTURED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_UNSTRUCTURED = "nt:unstructured"; /** - * nt:version + * Use {@link javax.jcr.nodetype.NodeType#NT_VERSION} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_VERSION = "nt:version"; /** - * nt:versionHistory + * Use {@link javax.jcr.nodetype.NodeType#NT_VERSION_HISTORY} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_VERSIONHISTORY = "nt:versionHistory"; /** @@ -313,7 +312,7 @@ public interface JcrConstants { */ public static final String NT_VERSIONLABELS = "nt:versionLabels"; /** - * nt:versionedChild + * Use {@link javax.jcr.nodetype.NodeType#NT_VERSIONED_CHILD} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String NT_VERSIONEDCHILD = "nt:versionedChild"; } From 9f5e1c720cbd15e9bc871946a728b31a0c526fed Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 13 Feb 2025 07:58:49 +0100 Subject: [PATCH 251/271] JCR-5130: Update oak-jackrabbit-api.version.implemented in trunk to Oak 1.76.0 --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 0eb3eb76b99..106753c1945 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -55,7 +55,7 @@ ${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions - 1.74.0 + 1.76.0 1.22.21 9.4.56.v20240826 From 04375445a8eb57f8e0daacdc359f6c23742cac43 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 17 Mar 2025 09:45:24 +0100 Subject: [PATCH 252/271] =?UTF-8?q?JCR-5121:=20Java=2023:=20getSubject=20i?= =?UTF-8?q?s=20supported=20only=20if=20a=20security=20manager=E2=80=A6=20(?= =?UTF-8?q?#222)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * JCR-5121: Java 23: getSubject is supported only if a security manager is allowed - borrowed fix from OAK-11199 * JCR-5121: Java 23: getSubject is supported only if a security manager is allowed - borrowed fix from OAK-11199 * JCR-5121: Java 23: getSubject is supported only if a security manager is allowed - borrowed fix from OAK-11199 - remove unused 'callAs' --- .../jackrabbit/core/RepositoryImpl.java | 6 +- .../core/jdkcompat/Java23Subject.java | 58 +++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jdkcompat/Java23Subject.java diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java index ce105bb7656..95e94d8f7e4 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java @@ -22,8 +22,6 @@ import java.io.OutputStream; import java.io.StringReader; import java.nio.charset.StandardCharsets; -import java.security.AccessControlContext; -import java.security.AccessController; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -80,6 +78,7 @@ import org.apache.jackrabbit.core.gc.GarbageCollector; import org.apache.jackrabbit.core.id.NodeId; import org.apache.jackrabbit.core.id.NodeIdFactory; +import org.apache.jackrabbit.core.jdkcompat.Java23Subject; import org.apache.jackrabbit.core.lock.LockManager; import org.apache.jackrabbit.core.lock.LockManagerImpl; import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry; @@ -1025,8 +1024,7 @@ private Session extendAuthentication(String workspaceName) Subject subject = null; try { - AccessControlContext acc = AccessController.getContext(); - subject = Subject.getSubject(acc); + subject = Java23Subject.getSubject(); } catch (SecurityException e) { log.warn("Can't check for preauthentication. Reason: {}", e.getMessage()); } diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jdkcompat/Java23Subject.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jdkcompat/Java23Subject.java new file mode 100644 index 00000000000..95ea967ee8d --- /dev/null +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jdkcompat/Java23Subject.java @@ -0,0 +1,58 @@ +/* + * 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. + */ +package org.apache.jackrabbit.core.jdkcompat; + +import javax.security.auth.Subject; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.util.concurrent.Callable; + +/** + * This class contains methods replacing the deprecated + * {@link Subject#getSubject(AccessControlContext)} + * and associated methods, which changed their behavior + * with Java 23 (@see https://inside.java/2024/07/08/quality-heads-up). + *

    + * Subset borrowed from org.apache.jackrabbit.oak.commons.jdkcompat + * (see JCR-5121 and OAK-11199). + */ +public class Java23Subject { + + static Method current; + + static { + try { + current = Subject.class.getMethod("current"); + } catch (NoSuchMethodException ignored) {} + } + + public static Subject getSubject() { + Subject result; + if (current != null) { + try { + result = (Subject) current.invoke(null); + } catch (InvocationTargetException | IllegalAccessException e) { + throw new SecurityException(e); + } + } else { + result = Subject.getSubject(AccessController.getContext()); + } + return result; + } +} From 41ec359c6275ec82660f810a16bd0096f5730815 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Mon, 17 Mar 2025 10:10:39 +0100 Subject: [PATCH 253/271] JCR-5127: Explicitly link to constants in expanded form in JCR (fix Javadoc) --- .../src/main/java/org/apache/jackrabbit/JcrConstants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index 539705a671a..2cd9696f8d7 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -28,7 +28,7 @@ * constants may not refer to the respective items. *

    * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType}, - * {@link javax.jcr.Nodex}, {@link javax.jcr.Property} and {@link javax.jcr.Workspace} + * {@link javax.jcr.Node}, {@link javax.jcr.Property} and {@link javax.jcr.Workspace} * are more complete (covering JCR 2.0 * as well) and also define names using expanded form, which is immune to session local * remappings, so it is recommended to use those constants instead whenever possible. @@ -125,7 +125,7 @@ public interface JcrConstants { */ public static final String JCR_MERGEFAILED = "jcr:mergeFailed"; /** - * Use {@link javax.jcr.Property#JCR_MIME_TYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + * Use {@link javax.jcr.Property#JCR_MIMETYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_MIMETYPE = "jcr:mimeType"; /** From 9618754162926633e5f3281fe23033a6f00bab33 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Mar 2025 15:30:55 +0100 Subject: [PATCH 254/271] JCR-5132: webapp: update tomcat dependency to 9.0.102 (#223) --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index 53a568512b6..cc4d74c80e7 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.97 + 9.0.102 From 8dbb48263222da3a19e0a1a9ff10141e4eddb9da Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Mar 2025 15:59:56 +0100 Subject: [PATCH 255/271] JCR-5131: jackrabbit-jcr2spi: switch to commons-collections4 4.5.0-M3 (#224) --- .../jackrabbit/jcr2spi/hierarchy/LinkedEntries.java | 8 ++++---- jackrabbit-parent/pom.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java index e8e877d45d8..1c4a5b957b2 100644 --- a/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java +++ b/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/LinkedEntries.java @@ -22,7 +22,7 @@ import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.commons.collections4.list.AbstractLinkedListForJava21; +import org.apache.commons.collections4.list.AbstractLinkedListJava21; import org.apache.jackrabbit.spi.Name; import org.apache.jackrabbit.spi.Path; @@ -31,7 +31,7 @@ * LinkNode which links the entries of the list. */ @SuppressWarnings("rawtypes") -class LinkedEntries extends AbstractLinkedListForJava21 { +class LinkedEntries extends AbstractLinkedListJava21 { private Node header; private volatile int modCount; @@ -166,7 +166,7 @@ void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) { * * @param value a child node entry. * @return a wrapping {@link LinkedEntries.LinkNode}. - * @see CopyOfAbstractLinkedList#createNode(Object) + * @see AbstractLinkedListJava21#createNode(Object) */ @Override protected Node createNode(Object value) { @@ -175,7 +175,7 @@ protected Node createNode(Object value) { /** * @return a new LinkNode. - * @see CopyOfAbstractLinkedList#createHeaderNode() + * @see AbstractLinkedListJava21#createHeaderNode() */ @Override protected Node createHeaderNode() { diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 106753c1945..b852750350d 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -450,7 +450,7 @@ org.apache.commons commons-collections4 - 4.5.0-M2 + 4.5.0-M3 commons-io From e97e1ebacac1c92bab9f62195e6949e80a081fee Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Wed, 19 Mar 2025 16:02:22 +0100 Subject: [PATCH 256/271] JCR-5133: Update easymock dependency to 5.5.0 (#225) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index b852750350d..1702a1a914b 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -612,7 +612,7 @@ org.easymock easymock - 5.4.0 + 5.5.0 junit From 5de89ffb061a60f60c561fb785dcad06c1d6379a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 27 Mar 2025 11:06:47 +0100 Subject: [PATCH 257/271] JCR-5133: Update easymock dependency to 5.5.0 (#228) From 0f409c159310380f01057102962b8eae0d446dfc Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 27 Mar 2025 11:11:59 +0100 Subject: [PATCH 258/271] JCR-5134: Update oak-jackrabbit-api.version.used to Oak 1.22.22 (#227) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 1702a1a914b..b4ec6ece57f 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -57,7 +57,7 @@ 1.76.0 - 1.22.21 + 1.22.22 9.4.56.v20240826 2.4.1 ${project.build.sourceEncoding} From 5fb875247f2c859ca72114c0ecd22a70192045a3 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 3 Apr 2025 16:02:34 +0200 Subject: [PATCH 259/271] JCR-5138: Borrow JackrabbitSessionImpl tests from Oak (#232) --- .../jackrabbit/api/JackrabbitSessionTest.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 jackrabbit-core/src/test/java/org/apache/jackrabbit/api/JackrabbitSessionTest.java diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/JackrabbitSessionTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/JackrabbitSessionTest.java new file mode 100644 index 00000000000..f1a36298b72 --- /dev/null +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/JackrabbitSessionTest.java @@ -0,0 +1,83 @@ +/* + * 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. + */ +package org.apache.jackrabbit.api; + +import org.apache.jackrabbit.test.AbstractJCRTest; +import org.apache.jackrabbit.test.NotExecutableException; +import org.junit.Ignore; + +import javax.jcr.GuestCredentials; +import javax.jcr.Item; +import javax.jcr.Node; +import javax.jcr.Property; +import javax.jcr.RepositoryException; + +import static org.mockito.Mockito.mock; + +public class JackrabbitSessionTest extends AbstractJCRTest { + + private JackrabbitSession s; + + @Override + protected void setUp() throws Exception { + super.setUp(); + if (superuser instanceof JackrabbitSession) { + s = (JackrabbitSession) superuser; + } else { + throw new NotExecutableException("JackrabbitSession expected"); + } + } + + public void testGetParentOrNullRootNode() throws Exception { + assertNull(s.getParentOrNull(s.getRootNode())); + } + + public void testGetParentOrNull() throws Exception { + Node n = s.getNode(testRoot); + assertEquivalentNode(n, s.getParentOrNull(n.getProperty(Property.JCR_PRIMARY_TYPE))); + assertEquivalentNode(n.getParent(), s.getParentOrNull(n)); + } + + private static void assertEquivalentNode(Node expected, Node result) throws Exception { + assertNotNull(result); + assertEquals(expected.getPath(), result.getPath()); + } + + // @Ignore("Jackrabbit does not check cross-Session request") + public void ignoreTestGetParentOrNullSessionMismatch() throws Exception { + JackrabbitSession guest = (JackrabbitSession) getHelper().getRepository().login(new GuestCredentials()); + try { + guest.getParentOrNull(s.getNode(testRoot)); + fail("RepositoryException expected"); + } catch (RepositoryException e) { + // success + } finally { + guest.logout(); + } + } + + // @Ignore("Jackrabbit does not verify that the Item was obtained from Jackrabbit") + public void ignoreTestGetParentOrNullImplMismatch() { + try { + Item item = mock(Item.class); + s.getParentOrNull(item); + fail("RepositoryException expected"); + } catch (RepositoryException e) { + // success + } + } +} \ No newline at end of file From 7a319093c9864111bb86c9895148e580e0f8259a Mon Sep 17 00:00:00 2001 From: mbaedke Date: Tue, 8 Apr 2025 14:58:46 +0200 Subject: [PATCH 260/271] JCR-5135: Make JNDI support opt-in (#229) Done. --- .../jackrabbit/core/jndi/RegistryHelper.java | 44 +++++++++------- .../RepositoryFactoryImplTest.java | 19 +++++-- .../commons/JndiRepositoryFactory.java | 46 +++++++++------- .../jackrabbit/commons/package-info.java | 2 +- .../commons/repository/JNDIRepository.java | 5 +- .../repository/JNDIRepositoryFactory.java | 41 +++++++++------ .../jackrabbit/commons/JcrUtilsTest.java | 52 +++++++++++++++---- 7 files changed, 140 insertions(+), 69 deletions(-) diff --git a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/RegistryHelper.java b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/RegistryHelper.java index 5a8e406ce17..6784a70e2a1 100644 --- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/RegistryHelper.java +++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/RegistryHelper.java @@ -25,6 +25,8 @@ import org.apache.jackrabbit.api.JackrabbitRepository; +import static org.apache.jackrabbit.commons.JndiRepositoryFactory.JNDI_ENABLED; + /** * JNDI helper functionality. This class contains static utility * methods for binding and unbinding Jackrabbit repositories to and @@ -59,24 +61,28 @@ public static void registerRepository(Context ctx, String name, String repHomeDir, boolean overwrite) throws NamingException, RepositoryException { - Reference reference = new Reference( - Repository.class.getName(), - BindableRepositoryFactory.class.getName(), - null); // no classpath defined - reference.add(new StringRefAddr( - BindableRepository.CONFIGFILEPATH_ADDRTYPE, configFilePath)); - reference.add(new StringRefAddr( - BindableRepository.REPHOMEDIR_ADDRTYPE, repHomeDir)); + if (JNDI_ENABLED) { + Reference reference = new Reference( + Repository.class.getName(), + BindableRepositoryFactory.class.getName(), + null); // no classpath defined + reference.add(new StringRefAddr( + BindableRepository.CONFIGFILEPATH_ADDRTYPE, configFilePath)); + reference.add(new StringRefAddr( + BindableRepository.REPHOMEDIR_ADDRTYPE, repHomeDir)); - // always create instance by using BindableRepositoryFactory - // which maintains an instance cache; - // see http://issues.apache.org/jira/browse/JCR-411 for details - Object obj = new BindableRepositoryFactory().getObjectInstance( - reference, null, null, null); - if (overwrite) { - ctx.rebind(name, obj); + // always create instance by using BindableRepositoryFactory + // which maintains an instance cache; + // see http://issues.apache.org/jira/browse/JCR-411 for details + Object obj = new BindableRepositoryFactory().getObjectInstance( + reference, null, null, null); + if (overwrite) { + ctx.rebind(name, obj); + } else { + ctx.bind(name, obj); + } } else { - ctx.bind(name, obj); + throw new RepositoryException("JNDI is not enabled"); } } @@ -91,8 +97,10 @@ public static void registerRepository(Context ctx, String name, */ public static void unregisterRepository(Context ctx, String name) throws NamingException { - ((JackrabbitRepository) ctx.lookup(name)).shutdown(); - ctx.unbind(name); + if (JNDI_ENABLED) { + ((JackrabbitRepository) ctx.lookup(name)).shutdown(); + ctx.unbind(name); + } } } diff --git a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/RepositoryFactoryImplTest.java b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/RepositoryFactoryImplTest.java index 3d87ecd573e..ebc88392746 100644 --- a/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/RepositoryFactoryImplTest.java +++ b/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/RepositoryFactoryImplTest.java @@ -27,6 +27,7 @@ import javax.naming.Context; import javax.jcr.RepositoryFactory; + import org.apache.jackrabbit.api.JackrabbitRepository; import org.apache.jackrabbit.commons.JcrUtils; import org.apache.jackrabbit.commons.JndiRepositoryFactory; @@ -135,12 +136,22 @@ public void testJNDI() throws Exception { parameters.put(Context.INITIAL_CONTEXT_FACTORY, DummyInitialContextFactory.class.getName()); parameters.put(Context.PROVIDER_URL, "localhost"); InitialContext context = new InitialContext(new Hashtable(parameters)); - RegistryHelper.registerRepository(context, name, - REPO_CONF.getAbsolutePath(), REPO_HOME.getAbsolutePath(), false); + try { + RegistryHelper.registerRepository(context, name, + REPO_CONF.getAbsolutePath(), REPO_HOME.getAbsolutePath(), false); + } catch (RepositoryException expected) {} try { parameters.put(JndiRepositoryFactory.JNDI_NAME, name); - repo = JcrUtils.getRepository(parameters); - checkRepository(repo); + try { + repo = JcrUtils.getRepository(parameters); + } catch (RepositoryException e) { + if (JndiRepositoryFactory.JNDI_ENABLED) { + fail("JNDI repository missing: " + e.getMessage()); + } + } + if (repo != null) { + checkRepository(repo); + } } finally { RegistryHelper.unregisterRepository(context, name); } diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JndiRepositoryFactory.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JndiRepositoryFactory.java index 92274df6f3f..83eca3032f7 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JndiRepositoryFactory.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JndiRepositoryFactory.java @@ -56,6 +56,11 @@ @SuppressWarnings({ "rawtypes", "unchecked" }) public class JndiRepositoryFactory implements RepositoryFactory { + /** + * Disabled by default, see JCR-5135 + */ + public static final boolean JNDI_ENABLED = Boolean.getBoolean("jackrabbit.jndi.enabled"); + /** * The JNDI name parameter name. */ @@ -64,29 +69,32 @@ public class JndiRepositoryFactory implements RepositoryFactory { public Repository getRepository(Map parameters) throws RepositoryException { - if (parameters == null) { - return null; // no default JNDI repository - } else { - Hashtable environment = new Hashtable(parameters); - if (environment.containsKey(JNDI_NAME)) { - String name = environment.remove(JNDI_NAME).toString(); - return getRepository(name, environment); - } else if (environment.containsKey(JcrUtils.REPOSITORY_URI)) { - Object parameter = environment.remove(JcrUtils.REPOSITORY_URI); - try { - URI uri = new URI(parameter.toString().trim()); - if ("jndi".equalsIgnoreCase(uri.getScheme())) { - return getRepository(uri, environment); - } else { - return null; // not a jndi: URI + if (JNDI_ENABLED) { + if (parameters == null) { + return null; // no default JNDI repository + } else { + Hashtable environment = new Hashtable(parameters); + if (environment.containsKey(JNDI_NAME)) { + String name = environment.remove(JNDI_NAME).toString(); + return getRepository(name, environment); + } else if (environment.containsKey(JcrUtils.REPOSITORY_URI)) { + Object parameter = environment.remove(JcrUtils.REPOSITORY_URI); + try { + URI uri = new URI(parameter.toString().trim()); + if ("jndi".equalsIgnoreCase(uri.getScheme())) { + return getRepository(uri, environment); + } else { + return null; // not a jndi: URI + } + } catch (URISyntaxException e) { + return null; // not a valid URI } - } catch (URISyntaxException e) { - return null; // not a valid URI + } else { + return null; // unknown parameters } - } else { - return null; // unknown parameters } } + return null; } private Repository getRepository(URI uri, Hashtable environment) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java index 42b3b486607..7eb2a8d1414 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java @@ -14,5 +14,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@org.osgi.annotation.versioning.Version("2.4.0") +@org.osgi.annotation.versioning.Version("2.5.0") package org.apache.jackrabbit.commons; diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepository.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepository.java index c8eff32952b..ffd94138f6c 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepository.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepository.java @@ -24,9 +24,13 @@ * does not need to exist when this class is instantiated. The JNDI entry * can also be replaced with another repository during the lifetime of an * instance of this class. + *

    + * This class is deprecated and will be removed in future releases. * * @since 1.4 + * @deprecated use {@link ProxyRepository} instead */ +@Deprecated(forRemoval = true) public class JNDIRepository extends ProxyRepository { /** @@ -38,5 +42,4 @@ public class JNDIRepository extends ProxyRepository { public JNDIRepository(Context context, String name) { super(new JNDIRepositoryFactory(context, name)); } - } diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepositoryFactory.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepositoryFactory.java index 15646532644..c211c44444f 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepositoryFactory.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/repository/JNDIRepositoryFactory.java @@ -21,11 +21,17 @@ import javax.naming.Context; import javax.naming.NamingException; +import static org.apache.jackrabbit.commons.JndiRepositoryFactory.JNDI_ENABLED; + /** * Factory that looks up a repository from JNDI. + *

    + * This class is deprecated and will be removed in future releases. * * @since 1.4 + * @deprecated use {@link org.apache.jackrabbit.commons.JndiRepositoryFactory} instead */ +@Deprecated(forRemoval = true) public class JNDIRepositoryFactory implements RepositoryFactory { /** @@ -56,25 +62,28 @@ public JNDIRepositoryFactory(Context context, String name) { * @throws RepositoryException if the repository can not be found */ public Repository getRepository() throws RepositoryException { - try { - Object repository = context.lookup(name); - if (repository instanceof Repository) { - return (Repository) repository; - } else if (repository == null) { - throw new RepositoryException( - "Repository not found: The JNDI entry " - + name + " is null"); - } else { + if (JNDI_ENABLED) { + try { + Object repository = context.lookup(name); + if (repository instanceof Repository) { + return (Repository) repository; + } else if (repository == null) { + throw new RepositoryException( + "Repository not found: The JNDI entry " + + name + " is null"); + } else { + throw new RepositoryException( + "Invalid repository: The JNDI entry " + + name + " is an instance of " + + repository.getClass().getName()); + } + } catch (NamingException e) { throw new RepositoryException( - "Invalid repository: The JNDI entry " - + name + " is an instance of " - + repository.getClass().getName()); + "Repository not found: The JNDI entry " + name + + " could not be looked up", e); } - } catch (NamingException e) { - throw new RepositoryException( - "Repository not found: The JNDI entry " + name - + " could not be looked up", e); } + return null; } } diff --git a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java index a6a867112be..e44224ee333 100644 --- a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java +++ b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/commons/JcrUtilsTest.java @@ -51,20 +51,52 @@ public void testGetRepository() throws Exception { "java.naming.factory.initial", "org.osjava.sj.memory.MemoryContextFactory"); parameters.put("org.osjava.sj.jndi.shared", "true"); - assertTrue(repository == JcrUtils.getRepository(parameters)); + + // JDNI ist disabled by default + if (JndiRepositoryFactory.JNDI_ENABLED) { + assertTrue(repository == JcrUtils.getRepository(parameters)); + } else { + try { + JcrUtils.getRepository(parameters); + fail("Repository lookup should fail and throw an exception"); + } catch (RepositoryException expected) {} + } // Test lookup with URI query parameters - assertTrue(repository == JcrUtils.getRepository( - "jndi://x" - + "?org.apache.jackrabbit.repository.jndi.name=repository" - + "&org.osjava.sj.jndi.shared=true" - + "&java.naming.factory.initial" - + "=org.osjava.sj.memory.MemoryContextFactory")); + // JDNI ist disabled by default + if (JndiRepositoryFactory.JNDI_ENABLED) { + assertTrue(repository == JcrUtils.getRepository( + "jndi://x" + + "?org.apache.jackrabbit.repository.jndi.name=repository" + + "&org.osjava.sj.jndi.shared=true" + + "&java.naming.factory.initial" + + "=org.osjava.sj.memory.MemoryContextFactory")); + } else { + try { + JcrUtils.getRepository( + "jndi://x" + + "?org.apache.jackrabbit.repository.jndi.name=repository" + + "&org.osjava.sj.jndi.shared=true" + + "&java.naming.factory.initial" + + "=org.osjava.sj.memory.MemoryContextFactory"); + fail("Repository lookup should fail and throw an exception"); + } catch (RepositoryException expected) {} + } // Test lookup with the custom JNDI URI format (JCR-2771) - assertTrue(repository == JcrUtils.getRepository( - "jndi://org.osjava.sj.memory.MemoryContextFactory/repository" - + "?org.osjava.sj.jndi.shared=true")); + // JDNI ist disabled by default + if (JndiRepositoryFactory.JNDI_ENABLED) { + assertTrue(repository == JcrUtils.getRepository( + "jndi://org.osjava.sj.memory.MemoryContextFactory/repository" + + "?org.osjava.sj.jndi.shared=true")); + } else { + try { + JcrUtils.getRepository( + "jndi://org.osjava.sj.memory.MemoryContextFactory/repository" + + "?org.osjava.sj.jndi.shared=true"); + fail("Repository lookup should fail and throw an exception"); + } catch (RepositoryException expected) {} + } try { JcrUtils.getRepository( From 728a437eba1b26e719e96509979bb27c46b914c5 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 8 May 2025 07:30:20 +0200 Subject: [PATCH 261/271] JCR-5143: Update Mockito dependency to 5.17.0 (#237) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index b4ec6ece57f..4ffadde9aff 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -622,7 +622,7 @@ org.mockito mockito-core - 5.14.1 + 5.17.0 From d3916361a491545b2759db3c4c4872dec2ac39e0 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 8 May 2025 07:41:54 +0100 Subject: [PATCH 262/271] JCR-5132: webapp: update tomcat dependency to 9.0.104 --- jackrabbit-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-webapp/pom.xml b/jackrabbit-webapp/pom.xml index cc4d74c80e7..6dd596935aa 100644 --- a/jackrabbit-webapp/pom.xml +++ b/jackrabbit-webapp/pom.xml @@ -35,7 +35,7 @@ Web application that hosts and serves a Jackrabbit content repository - 9.0.102 + 9.0.104 From 1d2c61bf2b874985c983fd1c85b4a072d06725d7 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 8 May 2025 11:25:07 +0200 Subject: [PATCH 263/271] JCR-5144: Update to jacoco version 0.8.13 (#238) --- jackrabbit-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-parent/pom.xml b/jackrabbit-parent/pom.xml index 4ffadde9aff..69806585d64 100644 --- a/jackrabbit-parent/pom.xml +++ b/jackrabbit-parent/pom.xml @@ -260,7 +260,7 @@ org.jacoco jacoco-maven-plugin - 0.8.12 + 0.8.13 pre-unit-test From 2561ec4ff49512ab6ec597e199046fa7c58f146a Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 8 May 2025 11:35:30 +0200 Subject: [PATCH 264/271] JCR-5145: Upgrade Commons VFS to 2.10.0 (#240) --- jackrabbit-vfs-ext/pom.xml | 47 +++---------------- .../vfs/ext/ds/TestVFSDataStore.java | 6 ++- 2 files changed, 11 insertions(+), 42 deletions(-) diff --git a/jackrabbit-vfs-ext/pom.xml b/jackrabbit-vfs-ext/pom.xml index fe7841ee9f6..418d84b9e9d 100644 --- a/jackrabbit-vfs-ext/pom.xml +++ b/jackrabbit-vfs-ext/pom.xml @@ -44,57 +44,22 @@ org.apache.commons commons-vfs2 - 2.9.0 + 2.10.0 - commons-logging - commons-logging - - - - org.apache.hadoop - hadoop-hdfs-client - - - - - - org.apache.hadoop - hadoop-hdfs-client - 3.4.0 - - - org.jetbrains.kotlin - kotlin-stdlib-common + commons-io + commons-io - - - org.jetbrains.kotlin - kotlin-stdlib - 1.9.25 - org.apache.commons commons-vfs2-jackrabbit2 - 2.9.0 + 2.10.0 - commons-logging - commons-logging - - - org.apache.httpcomponents - httpclient - - - org.apache.jackrabbit - jackrabbit-webdav - - - org.apache.jackrabbit - jackrabbit-standalone-components + commons-io + commons-io diff --git a/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java b/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java index 869223a31f8..43736aaba2f 100644 --- a/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java +++ b/jackrabbit-vfs-ext/src/test/java/org/apache/jackrabbit/vfs/ext/ds/TestVFSDataStore.java @@ -190,7 +190,11 @@ protected void doSetFileSystemOptionsPropertiesInString() throws Exception { File [] identities = configBuilder.getIdentities(fso); Assert.assertNotNull(identities); Assert.assertEquals(1, identities.length); - Assert.assertEquals("/home/tester/.ssh/id_rsa", FilenameUtils.separatorsToUnix(identities[0].getPath())); + String expectedPath = identities[0].getPath(); + if (FilenameUtils.getPrefixLength(expectedPath) != 0) { + expectedPath = expectedPath.substring(FilenameUtils.getPrefixLength(expectedPath) - 1); + } + Assert.assertEquals("/home/tester/.ssh/id_rsa", FilenameUtils.separatorsToUnix(expectedPath)); Assert.assertEquals(Integer.valueOf(30000), configBuilder.getTimeout(fso)); dataStore.close(); From da98d40a73f7bfd629975c9e8bafac8f2c0e9764 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Thu, 8 May 2025 12:10:37 +0200 Subject: [PATCH 265/271] JCR-5147: remove jackrabbit 1.x performance tests (#241) --- test/performance/jackrabbit10/pom.xml | 62 ------------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit11/pom.xml | 62 ------------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit12/pom.xml | 58 ----------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit13/pom.xml | 52 ---------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit14/pom.xml | 52 ---------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit15/pom.xml | 52 ---------------- .../performance/PerformanceTest.java | 28 --------- test/performance/jackrabbit16/pom.xml | 52 ---------------- .../performance/PerformanceTest.java | 28 --------- test/performance/pom.xml | 7 --- 15 files changed, 593 deletions(-) delete mode 100644 test/performance/jackrabbit10/pom.xml delete mode 100644 test/performance/jackrabbit10/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit11/pom.xml delete mode 100644 test/performance/jackrabbit11/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit12/pom.xml delete mode 100644 test/performance/jackrabbit12/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit13/pom.xml delete mode 100644 test/performance/jackrabbit13/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit14/pom.xml delete mode 100644 test/performance/jackrabbit14/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit15/pom.xml delete mode 100644 test/performance/jackrabbit15/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java delete mode 100644 test/performance/jackrabbit16/pom.xml delete mode 100644 test/performance/jackrabbit16/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java diff --git a/test/performance/jackrabbit10/pom.xml b/test/performance/jackrabbit10/pom.xml deleted file mode 100644 index e30a5c818ef..00000000000 --- a/test/performance/jackrabbit10/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit10 - Jackrabbit 1.0 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.0 - test - - - jsr170 - jcr - - - org.slf4j - slf4j-log4j12 - - - - - - - diff --git a/test/performance/jackrabbit10/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit10/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index 861fe48e062..00000000000 --- a/test/performance/jackrabbit10/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.0"); - } - -} diff --git a/test/performance/jackrabbit11/pom.xml b/test/performance/jackrabbit11/pom.xml deleted file mode 100644 index d0c3c5d2d8f..00000000000 --- a/test/performance/jackrabbit11/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit11 - Jackrabbit 1.1 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.1 - test - - - jsr170 - jcr - - - org.slf4j - slf4j-log4j12 - - - - - - - diff --git a/test/performance/jackrabbit11/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit11/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index 11a7ccebb50..00000000000 --- a/test/performance/jackrabbit11/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.1"); - } - -} diff --git a/test/performance/jackrabbit12/pom.xml b/test/performance/jackrabbit12/pom.xml deleted file mode 100644 index 9ff4fab9700..00000000000 --- a/test/performance/jackrabbit12/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit12 - Jackrabbit 1.2 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.2.1 - test - - - org.slf4j - slf4j-log4j12 - - - - - - - diff --git a/test/performance/jackrabbit12/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit12/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index 76266ef8dd2..00000000000 --- a/test/performance/jackrabbit12/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.2"); - } - -} diff --git a/test/performance/jackrabbit13/pom.xml b/test/performance/jackrabbit13/pom.xml deleted file mode 100644 index 90b5dec10ea..00000000000 --- a/test/performance/jackrabbit13/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit13 - Jackrabbit 1.3 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.3 - test - - - - - diff --git a/test/performance/jackrabbit13/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit13/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index fc4df262cac..00000000000 --- a/test/performance/jackrabbit13/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.3"); - } - -} diff --git a/test/performance/jackrabbit14/pom.xml b/test/performance/jackrabbit14/pom.xml deleted file mode 100644 index b28716fc3a6..00000000000 --- a/test/performance/jackrabbit14/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit14 - Jackrabbit 1.4 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.4 - test - - - - - diff --git a/test/performance/jackrabbit14/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit14/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index ce7d671bc76..00000000000 --- a/test/performance/jackrabbit14/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.4"); - } - -} diff --git a/test/performance/jackrabbit15/pom.xml b/test/performance/jackrabbit15/pom.xml deleted file mode 100644 index 449540d756d..00000000000 --- a/test/performance/jackrabbit15/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit15 - Jackrabbit 1.5 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.5.0 - test - - - - - diff --git a/test/performance/jackrabbit15/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit15/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index 6772594f499..00000000000 --- a/test/performance/jackrabbit15/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.5"); - } - -} diff --git a/test/performance/jackrabbit16/pom.xml b/test/performance/jackrabbit16/pom.xml deleted file mode 100644 index a3a3ad4f086..00000000000 --- a/test/performance/jackrabbit16/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.jackrabbit - jackrabbit-perf-parent - 1-SNAPSHOT - ../parent/pom.xml - - - jackrabbit-perf-jackrabbit16 - Jackrabbit 1.6 Performance Test - - - - org.apache.jackrabbit - jackrabbit-perf-base - ${project.version} - test - - - org.apache.jackrabbit - jackrabbit-core - 1.6.0 - test - - - - - diff --git a/test/performance/jackrabbit16/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java b/test/performance/jackrabbit16/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java deleted file mode 100644 index ecd3a86e52c..00000000000 --- a/test/performance/jackrabbit16/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -package org.apache.jackrabbit.performance; - -import org.testng.annotations.Test; - -public class PerformanceTest extends AbstractPerformanceTest { - - @Test - public void testPerformance() throws Exception { - testPerformance("1.6"); - } - -} diff --git a/test/performance/pom.xml b/test/performance/pom.xml index 4a0330d27e2..177e9159ec3 100644 --- a/test/performance/pom.xml +++ b/test/performance/pom.xml @@ -41,13 +41,6 @@ parent base - jackrabbit20 jackrabbit21 jackrabbit22 From 3c4d0ff7bdb6517b2cb4f84fac77894cd95cf611 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 20 May 2025 17:16:34 +0200 Subject: [PATCH 266/271] JCR-5146 Add mixin constants (#239) --- .../org/apache/jackrabbit/JcrConstants.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index 2cd9696f8d7..df1afbabf66 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -235,14 +235,38 @@ public interface JcrConstants { */ public static final String JCR_SCORE = "jcr:score"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_CREATED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_CREATED = "mix:created"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_LANGUAGE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_LANGUAGE = "mix:language"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_LAST_MODIFIED} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_LAST_MODIFIED = "mix:lastModified"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_LIFECYCLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_LIFECYCLE = "mix:lifecycle"; /** * Use {@link javax.jcr.nodetype.NodeType#MIX_LOCKABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_LOCKABLE = "mix:lockable"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_MIMETYPE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_MIMETYPE = "mix:mimetype"; /** * Use {@link javax.jcr.nodetype.NodeType#MIX_REFERENCEABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_REFERENCEABLE = "mix:referenceable"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_SIMPLE_VERSIONABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_SIMPLE_VERSIONABLE = "mix:simpleVersionable"; /** * Use {@link javax.jcr.nodetype.NodeType#MIX_VERSIONABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ @@ -251,6 +275,10 @@ public interface JcrConstants { * Use {@link javax.jcr.nodetype.NodeType#MIX_SHAREABLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String MIX_SHAREABLE = "mix:shareable"; + /** + * Use {@link javax.jcr.nodetype.NodeType#MIX_TITLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String MIX_TITLE = "mix:title"; /** * Use {@link javax.jcr.nodetype.NodeType#NT_BASE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ From 86ff983715b30c8bdc650c420974a6a63c7bb546 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 20 May 2025 17:22:13 +0200 Subject: [PATCH 267/271] JCR-5150 Add constant for jcr:title --- .../src/main/java/org/apache/jackrabbit/JcrConstants.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java index df1afbabf66..6a4332eb9f8 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java @@ -201,6 +201,10 @@ public interface JcrConstants { * Use {@link javax.jcr.Workspace#NAME_SYSTEM_NODE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ public static final String JCR_SYSTEM = "jcr:system"; + /** + * Use {@link javax.jcr.Property#JCR_TITLE} whenever expanded JCR names are supported (e.g. in JCR API method parameters). + */ + public static final String JCR_TITLE = "jcr:title"; /** * Use {@link javax.jcr.Property#JCR_UUID} whenever expanded JCR names are supported (e.g. in JCR API method parameters). */ From c9adb7bb7474d13f523d5a8351bd7d789c21431b Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 23 May 2025 08:16:29 +0200 Subject: [PATCH 268/271] JCR-5148: remove (comment out) mysql test profile (#242) --- jackrabbit-core/pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jackrabbit-core/pom.xml b/jackrabbit-core/pom.xml index ecfaf6740a5..07176a8342f 100644 --- a/jackrabbit-core/pom.xml +++ b/jackrabbit-core/pom.xml @@ -357,7 +357,7 @@ org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModify Note: the ${config.db.name} database is dropped and re-created in the clean phase. --> - + mssql @@ -443,13 +443,13 @@ org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModify org.codehaus.mojo sql-maven-plugin - + net.sourceforge.jtds jtds @@ -541,13 +541,13 @@ org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModify - + net.sourceforge.jtds jtds From 0067cea7b9024b5a07ddcbc730b67e96fe518571 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 23 May 2025 07:32:10 +0100 Subject: [PATCH 269/271] JCR-5146: Add mixin constants - fix package version --- .../src/main/java/org/apache/jackrabbit/package-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/package-info.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/package-info.java index 26f32fe40f9..3dae34a6ab9 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/package-info.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/package-info.java @@ -14,5 +14,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@org.osgi.annotation.versioning.Version("2.2") +@org.osgi.annotation.versioning.Version("2.3") package org.apache.jackrabbit; From e512a3a65f01dbb2c9b55078085871e6d0fd9ccd Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 10 Jun 2025 20:51:17 +0200 Subject: [PATCH 270/271] JCR-5152 Add method to check if a (local) name is valid according to JCR spec --- .../java/org/apache/jackrabbit/util/Text.java | 32 +++++++++++++++++++ .../apache/jackrabbit/util/package-info.java | 2 +- .../org/apache/jackrabbit/util/TextTest.java | 10 ++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java index 0b860bc904f..b6afc77c1da 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.BitSet; import java.util.Properties; +import java.util.Set; /** * This Class provides some text related utilities @@ -41,6 +42,8 @@ private Text() { */ public static final char[] hexTable = "0123456789abcdef".toCharArray(); + private static final Set INVALID_JCR_LOCAL_NAME_CHARS = Set.of( '/', ':', '[', ']', '*', '|'); + /** * Calculate an MD5 hash of the string given. * @@ -466,6 +469,10 @@ public static String unescape(String string) { * char ::= nonspace | ' ' * nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', '|' or any whitespace character *) * + *

    + * Note that just using this method does not necessarily return a string which is a + * valid local name. + * You still have to take care of invalid XML characters. * * @param name the name to escape * @return the escaped name @@ -567,6 +574,31 @@ public static String unescapeIllegalJcrChars(String name) { return buffer.toString(); } + /** + * Checks if the given name is a valid JCR local name. + *

    + * Note that the return value of {@link #escapeIllegalJcrChars(String)} is not necessarily a valid local name. + * You still have to take care of invalid XML characters. + * + * @param localName the string value to check + * @return true if the name is valid, false otherwise. + * @see JCR 2.0 Spec, ยง3.2.2 Local Names + * @see #escapeIllegalJcrChars(String) + * @since 2.6.0 (Apache Jackrabbit 2.24.0) + */ + public static boolean isValidJcrLocalName(String localName) { + if (localName == null || localName.isEmpty()) { + return false; + } + // self or parent are invalid + if (localName.equals(".") || localName.equals("..")) { + return false; + } + return localName.chars().noneMatch(c -> + INVALID_JCR_LOCAL_NAME_CHARS.contains((char) c) || !XMLChar.isValid(c) + ); + } + /** * Returns the name part of the path. If the given path is already a name * (i.e. contains no slashes) it is returned. diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java index ebb06936161..ccfc068b292 100644 --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java @@ -14,5 +14,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@org.osgi.annotation.versioning.Version("2.5.0") +@org.osgi.annotation.versioning.Version("2.6.0") package org.apache.jackrabbit.util; diff --git a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java index 1375aff26ff..6d034c3834c 100644 --- a/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java +++ b/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java @@ -202,4 +202,14 @@ public void testEscapeXML() { public void testEscapeHTML() { assertEquals("&<>'"", Text.encodeIllegalHTMLCharacters("&<>'\"")); } + + public void testIsValidJcrLocalName() { + assertTrue(Text.isValidJcrLocalName("valid%Name..\n\r test.\"'")); + assertFalse(Text.isValidJcrLocalName("invalid|name")); + assertFalse(Text.isValidJcrLocalName("some:name")); + // containing non XML characters (unicode control character) + assertFalse(Text.isValidJcrLocalName("\u000FinvalidName")); + assertFalse(Text.isValidJcrLocalName("..")); + assertFalse(Text.isValidJcrLocalName(".")); + } } From b962b12c08044e9f01b375dfa97adcb884a50230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Steen=20M=C3=B8ller?= Date: Wed, 18 Jun 2025 15:21:12 +0200 Subject: [PATCH 271/271] JCR-4892: Fix integration tests and improve name/description consistency --- jackrabbit-jcr-server-jakarta/pom.xml | 2 ++ jackrabbit-jcr-server-project/pom.xml | 2 ++ jackrabbit-jcr-servlet-jakarta/pom.xml | 2 ++ jackrabbit-jcr-servlet-project/pom.xml | 3 ++- jackrabbit-webapp-jakarta/pom.xml | 34 ++++++++++++++++---------- jackrabbit-webapp-project/pom.xml | 2 ++ jackrabbit-webdav-jakarta/pom.xml | 2 ++ jackrabbit-webdav-project/pom.xml | 3 ++- 8 files changed, 35 insertions(+), 15 deletions(-) diff --git a/jackrabbit-jcr-server-jakarta/pom.xml b/jackrabbit-jcr-server-jakarta/pom.xml index d8a89d29ea6..30ab1fbfce2 100644 --- a/jackrabbit-jcr-server-jakarta/pom.xml +++ b/jackrabbit-jcr-server-jakarta/pom.xml @@ -24,6 +24,8 @@ ../jackrabbit-jcr-server-project jackrabbit-jcr-server-jakarta + Jackrabbit JCR Server (Jakarta) + WebDAV server implementations for JCR, using supporting the Jakarta Servlet API 5.0, as transformed from the jackrabbit-jcr-server project. diff --git a/jackrabbit-jcr-server-project/pom.xml b/jackrabbit-jcr-server-project/pom.xml index db12f274779..5bc567161dc 100644 --- a/jackrabbit-jcr-server-project/pom.xml +++ b/jackrabbit-jcr-server-project/pom.xml @@ -24,6 +24,8 @@ ../jackrabbit-parent/pom.xml jackrabbit-jcr-server-project + Jackrabbit JCR Server (parent) + Parent project for JCR Server for both legacy Servlet API and Jakarta Servlet API 5.0. pom ../jackrabbit-jcr-server diff --git a/jackrabbit-jcr-servlet-jakarta/pom.xml b/jackrabbit-jcr-servlet-jakarta/pom.xml index bc17bd5cf29..a9153d2e157 100644 --- a/jackrabbit-jcr-servlet-jakarta/pom.xml +++ b/jackrabbit-jcr-servlet-jakarta/pom.xml @@ -24,6 +24,8 @@ ../jackrabbit-jcr-servlet-project jackrabbit-jcr-servlet-jakarta + Jackrabbit JCR Servlets (Jakarta) + Servlets and related classes for easy use of JCR content repositories in web applications, supporting the Jakarta Servlet API 5.0, as transformed from the jackrabbit-jcr-servlet project. diff --git a/jackrabbit-jcr-servlet-project/pom.xml b/jackrabbit-jcr-servlet-project/pom.xml index cc46ee24c16..eb5d1f58548 100644 --- a/jackrabbit-jcr-servlet-project/pom.xml +++ b/jackrabbit-jcr-servlet-project/pom.xml @@ -25,7 +25,8 @@ jackrabbit-jcr-servlet-project pom - Jackrabbit WebDAV Project + Jackrabbit JCR Servlets (parent) + Parent project for JCR servlets for both legacy Servlet API and Jakarta Servlet API 5.0. ../jackrabbit-jcr-servlet ../jackrabbit-jcr-servlet-jakarta diff --git a/jackrabbit-webapp-jakarta/pom.xml b/jackrabbit-webapp-jakarta/pom.xml index c4009ca75d0..f95a6c6f90c 100644 --- a/jackrabbit-webapp-jakarta/pom.xml +++ b/jackrabbit-webapp-jakarta/pom.xml @@ -24,9 +24,11 @@ ../jackrabbit-webapp-project jackrabbit-webapp-jakarta + Jackrabbit Web Application (Jakarta) + Web application that hosts and serves a Jackrabbit content repository. This artifact supports the Jakarta Servlet API 5.0, as transformed from the jackrabbit-webapp project. war - 10.1.6 + 10.1.42 @@ -62,6 +64,7 @@ + @@ -137,18 +140,23 @@ ${tomcat.version} - org.apache.tika - tika-parsers-standard-package - - - org.bouncycastle - bcmail-jdk15on - - - org.bouncycastle - bcprov-jdk15on - - + org.apache.derby + derbytools + test + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jackrabbit-webapp-project/pom.xml b/jackrabbit-webapp-project/pom.xml index d3f65b7ef8c..7ca3ebe94f4 100644 --- a/jackrabbit-webapp-project/pom.xml +++ b/jackrabbit-webapp-project/pom.xml @@ -24,6 +24,8 @@ ../jackrabbit-parent/pom.xml jackrabbit-webapp-project + Jackrabbit Web Application (parent) + Parent project for the Jackrabbit web application for both legacy Servlet API and Jakarta Servlet API 5.0. pom ../jackrabbit-webapp diff --git a/jackrabbit-webdav-jakarta/pom.xml b/jackrabbit-webdav-jakarta/pom.xml index c1688d1dac5..fd2cd36c21b 100644 --- a/jackrabbit-webdav-jakarta/pom.xml +++ b/jackrabbit-webdav-jakarta/pom.xml @@ -24,6 +24,8 @@ ../jackrabbit-webdav-project jackrabbit-webdav-jakarta + Jackrabbit WebDAV Library (Jakarta) + Generic WebDAV Library supporting the Jakarta Servlet API 5.0, transformed from the jackrabbit-webdav project. diff --git a/jackrabbit-webdav-project/pom.xml b/jackrabbit-webdav-project/pom.xml index 00ff0c36159..ae092a1ec67 100644 --- a/jackrabbit-webdav-project/pom.xml +++ b/jackrabbit-webdav-project/pom.xml @@ -25,7 +25,8 @@ jackrabbit-webdav-project pom - Jackrabbit JCR Servlet Project + Jackrabbit WebDAV Library (parent) + Parent project for the two API-versions of the WebDAV Library (legacy Servlet API and Jakarta Servlet API 5.0) ../jackrabbit-webdav ../jackrabbit-webdav-jakarta