jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1511802 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java
Date Thu, 08 Aug 2013 14:25:28 GMT
Author: angela
Date: Thu Aug  8 14:25:28 2013
New Revision: 1511802

URL: http://svn.apache.org/r1511802
Log:
OAK-527: permissions (javadoc)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java?rev=1511802&r1=1511801&r2=1511802&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java
Thu Aug  8 14:25:28 2013
@@ -102,6 +102,9 @@ public final class Permissions {
 
     public static final long READ = READ_NODE | READ_PROPERTY;
 
+    /**
+     * @since OAK 1.0
+     */
     public static final long REMOVE = REMOVE_NODE | REMOVE_PROPERTY;
 
     public static final long SET_PROPERTY = ADD_PROPERTY | MODIFY_PROPERTY | REMOVE_PROPERTY;
@@ -151,6 +154,13 @@ public final class Permissions {
         PERMISSION_NAMES.put(USER_MANAGEMENT, "USER_MANAGEMENT");
     }
 
+    /**
+     * Returns names of the specified permissions.
+     *
+     * @param permissions The permissions for which the string representation
+     * should be collected.
+     * @return The names of the given permissions.
+     */
     public static Set<String> getNames(long permissions) {
         if (PERMISSION_NAMES.containsKey(permissions)) {
             return ImmutableSet.of(PERMISSION_NAMES.get(permissions));
@@ -166,6 +176,15 @@ public final class Permissions {
         }
     }
 
+    /**
+     * Returns the names of the specified permissions separated by ','.
+     *
+     * @param permissions The permissions for which the string representation
+     * should be collected.
+     * @return The names of the given permissions separated by ',' such
+     * that i can be passed to {@link Session#hasPermission(String, String)}
+     * and {@link Session#checkPermission(String, String)}.
+     */
     public static String getString(long permissions) {
         if (PERMISSION_NAMES.containsKey(permissions)) {
             return PERMISSION_NAMES.get(permissions);



Mime
View raw message