directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1050501 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java
Date Fri, 17 Dec 2010 22:03:05 GMT
Author: felixk
Date: Fri Dec 17 22:03:04 2010
New Revision: 1050501

URL: http://svn.apache.org/viewvc?rev=1050501&view=rev
Log:
Make it an enum

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java?rev=1050501&r1=1050500&r2=1050501&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java
Fri Dec 17 22:03:04 2010
@@ -25,93 +25,91 @@ package org.apache.directory.shared.ldap
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class GrantAndDenial
+public enum GrantAndDenial
 {
     // Permissions that may be used in conjunction with any component of
     // <tt>ProtectedItem</tt>s.
     /** Grant for {@link MicroOperation#ADD} */
-    public static final GrantAndDenial GRANT_ADD = new GrantAndDenial( MicroOperation.ADD,
0, true );
+    GRANT_ADD ( MicroOperation.ADD, 0, true ),
 
     /** Denial for {@link MicroOperation#ADD} */
-    public static final GrantAndDenial DENY_ADD = new GrantAndDenial( MicroOperation.ADD,
1, false );
+    DENY_ADD ( MicroOperation.ADD, 1, false ),
 
     /** Grant for {@link MicroOperation#DISCLOSE_ON_ERROR} */
-    public static final GrantAndDenial GRANT_DISCLOSE_ON_ERROR = new GrantAndDenial( MicroOperation.DISCLOSE_ON_ERROR,
-        2, true );
+    GRANT_DISCLOSE_ON_ERROR ( MicroOperation.DISCLOSE_ON_ERROR, 2, true ),
 
     /** Denial for {@link MicroOperation#DISCLOSE_ON_ERROR} */
-    public static final GrantAndDenial DENY_DISCLOSE_ON_ERROR = new GrantAndDenial( MicroOperation.DISCLOSE_ON_ERROR,
-        3, false );
+    DENY_DISCLOSE_ON_ERROR ( MicroOperation.DISCLOSE_ON_ERROR, 3, false ),
 
     /** Grant for {@link MicroOperation#READ} */
-    public static final GrantAndDenial GRANT_READ = new GrantAndDenial( MicroOperation.READ,
4, true );
+    GRANT_READ ( MicroOperation.READ, 4, true ),
 
     /** Denial for {@link MicroOperation#READ} */
-    public static final GrantAndDenial DENY_READ = new GrantAndDenial( MicroOperation.READ,
5, false );
+    DENY_READ ( MicroOperation.READ, 5, false ),
 
     /** Grant for {@link MicroOperation#REMOVE} */
-    public static final GrantAndDenial GRANT_REMOVE = new GrantAndDenial( MicroOperation.REMOVE,
6, true );
+    GRANT_REMOVE ( MicroOperation.REMOVE, 6, true ),
 
     /** Denial for {@link MicroOperation#REMOVE} */
-    public static final GrantAndDenial DENY_REMOVE = new GrantAndDenial( MicroOperation.REMOVE,
7, false );
+    DENY_REMOVE ( MicroOperation.REMOVE, 7, false ),
 
     // Permissions that may be used only in conjunction with the entry
     // component.
     /** Grant for {@link MicroOperation#BROWSE} */
-    public static final GrantAndDenial GRANT_BROWSE = new GrantAndDenial( MicroOperation.BROWSE,
8, true );
+    GRANT_BROWSE ( MicroOperation.BROWSE, 8, true ),
 
     /** Denial for {@link MicroOperation#BROWSE} */
-    public static final GrantAndDenial DENY_BROWSE = new GrantAndDenial( MicroOperation.BROWSE,
9, false );
+    DENY_BROWSE ( MicroOperation.BROWSE, 9, false ),
 
     /** Grant for {@link MicroOperation#EXPORT} */
-    public static final GrantAndDenial GRANT_EXPORT = new GrantAndDenial( MicroOperation.EXPORT,
10, true );
+    GRANT_EXPORT ( MicroOperation.EXPORT, 10, true ),
 
     /** Denial for {@link MicroOperation#EXPORT} */
-    public static final GrantAndDenial DENY_EXPORT = new GrantAndDenial( MicroOperation.EXPORT,
11, false );
+    DENY_EXPORT ( MicroOperation.EXPORT, 11, false ),
 
     /** Grant for {@link MicroOperation#IMPORT} */
-    public static final GrantAndDenial GRANT_IMPORT = new GrantAndDenial( MicroOperation.IMPORT,
12, true );
+    GRANT_IMPORT ( MicroOperation.IMPORT, 12, true ),
 
     /** Denial for {@link MicroOperation#IMPORT} */
-    public static final GrantAndDenial DENY_IMPORT = new GrantAndDenial( MicroOperation.IMPORT,
13, false );
+    DENY_IMPORT ( MicroOperation.IMPORT, 13, false ),
 
     /** Grant for {@link MicroOperation#MODIFY} */
-    public static final GrantAndDenial GRANT_MODIFY = new GrantAndDenial( MicroOperation.MODIFY,
14, true );
+    GRANT_MODIFY ( MicroOperation.MODIFY, 14, true ),
 
     /** Denial for {@link MicroOperation#MODIFY} */
-    public static final GrantAndDenial DENY_MODIFY = new GrantAndDenial( MicroOperation.MODIFY,
15, false );
+    DENY_MODIFY ( MicroOperation.MODIFY, 15, false ),
 
     /** Grant for {@link MicroOperation#RENAME} */
-    public static final GrantAndDenial GRANT_RENAME = new GrantAndDenial( MicroOperation.RENAME,
16, true );
+    GRANT_RENAME ( MicroOperation.RENAME, 16, true ),
 
     /** Denial for {@link MicroOperation#RENAME} */
-    public static final GrantAndDenial DENY_RENAME = new GrantAndDenial( MicroOperation.RENAME,
17, false );
+    DENY_RENAME ( MicroOperation.RENAME, 17, false ),
 
     /** Grant for {@link MicroOperation#RETURN_DN} */
-    public static final GrantAndDenial GRANT_RETURN_DN = new GrantAndDenial( MicroOperation.RETURN_DN,
18, true );
+    GRANT_RETURN_DN ( MicroOperation.RETURN_DN, 18, true ),
 
     /** Denial for {@link MicroOperation#RETURN_DN} */
-    public static final GrantAndDenial DENY_RETURN_DN = new GrantAndDenial( MicroOperation.RETURN_DN,
19, false );
+    DENY_RETURN_DN ( MicroOperation.RETURN_DN, 19, false ),
 
     // Permissions that may be used in conjunction with any component,
     // except entry, of <tt>ProtectedItem</tt>s.
     /** Grant for {@link MicroOperation#COMPARE} */
-    public static final GrantAndDenial GRANT_COMPARE = new GrantAndDenial( MicroOperation.COMPARE,
20, true );
+    GRANT_COMPARE ( MicroOperation.COMPARE, 20, true ),
 
     /** Deny for {@link MicroOperation#COMPARE} */
-    public static final GrantAndDenial DENY_COMPARE = new GrantAndDenial( MicroOperation.COMPARE,
21, false );
+    DENY_COMPARE ( MicroOperation.COMPARE, 21, false ),
 
     /** Grant for {@link MicroOperation#FILTER_MATCH} */
-    public static final GrantAndDenial GRANT_FILTER_MATCH = new GrantAndDenial( MicroOperation.FILTER_MATCH,
22, true );
+    GRANT_FILTER_MATCH ( MicroOperation.FILTER_MATCH, 22, true ),
 
     /** Denial for {@link MicroOperation#FILTER_MATCH} */
-    public static final GrantAndDenial DENY_FILTER_MATCH = new GrantAndDenial( MicroOperation.FILTER_MATCH,
23, false );
+    DENY_FILTER_MATCH ( MicroOperation.FILTER_MATCH, 23, false ),
 
     /** Grant for {@link MicroOperation#INVOKE} */
-    public static final GrantAndDenial GRANT_INVOKE = new GrantAndDenial( MicroOperation.INVOKE,
24, true );
+    GRANT_INVOKE ( MicroOperation.INVOKE, 24, true ),
 
     /** Denial for {@link MicroOperation#INVOKE} */
-    public static final GrantAndDenial DENY_INVOKE = new GrantAndDenial( MicroOperation.INVOKE,
25, false );
+    DENY_INVOKE ( MicroOperation.INVOKE, 25, false );
 
     /** The micro operation. */
     private final MicroOperation microOperation;



Mime
View raw message