camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1197016 - in /camel/trunk: components/camel-jcr/ components/camel-jcr/src/test/java/org/apache/camel/component/jcr/ components/camel-jcr/src/test/resources/ parent/ platforms/karaf/features/ platforms/karaf/features/src/main/resources/
Date Thu, 03 Nov 2011 09:27:06 GMT
Author: davsclaus
Date: Thu Nov  3 09:27:05 2011
New Revision: 1197016

URL: http://svn.apache.org/viewvc?rev=1197016&view=rev
Log:
CAMEL-2960: camel-jcr upgraded to JCR 2.0 API. Thanks to Bilgin for the patch.

Modified:
    camel/trunk/components/camel-jcr/pom.xml
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
    camel/trunk/components/camel-jcr/src/test/resources/log4j.properties
    camel/trunk/components/camel-jcr/src/test/resources/repository_with_auth.xml
    camel/trunk/parent/pom.xml
    camel/trunk/platforms/karaf/features/pom.xml
    camel/trunk/platforms/karaf/features/src/main/resources/features.xml

Modified: camel/trunk/components/camel-jcr/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/pom.xml?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/pom.xml (original)
+++ camel/trunk/components/camel-jcr/pom.xml Thu Nov  3 09:27:05 2011
@@ -25,6 +25,7 @@
     <version>2.9-SNAPSHOT</version>
     <relativePath>../../parent</relativePath>
   </parent>
+
   <artifactId>camel-jcr</artifactId>
   <packaging>bundle</packaging>
   <name>Camel :: JCR</name>
@@ -47,7 +48,7 @@
     <dependency>
       <groupId>javax.jcr</groupId>
       <artifactId>jcr</artifactId>
-      <version>1.0</version>
+      <version>2.0</version>
     </dependency>
     <!-- test dependencies -->
     <dependency>
