jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1547087 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java oak-parent/pom.xml
Date Mon, 02 Dec 2013 16:27:55 GMT
Author: angela
Date: Mon Dec  2 16:27:55 2013
New Revision: 1547087

URL: http://svn.apache.org/r1547087
Log:
OAK-1201 : Implement jackrabbit api specific descriptors

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
    jackrabbit/oak/trunk/oak-parent/pom.xml

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java?rev=1547087&r1=1547086&r2=1547087&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
Mon Dec  2 16:27:55 2013
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.core;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
-
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.jcr.Credentials;
@@ -30,6 +29,7 @@ import javax.jcr.Value;
 import javax.jcr.ValueFactory;
 import javax.security.auth.login.LoginException;
 
+import org.apache.jackrabbit.api.JackrabbitRepository;
 import org.apache.jackrabbit.commons.SimpleValueFactory;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.ContentSession;
@@ -38,10 +38,14 @@ import org.apache.jackrabbit.oak.kernel.
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
+import org.apache.jackrabbit.oak.spi.security.SecurityConfiguration;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 import org.apache.jackrabbit.oak.spi.security.authentication.AuthenticationConfiguration;
 import org.apache.jackrabbit.oak.spi.security.authentication.LoginContext;
 import org.apache.jackrabbit.oak.spi.security.authentication.LoginContextProvider;
+import org.apache.jackrabbit.oak.spi.security.principal.PrincipalConfiguration;
+import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConfiguration;
+import org.apache.jackrabbit.oak.spi.security.user.UserConfiguration;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.util.GenericDescriptors;
 
@@ -174,7 +178,8 @@ public class ContentRepositoryImpl imple
         final ValueFactory valueFactory = new SimpleValueFactory();
         final Value trueValue = valueFactory.createValue(true);
         final Value falseValue = valueFactory.createValue(false);
-        return new GenericDescriptors()
+
+        GenericDescriptors gd = new GenericDescriptors()
                 .put(IDENTIFIER_STABILITY, valueFactory.createValue(Repository.IDENTIFIER_STABILITY_METHOD_DURATION),
true, true)
                 .put(LEVEL_1_SUPPORTED, trueValue, true, true)
                 .put(LEVEL_2_SUPPORTED, trueValue, true, true)
@@ -246,6 +251,21 @@ public class ContentRepositoryImpl imple
                 .put(SPEC_NAME_DESC, valueFactory.createValue("Content Repository for Java
Technology API"), true, true)
                 .put(SPEC_VERSION_DESC, valueFactory.createValue("2.0"), true, true)
                 .put(WRITE_SUPPORTED, trueValue, true, true);
+        // jackrabbit API specific descriptors
+        gd.put(JackrabbitRepository.OPTION_USER_MANAGEMENT_SUPPORTED, falseValue, true, false);
+        gd.put(JackrabbitRepository.OPTION_PRINCIPAL_MANAGEMENT_SUPPORTED, falseValue, true,
false);
+        gd.put(JackrabbitRepository.OPTION_PRIVILEGE_MANAGEMENT_SUPPORTED, falseValue, true,
false);
+        for (SecurityConfiguration sc : securityProvider.getConfigurations()) {
+            String name = sc.getName();
+            if (UserConfiguration.NAME.equals(name)) {
+                gd.put(JackrabbitRepository.OPTION_USER_MANAGEMENT_SUPPORTED, trueValue,
true, false);
+            } else if (PrincipalConfiguration.NAME.equals(name)) {
+                gd.put(JackrabbitRepository.OPTION_PRINCIPAL_MANAGEMENT_SUPPORTED, trueValue,
true, false);
+            } else if (PrivilegeConfiguration.NAME.equals(name)) {
+                gd.put(JackrabbitRepository.OPTION_PRIVILEGE_MANAGEMENT_SUPPORTED, trueValue,
true, false);
+            }
+        }
+        return gd;
     }
 
     /**

Modified: jackrabbit/oak/trunk/oak-parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-parent/pom.xml?rev=1547087&r1=1547086&r2=1547087&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-parent/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-parent/pom.xml Mon Dec  2 16:27:55 2013
@@ -40,7 +40,7 @@
     <project.reporting.outputEncoding>
       ${project.build.sourceEncoding}
     </project.reporting.outputEncoding>
-    <jackrabbit.version>2.7.2</jackrabbit.version>
+    <jackrabbit.version>2.8-SNAPSHOT</jackrabbit.version>
     <mongo.host>127.0.0.1</mongo.host>
     <mongo.port>27017</mongo.port>
     <mongo.db>MongoMKDB</mongo.db>



Mime
View raw message