jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1421878 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/privilege/PrivilegeConfigurationImpl.java security/privilege/PrivilegeConstants.java spi/security/privilege/PrivilegeConfiguration.java
Date Fri, 14 Dec 2012 14:18:35 GMT
Author: angela
Date: Fri Dec 14 14:18:33 2012
New Revision: 1421878

URL: http://svn.apache.org/viewvc?rev=1421878&view=rev
Log:
OAK-64 : Privilege Management (javadoc)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConfigurationImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConstants.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConfiguration.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConfigurationImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConfigurationImpl.java?rev=1421878&r1=1421877&r2=1421878&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConfigurationImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConfigurationImpl.java
Fri Dec 14 14:18:33 2012
@@ -33,10 +33,11 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeDefinitionReader;
 
 /**
- * PrivilegeConfigurationImpl... TODO
+ * Configuration for the privilege management component.
  */
 public class PrivilegeConfigurationImpl extends SecurityConfiguration.Default implements
PrivilegeConfiguration {
 
+    //---------------------------------------------< PrivilegeConfiguration >---
     @Nonnull
     @Override
     public PrivilegeManager getPrivilegeManager(Root root, NamePathMapper namePathMapper)
{
@@ -49,6 +50,7 @@ public class PrivilegeConfigurationImpl 
         return new PrivilegeDefinitionReaderImpl(tree);
     }
 
+    //----------------------------------------------< SecurityConfiguration >---
     @Nonnull
     @Override
     public RepositoryInitializer getRepositoryInitializer() {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConstants.java?rev=1421878&r1=1421877&r2=1421878&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConstants.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeConstants.java
Fri Dec 14 14:18:33 2012
@@ -24,48 +24,103 @@ import com.google.common.collect.Immutab
 import org.apache.jackrabbit.JcrConstants;
 
 /**
- * PrivilegeConstants... TODO
+ * Internal name constants used for the privilege management.
  */
 public interface PrivilegeConstants {
 
-    // constants for privilege serialization
+    /** Internal (oak) name for the root node of the privilege store. */
     String REP_PRIVILEGES = "rep:privileges";
+    /** Internal (oak) path for the privilege store.*/
     String PRIVILEGES_PATH = '/' + JcrConstants.JCR_SYSTEM + '/' + REP_PRIVILEGES;
 
+    /** Node type name of the root node of the privilege store */
     String NT_REP_PRIVILEGES = "rep:Privileges";
+    /** Node type name of the privilege definition nodes */
     String NT_REP_PRIVILEGE = "rep:Privilege";
 
+    /** Name of the property that defines if the privilege is abstract. */
     String REP_IS_ABSTRACT = "rep:isAbstract";
+    /** Name of the privilege definition property that stores the aggregate privilege names.
*/
     String REP_AGGREGATES = "rep:aggregates";
 
-    // Constants for privilege names
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_READ} privilege
*/
     String JCR_READ = "jcr:read";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_MODIFY_PROPERTIES}
privilege */
     String JCR_MODIFY_PROPERTIES = "jcr:modifyProperties";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_ADD_CHILD_NODES}
privilege */
     String JCR_ADD_CHILD_NODES = "jcr:addChildNodes";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_REMOVE_NODE} privilege
*/
     String JCR_REMOVE_NODE = "jcr:removeNode";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_REMOVE_CHILD_NODES}
privilege */
     String JCR_REMOVE_CHILD_NODES = "jcr:removeChildNodes";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_WRITE} privilege
*/
     String JCR_WRITE = "jcr:write";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_READ_ACCESS_CONTROL}
privilege */
     String JCR_READ_ACCESS_CONTROL = "jcr:readAccessControl";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_MODIFY_ACCESS_CONTROL}
privilege */
     String JCR_MODIFY_ACCESS_CONTROL = "jcr:modifyAccessControl";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_LOCK_MANAGEMENT}
privilege */
     String JCR_LOCK_MANAGEMENT = "jcr:lockManagement";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_VERSION_MANAGEMENT}
privilege */
     String JCR_VERSION_MANAGEMENT = "jcr:versionManagement";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_NODE_TYPE_MANAGEMENT}
privilege */
     String JCR_NODE_TYPE_MANAGEMENT = "jcr:nodeTypeManagement";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_RETENTION_MANAGEMENT}
privilege */
     String JCR_RETENTION_MANAGEMENT = "jcr:retentionManagement";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_LIFECYCLE_MANAGEMENT}
privilege */
     String JCR_LIFECYCLE_MANAGEMENT = "jcr:lifecycleManagement";
+
+    /** Internal (oak) name of the jcr:workspaceManagement privilege */
     String JCR_WORKSPACE_MANAGEMENT = "jcr:workspaceManagement";
+
+    /** Internal (oak) name of the jcr:nodeTypeDefinitionManagement privilege */
     String JCR_NODE_TYPE_DEFINITION_MANAGEMENT = "jcr:nodeTypeDefinitionManagement";
+
+    /** Internal (oak) name of the jcr:namespaceManagement privilege */
     String JCR_NAMESPACE_MANAGEMENT = "jcr:namespaceManagement";
