Author: enorman
Date: Sat Apr 2 18:15:02 2011
New Revision: 1088070
URL: http://svn.apache.org/viewvc?rev=1088070&view=rev
Log:
SLING-2044 Upgrade to jackrabbit 2.2.5
Added:
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml
(with props)
Modified:
sling/trunk/bundles/commons/testing/pom.xml
sling/trunk/bundles/jcr/davex/pom.xml
sling/trunk/bundles/jcr/jackrabbit-server/pom.xml
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultLoginModule.java
sling/trunk/bundles/jcr/webdav/pom.xml
sling/trunk/launchpad/builder/src/main/bundles/list.xml
Modified: sling/trunk/bundles/commons/testing/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/commons/testing/pom.xml?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
--- sling/trunk/bundles/commons/testing/pom.xml (original)
+++ sling/trunk/bundles/commons/testing/pom.xml Sat Apr 2 18:15:02 2011
@@ -87,19 +87,19 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: sling/trunk/bundles/jcr/davex/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/davex/pom.xml?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/davex/pom.xml (original)
+++ sling/trunk/bundles/jcr/davex/pom.xml Sat Apr 2 18:15:02 2011
@@ -95,7 +95,7 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-server</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
Modified: sling/trunk/bundles/jcr/jackrabbit-server/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/pom.xml?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-server/pom.xml (original)
+++ sling/trunk/bundles/jcr/jackrabbit-server/pom.xml Sat Apr 2 18:15:02 2011
@@ -94,9 +94,10 @@
org.apache.sling.jcr.jackrabbit.server.impl.Activator
</Bundle-Activator>
<Export-Package>
-
org.apache.sling.jcr.jackrabbit.server;version=2.1.0,
-
org.apache.sling.jcr.jackrabbit.server.security.*;version=2.0.4-incubator,
-
org.apache.jackrabbit.core.security.principal;version=2.1.1
+
org.apache.sling.jcr.jackrabbit.server;version=2.1.0,
+
org.apache.sling.jcr.jackrabbit.server.security;version=2.0.4-incubator,
+
org.apache.sling.jcr.jackrabbit.server.security.accessmanager;version=2.1.0,
+
org.apache.jackrabbit.core.security.principal;version=2.2.5
</Export-Package>
<Private-Package>
org.apache.sling.jcr.jackrabbit.server.impl.*,
@@ -215,7 +216,7 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified:
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
---
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
(original)
+++
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultAccessManager.java
Sat Apr 2 18:15:02 2011
@@ -23,6 +23,7 @@ import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.security.auth.Subject;
+import org.apache.jackrabbit.core.HierarchyManager;
import org.apache.jackrabbit.core.id.ItemId;
import org.apache.jackrabbit.core.security.AMContext;
import org.apache.jackrabbit.core.security.DefaultAccessManager;
@@ -66,6 +67,11 @@ public class PluggableDefaultAccessManag
// only warn once, then only warn on debug level.
private static int pluginWarning = 0;
+ /**
+ * the hierarchy manager used to resolve path from itemId
+ */
+ private HierarchyManager hierMgr;
+
public PluggableDefaultAccessManager() {
}
@@ -92,6 +98,7 @@ public class PluggableDefaultAccessManag
this.session = context.getSession();
this.subject = context.getSubject();
+ hierMgr = context.getHierarchyManager();
}
public void close() throws Exception {
@@ -128,11 +135,18 @@ public class PluggableDefaultAccessManag
return super.isGranted(parentPath, childName, permissions);
}
- public boolean canRead(Path itemPath) throws RepositoryException {
+ public boolean canRead(Path itemPath, ItemId itemId) throws
RepositoryException {
if (this.sanityCheck()) {
- return
this.accessManagerPlugin.canRead(namePathResolver.getJCRPath(itemPath));
+ String resolvedPath = null;
+ if (itemPath != null) {
+ resolvedPath = namePathResolver.getJCRPath(itemPath);
+ } else if (itemId != null) {
+ Path path = hierMgr.getPath(itemId);
+ resolvedPath = namePathResolver.getJCRPath(path);
+ }
+ return this.accessManagerPlugin.canRead(resolvedPath);
}
- return super.canRead(itemPath);
+ return super.canRead(itemPath, itemId);
}
public boolean canAccess(String workspaceName) throws RepositoryException {
Modified:
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultLoginModule.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultLoginModule.java?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
---
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultLoginModule.java
(original)
+++
sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/security/PluggableDefaultLoginModule.java
Sat Apr 2 18:15:02 2011
@@ -188,4 +188,13 @@ public class PluggableDefaultLoginModule
}
return creds;
}
+
+ @Override
+ protected boolean supportsCredentials(Credentials creds) {
+ if (creds instanceof TrustedCredentials) {
+ return true;
+ }
+ return super.supportsCredentials(creds);
+ }
+
}
Added:
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml?rev=1088070&view=auto
==============================================================================
---
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml
(added)
+++
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml
Sat Apr 2 18:15:02 2011
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<properties>
+
+ <parsers>
+
+ <parser class="org.apache.tika.parser.DefaultParser"/>
+
+ <parser class="org.apache.tika.parser.EmptyParser">
+ <!-- Disable package extraction as it's too resource-intensive -->
+ <mime>application/x-archive</mime>
+ <mime>application/x-bzip</mime>
+ <mime>application/x-bzip2</mime>
+ <mime>application/x-cpio</mime>
+ <mime>application/x-gtar</mime>
+ <mime>application/x-gzip</mime>
+ <mime>application/x-tar</mime>
+ <mime>application/zip</mime>
+ <!-- Disable image extraction as there's no text to be found -->
+ <mime>image/bmp</mime>
+ <mime>image/gif</mime>
+ <mime>image/jpeg</mime>
+ <mime>image/png</mime>
+ <mime>image/vnd.wap.wbmp</mime>
+ <mime>image/x-icon</mime>
+ <mime>image/x-psd</mime>
+ <mime>image/x-xcf</mime>
+ </parser>
+
+ </parsers>
+
+</properties>
\ No newline at end of file
Propchange:
sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/org/apache/jackrabbit/core/query/lucene/tika-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: sling/trunk/bundles/jcr/webdav/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/webdav/pom.xml?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/webdav/pom.xml (original)
+++ sling/trunk/bundles/jcr/webdav/pom.xml Sat Apr 2 18:15:02 2011
@@ -117,7 +117,7 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-server</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
<scope>compile</scope>
</dependency>
Modified: sling/trunk/launchpad/builder/src/main/bundles/list.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/launchpad/builder/src/main/bundles/list.xml?rev=1088070&r1=1088069&r2=1088070&view=diff
==============================================================================
--- sling/trunk/launchpad/builder/src/main/bundles/list.xml (original)
+++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Sat Apr 2 18:15:02
2011
@@ -328,7 +328,7 @@
<bundle>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
</bundle>
<bundle>
<groupId>org.apache.derby</groupId>
@@ -338,12 +338,12 @@
<bundle>
<groupId>org.apache.tika</groupId>
<artifactId>tika-bundle</artifactId>
- <version>0.6</version>
+ <version>0.9</version>
</bundle>
<bundle>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.jackrabbit.server</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
</bundle>
<bundle>
<groupId>org.apache.sling</groupId>
@@ -358,32 +358,32 @@
<bundle>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
</bundle>
<bundle>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-spi</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
</bundle>
<bundle>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-spi-commons</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
</bundle>
<bundle>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-rmi</artifactId>
- <version>2.1.1</version>
+ <version>2.2.5</version>
</bundle>
<bundle>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.webdav</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
</bundle>
<bundle>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.davex</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
</bundle>
</startLevel>
</bundles>