@@ -63,6 +64,7 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
Thu Nov  3 09:27:05 2011
@@ -19,16 +19,18 @@ package org.apache.camel.component.jcr;
 import java.io.File;
 import javax.jcr.Repository;
 import javax.jcr.SimpleCredentials;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
 import javax.naming.Context;
 
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.jackrabbit.api.jsr283.security.AccessControlManager;
-import org.apache.jackrabbit.api.jsr283.security.AccessControlPolicyIterator;
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.TransientRepository;
-import org.apache.jackrabbit.core.security.authorization.JackrabbitAccessControlList;
+
 import org.junit.Before;
 
 /**
@@ -76,10 +78,9 @@ public abstract class JcrAuthTestBase ex
         AccessControlPolicyIterator acls = accessControlManager
                 .getApplicablePolicies(permissionsPath);
         if (acls.hasNext()) {
-            JackrabbitAccessControlList acl = (JackrabbitAccessControlList) acls
-                    .nextAccessControlPolicy();
-            acl.addEntry(user.getPrincipal(), accessControlManager
-                    .getSupportedPrivileges(permissionsPath), true);
+            AccessControlList acl = (AccessControlList) acls.nextAccessControlPolicy();
+            acl.addAccessControlEntry(user.getPrincipal(), accessControlManager
+                    .getSupportedPrivileges(permissionsPath));
             accessControlManager.setPolicy(permissionsPath, acl);
         } else {
             throw new Exception("could not set access control for path "

Modified: camel/trunk/components/camel-jcr/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/resources/log4j.properties?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/resources/log4j.properties (original)
+++ camel/trunk/components/camel-jcr/src/test/resources/log4j.properties Thu Nov  3 09:27:05
2011
@@ -23,10 +23,6 @@ log4j.rootLogger=INFO, file
 # uncomment the following to enable camel debugging
 #log4j.logger.org.apache.camel=DEBUG
 
-log4j.logger.org.apache.activemq=WARN
-log4j.logger.org.apache.mina=WARN
-log4j.logger.org.apache.ftpserver=WARN
-
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout

Modified: camel/trunk/components/camel-jcr/src/test/resources/repository_with_auth.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/resources/repository_with_auth.xml?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/resources/repository_with_auth.xml (original)
+++ camel/trunk/components/camel-jcr/src/test/resources/repository_with_auth.xml Thu Nov 
3 09:27:05 2011
@@ -15,7 +15,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"
"http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
+
+<!DOCTYPE Repository
+  PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
+  "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
 
 <!-- Example Repository Configuration File
      Used by
@@ -24,92 +27,95 @@
 -->
 <Repository>
   <!--
-    virtual file system where the repository stores global state
-    (e.g. registered namespaces, custom node types, etc.)
+      virtual file system where the repository stores global state
+      (e.g. registered namespaces, custom node types, etc.)
   -->
   <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
     <param name="path" value="${rep.home}/repository"/>
   </FileSystem>
 
-  <!-- security configuration -->
+  <!--
+      data store configuration
+  -->
+  <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
+
+  <!--
+      security configuration
+  -->
   <Security appName="Jackrabbit">
-	<SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" workspaceName="security"
/>
-    <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager" />
+
+    <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" workspaceName="security"/>
+    <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager"/>
     <LoginModule class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule">
-      <param name="adminId" value="admin" />
+      <param name="adminId" value="admin"/>
     </LoginModule>
+
   </Security>
 
-  <!-- location of workspaces root directory and name of default workspace -->
-  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
   <!--
-    workspace configuration template:
-    used to create the initial workspace if there's no workspace yet
+      location of workspaces root directory and name of default workspace
+  -->
+  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+  <!--
+      workspace configuration template:
+      used to create the initial workspace if there's no workspace yet
   -->
   <Workspace name="${wsp.name}">
     <!--
-      virtual file system of the workspace:
-      class: FQN of class implementing the FileSystem interface
+        virtual file system of the workspace:
+        class: FQN of class implementing the FileSystem interface
     -->
     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-      <param name="path" value="${wsp.home}" />
+      <param name="path" value="${wsp.home}"/>
     </FileSystem>
     <!--
-      persistence manager of the workspace:
-      class: FQN of class implementing the PersistenceManager interface
+        persistence manager of the workspace:
+        class: FQN of class implementing the PersistenceManager interface
     -->
-    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
-      <param name="url" value="jdbc:derby:${wsp.home}/db;create=true" />
-      <param name="schemaObjectPrefix" value="${wsp.name}_" />
+    <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+      <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+      <param name="schemaObjectPrefix" value="${wsp.name}_"/>
     </PersistenceManager>
     <!--
-      Search index and the file system it uses.
-      class: FQN of class implementing the QueryHandler interface
+        Search index and the file system it uses.
+        class: FQN of class implementing the QueryHandler interface
     -->
     <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-      <param name="path" value="${wsp.home}/index" />
-      <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"
/>
-      <param name="extractorPoolSize" value="2" />
-      <param name="supportHighlighting" value="true" />
+      <param name="path" value="${wsp.home}/index"/>
+      <param name="supportHighlighting" value="true"/>
     </SearchIndex>
-
-    <!-- 
-    <WorkspaceSecurity>
-      <AccessControlProvider class="org.apache.jackrabbit.core.security.user.UserAccessControlProvider"/>
-    </WorkspaceSecurity>
-    -->
   </Workspace>
 
-  <!-- Configures the versioning -->
+  <!--
+      Configures the versioning
+  -->
   <Versioning rootPath="${rep.home}/version">
     <!--
-      Configures the filesystem to use for versioning for the respective
-      persistence manager
+        Configures the filesystem to use for versioning for the respective
+        persistence manager
     -->
     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-      <param name="path" value="${rep.home}/version" />
+      <param name="path" value="${rep.home}/version"/>
     </FileSystem>
 
     <!--
-      Configures the persistence manager to be used for persisting version state.
-      Please note that the current versioning implementation is based on
-      a 'normal' persistence manager, but this could change in future
-      implementations.
-    -->
-    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
-      <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true" />
-      <param name="schemaObjectPrefix" value="version_" />
+        Configures the persistence manager to be used for persisting version state.
+        Please note that the current versioning implementation is based on
+        a 'normal' persistence manager, but this could change in future
+        implementations.
+    -->
+    <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+      <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+      <param name="schemaObjectPrefix" value="version_"/>
     </PersistenceManager>
   </Versioning>
 
   <!--
-    Search index for content that is shared repository wide
-    (/jcr:system tree, contains mainly versions)
+      Search index for content that is shared repository wide
+      (/jcr:system tree, contains mainly versions)
   -->
   <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
-    <param name="path" value="${rep.home}/repository/index" />
-    <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"
/>
-    <param name="extractorPoolSize" value="2" />
-    <param name="supportHighlighting" value="true" />
+    <param name="path" value="${rep.home}/repository/index"/>
+    <param name="supportHighlighting" value="true"/>
   </SearchIndex>
 </Repository>

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Nov  3 09:27:05 2011
@@ -94,7 +94,7 @@
     <httpclient-version>3.1</httpclient-version>
     <icu4j-version>4.0.1</icu4j-version>
     <jackson-version>1.8.6</jackson-version>
-    <jackrabbit-version>1.6.4</jackrabbit-version>
+    <jackrabbit-version>2.2.4</jackrabbit-version>
     <jain-sip-ri-bundle-version>1.2.154_1</jain-sip-ri-bundle-version>
     <jasypt-version>1.7</jasypt-version>
     <java-apns-version>0.1.6</java-apns-version>

Modified: camel/trunk/platforms/karaf/features/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/pom.xml?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/pom.xml (original)
+++ camel/trunk/platforms/karaf/features/pom.xml Thu Nov  3 09:27:05 2011
@@ -85,7 +85,6 @@
       <jetty-bundle-version>6.1.26_3</jetty-bundle-version>
       <jexcelapi-bundle-version>2.4.2_2</jexcelapi-bundle-version>
       <javax.el-bundle-version>2.1.0</javax.el-bundle-version>
-      <jcr-bundle-version>1.0_4</jcr-bundle-version>
       <jdom-bundle-version>1.1_3</jdom-bundle-version>
       <jettison-bundle-version>1.3</jettison-bundle-version>
       <jing-bundle-version>20030619_1</jing-bundle-version>

Modified: camel/trunk/platforms/karaf/features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features.xml?rev=1197016&r1=1197015&r2=1197016&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml (original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Thu Nov  3 09:27:05
2011
@@ -350,7 +350,7 @@
     <bundle>mvn:org.apache.camel/camel-jclouds/${pom.version}</bundle>
   </feature>
   <feature name='camel-jcr' version='${pom.version}' resolver='(obr)' start-level='50'>
-    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jcr-api/${jcr-bundle-version}</bundle>
+    <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jcr-api-2.0/1.9.0</bundle>
     <bundle dependency="true">mvn:org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit-version}</bundle>
     <feature version='${pom.version}'>camel-core</feature>
     <bundle>mvn:org.apache.camel/camel-jcr/${pom.version}</bundle>



Mime
View raw message