+
+    /** Internal (oak) name of the {@link javax.jcr.security.Privilege#JCR_ALL} privilege
*/
     String JCR_ALL = "jcr:all";
 
+    /** Internal (oak) name of the rep:privilegeManagement privilege */
     String REP_PRIVILEGE_MANAGEMENT = "rep:privilegeManagement";
+    /**
+     * Internal (oak) name of the rep:userManagement privilege
+     * @since OAK 1.0
+     */
     String REP_USER_MANAGEMENT = "rep:userManagement";
+
+    /** Internal (oak) name of the rep:write privilege */
     String REP_WRITE = "rep:write";
+
+    /** Internal (oak) name of the rep:readNodes privilege */
     String REP_READ_NODES = "rep:readNodes";
+
+    /** Internal (oak) name of the rep:readProperties privilege */
     String REP_READ_PROPERTIES = "rep:readProperties";
+
+    /** Internal (oak) name of the rep:addProperties privilege */
     String REP_ADD_PROPERTIES = "rep:addProperties";
+
+    /** Internal (oak) name of the rep:alterProperties privilege */
     String REP_ALTER_PROPERTIES = "rep:alterProperties";
+
+    /** Internal (oak) name of the rep:removeProperties privilege */
     String REP_REMOVE_PROPERTIES = "rep:removeProperties";
 
+    /** The internal names of all built-in privileges that are not aggregates. */
     String[] NON_AGGR_PRIVILEGES = new String[] {
             REP_READ_NODES, REP_READ_PROPERTIES,
             REP_ADD_PROPERTIES, REP_ALTER_PROPERTIES, REP_REMOVE_PROPERTIES,
@@ -75,26 +130,35 @@ public interface PrivilegeConstants {
             JCR_RETENTION_MANAGEMENT, JCR_WORKSPACE_MANAGEMENT, JCR_NODE_TYPE_DEFINITION_MANAGEMENT,
             JCR_NAMESPACE_MANAGEMENT, REP_PRIVILEGE_MANAGEMENT, REP_USER_MANAGEMENT};
 
+    /** The aggregation definition of the jcr:read privilege. */
     String[] AGGR_JCR_READ = new String[] {
             REP_READ_NODES, REP_READ_PROPERTIES
     };
 
+    /** The aggregation definition of the jcr:modifyProperties privilege. */
     String[] AGGR_JCR_MODIFY_PROPERTIES = new String[] {
             REP_ADD_PROPERTIES, REP_ALTER_PROPERTIES, REP_REMOVE_PROPERTIES
     };
 
+    /** The aggregation definition of the jcr:write privilege. */
     String[] AGGR_JCR_WRITE = new String[] {
             JCR_MODIFY_PROPERTIES, JCR_ADD_CHILD_NODES, JCR_REMOVE_CHILD_NODES, JCR_REMOVE_NODE
     };
 
+    /** The aggregation definition of the rep:write privilege. */
     String[] AGGR_REP_WRITE = new String[] {
             JCR_WRITE, JCR_NODE_TYPE_MANAGEMENT
     };
 
+    /** The internal names of all built-in privileges that are aggregates. */
     Map<String, String[]> AGGREGATE_PRIVILEGES = ImmutableMap.of(JCR_READ, AGGR_JCR_READ,
             JCR_MODIFY_PROPERTIES, AGGR_JCR_MODIFY_PROPERTIES,
             JCR_WRITE, AGGR_JCR_WRITE,
             REP_WRITE, AGGR_REP_WRITE);
 
+    /**
+     * The internal names of all property definitions that are associated with
+     * the {@link #NT_REP_PRIVILEGE rep:Privilege} node type
+     */
     Set<String> PRIVILEGE_PROPERTY_NAMES = ImmutableSet.of(REP_IS_ABSTRACT, REP_AGGREGATES);
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConfiguration.java?rev=1421878&r1=1421877&r2=1421878&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConfiguration.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeConfiguration.java
Fri Dec 14 14:18:33 2012
@@ -25,13 +25,27 @@ import org.apache.jackrabbit.oak.namepat
 import org.apache.jackrabbit.oak.spi.security.SecurityConfiguration;
 
 /**
- * PrivilegeConfiguration... TODO
+ * Interface for the privilege management configuration.
  */
 public interface PrivilegeConfiguration extends SecurityConfiguration {
 
+    /**
+     * Creates a new instance of {@link PrivilegeManager}.
+     *
+     * @param root The root for which the privilege manager should be created.
+     * @param namePathMapper The name and path mapper to be used.
+     * @return A new {@code PrivilegeManager}.
+     */
     @Nonnull
     PrivilegeManager getPrivilegeManager(Root root, NamePathMapper namePathMapper);
 
+    /**
+     * Creates a new {@code PrivilegeDefinitionReader} instance for the
+     * specified {@code tree}.
+     *
+     * @param tree The {@code Tree} that is used to read the privilege definitions.
+     * @return A new {@code PrivilegeDefinitionReader}.
+     */
     @Nonnull
     PrivilegeDefinitionReader getPrivilegeDefinitionReader(Tree tree);
 }



Mime
View raw message